[Mlir-commits] [mlir] [mlir][affine] Guard invalid dim attribute in the test-reify-bound pass (PR #129013)

Matthias Springer llvmlistbot at llvm.org
Thu Mar 6 01:54:21 PST 2025


================
@@ -84,6 +84,13 @@ static LogicalResult testReifyValueBounds(FunctionOpInterface funcOp,
     auto boundType = op.getBoundType();
     Value value = op.getVar();
     std::optional<int64_t> dim = op.getDim();
----------------
matthias-springer wrote:

`dim` must be provided if and only if `value` is a shaped type. We should also error out for IR such as:
```
%r = "test.reify_bound"(%int_val) {dim = 1 : i64} : (index) -> index
```


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


More information about the Mlir-commits mailing list