[llvm] [IR] Add `alwaysuniform` function attribute (PR #214644)
Justin Fargnoli via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 00:08:48 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.
----------------
justinfargnoli wrote:
>A call to this function is always uniform
This feels ambiguous to me. If we mean:
> Setting this attribute on a function means that a call to it always returns a uniform result.
Can we just say that?
https://github.com/llvm/llvm-project/pull/214644
More information about the llvm-commits
mailing list