[Mlir-commits] [mlir] [mlir][affine]fix create affine.for bug. (PR #117721)
lonely eagle
llvmlistbot at llvm.org
Wed Nov 27 07:14:27 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'm a bit confused, for the block bb0, if it's parameter is a memref, then it's dimensions can change as well, but it shouldn't cause an effect like the one inside the example you gave, I'm not very sure. I think this needs to be confirmed.
https://github.com/llvm/llvm-project/pull/117721
More information about the Mlir-commits
mailing list