diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp index 64211c8d31b..5bf7b112869 100644 --- a/lib/CodeGen/InlineSpiller.cpp +++ b/lib/CodeGen/InlineSpiller.cpp @@ -1196,7 +1196,7 @@ void InlineSpiller::spillAroundUses(unsigned Reg) { for (MachineRegisterInfo::reg_bundle_iterator RegI = MRI.reg_bundle_begin(Reg), E = MRI.reg_bundle_end(); RegI != E; ) { - MachineInstr *MI = &*(RegI++); + MachineInstr *MI = getBundleStart(&*(RegI++)); // Debug values are not allowed to affect codegen. if (MI->isDebugValue()) {