Changes in directory llvm/test/Transforms/InstCombine:

store-merge.ll added (r1.1)
---
Log message:

new testcase


---
Diffs of the changes:  (+36 -0)

 store-merge.ll |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+)


Index: llvm/test/Transforms/InstCombine/store-merge.ll
diff -c /dev/null llvm/test/Transforms/InstCombine/store-merge.ll:1.1
*** /dev/null   Sat Apr 14 20:00:47 2007
--- llvm/test/Transforms/InstCombine/store-merge.ll     Sat Apr 14 20:00:37 2007
***************
*** 0 ****
--- 1,36 ----
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 
%storemerge} | wc -l | grep 2
+ ;; Simple sinking tests
+ 
+ ; "if then else"
+ define i32 @test1(i1 %C) {
+       %A = alloca i32
+         br i1 %C, label %Cond, label %Cond2
+ 
+ Cond:
+         store i32 -987654321, i32* %A
+         br label %Cont
+ 
+ Cond2:
+       store i32 47, i32* %A
+       br label %Cont
+ 
+ Cont:
+       %V = load i32* %A
+       ret i32 %V
+ }
+ 
+ ; "if then"
+ define i32 @test2(i1 %C) {
+       %A = alloca i32
+       store i32 47, i32* %A
+         br i1 %C, label %Cond, label %Cont
+ 
+ Cond:
+         store i32 -987654321, i32* %A
+         br label %Cont
+ 
+ Cont:
+       %V = load i32* %A
+       ret i32 %V
+ }
+ 



_______________________________________________
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to