aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CodeGen/PowerPC/cttz.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/cttz.ll b/test/CodeGen/PowerPC/cttz.ll
new file mode 100644
index 0000000000..f860456d64
--- /dev/null
+++ b/test/CodeGen/PowerPC/cttz.ll
@@ -0,0 +1,12 @@
+; Make sure this testcase does not use ctpop
+; RUN: llvm-as < %s | llc -march=ppc32 | grep -i 'cntlzw'
+
+declare int %llvm.cttz(int)
+
+implementation ; Functions:
+
+int %bar(int %x) {
+entry:
+ %tmp.1 = call int %llvm.cttz( int %x )
+ ret int %tmp.1
+}