[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyLibCalls/StrChr.ll

Reid Spencer reid at x10sys.com
Tue May 3 10:09:49 PDT 2005



Changes in directory llvm/test/Regression/Transforms/SimplifyLibCalls:

StrChr.ll updated: 1.1 -> 1.2
---
Log message:

Fix this test to succeed even if "strchr" is on a call instruction.


---
Diffs of the changes:  (+5 -3)

 StrChr.ll |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


Index: llvm/test/Regression/Transforms/SimplifyLibCalls/StrChr.ll
diff -u llvm/test/Regression/Transforms/SimplifyLibCalls/StrChr.ll:1.1 llvm/test/Regression/Transforms/SimplifyLibCalls/StrChr.ll:1.2
--- llvm/test/Regression/Transforms/SimplifyLibCalls/StrChr.ll:1.1	Tue May  3 01:22:41 2005
+++ llvm/test/Regression/Transforms/SimplifyLibCalls/StrChr.ll	Tue May  3 12:09:38 2005
@@ -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 @@
 
   %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
 }






More information about the llvm-commits mailing list