[clang] [llvm] [HLSL][DXIL][SPIRV] Added WaveActiveBitOr HLSL intrinsic (PR #165156)

Sietze Riemersma via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 13:41:57 PDT 2025


================
@@ -3211,6 +3211,29 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
     TheCall->setType(ArgTyExpr);
     break;
   }
+  case Builtin::BI__builtin_hlsl_wave_active_bit_or: {
+    if (SemaRef.checkArgCount(TheCall, 1))
+      return true;
+
+    // Ensure input expr type is a scalar/vector and the same as the return type
+    if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
----------------
KungFuDonkey wrote:

Hmm, I am still new to this, so take my PR with a grain of salt.

I copied this from WaveActiveSum, which has that order. I'll change it for this function.

I guess the Scalar or Vector type makes no sense as we only allow uint32 and uint64 here

Will update the code

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


More information about the cfe-commits mailing list