This fixes an issue with rL263658 pointed out by Tom Stellard.
llvm-svn: 263823
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
NumInstr < SkipThreshold && I != E; ++I) {
- if (I->isBundle() || !I->isBundled())
+ if (I->isBundle() || !I->isBundled()) {
// When a uniform loop is inside non-uniform control flow, the branch
// leaving the loop might be an S_CBRANCH_VCCNZ, which is never taken
// when EXEC = 0. We should skip the loop lest it becomes infinite.
if (++NumInstr >= SkipThreshold)
return true;
+ }
}
}