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

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 14:23:13 PST 2024


================
@@ -19108,6 +19108,21 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
         /*ReturnType=*/Op0->getType(), CGM.getHLSLRuntime().getStepIntrinsic(),
         ArrayRef<Value *>{Op0, Op1}, nullptr, "hlsl.step");
   }
+  case Builtin::BI__builtin_hlsl_wave_active_any_true: {
+    IntegerType *Int1Ty =
----------------
inbelic wrote:

I am not sure what exactly you are referring to with the scope but I think you can just do
`assert(Op->getType()->isIntegerType(1) && ...)` instead of constructing the type to compare.

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


More information about the cfe-commits mailing list