[PowerPC] Don't assume ADDISdtprelHA's source is r3
authorHal Finkel <hfinkel@anl.gov>
Sun, 30 Aug 2015 07:44:05 +0000 (07:44 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 30 Aug 2015 07:44:05 +0000 (07:44 +0000)
commit0977a23c2a0cbc9ca661f7d694ade420edbd7dde
tree60023e97d9da009a3a661bc629e49477815c31e3
parentd335656e0edcc7ba867a789ffd39f9e454b56487
[PowerPC] Don't assume ADDISdtprelHA's source is r3

Even through ADDISdtprelHA generally has r3 as its source register, it is
possible for the instruction scheduler to move things around such that some
other register is the source. We need to print the actual source register, not
always r3. Fixes PR24394.

The test case will come in a follow-up commit because it depends on MIR
target-flags parsing.

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