[llvm-commits] CVS: llvm/test/Regression/Transforms/TailDup/PHIUpdateTest.ll basictest.ll
Chris Lattner
lattner at cs.uiuc.edu
Sun Jun 22 15:33:00 PDT 2003
Changes in directory llvm/test/Regression/Transforms/TailDup:
PHIUpdateTest.ll added (r1.1)
basictest.ll added (r1.1)
---
Log message:
New testcases
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/TailDup/PHIUpdateTest.ll
diff -c /dev/null llvm/test/Regression/Transforms/TailDup/PHIUpdateTest.ll:1.1
*** /dev/null Sun Jun 22 15:32:45 2003
--- llvm/test/Regression/Transforms/TailDup/PHIUpdateTest.ll Sun Jun 22 15:32:35 2003
***************
*** 0 ****
--- 1,20 ----
+ ; This test checks to make sure phi nodes are updated properly
+ ;
+ ; RUN: as < %s | opt -tailduplicate -disable-output
+
+
+
+ int %test(bool %c, int %X, int %Y) {
+ br label %L
+
+ L:
+ %A = add int %X, %Y
+ br bool %c, label %T, label %F
+
+ F:
+ br bool %c, label %L, label %T
+
+ T:
+ %V = phi int [%A, %L], [0, %F]
+ ret int %V
+ }
Index: llvm/test/Regression/Transforms/TailDup/basictest.ll
diff -c /dev/null llvm/test/Regression/Transforms/TailDup/basictest.ll:1.1
*** /dev/null Sun Jun 22 15:32:45 2003
--- llvm/test/Regression/Transforms/TailDup/basictest.ll Sun Jun 22 15:32:35 2003
***************
*** 0 ****
--- 1,22 ----
+ ; RUN: as < %s | opt -tailduplicate -disable-output
+
+ declare void %__main()
+
+ int %main() {
+ entry: ; No predecessors!
+ call void %__main( )
+ br label %loopentry
+
+ loopentry: ; preds = %entry, %no_exit
+ %i.0 = phi int [ %inc, %no_exit ], [ 0, %entry ] ; <int> [#uses=2]
+ %tmp.1 = setle int %i.0, 99 ; <bool> [#uses=1]
+ br bool %tmp.1, label %no_exit, label %return
+
+ no_exit: ; preds = %loopentry
+ %tmp.51 = call int %main( ) ; <int> [#uses=0]
+ %inc = add int %i.0, 1 ; <int> [#uses=1]
+ br label %loopentry
+
+ return: ; preds = %loopentry
+ ret int %i.0
+ }
More information about the llvm-commits
mailing list