fixes for a number of ZAM optimization bugs

This commit is contained in:
Vern Paxson 2023-11-05 16:26:38 -08:00 committed by Arne Welzel
parent 9bfe18473d
commit 1dc74eaa9c
11 changed files with 44 additions and 28 deletions

View file

@ -1468,7 +1468,7 @@ ExprPtr AssignExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
auto ind1_e = ind_e->Op1()->Reduce(c, ind1_stmt);
auto ind2_e = ind_e->Op2()->Reduce(c, ind2_stmt);
auto rhs_e = op2->Reduce(c, rhs_stmt);
auto rhs_e = op2->ReduceToSingleton(c, rhs_stmt);
red_stmt = MergeStmts(MergeStmts(rhs_reduce, ind1_stmt), ind2_stmt, rhs_stmt);