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

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 20 09:45:02 PST 2024


================
@@ -2826,6 +2843,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
     return selectExtInst(ResVReg, ResType, I, CL::s_clamp, GL::SClamp);
   case Intrinsic::spv_wave_active_countbits:
     return selectWaveActiveCountBits(ResVReg, ResType, I);
+  case Intrinsic::spv_wave_any:
+    return selectWaveActiveAnyTrue(ResVReg, ResType, I);
----------------
farzonl wrote:

Why can’t you just do:

`return selectWaveNOpInst(ResVReg, ResType, I, SPIRV::OpGroupNonUniformAny, 3);`

here?

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


More information about the cfe-commits mailing list