diff --git a/lib/Target/X86/X86VZeroUpper.cpp b/lib/Target/X86/X86VZeroUpper.cpp index 99ba4c02a46..6925b272b4a 100644 --- a/lib/Target/X86/X86VZeroUpper.cpp +++ b/lib/Target/X86/X86VZeroUpper.cpp @@ -281,8 +281,8 @@ bool VZeroUpperInserter::runOnMachineFunction(MachineFunction &MF) { // Process all blocks. This will compute block exit states, record the first // unguarded call in each block, and add successors of dirty blocks to the // DirtySuccessors list. - for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) - processBasicBlock(*I); + for (MachineBasicBlock &MBB : MF) + processBasicBlock(MBB); // If any YMM regs are live in to this function, add the entry block to the // DirtySuccessors list