llvm.org GIT mirror llvm / 0765ce6
convert to filecheck git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80025 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 15 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s | llc -march=x86 > %t
1 ; RUN: grep btl %t | count 2
2 ; RUN: grep cmov %t | count 2
3 ; RUN: not grep test %t
4 ; RUN: not grep set %t
5 ; RUN: not grep j %t
6 ; RUN: not grep cmovne %t
7 ; RUN: not grep cmove %t
0 ; RUN: llvm-as < %s | llc -march=x86 | FileCheck %s
81
9 define i32 @foo(i32 %x, i32 %n, i32 %w, i32 %v) nounwind readnone {
2 define i32 @test1(i32 %x, i32 %n, i32 %w, i32 %v) nounwind readnone {
103 entry:
4 ; CHECK: test1:
5 ; CHECK: btl
6 ; CHECK-NEXT: movl $12, %eax
7 ; CHECK-NEXT: cmovae 16(%esp), %eax
8 ; CHECK-NEXT: ret
9
1110 %0 = lshr i32 %x, %n ; [#uses=1]
1211 %1 = and i32 %0, 1 ; [#uses=1]
1312 %toBool = icmp eq i32 %1, 0 ; [#uses=1]
1413 %.0 = select i1 %toBool, i32 %v, i32 12 ; [#uses=1]
1514 ret i32 %.0
1615 }
17 define i32 @bar(i32 %x, i32 %n, i32 %w, i32 %v) nounwind readnone {
16 define i32 @test2(i32 %x, i32 %n, i32 %w, i32 %v) nounwind readnone {
1817 entry:
18 ; CHECK: test2:
19 ; CHECK: btl
20 ; CHECK-NEXT: movl $12, %eax
21 ; CHECK-NEXT: cmovb 16(%esp), %eax
22 ; CHECK-NEXT: ret
23
1924 %0 = lshr i32 %x, %n ; [#uses=1]
2025 %1 = and i32 %0, 1 ; [#uses=1]
2126 %toBool = icmp eq i32 %1, 0 ; [#uses=1]