[PowerPC] Support non-direct-sub/superclass VSX copies
authorHal Finkel <hfinkel@anl.gov>
Mon, 16 Feb 2015 23:46:30 +0000 (23:46 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 16 Feb 2015 23:46:30 +0000 (23:46 +0000)
commitba51ae6864c22927b67059a56770472b610a790b
tree132a6b9eb85bf9bfa4daf22ba2df47dad89ae361
parenta9c73c5bc080ae8acab78a23de96e2150a9e2139
[PowerPC] Support non-direct-sub/superclass VSX copies

Our register allocation has become better recently, it seems, and is now
starting to generate cross-block copies into inflated register classes. These
copies are not transformed into subregister insertions/extractions by the
PPCVSXCopy class, and so need to be handled directly by
PPCInstrInfo::copyPhysReg. The code to do this was *almost* there, but not
quite (it was unnecessarily restricting itself to only the direct
sub/super-register-class case (not copying between, for example, something in
VRRC and the lower-half of VSRC which are super-registers of F8RC).

Triggering this behavior manually is difficult; I'm including two
bugpoint-reduced test cases from the test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229457 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
test/CodeGen/PowerPC/vsx-infl-copy1.ll [new file with mode: 0644]
test/CodeGen/PowerPC/vsx-infl-copy2.ll [new file with mode: 0644]