llvm.org GIT mirror llvm / 1db570d
filecheckize a test and mark these wiht a cpu so it passes on hosts without cmovs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98521 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
3 changed file(s) with 13 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llc < %s -march=x86 | not grep {j\[lgbe\]}
0 ; RUN: llc < %s -march=x86 -mcpu=yonah | not grep {j\[lgbe\]}
11
2 define i32 @max(i32 %A, i32 %B) {
2 define i32 @max(i32 %A, i32 %B) nounwind {
33 %gt = icmp sgt i32 %A, %B ; [#uses=1]
44 %R = select i1 %gt, i32 %A, i32 %B ; [#uses=1]
55 ret i32 %R
None ; RUN: llc < %s -mtriple=i386-apple-darwin -disable-fp-elim -stats |& grep asm-printer | grep 55
0 ; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -disable-fp-elim -stats |& grep asm-printer | grep 55
11 ; PR2568
22
33 @g_3 = external global i16 ; [#uses=1]
None ; RUN: llc < %s -march=x86 | grep bsr | count 2
1 ; RUN: llc < %s -march=x86 | grep bsf
2 ; RUN: llc < %s -march=x86 | grep cmov | count 3
0 ; RUN: llc < %s -march=x86 -mcpu=yonah | FileCheck %s
31
42 define i32 @t1(i32 %x) nounwind {
53 %tmp = tail call i32 @llvm.ctlz.i32( i32 %x )
64 ret i32 %tmp
5 ; CHECK: t1:
6 ; CHECK: bsrl
7 ; CHECK: cmov
78 }
89
910 declare i32 @llvm.ctlz.i32(i32) nounwind readnone
1112 define i32 @t2(i32 %x) nounwind {
1213 %tmp = tail call i32 @llvm.cttz.i32( i32 %x )
1314 ret i32 %tmp
15 ; CHECK: t2:
16 ; CHECK: bsfl
17 ; CHECK: cmov
1418 }
1519
1620 declare i32 @llvm.cttz.i32(i32) nounwind readnone
2024 %tmp1 = add i16 %x, %y
2125 %tmp2 = tail call i16 @llvm.ctlz.i16( i16 %tmp1 ) ; [#uses=1]
2226 ret i16 %tmp2
27 ; CHECK: t3:
28 ; CHECK: bsrw
29 ; CHECK: cmov
2330 }
2431
2532 declare i16 @llvm.ctlz.i16(i16) nounwind readnone