1
- ; RUN: llc < %s -march=x86 | grep cmp | count 1
2
- ; RUN: llc < %s -march=x86 | grep test | count 1
1
+ ; RUN: llc < %s -march=x86-64 | FileCheck %s
3
2
4
- define i32 @f1 (i32 %X , i32* %y ) nounwind {
3
+ define i32 @test1 (i32 %X , i32* %y ) nounwind {
5
4
%tmp = load i32* %y ; <i32> [#uses=1]
6
5
%tmp.upgrd.1 = icmp eq i32 %tmp , 0 ; <i1> [#uses=1]
7
6
br i1 %tmp.upgrd.1 , label %ReturnBlock , label %cond_true
@@ -11,9 +10,11 @@ cond_true: ; preds = %0
11
10
12
11
ReturnBlock: ; preds = %0
13
12
ret i32 0
13
+ ; CHECK: test1:
14
+ ; CHECK: cmpl $0, (%rsi)
14
15
}
15
16
16
- define i32 @f2 (i32 %X , i32* %y ) nounwind {
17
+ define i32 @test2 (i32 %X , i32* %y ) nounwind {
17
18
%tmp = load i32* %y ; <i32> [#uses=1]
18
19
%tmp1 = shl i32 %tmp , 3 ; <i32> [#uses=1]
19
20
%tmp1.upgrd.2 = icmp eq i32 %tmp1 , 0 ; <i1> [#uses=1]
@@ -24,4 +25,8 @@ cond_true: ; preds = %0
24
25
25
26
ReturnBlock: ; preds = %0
26
27
ret i32 0
28
+ ; CHECK: test2:
29
+ ; CHECK: movl (%rsi), %eax
30
+ ; CHECK: shll $3, %eax
31
+ ; CHECK: testl %eax, %eax
27
32
}
0 commit comments