Evan Cheng | 18efe26 | 2007-12-14 02:13:44 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=x86 | grep bsr |
2 | ; RUN: llvm-as < %s | llc -march=x86 | grep bsf | ||||
3 | |||||
4 | define i32 @t1(i32 %x) nounwind { | ||||
5 | %tmp = tail call i32 @llvm.ctlz.i32( i32 %x ) | ||||
6 | ret i32 %tmp | ||||
7 | } | ||||
8 | |||||
9 | declare i32 @llvm.ctlz.i32(i32) nounwind readnone | ||||
10 | |||||
11 | define i32 @t2(i32 %x) nounwind { | ||||
12 | %tmp = tail call i32 @llvm.cttz.i32( i32 %x ) | ||||
13 | ret i32 %tmp | ||||
14 | } | ||||
15 | |||||
16 | declare i32 @llvm.cttz.i32(i32) nounwind readnone |