summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
diff options
context:
space:
mode:
authorMichael Kuperstein <mkuper@google.com>2016-12-07 19:31:08 +0000
committerMichael Kuperstein <mkuper@google.com>2016-12-07 19:31:08 +0000
commit5842b20633ef3b244a2d583cf0d209b4ea57a911 (patch)
treea22704a232eddf73ba257fd399365467a8fae2ff /llvm/lib/Target/X86/X86CallFrameOptimization.cpp
parent18092cf2c30efe6f4021b6ab29a581e172fa898d (diff)
downloadbcm5719-llvm-5842b20633ef3b244a2d583cf0d209b4ea57a911.tar.gz
bcm5719-llvm-5842b20633ef3b244a2d583cf0d209b4ea57a911.zip
[X86] Skip over DEBUG_VALUE while looking for start of call sequence
If we don't skip over DEBUG_VALUEs, we get differences between -g and non-g code. This fixes PR31242. Differential Revision: https://reviews.llvm.org/D27485 llvm-svn: 288965
Diffstat (limited to 'llvm/lib/Target/X86/X86CallFrameOptimization.cpp')
-rw-r--r--llvm/lib/Target/X86/X86CallFrameOptimization.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
index 25d1c51d28f..78bd2add8c3 100644
--- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
+++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
@@ -340,10 +340,10 @@ void X86CallFrameOptimization::collectCallInfo(MachineFunction &MF,
return;
}
- // For globals in PIC mode, we can have some LEAs here.
- // Ignore them, they don't bother us.
+ // Skip over DEBUG_VALUE.
+ // For globals in PIC mode, we can have some LEAs here. Skip them as well.
// TODO: Extend this to something that covers more cases.
- while (I->getOpcode() == X86::LEA32r)
+ while (I->getOpcode() == X86::LEA32r || I->isDebugValue())
++I;
unsigned StackPtr = RegInfo.getStackRegister();
OpenPOWER on IntegriCloud