[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

Finn Plummer via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 11:57:44 PST 2024


================
@@ -86,6 +86,7 @@ let TargetPrefix = "spv" in {
   def int_spv_dot4add_i8packed : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
   def int_spv_dot4add_u8packed : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
   def int_spv_wave_active_countbits : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i1_ty], [IntrConvergent, IntrNoMem]>;
+  def int_spv_wave_any : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_i1_ty], [IntrConvergent, IntrNoMem]>;
----------------
inbelic wrote:

Happy to be corrected. My understanding was that `IntrConvergent` was used to model the cross-lane side-effect, and we can depend on that to ensure no optimizations would cause a bad reordering/folding. So we can then use `IntrNoMem` to model that there are no other (memory) side-effects.

cc @farzonl @bogner 

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


More information about the llvm-commits mailing list