blob: ae4f50941f810c1fb1f4fae57cf802352c884a27 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; This function contains intervening instructions which should be moved out of the way
Tanya Lattner003eae52008-03-10 07:21:50 +00002; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Tanya Lattner003eae52008-03-10 07:21:50 +00004define i32 @Test(i32 %X) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005entry:
Tanya Lattner003eae52008-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
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016}
17