[Tarantool-patches] [PATCH luajit] Fix FOLD rule for x-0.

Igor Munkin imun at tarantool.org
Thu Nov 23 09:29:30 MSK 2023


Sergey,

I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in master, release/2.11 and
release/2.10.

On 31.10.23, Sergey Kaplun via Tarantool-patches wrote:
> From: Mike Pall <mike>
> 
> Reported by XmiliaH.
> 
> (cherry-picked from commit 7b994e0ee0399caf6319865bbac88ddf62129a36)
> 
> Fold optimization x - (-0) ==> x is INVALID for x = -0 in FP arithmetic.
> Its result is -0 instead of +0. This patch allows only x - (+0) ==> x
> optimization.
> 
> Sergey Kaplun:
> * added the description and the test for the problem
> 
> Part of tarantool/tarantool#9145
> ---
> 
> Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-783-fix-fold-x-0
> Tarantool PR: https://github.com/tarantool/tarantool/pull/9320
> Related Issues:
> * https://github.com/tarantool/tarantool/issues/9145
> * https://github.com/LuaJIT/LuaJIT/pull/783
> 
>  src/lj_opt_fold.c                            |  3 +--
>  test/tarantool-tests/lj-783-fold--0.test.lua | 28 ++++++++++++++++++++
>  2 files changed, 29 insertions(+), 2 deletions(-)
>  create mode 100644 test/tarantool-tests/lj-783-fold--0.test.lua
> 

<snipped>

> -- 
> 2.42.0
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list