summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZOperands.td
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-09-27 15:14:04 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-09-27 15:14:04 +0000
commit54b369166fcd71b95480361dcc0c2c767c6e6e74 (patch)
tree6df0f240ad7dead3e93e044810626c4fc92d19f4 /llvm/lib/Target/SystemZ/SystemZOperands.td
parent8b5987eba5a080962cbc98ce5f006db3aa62ae2e (diff)
downloadbcm5719-llvm-54b369166fcd71b95480361dcc0c2c767c6e6e74.tar.gz
bcm5719-llvm-54b369166fcd71b95480361dcc0c2c767c6e6e74.zip
[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
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZOperands.td')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZOperands.td3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZOperands.td b/llvm/lib/Target/SystemZ/SystemZOperands.td
index f1db1fdb4c5..3ad146c57d9 100644
--- a/llvm/lib/Target/SystemZ/SystemZOperands.td
+++ b/llvm/lib/Target/SystemZ/SystemZOperands.td
@@ -46,7 +46,8 @@ class PCRelOperand<ValueType vt, AsmOperandClass asmop> : Operand<vt> {
// address with address size VT. SELF is the name of the operand and
// ASMOP is the associated asm operand.
class PCRelAddress<ValueType vt, string self, AsmOperandClass asmop>
- : ComplexPattern<vt, 1, "selectPCRelAddress", [z_pcrel_wrapper]>,
+ : ComplexPattern<vt, 1, "selectPCRelAddress",
+ [z_pcrel_wrapper, z_pcrel_offset]>,
PCRelOperand<vt, asmop> {
let MIOperandInfo = (ops !cast<Operand>(self));
}
OpenPOWER on IntegriCloud