[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/phi.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 14 11:12:31 PST 2004



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

phi.ll updated: 1.12 -> 1.13
---
Log message:

New testcase: the phi can be eliminated if the casts are sucked into it.
Note that this reduces code size anyway (as well as making further 
optimizations simpler) so it's always a win.


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

Index: llvm/test/Regression/Transforms/InstCombine/phi.ll
diff -u llvm/test/Regression/Transforms/InstCombine/phi.ll:1.12 llvm/test/Regression/Transforms/InstCombine/phi.ll:1.13
--- llvm/test/Regression/Transforms/InstCombine/phi.ll:1.12	Sun Nov 14 11:54:58 2004
+++ llvm/test/Regression/Transforms/InstCombine/phi.ll	Sun Nov 14 13:12:17 2004
@@ -53,3 +53,15 @@
         ret int %B
 }
 
+uint %test6(int %A, bool %b) {
+BB0:
+        %X = cast int %A to uint
+        br bool %b, label %BB1, label %BB2
+BB1:
+        %Y = cast int %A to uint
+        br label %BB2
+BB2:
+        %B = phi uint [%X, %BB0], [%Y, %BB1] ;; Suck casts into phi
+        ret uint %B
+}
+






More information about the llvm-commits mailing list