Swap PPC isel operands to allow for 0-folding
authorHal Finkel <hfinkel@anl.gov>
Fri, 28 Feb 2014 06:11:16 +0000 (06:11 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 28 Feb 2014 06:11:16 +0000 (06:11 +0000)
commit3d2ce7a5a71c580142f974300899c0140eef4c65
tree8b8a10e0cfff357954c2a962e3787e41549378d0
parent49c76560f31772bb6518c7e94549e44a19c25a7e
Swap PPC isel operands to allow for 0-folding

The PPC isel instruction can fold 0 into the first operand (thus eliminating
the need to materialize a zero-containing register when the 'true' result of
the isel is 0). When the isel is fed by a bit register operation that we can
invert, do so as part of the bit-register-operation peephole routine.

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