mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 13:27:52 +00:00
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 llvm-svn: 21881
This commit is contained in:
parent
e84f776b5d
commit
71bcc67a0f
12
test/Regression/CodeGen/PowerPC/cttz.ll
Normal file
12
test/Regression/CodeGen/PowerPC/cttz.ll
Normal file
@ -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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user