Chris Lattner | 63c08be | 2003-12-08 05:32:48 +0000 | [diff] [blame] | 1 | ; This function contains intervening instructions which should be moved out of the way |
Dan Gohman | f2f6ce6 | 2009-09-11 18:01:28 +0000 | [diff] [blame] | 2 | ; RUN: opt < %s -tailcallelim -S | not grep call |
Chris Lattner | 63c08be | 2003-12-08 05:32:48 +0000 | [diff] [blame] | 3 | |
Tanya Lattner | ceca194 | 2008-03-10 07:21:50 +0000 | [diff] [blame] | 4 | define i32 @Test(i32 %X) { |
Chris Lattner | 63c08be | 2003-12-08 05:32:48 +0000 | [diff] [blame] | 5 | entry: |
Tanya Lattner | ceca194 | 2008-03-10 07:21:50 +0000 | [diff] [blame] | 6 | %tmp.1 = icmp eq i32 %X, 0 ; <i1> [#uses=1] |
| 7 | br i1 %tmp.1, label %then.0, label %endif.0 |
| 8 | then.0: ; preds = %entry |
| 9 | %tmp.4 = add i32 %X, 1 ; <i32> [#uses=1] |
| 10 | ret i32 %tmp.4 |
| 11 | endif.0: ; preds = %entry |
| 12 | %tmp.10 = add i32 %X, -1 ; <i32> [#uses=1] |
| 13 | %tmp.8 = call i32 @Test( i32 %tmp.10 ) ; <i32> [#uses=1] |
| 14 | %DUMMY = add i32 %X, 1 ; <i32> [#uses=0] |
| 15 | ret i32 %tmp.8 |
Chris Lattner | 63c08be | 2003-12-08 05:32:48 +0000 | [diff] [blame] | 16 | } |
| 17 | |