[PowerPC][NFC] Fix bugs in r+r to r+i conversion
commit872c921c7d4729b354e984234cd04baeda8a7469
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 22 Oct 2018 11:22:59 +0000 (22 11:22 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 22 Oct 2018 11:22:59 +0000 (22 11:22 +0000)
treeada99df1dc359fa831fa6e238f5c034fd05873de
parent084d5e1748d32de6955d90ff9aeedb84b4afd883
[PowerPC][NFC] Fix bugs in r+r to r+i conversion

The D-Form VSX loads introduced in ISA 3.0 are not direct D-Form equivalent of
the corresponding X-Forms since they only target the Altivec registers.
Namely LXSSPX can load into any of the 64 VSX registers whereas LXSSP can only
load into the upper 32 VSX registers. Similarly with the remaining affected
instructions.

There is currently no way that I can see to trigger the bug, but as we add other
ways of exploiting these instructions, there may very well be instances that do.

This is an NFC patch in practical terms since the changes it introduces can not
be triggered without an MIR test.

Differential revision: https://reviews.llvm.org/D53323

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344894 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
test/CodeGen/PowerPC/convert-rr-to-ri-instrs.mir