[Mlir-commits] [mlir] [mlir][Affine] Let affine.[de]linearize_index omit outer bounds (PR #116103)
Krzysztof Drewniak
llvmlistbot at llvm.org
Wed Nov 13 23:32:22 PST 2024
================
@@ -4736,6 +4741,14 @@ LogicalResult AffineLinearizeIndexOp::verify() {
}
OpFoldResult AffineLinearizeIndexOp::fold(FoldAdaptor adaptor) {
+ // No indices linearizes to zero.
+ if (getMultiIndex().empty())
----------------
krzysz00 wrote:
I think we should allow this case and define it to be 0. It follows naturally from the general idea of linearization.
https://github.com/llvm/llvm-project/pull/116103
More information about the Mlir-commits
mailing list