[Mlir-commits] [mlir] [mlir] Handle null region in LoopLikeOpInterface::isDefinedOutsideOfLoop (PR #204521)

Federico Bruzzone llvmlistbot at llvm.org
Thu Jun 18 05:29:48 PDT 2026


================
@@ -62,7 +62,8 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> {
       /*args=*/(ins "::mlir::Value ":$value),
       /*methodBody=*/"",
       /*defaultImplementation=*/[{
-        return !$_op->isAncestor(value.getParentRegion()->getParentOp());
+        ::mlir::Region *region = value.getParentRegion();
----------------
FedericoBruzzone wrote:

Can you add an inline comment explaining the null check? :D

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


More information about the Mlir-commits mailing list