Commit e612b60c authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Avoid unneeded nesting

parent 881a4bd4
......@@ -115,8 +115,11 @@ struct parse_if : op_parser<parse_if>
else_out_shape.type_string());
}
if(not then_out_shape.dynamic() and not else_out_shape.dynamic())
if(then_out_shape.dynamic() or else_out_shape.dynamic())
{
continue;
}
auto then_lens = then_out_shape.lens();
auto else_lens = else_out_shape.lens();
......@@ -185,7 +188,6 @@ struct parse_if : op_parser<parse_if>
throw_shapes();
}
}
}
auto if_ret = info.add_instruction(make_op("if"), args, {then_mdl, else_mdl});
auto out_s = if_ret->get_shape();
......
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