From f4d1aca56808ba143da704fb51bdf0df52ca6fef Mon Sep 17 00:00:00 2001 From: Michael Kuperstein Date: Thu, 12 Feb 2015 14:17:35 +0000 Subject: [X86] Call frame optimization - allow stack-relative movs to be folded into a push Since we track esp precisely, there's no reason not to allow this. llvm-svn: 228924 --- llvm/lib/Target/X86/X86CallFrameOptimization.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'llvm/lib/Target/X86/X86CallFrameOptimization.cpp') diff --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp index c0c009b6b7a..1ede5c73f2b 100644 --- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp +++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp @@ -469,12 +469,6 @@ MachineInstr *X86CallFrameOptimization::canFoldIntoRegPush( DefMI->getParent() != FrameSetup->getParent()) return nullptr; - // Be careful with movs that load from a stack slot, since it may get - // resolved incorrectly. - // TODO: Again, we already have the infrastructure, so this should work. - if (!DefMI->getOperand(1).isReg()) - return nullptr; - // Now, make sure everything else up until the ADJCALLSTACK is a sequence // of MOVs. To be less conservative would require duplicating a lot of the // logic from PeepholeOptimizer. -- cgit v1.2.3