[llvm] [IR] Add `alwaysuniform` function attribute (PR #214644)
Reem Elkhouly via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 01:04:39 PDT 2026
================
@@ -2377,6 +2377,11 @@ define void @f() "no-sse" { ... }
would normally be considered a source of divergence; setting this attribute
on a function means that a call to it is not a source of divergence.
+`alwaysuniform`
+: A call to this function is always uniform. In uniformity analysis, a *uniform*
+ value is a value that is the same across all threads in a subgroup. Setting this
+ attribute on a function means that a call to it always returns a uniform result.
----------------
amd-relkhoul wrote:
Correct!
Even if the inputs are divergent, the call is guaranteed to return a uniform result.
I'll edit the description to stress on that and remove the ambiguity.
Thanks
https://github.com/llvm/llvm-project/pull/214644
More information about the llvm-commits
mailing list