summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2014-03-13 21:25:10 +0000
committerOwen Anderson <resistor@mac.com>2014-03-13 21:25:10 +0000
commitee1ae96bd53c5cb3130e6a3356b30e8872f3dd6d (patch)
treeb7226a40cebc0f98a7541e42e836e89d225e141f
parent3fe486a332bc206f9415f9b54e4694115a69b0ab (diff)
downloadbcm5719-llvm-ee1ae96bd53c5cb3130e6a3356b30e8872f3dd6d.tar.gz
bcm5719-llvm-ee1ae96bd53c5cb3130e6a3356b30e8872f3dd6d.zip
Fix a subtle issue introduced my my recent changes to MachineRegisterInfo iterators.
When initializing an iterator, we may have to step forward to find the first operand that passes the current filter set. When doing that stepping, we should always step one operand at a time, even if this is by-instr or by-bundle iterator, as we're stepping between invalid values, so the stride doesn't make sense there. Fixes a miscompilation of YASM on Win32 reported by Hans Wennborg. I have not yet figured out how to reduce it to something testcase-able, because it's sensitive to the details of how the registers get spilled. llvm-svn: 203852
-rw-r--r--llvm/include/llvm/CodeGen/MachineRegisterInfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h
index 01fa00fe241..7167595ec7d 100644
--- a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -677,7 +677,7 @@ public:
if ((!ReturnUses && op->isUse()) ||
(!ReturnDefs && op->isDef()) ||
(SkipDebug && op->isDebug()))
- ++*this;
+ advance();
}
}
friend class MachineRegisterInfo;
OpenPOWER on IntegriCloud