Debug Info Testing: updated to use NULL instead of "i32 0" in a few fields.
[oota-llvm.git] / test / Transforms / SimplifyCFG / PhiEliminate.ll
index ba5f81b5cf77dcc155c56d9ef38ffa5c9ca04af3..d5ce9a7e6bc842a0c2928e6660616d5c338a0fce 100644 (file)
@@ -3,35 +3,25 @@
 ; nodes away allows the branches to be eliminated, performing a simple form of
 ; 'if conversion'.
 
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis > %t.xform
-; RUN: not grep phi %t.xform && grep ret %t.xform
+; RUN: opt < %s -simplifycfg -S > %t.xform
+; RUN:   not grep phi %t.xform 
+; RUN:   grep ret %t.xform
 
-declare void %use(bool)
-declare void %use(int)
+declare void @use(i1)
 
-void %test(bool %c, int %V, int %V2) {
-       br bool %c, label %T, label %F
-T:
-       br label %F
-F:
-       %B1 = phi bool [true, %0], [false, %T]
-       %B2 = phi bool [true, %T], [false, %0]
-       %I1 = phi int  [1, %T], [0, %0]
-       %I2 = phi int  [1, %0], [0, %T]
-       %I3 = phi int  [17, %T], [0, %0]
-       %I4 = phi int  [17, %T], [5, %0]
-       %I5 = phi int  [%V, %T], [0, %0]
-       %I6 = phi int  [%V, %0], [0, %T]
-       %I7 = phi int  [%V, %0], [%V2, %T]
-       call void %use(bool %B1)
-       call void %use(bool %B2)
-       call void %use(int  %I1)
-       call void %use(int  %I2)
-       call void %use(int  %I3)
-       call void %use(int  %I4)
-       call void %use(int  %I5)
-       call void %use(int  %I6)
-       call void %use(int  %I7)
-       ret void
+declare void @use.upgrd.1(i32)
+
+
+define void @test(i1 %c, i32 %V, i32 %V2) {
+; <label>:0
+        br i1 %c, label %T, label %F
+T:              ; preds = %0
+        br label %F
+F:              ; preds = %T, %0
+        %B1 = phi i1 [ true, %0 ], [ false, %T ]                ; <i1> [#uses=1]
+        %I6 = phi i32 [ %V, %0 ], [ 0, %T ]             ; <i32> [#uses=1]
+        call void @use( i1 %B1 )
+        call void @use.upgrd.1( i32 %I6 )
+        ret void
 }