[llvm] [AMDGPU] make AMDGPUUniformIntrinsicCombine a function pass (PR #165265)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 02:37:09 PDT 2025
================
@@ -97,14 +91,12 @@ static bool optimizeUniformIntrinsic(IntrinsicInst &II,
Tracker[NotOp] = true; // NOT preserves uniformity
LLVM_DEBUG(dbgs() << "Replacing ICMP_EQ: " << *NotOp << '\n');
ICmp->replaceAllUsesWith(NotOp);
- ICmp->eraseFromParent();
----------------
ssahasra wrote:
I vaguely remember that since you use early_inc_range in the outer for-loop, it should be safe to call this erase, right?
https://github.com/llvm/llvm-project/pull/165265
More information about the llvm-commits
mailing list