mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
R600: avoid calling std::next on an iterator that might be end()
This was causing my llc to go into an infinite loop on CodeGen/R600/address-space.ll (just triggered recently by some allocator changes). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205005 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b7de4288bc
commit
bd2cca79b7
@ -439,10 +439,10 @@ bool SILowerControlFlowPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
BI != BE; ++BI) {
|
||||
|
||||
MachineBasicBlock &MBB = *BI;
|
||||
for (MachineBasicBlock::iterator I = MBB.begin(), Next = std::next(I);
|
||||
I != MBB.end(); I = Next) {
|
||||
|
||||
MachineBasicBlock::iterator I, Next;
|
||||
for (I = MBB.begin(); I != MBB.end(); I = Next) {
|
||||
Next = std::next(I);
|
||||
|
||||
MachineInstr &MI = *I;
|
||||
if (TII->isDS(MI.getOpcode())) {
|
||||
NeedM0 = true;
|
||||
|
Loading…
Reference in New Issue
Block a user