[SystemZ] Improve handling of PC-relative addresses
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Fri, 27 Sep 2013 15:14:04 +0000 (15:14 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Fri, 27 Sep 2013 15:14:04 +0000 (15:14 +0000)
commit8dac19c0708c9bd0da0b832014918e00ded44d86
tree008a633a794b968815a5e6d8112a4aa931e06cc3
parent4d835f1cbe5d8c5f6cea4040bea9b180927a1c05
[SystemZ] Improve handling of PC-relative addresses

The backend previously folded offsets into PC-relative addresses
whereever possible.  That's the right thing to do when the address
can be used directly in a PC-relative memory reference (using things
like LRL).  But if we have a register-based memory reference and need
to load the PC-relative address separately, it's better to use an anchor
point that could be shared with other accesses to the same area of the
variable.

Fixes a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191524 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.h
lib/Target/SystemZ/SystemZOperands.td
lib/Target/SystemZ/SystemZOperators.td
test/CodeGen/SystemZ/int-move-08.ll