mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-31 16:02:52 +01:00
a8f0f7babb
Generate code for Mips32r1 unless a Mips32r2 feature is tested. llvm-svn: 139433
34 lines
690 B
LLVM
34 lines
690 B
LLVM
; RUN: llc -march=mips < %s | FileCheck %s
|
|
|
|
; CHECK: clz $2, $4
|
|
define i32 @t1(i32 %X) nounwind readnone {
|
|
entry:
|
|
%tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X)
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
declare i32 @llvm.ctlz.i32(i32) nounwind readnone
|
|
|
|
; CHECK: clz $2, $4
|
|
define i32 @t2(i32 %X) nounwind readnone {
|
|
entry:
|
|
%tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X)
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
; CHECK: clo $2, $4
|
|
define i32 @t3(i32 %X) nounwind readnone {
|
|
entry:
|
|
%neg = xor i32 %X, -1
|
|
%tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg)
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
; CHECK: clo $2, $4
|
|
define i32 @t4(i32 %X) nounwind readnone {
|
|
entry:
|
|
%neg = xor i32 %X, -1
|
|
%tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg)
|
|
ret i32 %tmp1
|
|
}
|