[Mlir-commits] [mlir] [mlir][spirv] Tighten SPIR-V TOSA pool constraints (PR #193515)

Igor Wodiany llvmlistbot at llvm.org
Fri Apr 24 03:31:23 PDT 2026


================
@@ -54,6 +54,96 @@ void printSPIRV_I32_1DArmTensor(OpAsmPrinter &printer, Operation *,
 // SPIRV Tosa Custom verifiers
 //===----------------------------------------------------------------------===//
 
+namespace {
+
+int64_t getIntValue(DenseIntElementsAttr attr, size_t idx) {
+  return (*std::next(attr.getValues<APInt>().begin(), idx)).getSExtValue();
----------------
IgWod wrote:

You could probably just use `attr.getValues<int64_t>()[idx]`, see: https://github.com/llvm/llvm-project/blob/faf37adb3b33a984c585bb5a53f0caa8f0934c0f/mlir/include/mlir/IR/BuiltinAttributeInterfaces.td#L133

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


More information about the Mlir-commits mailing list