diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/lib/Target/SystemZ/SystemZRegisterInfo.cpp index 6fd24e3df625e..8d872b75d2ecf 100644 --- a/lib/Target/SystemZ/SystemZRegisterInfo.cpp +++ b/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().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.