[llvm] [SPIRV] Implement LLVM IR and backend for typed buffer counters (PR #161425)

Marcos Maronas via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 06:31:57 PDT 2025


================
@@ -3479,6 +3489,130 @@ bool SPIRVInstructionSelector::selectHandleFromBinding(Register &ResVReg,
                                   *cast<GIntrinsic>(&I), I);
 }
 
+bool SPIRVInstructionSelector::selectCounterHandleFromBinding(
+    Register &ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
+  auto &Intr = cast<GIntrinsic>(I);
+  assert(Intr.getIntrinsicID() ==
+         Intrinsic::spv_resource_counterhandlefrombinding);
+
+  // Extract information from the intrinsic call
----------------
maarquitos14 wrote:

```suggestion
  // Extract information from the intrinsic call.
```

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


More information about the llvm-commits mailing list