mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 12:30:57 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3bccda2dc
commit
ef1a3d2607
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user