llvm.org GIT mirror llvm / 938ef6f
move to CodeGen/ARM/2007-05-07-tailmerge-1.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36918 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 0 addition(s) and 65 deletion(s). Raw diff Collapse all Expand all
+0
-65
test/CodeGen/Generic/2007-05-07-tailmerge-1.c less more
None ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | wc -l | grep 1
1 ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | wc -l | grep 1
2 ; Check that calls to baz and quux are tail-merged.
3
4 ; ModuleID = 'tail.c'
5 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
6 target triple = "i686-apple-darwin8"
7
8 define i32 @f(i32 %i, i32 %q) {
9 entry:
10 %i_addr = alloca i32 ; [#uses=2]
11 %q_addr = alloca i32 ; [#uses=2]
12 %retval = alloca i32, align 4 ; [#uses=1]
13 "alloca point" = bitcast i32 0 to i32 ; [#uses=0]
14 store i32 %i, i32* %i_addr
15 store i32 %q, i32* %q_addr
16 %tmp = load i32* %i_addr ; [#uses=1]
17 %tmp1 = icmp ne i32 %tmp, 0 ; [#uses=1]
18 %tmp12 = zext i1 %tmp1 to i8 ; [#uses=1]
19 %toBool = icmp ne i8 %tmp12, 0 ; [#uses=1]
20 br i1 %toBool, label %cond_true, label %cond_false
21
22 cond_true: ; preds = %entry
23 %tmp3 = call i32 (...)* @bar( ) ; [#uses=0]
24 %tmp4 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0]
25 br label %cond_next
26
27 cond_false: ; preds = %entry
28 %tmp5 = call i32 (...)* @foo( ) ; [#uses=0]
29 %tmp6 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0]
30 br label %cond_next
31
32 cond_next: ; preds = %cond_false, %cond_true
33 %tmp7 = load i32* %q_addr ; [#uses=1]
34 %tmp8 = icmp ne i32 %tmp7, 0 ; [#uses=1]
35 %tmp89 = zext i1 %tmp8 to i8 ; [#uses=1]
36 %toBool10 = icmp ne i8 %tmp89, 0 ; [#uses=1]
37 br i1 %toBool10, label %cond_true11, label %cond_false15
38
39 cond_true11: ; preds = %cond_next
40 %tmp13 = call i32 (...)* @foo( ) ; [#uses=0]
41 %tmp14 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0]
42 br label %cond_next18
43
44 cond_false15: ; preds = %cond_next
45 %tmp16 = call i32 (...)* @bar( ) ; [#uses=0]
46 %tmp17 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0]
47 br label %cond_next18
48
49 cond_next18: ; preds = %cond_false15, %cond_true11
50 %tmp19 = call i32 (...)* @bar( ) ; [#uses=0]
51 br label %return
52
53 return: ; preds = %cond_next18
54 %retval20 = load i32* %retval ; [#uses=1]
55 ret i32 %retval20
56 }
57
58 declare i32 @bar(...)
59
60 declare i32 @baz(...)
61
62 declare i32 @foo(...)
63
64 declare i32 @quux(...)