Commit 3e859e67 authored by Yu Cheng's avatar Yu Cheng Committed by LeiWang1999
Browse files

[Bugfix] Fixed the handling logic of IfThenElseNode in if_stmt_binding (#315)

parent 0fd82ed5
......@@ -29,8 +29,11 @@ private:
Stmt VisitStmt_(const IfThenElseNode *op) final {
auto condition = op->condition;
auto then_case = op->then_case;
auto else_case = op->else_case;
auto then_case = VisitStmt(op->then_case);
Optional<Stmt> else_case = op->else_case;
if (else_case.defined()) {
else_case = VisitStmt(else_case.value());
}
auto bind_if_stmt = [](Optional<Stmt> body,
const PrimExpr condition) -> Stmt {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment