[Mlir-commits] [mlir] [mlir][linalg] fix segmentation fault in isContractionBody function (PR #108703)

Mehdi Amini llvmlistbot at llvm.org
Sun Sep 15 03:14:02 PDT 2024


================
@@ -222,7 +222,7 @@ bool mlir::linalg::detail::isContractionBody(
   Value contributed = getSourceSkipUnary(
       isa<BlockArgument>(reductionLHS) ? reductionRHS : reductionLHS);
   Operation *elementwiseOp = contributed.getDefiningOp();
-  if (elementwiseOp->getNumResults() != 1 ||
+  if (!elementwiseOp || elementwiseOp->getNumResults() != 1 ||
----------------
joker-eph wrote:

Can you please provide a minimal test for this?

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


More information about the Mlir-commits mailing list