[llvm] [AMDGPU][AtomicOptimizer] Fix DT update for divergent values with Iterative strategy (PR #87605)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 7 23:14:28 PDT 2024
================
@@ -876,7 +876,7 @@ void AMDGPUAtomicOptimizerImpl::optimizeAtomic(Instruction &I,
BasicBlock *Predecessor = nullptr;
if (ValDivergent && ScanImpl == ScanOptions::Iterative) {
// Move terminator from I's block to ComputeEnd block.
- Instruction *Terminator = EntryBB->getTerminator();
+ BranchInst *Terminator = cast<BranchInst>(EntryBB->getTerminator());
----------------
Pierre-vh wrote:
Added comment + changed var name
https://github.com/llvm/llvm-project/pull/87605
More information about the llvm-commits
mailing list