[PowerPC] Remove zexts after byte-swapping loads
authorHal Finkel <hfinkel@anl.gov>
Mon, 5 Jan 2015 18:09:06 +0000 (18:09 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 5 Jan 2015 18:09:06 +0000 (18:09 +0000)
commit0ef99720c578bb348b0ee9bef862fedcc441b3a1
tree8cc29a813a2c62e66280d2f215042dd2285f6c92
parent9e989cf1905e99f2ac85296bcfcfce8989f79c66
[PowerPC] Remove zexts after byte-swapping loads

lhbrx and lwbrx not only load their data with byte swapping, but also clear the
upper 32 bits (at least). As a result, they can be added to the PPCISelDAGToDAG
peephole optimization as frontier instructions for the removal of unnecessary
zero extensions.

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