forked from OSchip/llvm-project
Make sure I is not the end iterator when isInsideBundle is called.
llvm-svn: 166784
This commit is contained in:
parent
ceb32bf285
commit
6fe7acab9d
|
@ -145,7 +145,8 @@ MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI() {
|
||||||
instr_iterator I = instr_begin(), E = instr_end();
|
instr_iterator I = instr_begin(), E = instr_end();
|
||||||
while (I != E && I->isPHI())
|
while (I != E && I->isPHI())
|
||||||
++I;
|
++I;
|
||||||
assert(!I->isInsideBundle() && "First non-phi MI cannot be inside a bundle!");
|
assert((I == E || !I->isInsideBundle()) &&
|
||||||
|
"First non-phi MI cannot be inside a bundle!");
|
||||||
return I;
|
return I;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +157,7 @@ MachineBasicBlock::SkipPHIsAndLabels(MachineBasicBlock::iterator I) {
|
||||||
++I;
|
++I;
|
||||||
// FIXME: This needs to change if we wish to bundle labels / dbg_values
|
// FIXME: This needs to change if we wish to bundle labels / dbg_values
|
||||||
// inside the bundle.
|
// inside the bundle.
|
||||||
assert(!I->isInsideBundle() &&
|
assert((I == E || !I->isInsideBundle()) &&
|
||||||
"First non-phi / non-label instruction is inside a bundle!");
|
"First non-phi / non-label instruction is inside a bundle!");
|
||||||
return I;
|
return I;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue