[PowerPC] Remove zexts after i32 ctlz
authorHal Finkel <hfinkel@anl.gov>
Mon, 5 Jan 2015 18:52:29 +0000 (18:52 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 5 Jan 2015 18:52:29 +0000 (18:52 +0000)
commit3ab10c1918df0d00e31eef7a6f4de6ece022282d
tree32a45608e95d4ac72f939d3d916e05478cd62693
parent0ef99720c578bb348b0ee9bef862fedcc441b3a1
[PowerPC] Remove zexts after i32 ctlz

The 64-bit semantics of cntlzw are not special, the 32-bit population count is
stored as a 64-bit value in the range [0,32]. As a result, it is always zero
extended, and it can be added to the PPCISelDAGToDAG peephole optimization as a
frontier instruction for the removal of unnecessary zero extensions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225192 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
test/CodeGen/PowerPC/rm-zext.ll