summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-10-03 21:16:50 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-10-03 21:16:50 +0000
commit2d57088ff015b01c8c2aa8d7844f96881e0c82ce (patch)
tree2cb6c7a3d014c5a57e83270ea4c1961f8780d5c7 /test
parent631d11765b9f7ebdb49679c92bd41083fbab3f62 (diff)
downloadllvm-2d57088ff015b01c8c2aa8d7844f96881e0c82ce.tar.gz
llvm-2d57088ff015b01c8c2aa8d7844f96881e0c82ce.tar.bz2
llvm-2d57088ff015b01c8c2aa8d7844f96881e0c82ce.tar.xz
Add support for 64-bit count leading ones and zeros instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Mips/mips64instrs.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/mips64instrs.ll b/test/CodeGen/Mips/mips64instrs.ll
index b2aa3ecc02..16bca0fbbf 100644
--- a/test/CodeGen/Mips/mips64instrs.ll
+++ b/test/CodeGen/Mips/mips64instrs.ll
@@ -116,3 +116,20 @@ entry:
ret i64 %rem
}
+declare i64 @llvm.ctlz.i64(i64) nounwind readnone
+
+; CHECK: dclz $2, $4
+define i64 @f18(i64 %X) nounwind readnone {
+entry:
+ %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %X)
+ ret i64 %tmp1
+}
+
+; CHECK: dclo $2, $4
+define i64 @f19(i64 %X) nounwind readnone {
+entry:
+ %neg = xor i64 %X, -1
+ %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %neg)
+ ret i64 %tmp1
+}
+