summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2016-04-12 12:07:23 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2016-04-12 12:07:23 +0000
commitf0fc50905f361f30b1f07c0335db2585cdfed77b (patch)
tree5d72e09cb82e88d24b7ca1532776e5c50049cfaa /llvm/lib/Target
parentf2638d42560998a77d9e973496e57e3b55676f85 (diff)
downloadbcm5719-llvm-f0fc50905f361f30b1f07c0335db2585cdfed77b.tar.gz
bcm5719-llvm-f0fc50905f361f30b1f07c0335db2585cdfed77b.zip
[SystemZ] Use LDE32 instead of LE, when Offset is small.
On z13, if eliminateFrameIndex() chooses LE (and not LEY), immediately transform that LE to LDE32 to avoid partial register dependencies. LEY should be generally preferred for big offsets over an expansion into LAY + LDE32. Reviewed by Ulrich Weigand. llvm-svn: 266060
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
index 6fd24e3df62..8d872b75d2e 100644
--- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
@@ -84,8 +84,14 @@ SystemZRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
// accepts the offset exists.
unsigned Opcode = MI->getOpcode();
unsigned OpcodeForOffset = TII->getOpcodeForOffset(Opcode, Offset);
- if (OpcodeForOffset)
+ if (OpcodeForOffset) {
+ if (OpcodeForOffset == SystemZ::LE &&
+ MF.getSubtarget<SystemZSubtarget>().hasVector()) {
+ // If LE is ok for offset, use LDE instead on z13.
+ OpcodeForOffset = SystemZ::LDE32;
+ }
MI->getOperand(FIOperandNum).ChangeToRegister(BasePtr, false);
+ }
else {
// Create an anchor point that is in range. Start at 0xffff so that
// can use LLILH to load the immediate.
OpenPOWER on IntegriCloud