mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-13 16:03:58 +00:00
18efe269b1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45024 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
398 B
LLVM
17 lines
398 B
LLVM
; RUN: llvm-as < %s | llc -march=x86 | grep bsr
|
|
; RUN: llvm-as < %s | llc -march=x86 | grep bsf
|
|
|
|
define i32 @t1(i32 %x) nounwind {
|
|
%tmp = tail call i32 @llvm.ctlz.i32( i32 %x )
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.ctlz.i32(i32) nounwind readnone
|
|
|
|
define i32 @t2(i32 %x) nounwind {
|
|
%tmp = tail call i32 @llvm.cttz.i32( i32 %x )
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i32 @llvm.cttz.i32(i32) nounwind readnone
|