AArch64: Fix range loop contradicting comment above it

llvm-svn: 272959
This commit is contained in:
Matt Arsenault 2016-06-16 21:21:49 +00:00
parent 3e06e1edac
commit f1c3906a5d
1 changed files with 2 additions and 1 deletions

View File

@ -463,7 +463,8 @@ bool AArch64BranchRelaxation::relaxBranchInstructions() {
bool Changed = false;
// Relaxing branches involves creating new basic blocks, so re-eval
// end() for termination.
for (auto &MBB : *MF) {
for (MachineFunction::iterator I = MF->begin(); I != MF->end(); ++I) {
MachineBasicBlock &MBB = *I;
MachineInstr *MI = MBB.getFirstTerminator();
if (isConditionalBranch(MI->getOpcode()) &&
!isBlockInRange(MI, getDestBlock(MI),