blob: 0505529cc48d9047fd05c340c749130953c09bd5 [file] [log] [blame]
Evan Cheng18efe262007-12-14 02:13:44 +00001; RUN: llvm-as < %s | llc -march=x86 | grep bsr
2; RUN: llvm-as < %s | llc -march=x86 | grep bsf
3
4define i32 @t1(i32 %x) nounwind {
5 %tmp = tail call i32 @llvm.ctlz.i32( i32 %x )
6 ret i32 %tmp
7}
8
9declare i32 @llvm.ctlz.i32(i32) nounwind readnone
10
11define i32 @t2(i32 %x) nounwind {
12 %tmp = tail call i32 @llvm.cttz.i32( i32 %x )
13 ret i32 %tmp
14}
15
16declare i32 @llvm.cttz.i32(i32) nounwind readnone