[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 20 13:55:11 PDT 2024


Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/80680 at github.com>


================
@@ -1295,11 +1295,13 @@ double4 trunc(double4);
 /// true, across all active lanes in the current wave.
 _HLSL_AVAILABILITY(shadermodel, 6.0)
 _HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits)
+__attribute__((convergent))
----------------
llvm-beanz wrote:

I'm not sure I entirely agree with @arsenm here.

>From the LLVM-IR and compiler implementation perspective it is helpful to be able to expect that convergent is the default expected behavior, but from the language perspective for HLSL it is preferable to imply that convergence is the outlier because in the common case convergence isn't required.

I really don't want to tie the implementation of HLSL to a 4.5 year old PR that isn't merged.

@bogner, do you have thoughts here?

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


More information about the cfe-commits mailing list