[Mlir-commits] [mlir] [Mlir] decompose generic by unfolding projected permutation crash fix (PR #122449)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 10 07:27:19 PST 2025


================
@@ -159,6 +159,15 @@ LogicalResult DecomposeProjectedPermutation::matchAndRewrite(
     auto map = op.getMatchingIndexingMap(&opOperand);
     if (!map.isProjectedPermutation(false))
       return failure();
+
+    // If we have any inputs that aren't memref or ranked tensor types, reject
+    // the pattern.
+    if (!dyn_cast<ShapedType>(opOperand.get().getType()))
+      return op->emitError("Expected operand #")
----------------
GrumpyPigSkin wrote:

I have modified it to use rewriter.notifyMatchFailure.
Is the test okay just checking if it compiles successfully? I wasn't sure how to capture the notifyMatchFailure using FileCheck.

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


More information about the Mlir-commits mailing list