summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/thumb2-clz.ll
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-06-26 20:47:43 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-06-26 20:47:43 +0000
commit24062ac5be1a33d1ef76d399613b7d48a684116e (patch)
tree16688054fa9f66e271ceb5bd270b7a321e4c305a /test/CodeGen/Thumb2/thumb2-clz.ll
parent7ce720b448c581b822577aaf44b73a5aa9689dfc (diff)
downloadllvm-24062ac5be1a33d1ef76d399613b7d48a684116e.tar.gz
llvm-24062ac5be1a33d1ef76d399613b7d48a684116e.tar.bz2
llvm-24062ac5be1a33d1ef76d399613b7d48a684116e.tar.xz
Thumb-2 has CLZ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-clz.ll')
-rw-r--r--test/CodeGen/Thumb2/thumb2-clz.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-clz.ll b/test/CodeGen/Thumb2/thumb2-clz.ll
new file mode 100644
index 0000000000..e5f94a6c49
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-clz.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2,+v7a | grep "clz " | count 1
+
+define i32 @f1(i32 %a) {
+ %tmp = tail call i32 @llvm.ctlz.i32(i32 %a)
+ ret i32 %tmp
+}
+
+declare i32 @llvm.ctlz.i32(i32) nounwind readnone