diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86ExpandPseudo.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ExpandPseudo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ExpandPseudo.cpp b/llvm/lib/Target/X86/X86ExpandPseudo.cpp index 29ca3736aca..1b00997e750 100644 --- a/llvm/lib/Target/X86/X86ExpandPseudo.cpp +++ b/llvm/lib/Target/X86/X86ExpandPseudo.cpp @@ -88,8 +88,9 @@ bool X86ExpandPseudo::ExpandMI(MachineBasicBlock &MBB, // standard x86_64 and NaCl use 64-bit frame/stack pointers, x32 - 32-bit. const bool Uses64BitFramePtr = STI->isTarget64BitLP64() || STI->isTargetNaCl64(); - bool UseLEAForSP = - X86FL->useLEAForSPInProlog(*MBB.getParent()); + // Check if we should use LEA for SP. + bool UseLEAForSP = STI->useLeaForSP() && + X86FL->canUseLEAForSPInEpilogue(*MBB.getParent()); unsigned StackPtr = TRI->getStackRegister(); // Check for possible merge with preceding ADD instruction. StackAdj += X86FrameLowering::mergeSPUpdates(MBB, MBBI, StackPtr, true); |