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