Add a test to the previous added clo instruction. Patch by Akira again

llvm-svn: 118668
This commit is contained in:
Bruno Cardoso Lopes 2010-11-10 02:22:44 +00:00
parent 67fc18a493
commit a4ceea8cd8
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
; RUN: llc -march=mips -mcpu=4ke < %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
}