comparison test/CodeGen/X86/nobt.ll @ 0:95c75e76d11b LLVM3.4

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children 803732b1fca8
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
1 ; RUN: llc < %s -march=x86 | not grep btl
2
3 ; This tests some cases where BT must not be generated. See also bt.ll.
4 ; Fixes 20040709-[12].c in gcc testsuite.
5
6 define void @test2(i32 %x, i32 %n) nounwind {
7 entry:
8 %tmp1 = and i32 %x, 1
9 %tmp2 = urem i32 %tmp1, 15
10 %tmp3 = and i32 %tmp2, 1 ; <i32> [#uses=1]
11 %tmp4 = icmp eq i32 %tmp3, %tmp2 ; <i1> [#uses=1]
12 br i1 %tmp4, label %bb, label %UnifiedReturnBlock
13
14 bb: ; preds = %entry
15 call void @foo()
16 ret void
17
18 UnifiedReturnBlock: ; preds = %entry
19 ret void
20 }
21
22 define void @test3(i32 %x, i32 %n) nounwind {
23 entry:
24 %tmp1 = and i32 %x, 1
25 %tmp2 = urem i32 %tmp1, 15
26 %tmp3 = and i32 %tmp2, 1 ; <i32> [#uses=1]
27 %tmp4 = icmp eq i32 %tmp2, %tmp3 ; <i1> [#uses=1]
28 br i1 %tmp4, label %bb, label %UnifiedReturnBlock
29
30 bb: ; preds = %entry
31 call void @foo()
32 ret void
33
34 UnifiedReturnBlock: ; preds = %entry
35 ret void
36 }
37
38 define void @test4(i32 %x, i32 %n) nounwind {
39 entry:
40 %tmp1 = and i32 %x, 1
41 %tmp2 = urem i32 %tmp1, 15
42 %tmp3 = and i32 %tmp2, 1 ; <i32> [#uses=1]
43 %tmp4 = icmp ne i32 %tmp2, %tmp3 ; <i1> [#uses=1]
44 br i1 %tmp4, label %bb, label %UnifiedReturnBlock
45
46 bb: ; preds = %entry
47 call void @foo()
48 ret void
49
50 UnifiedReturnBlock: ; preds = %entry
51 ret void
52 }
53
54 define void @test5(i32 %x, i32 %n) nounwind {
55 entry:
56 %tmp1 = and i32 %x, 1
57 %tmp2 = urem i32 %tmp1, 15
58 %tmp3 = and i32 %tmp2, 1 ; <i32> [#uses=1]
59 %tmp4 = icmp ne i32 %tmp2, %tmp3 ; <i1> [#uses=1]
60 br i1 %tmp4, label %bb, label %UnifiedReturnBlock
61
62 bb: ; preds = %entry
63 call void @foo()
64 ret void
65
66 UnifiedReturnBlock: ; preds = %entry
67 ret void
68 }
69
70 declare void @foo()