1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

[X86]: Fix for uninitialized access introduced in r272797.

llvm-svn: 272835
This commit is contained in:
Kevin B. Smith 2016-06-15 20:52:19 +00:00
parent 25ec11b40c
commit 6c7d1c52cb

View File

@ -372,12 +372,16 @@ void FixupBWInstPass::processBasicBlock(MachineFunction &MF,
LiveRegs.addLiveIns(MBB);
auto NextCandidateIter = MIReplacements.begin();
auto EndCandidateIter = MIReplacements.end();
for (auto I = MBB.begin(); I != MBB.end(); ++I) {
MachineInstr *MI = &*I;
SmallVector<std::pair<unsigned, const MachineOperand*>, 4> Clobbers;
LiveRegs.stepForward(*MI, Clobbers);
if (NextCandidateIter == EndCandidateIter)
break;
// Only check and create a new instruction if this instruction is
// known to be a candidate that didn't get transformed.
if (NextCandidateIter->first == MI) {