[Mlir-commits] [mlir] [mlir][affine] Guard invalid dim attribute in the test-reify-bound pass (PR #129013)
Matthias Springer
llvmlistbot at llvm.org
Tue Mar 11 02:26:58 PDT 2025
================
@@ -84,6 +84,23 @@ static LogicalResult testReifyValueBounds(FunctionOpInterface funcOp,
auto boundType = op.getBoundType();
Value value = op.getVar();
std::optional<int64_t> dim = op.getDim();
+ auto shapedType = dyn_cast<ShapedType>(value.getType());
+ if (!shapedType && dim.has_value()) {
+ op->emitOpError("dim specified for non-shaped type");
----------------
matthias-springer wrote:
We need one more case: `shapedType && !dim.has_value()`
https://github.com/llvm/llvm-project/pull/129013
More information about the Mlir-commits
mailing list