blob: 93519ffdc0260f2f3f5b8a718f11ad9d4e150bee [file] [log] [blame]
Reid Spencer91948d42007-04-14 20:13:02 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
2; RUN: %prcontext div 1 | grep ret
Chris Lattner86653672004-12-08 23:41:16 +00003
4;; This tests that the instructions in the entry blocks are sunk into each
5;; arm of the 'if'.
6
7int %foo(bool %C, int %A, int %B) {
8entry:
9 %tmp.2 = div int %A, %B
10 %tmp.9 = add int %B, %A
11 br bool %C, label %then, label %endif
12
13then:
14 ret int %tmp.9
15
16endif:
17 ret int %tmp.2
18}