[llvm] [InstCombine] Add assume-based optimizations for equality and AMDGPU ballot patterns (PR #160670)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 02:37:14 PDT 2025


================
@@ -3540,6 +3540,79 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
       }
     }
 
+    // Basic assume equality optimization: assume(x == c) -> replace dominated uses of x with c
----------------
jayfoad wrote:

Of course uses of x are dominated by the definition of x. This comment refers to uses of x dominated by the "assume".

https://github.com/llvm/llvm-project/pull/160670


More information about the llvm-commits mailing list