Skip to content

Commit

Permalink
Fix corner case in if_then_else simplification (#8189)
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Johnson <[email protected]>
  • Loading branch information
abadams and steven-johnson authored Apr 16, 2024
1 parent f4c7831 commit 7994e70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Simplify_Call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,11 @@ Expr Simplify::visit(const Call *op, ExprInfo *bounds) {
}
in_unreachable = false;
if (true_unreachable) {
return false_value;
if (false_value.defined()) {
return false_value;
} else {
return make_zero(op->type);
}
} else if (false_unreachable) {
return true_value;
}
Expand Down

0 comments on commit 7994e70

Please sign in to comment.