[llvm] [InstCombine] Optimize AMDGPU ballot + assume uniformity patterns (PR #160670)

Pankaj Dwivedi via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 03:18:34 PDT 2025


PankajDwivedi-25 wrote:

> > assume(icmp eq (ballot(cmp), -1))
> 
> Isn't the ballot result anded with exec?

I don't know why this point is relevant here; all I can see is that the ballot result must be true for all lanes.

> Such that this assume is only correct for full dispatches at the entry to the kernel?

I thought we just assume its operand is true irrespective of the context where it is present.

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


More information about the llvm-commits mailing list