Skip to content
Snippets Groups Projects
Commit 3fc9a049 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Swap out neutral init values for reduced assignments with min/max op

parent 75ea862f
No related branches found
No related tags found
1 merge request!438Reduction Support
Pipeline #72382 passed
......@@ -207,10 +207,10 @@ class FreezeExpressions:
init_val = PsConstant(1)
new_rhs = mul(lhs.clone(), rhs)
case "min":
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Min), [])
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Max), [])
new_rhs = PsCall(PsMathFunction(MathFunctions.Min), [lhs.clone(), rhs])
case "max":
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Max), [])
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Min), [])
new_rhs = PsCall(PsMathFunction(MathFunctions.Max), [lhs.clone(), rhs])
case _:
raise FreezeError(f"Unsupported reduced assignment: {expr.op}.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment