[Mlir-commits] [mlir] [mlir][vector] Don't fold in_bounds for scalable vector dimensions (PR #213506)

Federico Bruzzone llvmlistbot at llvm.org
Thu Aug 6 04:57:44 PDT 2026


================
@@ -5377,6 +5377,11 @@ static bool isInBounds(TransferOp op, int64_t resultIdx, int64_t indicesIdx) {
   // op.getIndices()[indicesIdx] + vectorType < dim(op.getSource(), indicesIdx)
   if (op.getShapedType().isDynamicDim(indicesIdx))
     return false;
+  // A scalable dimension holds `vscale` times as many elements as its static
+  // size suggests and `vscale` is only known at run time, so the static size is
+  // just a lower bound and cannot prove that the transfer fits.
----------------
FedericoBruzzone wrote:

```suggestion
    // Scalable dimensions are `vscale` times larger at runtime, so the static
    // size is only a lower bound and cannot prove that the transfer fits.
```

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


More information about the Mlir-commits mailing list