push
github
Limit CSE for IR_CARG to fix loop optimizations. Thanks to Peter Cawley. (cherry picked from commit 3bdc6498c) `IR_CALLXS` for the vararg function contains `IR_CARG(fptr, ctid)` as the second operand. The `loop_emit_phi()` scans only the first operand of the IR, so the second is not marked as PHI. In this case, when the IR appears in both the invariant and variant parts of the loop, CSE may remove it and thus lead to incorrect emitting results. This patch tweaks the CSE rules to avoid CSE across the `IR_LOOP`. Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#10199 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Reviewed-by: Maxim Kokryashkin <m.kokryashkin@tarantool.org> Signed-off-by: Sergey Kaplun <skaplun@tarantool.org> (cherry picked from commit b52fe9795)
5694 of 6033 branches covered (94.38%)
Branch coverage included in aggregate %.
4 of 4 new or added lines in 1 file covered. (100.0%)
22 existing lines in 5 files now uncovered.21708 of 23449 relevant lines covered (92.58%)
2974203.78 hits per line