projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7c4a4a
)
Add testcase for legalizing ISD::CTTZ efficiently. On PPC, ctlz(int) is
author
Nate Begeman
<natebegeman@mac.com>
Wed, 11 May 2005 23:45:54 +0000
(23:45 +0000)
committer
Nate Begeman
<natebegeman@mac.com>
Wed, 11 May 2005 23:45:54 +0000
(23:45 +0000)
now codegen'd as this:
addi r2, r3, -1
andc r2, r2, r3
cntlzw r2, r2
subfic r3, r2, 32
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21881
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/CodeGen/PowerPC/cttz.ll
[new file with mode: 0644]
patch
|
blob
diff --git a/test/CodeGen/PowerPC/cttz.ll
b/test/CodeGen/PowerPC/cttz.ll
new file mode 100644
(file)
index 0000000..
f860456
--- /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
+}