[Mlir-commits] [mlir] [mlir][affine]fix create affine.for bug. (PR #117721)
lonely eagle
llvmlistbot at llvm.org
Wed Nov 27 05:12:41 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:
You're right.Thanks for the advice, I probably already know how to do it.Thanks!
https://github.com/llvm/llvm-project/pull/117721
More information about the Mlir-commits
mailing list