Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / Transforms / InstCombine / hoist_instr.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | %prcontext div 1 | grep then:
2
3 ;; This tests that the div is hoisted into the then block.
4
5 int %foo(bool %C, int %A, int %B) {
6 entry:
7         br bool %C, label %then, label %endif
8
9 then:
10         br label %endif
11
12 endif:
13         %X = phi int [%A, %then], [15, %entry]
14         %Y = div int %X, 42
15         ret int %Y
16 }