diff options
Diffstat (limited to 'test/Transforms/InstCombine/strchr-1.ll')
-rw-r--r-- | test/Transforms/InstCombine/strchr-1.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/strchr-1.ll b/test/Transforms/InstCombine/strchr-1.ll index 5efab9ec4b..d2c9894621 100644 --- a/test/Transforms/InstCombine/strchr-1.ll +++ b/test/Transforms/InstCombine/strchr-1.ll @@ -52,3 +52,14 @@ define void @test_simplify4(i32 %chr) { store i8* %dst, i8** @chp ret void } + +define void @test_simplify5() { +; CHECK: store i8* getelementptr inbounds ([14 x i8]* @hello, i32 0, i32 13) +; CHECK-NOT: call i8* @strchr +; CHECK: ret void + + %src = getelementptr [14 x i8]* @hello, i32 0, i32 0 + %dst = call i8* @strchr(i8* %src, i32 65280) + store i8* %dst, i8** @chp + ret void +} |