diff options
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp b/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp index b876a660fe7..fbca0a7b832 100644 --- a/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp +++ b/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp @@ -52,15 +52,10 @@ bool AMDGPUConvertToISAPass::runOnMachineFunction(MachineFunction &MF) for (MachineFunction::iterator BB = MF.begin(), BB_E = MF.end(); BB != BB_E; ++BB) { MachineBasicBlock &MBB = *BB; - for (MachineBasicBlock::iterator I = MBB.begin(), Next = llvm::next(I); - I != MBB.end(); I = Next, Next = llvm::next(I) ) { + for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); + I != E; ++I) { MachineInstr &MI = *I; - MachineInstr * newInstr = TII->convertToISA(MI, MF, MBB.findDebugLoc(I)); - if (!newInstr) { - continue; - } - MBB.insert(I, newInstr); - MI.eraseFromParent(); + TII->convertToISA(MI, MF, MBB.findDebugLoc(I)); } } return false; |