Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/relax/ir/expr_functor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,15 @@ void ExprMutator::ReEmitBinding(const VarBindingNode* binding, Expr new_value) {
return;
}

Var temp = WithStructInfo(new_var, GetStructInfo(new_value));
auto new_sinfo = new_value->struct_info_.as<StructInfo>();

ICHECK(new_sinfo)
<< "InternalError: "
<< "In binding of variable " << binding->var << ", the value " << new_value
<< " does not have StructInfo. "
<< "This typically occurs when ReEmitBinding is called without first calling Normalize.";

Var temp = WithStructInfo(new_var, new_sinfo.value());
if (!temp.same_as(new_var)) {
new_var = temp;
}
Expand Down