Ran
|
Jobs
1
|
Files
89
|
Run time
9s
|
Badge
Embed ▾
README BADGES
|
push
github
IR_MIN/IR_MAX is non-commutative due to underlying FPU ops. Thanks to Peter Cawley. (cherry-picked from commit 7a2b83a0c) Even after the commit c05d10330 ("Fix math.min()/math.max() inconsistencies."), some of the corner cases (see tests in the commit for details) for `math.min()`/`math.max()` still inconsistent in the JIT and the VM. This happens because `IR_MIN` and `IR_MAX` are marked as commutative, so their operands were swapped by `asm_swapops()`. As a result, because `minsd`[1]/`maxsd`[2] instructions don't change the sign byte of the destination register, its sign is preserved if we compare 0 with -0. When we compare something with NaN, the second source operand (either a NaN or a valid floating-point value) is written to the result. Hence, swapping the operands changed the resulting value. This patch removes the commutative flag from the aforementioned IRs to prevent swapping of their operands. [1]: https://c9x.me/x86/html/file_module_x86_id_173.html [2]: https://c9x.me/x86/html/file_module_x86_id_168.html Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#9145
5358 of 5975 branches covered (0.0%)
Branch coverage included in aggregate %.
20502 of 23304 relevant lines covered (87.98%)
2770068.86 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
95.97 |
-0.05% | src/lj_record.c |
1 |
99.04 |
1.44% | src/lj_str.c |
3 |
96.17 |
-0.3% | src/lj_asm.c |
3 |
95.2 |
-0.71% | src/lj_opt_mem.c |
42 |
64.44 |
-20.44% | src/lj_sysprof.c |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 6828599309.1 | 89 |
88.32 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|