summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-03-22 14:58:48 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-03-22 14:58:48 +0000
commite90b022468aa7ebaabcaec4ed6f5ba0e56a537fe (patch)
treedbc1b795dee374a94b31e5370508eb13c04c7618 /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
parentd1b99d350c5c6d32005b49cfeb22186cbe1132a0 (diff)
downloadbcm5719-llvm-e90b022468aa7ebaabcaec4ed6f5ba0e56a537fe.tar.gz
bcm5719-llvm-e90b022468aa7ebaabcaec4ed6f5ba0e56a537fe.zip
Fix swapped BasePtr and Offset in pre-inc memory addresses.
PPCTargetLowering::getPreIndexedAddressParts currently provides the base part of a memory address in the offset result, and the offset part in the base result. That swap is then undone again when an MI instruction is generated (in PPCDAGToDAGISel::Select for loads, and using .md Pat patterns for stores). This patch reverts this double swap, to make common code and back-end be in sync as to which part of the address is base and which is offset. To avoid performance regressions in certain cases, target code now checks whether the choice of base register would be rejected for pre-inc accesses by common code, and attempts to swap base and offset again in such cases. (Overall, this means that now pre-ice accesses are generated *more* frequently than before.) llvm-svn: 177733
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud