未验证 提交 100ac296 编写于 作者: 傅剑寒 提交者: GitHub

fix simplifyBlockMutator backtrace logic (#56338)

上级 1af1178a
......@@ -299,6 +299,9 @@ struct SimplifyBlocksMutator : public ir::IRMutator<> {
*expr = node->stmts[0];
Visit(expr, expr);
} else {
for (auto& s : node->stmts) {
Visit(&s, &s);
}
std::vector<Expr> stmts;
for (auto& s : node->stmts) {
if (s.As<ir::Block>()) {
......@@ -308,7 +311,6 @@ struct SimplifyBlocksMutator : public ir::IRMutator<> {
stmts.push_back(inner_stmt);
}
} else {
IRMutator<>::Visit(&s, &s);
stmts.push_back(s);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册