[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/cttz.ll
Nate Begeman
natebegeman at mac.com
Wed May 11 16:46:05 PDT 2005
Changes in directory llvm/test/Regression/CodeGen/PowerPC:
cttz.ll added (r1.1)
---
Log message:
Add testcase for legalizing ISD::CTTZ efficiently. On PPC, ctlz(int) is
now codegen'd as this:
addi r2, r3, -1
andc r2, r2, r3
cntlzw r2, r2
subfic r3, r2, 32
blr
---
Diffs of the changes: (+12 -0)
cttz.ll | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/test/Regression/CodeGen/PowerPC/cttz.ll
diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/cttz.ll:1.1
*** /dev/null Wed May 11 18:46:04 2005
--- llvm/test/Regression/CodeGen/PowerPC/cttz.ll Wed May 11 18:45:54 2005
***************
*** 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
+ }
More information about the llvm-commits
mailing list