[Mlir-commits] [mlir] [mlir][affine]fix create affine.for bug. (PR #117721)
lonely eagle
llvmlistbot at llvm.org
Wed Nov 27 17:33:44 PST 2024
================
@@ -352,9 +353,13 @@ static bool isDimOpValidSymbol(ShapedDimOpInterface dimOp, Region *region) {
// Conservatively handle remaining BlockArguments as non-valid symbols.
// E.g. scf.for iterArgs.
- if (llvm::isa<BlockArgument>(dimOp.getShapedValue()))
- return false;
-
+ if (auto blockArgument =
+ llvm::dyn_cast<BlockArgument>(dimOp.getShapedValue())) {
+ if (!llvm::isa<FunctionOpInterface>(
+ blockArgument.getParentRegion()->getParentOp())) {
----------------
linuxlonelyeagle wrote:
I think I've figured it out, and I'll modify the patch later.
https://github.com/llvm/llvm-project/pull/117721
More information about the Mlir-commits
mailing list