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
This commit is contained in:
Owen Anderson 2014-03-13 21:25:10 +00:00
parent 3fe486a332
commit ee1ae96bd5
1 changed files with 1 additions and 1 deletions

View File

@ -677,7 +677,7 @@ public:
if ((!ReturnUses && op->isUse()) ||
(!ReturnDefs && op->isDef()) ||
(SkipDebug && op->isDebug()))
++*this;
advance();
}
}
friend class MachineRegisterInfo;