[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)
commit54b369166fcd71b95480361dcc0c2c767c6e6e74
tree6df0f240ad7dead3e93e044810626c4fc92d19f4
parent8b5987eba5a080962cbc98ce5f006db3aa62ae2e
[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.

llvm-svn: 191524
llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.h
llvm/lib/Target/SystemZ/SystemZOperands.td
llvm/lib/Target/SystemZ/SystemZOperators.td
llvm/test/CodeGen/SystemZ/int-move-08.ll