new testcase
[oota-llvm.git] / test / Transforms / InstCombine / sink_instruction.ll
1 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | %prcontext div 1 | grep ret
2
3 ;; This tests that the instructions in the entry blocks are sunk into each
4 ;; arm of the 'if'.
5
6 int %foo(bool %C, int %A, int %B) {
7 entry:
8         %tmp.2 = div int %A, %B
9         %tmp.9 = add int %B, %A
10         br bool %C, label %then, label %endif
11
12 then:
13         ret int %tmp.9
14
15 endif:
16         ret int %tmp.2
17 }