aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-05-03 17:09:38 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-05-03 17:09:38 +0000
commitc88e681498feb35b78a029d029e3de401c75a8d3 (patch)
tree4b1a337b459563f1e76ed8a888dac54dfe68e5f4
parent82be985b990b458933ed3fe1834299eedab400ad (diff)
Fix this test to succeed even if "strchr" is on a call instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21675 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/SimplifyLibCalls/StrChr.ll8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Transforms/SimplifyLibCalls/StrChr.ll b/test/Transforms/SimplifyLibCalls/StrChr.ll
index 7594fee4b1..2d4f5f2dac 100644
--- a/test/Transforms/SimplifyLibCalls/StrChr.ll
+++ b/test/Transforms/SimplifyLibCalls/StrChr.ll
@@ -1,5 +1,5 @@
; Test that the StrChrOptimizer works correctly
-; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*strchr'
+; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*%strchr'
declare sbyte* %strchr(sbyte*,int)
declare int %puts(sbyte*)
@@ -14,6 +14,8 @@ int %main () {
%world = call sbyte* %strchr(sbyte* %hello_p, int 119 )
%ignore = call sbyte* %strchr(sbyte* %null_p, int 119 )
- %result = call int %puts(sbyte* %world)
- ret int %result
+ %len = call int %puts(sbyte* %world)
+ %index = add int %len, 112
+ %result = call sbyte* %strchr(sbyte* %hello_p, int %index)
+ ret int %index
}