Move a DenseMap's declaration outside of a loop, and just call
[oota-llvm.git] / test / Transforms / LICM / 2003-12-11-SinkingToPHI.ll
index ecbc130e8739f84b5d75ad86772951ca453b6a71..e491c9aee479aa6a7caa64e26afaf1fc16973275 100644 (file)
@@ -1,20 +1,16 @@
 ; RUN: llvm-as < %s | opt -licm | lli
 
-implementation   ; Functions:
-
-int %main() {
+define i32 @main() {
 entry:
        br label %Loop
-
-Loop:
-       br bool true, label %LoopCont, label %Out
-LoopCont:
-       %X = add int 1, 0
-       br bool true, label %Out, label %Loop
-
-Out:
-       %V = phi int [ 2, %Loop], [ %X, %LoopCont]
-       %V2 = sub int %V, 1
-       ret int %V2
+Loop:          ; preds = %LoopCont, %entry
+       br i1 true, label %LoopCont, label %Out
+LoopCont:              ; preds = %Loop
+       %X = add i32 1, 0               ; <i32> [#uses=1]
+       br i1 true, label %Out, label %Loop
+Out:           ; preds = %LoopCont, %Loop
+       %V = phi i32 [ 2, %Loop ], [ %X, %LoopCont ]            ; <i32> [#uses=1]
+       %V2 = sub i32 %V, 1             ; <i32> [#uses=1]
+       ret i32 %V2
 }