[llvm] [WIP][Assume] Generic assume-based uniformity optimization (PR #160670)
Teja Alaghari via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 5 04:47:48 PDT 2025
================
@@ -1341,6 +1336,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
Call->takeName(&II);
return IC.replaceInstUsesWith(II, Call);
}
+
+ if (auto *Src = dyn_cast<ConstantInt>(Arg)) {
----------------
TejaX-Alaghari wrote:
The `ballot(false) → 0` optimization moved to execute *after* Wave32 conversion instead of before. This ensures:
1. Wave32 conversion happens first (i64 → i32 ballot + zext)
2. Then constant folding applies
3. More consistent optimization order
Is this the right approach, or should it stay before Wave32 conversion?
https://github.com/llvm/llvm-project/pull/160670
More information about the llvm-commits
mailing list