Code generation is incorrect with impure functions due to optimization pass #3746
Labels
goal:quality & productivity
Quality issues and issues that impact our productivity coding day to day inside slang
kind:bug
something doesn't work like it should
The first call to
simplifyIR
(afterlowerLValueCast
inlinkAndOptimizeIR
) simplifies functions which are impure and have side effects in the body (and not the arguments). It is likely allsimplifyIR
calls exhibit this behavior.edit:
This issue is due to incorrect checking in
isPureFunctionalCall
example case:
this compiles
computeMain
currently into:computeMain should instead compile effectively into:
The text was updated successfully, but these errors were encountered: