[PowerPC] Use a small cleanup pass to remove VSX self copies
authorHal Finkel <hfinkel@anl.gov>
Thu, 27 Mar 2014 23:12:31 +0000 (23:12 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 27 Mar 2014 23:12:31 +0000 (23:12 +0000)
commite2ee98ab169fe8d1d4bd39fe0ecb89274eceb438
treed4f276d3816f78e5f52764f62813ead41fb29df0
parentd9524d66cd6a69ded63b29bed5413217444b162a
[PowerPC] Use a small cleanup pass to remove VSX self copies

As explained in r204976, because of how the allocation of VSX registers
interacts with the call-lowering code, we sometimes end up generating self VSX
copies. Specifically, things like this:
  %VSL2<def> = COPY %F2, %VSL2<imp-use,kill>
(where %F2 is really a sub-register of %VSL2, and so this copy is a nop)

This adds a small cleanup pass to remove these prior to post-RA scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204980 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
test/CodeGen/PowerPC/vsx-self-copy.ll [new file with mode: 0644]