[Mlir-commits] [mlir] [mlir][Affine] Let affine.[de]linearize_index omit outer bounds (PR #116103)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Nov 13 20:28:07 PST 2024


================
@@ -4736,6 +4741,14 @@ LogicalResult AffineLinearizeIndexOp::verify() {
 }
 
 OpFoldResult AffineLinearizeIndexOp::fold(FoldAdaptor adaptor) {
+  // No indices linearizes to zero.
+  if (getMultiIndex().empty())
----------------
MaheshRavishankar wrote:

I think we should disallow this case in the verifier.

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


More information about the Mlir-commits mailing list