blob: 0c40bd5dc50d3bf525e98e015e6ace65718fbda2 [file] [log] [blame]
Chris Lattner63c08be2003-12-08 05:32:48 +00001; This function contains intervening instructions which should be moved out of the way
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00002; RUN: opt < %s -tailcallelim -S | not grep call
Chris Lattner63c08be2003-12-08 05:32:48 +00003
Tanya Lattnerceca1942008-03-10 07:21:50 +00004define i32 @Test(i32 %X) {
Chris Lattner63c08be2003-12-08 05:32:48 +00005entry:
Tanya Lattnerceca1942008-03-10 07:21:50 +00006 %tmp.1 = icmp eq i32 %X, 0 ; <i1> [#uses=1]
7 br i1 %tmp.1, label %then.0, label %endif.0
8then.0: ; preds = %entry
9 %tmp.4 = add i32 %X, 1 ; <i32> [#uses=1]
10 ret i32 %tmp.4
11endif.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 Lattner63c08be2003-12-08 05:32:48 +000016}
17