Move a DenseMap's declaration outside of a loop, and just call
[oota-llvm.git] / test / Transforms / InstCombine / sink_instruction.ll
index 93519ffdc0260f2f3f5b8a718f11ad9d4e150bee..cb8a090e5a07f37cf2ed1e708fa4895f33d380f7 100644 (file)
@@ -1,18 +1,19 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
 ; RUN:   %prcontext div 1 | grep ret
 
 ;; This tests that the instructions in the entry blocks are sunk into each
 ;; arm of the 'if'.
 
-int %foo(bool %C, int %A, int %B) {
+define i32 @foo(i1 %C, i32 %A, i32 %B) {
 entry:
-       %tmp.2 = div int %A, %B
-       %tmp.9 = add int %B, %A
-       br bool %C, label %then, label %endif
+        %tmp.2 = sdiv i32 %A, %B                ; <i32> [#uses=1]
+        %tmp.9 = add i32 %B, %A         ; <i32> [#uses=1]
+        br i1 %C, label %then, label %endif
 
-then:
-       ret int %tmp.9
+then:           ; preds = %entry
+        ret i32 %tmp.9
 
-endif:
-       ret int %tmp.2
+endif:          ; preds = %entry
+        ret i32 %tmp.2
 }
+