diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp index 4971b010870d..9e86bd0c2b97 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp @@ -95,10 +95,8 @@ bool AMDGPULateCodeGenPrepare::runOnFunction(Function &F) { bool Changed = false; for (auto &BB : F) - for (auto BI = BB.begin(), BE = BB.end(); BI != BE; /*EMPTY*/) { - Instruction *I = &*BI++; - Changed |= visit(*I); - } + for (Instruction &I : llvm::make_early_inc_range(BB)) + Changed |= visit(I); return Changed; } |
