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