Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; This function contains intervening instructions which should be moved out of the way |
| 2 | ; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call |
| 3 | |
| 4 | int %Test(int %X) { |
| 5 | entry: |
| 6 | %tmp.1 = seteq int %X, 0 |
| 7 | br bool %tmp.1, label %then.0, label %endif.0 |
| 8 | |
| 9 | then.0: |
| 10 | %tmp.4 = add int %X, 1 |
| 11 | ret int %tmp.4 |
| 12 | |
| 13 | endif.0: |
| 14 | %tmp.10 = add int %X, -1 |
| 15 | %tmp.8 = call int %Test(int %tmp.10) |
| 16 | %DUMMY = add int %X, 1 ;; This should not prevent elimination |
| 17 | ret int %tmp.8 |
| 18 | } |
| 19 | |