You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing a multiplication such as 3 * 5 * x expands correctly, but multiplications such as x * 3 * 5 do not. Multiplication between constants should be expanded first, before multiplications between expressions and constants.
Note that removing the expr.has_side_effects() guard on the variable assignment in validate_expr_mul_const is not sufficient to solve this problem. In cases such as 17 * 3, where the multiplication expansion is not the same as the multiplication written, suboptimal code will still be produced. (In this case, x*51 expands to x * 5 * 5 * 2 + x)
The text was updated successfully, but these errors were encountered:
Doing a multiplication such as
3 * 5 * x
expands correctly, but multiplications such asx * 3 * 5
do not. Multiplication between constants should be expanded first, before multiplications between expressions and constants.Note that removing the
expr.has_side_effects()
guard on the variable assignment invalidate_expr_mul_const
is not sufficient to solve this problem. In cases such as17 * 3
, where the multiplication expansion is not the same as the multiplication written, suboptimal code will still be produced. (In this case,x*51
expands tox * 5 * 5 * 2 + x
)The text was updated successfully, but these errors were encountered: