[PowerPC] Don't remove self VSX copies in PPCInstrInfo::copyPhysReg
authorHal Finkel <hfinkel@anl.gov>
Thu, 27 Mar 2014 22:46:28 +0000 (22:46 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 27 Mar 2014 22:46:28 +0000 (22:46 +0000)
commitbe77894aef60c9aa1f84110090102b437a6e885b
tree9036f82777443c63da11784560755f17c1e46d12
parentd21857ce15127eb3eb6d6957983906e30a0506b7
[PowerPC] Don't remove self VSX copies in PPCInstrInfo::copyPhysReg

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)

The problem is that ExpandPostRAPseudos always assumes that *some* instruction
has been inserted, and adds implicit defs to it. This is a problem if no copy
was inserted because it can cause subtle problems during post-RA scheduling.
These self copies will have to be removed some other way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204976 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp