[Mlir-commits] [mlir] [mlir][Utils] Add verifyIndexCount helper (NFC) (PR #176678)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Jan 23 08:43:59 PST 2026


================
@@ -5853,8 +5854,8 @@ LogicalResult vector::LoadOp::verify() {
 
   if (resVecTy.getElementType() != memElemTy)
     return emitOpError("base and result element types should match");
-  if (llvm::size(getIndices()) != memRefTy.getRank())
-    return emitOpError("requires ") << memRefTy.getRank() << " indices";
+  if (failed(verifyIndexCount(*this, memRefTy, llvm::size(getIndices()))))
----------------
banach-space wrote:

Same comment for other lines using `llvm::size()`

```suggestion
  if (failed(verifyIndexCount(*this, memRefTy, getIndices().size())))
```

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


More information about the Mlir-commits mailing list