Skip to content

Commit

Permalink
Fixup faulty logic in getting subviews and scf.pars (Xilinx#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwei-xilinx authored Apr 22, 2024
1 parent ee3596d commit 7cafce1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mlir/lib/Conversion/ConvertToAIRPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2176,12 +2176,14 @@ LogicalResult TileL1L2AIRMemcpyUsingScfParallel(air::DmaMemcpyNdOp op,
memref::SubViewOp tilingHintSubview = nullptr;
scf::ParallelOp previousTilingScfPar = nullptr;
for (auto user : L1Memref.getUsers()) {
tilingHintSubview = dyn_cast<memref::SubViewOp>(user);
if (!tilingHintSubview)
if (auto subViewUser = dyn_cast<memref::SubViewOp>(user))
tilingHintSubview = subViewUser;
else
continue;
previousTilingScfPar =
tilingHintSubview->getParentOfType<scf::ParallelOp>();
if (!previousTilingScfPar)
if (auto subViewParentPar =
tilingHintSubview->getParentOfType<scf::ParallelOp>())
previousTilingScfPar = subViewParentPar;
else
continue;
}
if (!tilingHintSubview || !previousTilingScfPar)
Expand Down

0 comments on commit 7cafce1

Please sign in to comment.