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

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 15 11:36:43 PST 2024


================
@@ -1995,7 +2014,7 @@ bool SPIRVInstructionSelector::selectWaveReadLaneAt(Register ResVReg,
                  TII.get(SPIRV::OpGroupNonUniformShuffle))
       .addDef(ResVReg)
       .addUse(GR.getSPIRVTypeID(ResType))
-      .addUse(GR.getOrCreateConstInt(3, I, IntTy, TII))
+      .addUse(GR.getOrCreateConstInt(SPIRV::Scope::Subgroup, I, IntTy, TII))
       .addUse(I.getOperand(2).getReg())
       .addUse(I.getOperand(3).getReg());
----------------
pow2clk wrote:

While you're here, you might add the `constrainAllUses` method call here as well.

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


More information about the cfe-commits mailing list