Reid Spencer | d0e30dc | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | %prcontext div 1 | grep ret |
Chris Lattner | 8665367 | 2004-12-08 23:41:16 +0000 | [diff] [blame] | 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 | } |