[Tarantool-patches] [PATCH v2 luajit 26/45] test: enable <misc/phi_conv.lua> LuaJIT test
Sergey Bronnikov
sergeyb at tarantool.org
Thu Aug 22 16:39:24 MSK 2024
Sergey,
thanks for the patch! LGTM with a minor comment below.
On 21.08.2024 11:58, Sergey Kaplun wrote:
> This patch moves the aforementioned test from the <misc> to the
> <trace/phi/> directory, includes it in <index>, and names the subtests.
>
> Part of tarantool/tarantool#9398
> ---
> .../{misc/phi_conv.lua => trace/phi/conv.lua} | 33 ++++++++++---------
> test/LuaJIT-tests/trace/phi/index | 1 +
> 2 files changed, 19 insertions(+), 15 deletions(-)
> rename test/LuaJIT-tests/{misc/phi_conv.lua => trace/phi/conv.lua} (69%)
>
> diff --git a/test/LuaJIT-tests/misc/phi_conv.lua b/test/LuaJIT-tests/trace/phi/conv.lua
> similarity index 69%
> rename from test/LuaJIT-tests/misc/phi_conv.lua
> rename to test/LuaJIT-tests/trace/phi/conv.lua
> index 8d7bea5f..267423c2 100644
> --- a/test/LuaJIT-tests/misc/phi_conv.lua
> +++ b/test/LuaJIT-tests/trace/phi/conv.lua
> @@ -1,18 +1,5 @@
> -
> local bit = require("bit")
>
> -local Rm = {}
> -for i=0,16 do Rm[i] = 0 end
> -
> -for k=1,10 do
> - local seed = 1
> - for i=16,0,-1 do
> - seed = bit.band(seed*9069, 0x7fffffff)
> - Rm[i] = seed
> - end
> - assert(seed == 1952688301)
> -end
> -
> local retindex = 0
> local retdata = { 3, 1, 1, 1, 0, 3, 1, 0, 0, 2, 0, 2, 0, 0, 3, 1, 1, 1, 1 }
>
> @@ -47,7 +34,23 @@ local function test()
> end
> end
>
> -if jit and jit.status and jit.status() then jit.opt.start("hotloop=1") end
> +do --- PHI for CONV num.int before ASTORE.
> + local Rm = {}
> + for i=0,16 do Rm[i] = 0 end
please add whitespaces
>
> -test()
> + for k=1,10 do
please add whitespaces
> + local seed = 1
> + for i=16,0,-1 do
please add whitespaces
> + seed = bit.band(seed*9069, 0x7fffffff)
> + Rm[i] = seed
> + end
> + assert(seed == 1952688301)
> + end
> +end
> +
> +do --- PHI for CONV num.int of lookup.
> + jit.opt.start("hotloop=1")
> + test()
> + jit.opt.start("hotloop=56")
> +end
>
> diff --git a/test/LuaJIT-tests/trace/phi/index b/test/LuaJIT-tests/trace/phi/index
> index 74a07333..a72d37a0 100644
> --- a/test/LuaJIT-tests/trace/phi/index
> +++ b/test/LuaJIT-tests/trace/phi/index
> @@ -1,3 +1,4 @@
> copyspill.lua
> +conv.lua
> ref.lua
> rotate.lua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20240822/834ea933/attachment.htm>
More information about the Tarantool-patches
mailing list