summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2013-10-23 18:32:43 +0000
committerMichael Liao <michael.liao@intel.com>2013-10-23 18:32:43 +0000
commitc7bf44d7bb79e8fc71c8b7996fc9f3a60f7a4925 (patch)
tree009945b6464ad8cd702be2c75e75a3abf7e071e0 /llvm/lib/Target/X86
parent4598907ff84ed4fba270e159607268f0ee8d6307 (diff)
downloadbcm5719-llvm-c7bf44d7bb79e8fc71c8b7996fc9f3a60f7a4925.tar.gz
bcm5719-llvm-c7bf44d7bb79e8fc71c8b7996fc9f3a60f7a4925.zip
Fix PR17631
- Skip instructions added in prolog. For specific targets, prolog may insert helper function calls (e.g. _chkstk will be called when there're more than 4K bytes allocated on stack). However, these helpers don't use/def YMM/XMM registers. llvm-svn: 193261
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/X86VZeroUpper.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86VZeroUpper.cpp b/llvm/lib/Target/X86/X86VZeroUpper.cpp
index 477f75afef2..0d37a7d0e67 100644
--- a/llvm/lib/Target/X86/X86VZeroUpper.cpp
+++ b/llvm/lib/Target/X86/X86VZeroUpper.cpp
@@ -231,8 +231,17 @@ bool VZeroUpperInserter::processBasicBlock(MachineFunction &MF,
bool BBHasCall = false;
for (MachineBasicBlock::iterator I = BB.begin(); I != BB.end(); ++I) {
- MachineInstr *MI = I;
DebugLoc dl = I->getDebugLoc();
+ MachineInstr *MI = I;
+
+ // Don't need to check instructions added in prolog.
+ // In prolog, special function calls may be added for specific targets
+ // (e.g. on Windows, a prolog helper '_chkstk' is called when the local
+ // variables exceed 4K bytes on stack.) These helpers won't use/def YMM/XMM
+ // registers.
+ if (MI->getFlag(MachineInstr::FrameSetup))
+ continue;
+
bool isControlFlow = MI->isCall() || MI->isReturn();
// Shortcut: don't need to check regular instructions in dirty state.
OpenPOWER on IntegriCloud