From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 366F24427C8; Sat, 20 May 2023 18:07:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 366F24427C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1684595261; bh=LAOR8UBORdeT8WPnx/VBJJD1aT9u0WN4AAEmMYVoK9k=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=M/xqD+Qe27n0W+hBssPBKIYa8IjLvOK7tYYcFl9fUbGv7wf1UK/vzbZ3iJ/qHeZsT 1PtwxRzFvpM+o1ORhN4CgCk3LBhg+c8uzF+g/M8IbuBgcUZLwabNB9ZXEiwXjfOSak 5tMGxD0z2EqizljbJn3L+MBf0CFIeI6+MxAuCK4Q= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id AEB974427C8 for ; Sat, 20 May 2023 18:07:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AEB974427C8 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1q0OBG-0006xU-UK; Sat, 20 May 2023 18:07:39 +0300 Date: Sat, 20 May 2023 18:03:34 +0300 To: Maxim Kokryashkin Message-ID: References: <1684152313.987316030@f170.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1684152313.987316030@f170.i.mail.ru> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD921E8753A900160F107B6AB32C260A2F4A83FD3E4D135EB99182A05F538085040ADE67830055A8C7DBFB5FAF243B1B45CF0603A6729A8A94389A175D946BAABDB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE711269A7C2F827F16EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377A7A7D315BEE81B48638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8ADB94AE0DFF44E3F02AFFDF71FAFA292117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC990B2EB4F061288CA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735204B6963042765DA4B2CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A1DCCEB63E2F10FB089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A59E1AF3915F5E8F06D8AB3F12618EE81EEB912330C541849FF87CCE6106E1FC07E67D4AC08A07B9B0CE135D2742255B35CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D3463DBE2ADA183F62F6CA71057A563E56DDBC0CEB8CD24D424CF75749160FA87FFD395B84EA06534D61D7E09C32AA3244CBF7B503835B9836A4DA39FC72FBB479655E75C8D0ED9F6EEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlaZ30BpkxfIVCDE4553yJw== X-DA7885C5: 309605F4395B05EE534A0BA342277401379CD4C048FCEC29D8BDD7C2675C328B262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B2C406E9A4FD7CAA44F00BDB58F08A5870FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/2] Fix canonicalization of +-0.0 keys for IR_NEWREF. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maxim! Thanks for the review! Fixed your comments and force-pushed the branch. On 15.05.23, Maxim Kokryashkin wrote: > > Hi, Sergey! > Thanks for the patch! > LGTM, except for a few nits regarding the commit message. >   > >  > >>From: Mike Pall > >> > >>Reported by Sergey Kaplun. > >> > >>(cherry picked from commit 96fc114a7a3be3fd2c227d5a0ac53aa50cfb85d1) > >> > >>This commit is a follow-up for the commit > >>f067cf638cf8987ab3b6db372d609a5982e458b5 ("Fix narrowing of unary > >>minus."). Since this commit -0 IR constant is stored as well as +0 > >Typo: s/as well as/as well as the/ Fixed. > >>constant on the trace. Since IR NEWREF keys don't canonicalizied for -0 > >Typo: s/don’t canonicalized/don’t get canonicalized/ Changed to "aren't canonicalizied", thanks! > >>opposed of IR HREFK, it may lead to inconsistencies during trace > >Typo: s/opposed of/as opposed to/ Fixed! Thanks! > >>recording. > >> > >>In particular, since -0 and 0 are different IR constants, alias analysis > >>declares that they can't be aliased during folding optimization. > >>Therefore: > >>1) For the IR TNEW we have non-nil value to lookup from the table via > >>   HLOAD, when only nil lookup is expected due to alias analysis. > >>2) For the IR TDUP we have non-nil value to lookup from the table via > >>   HLOAD, but the template table has no 0 field initiated as far as -0 > >>   isn't folding to 0 during parsing (see `bcemit_unop()` in > >>   ). > >>These cases lead to the assertion failures in `fwd_ahload()`. > >Typo: s/the assertion/assertion/ Fixed! > >> > >>This patch adds the aforementioned canonicalization. > >> > >>Sergey Bronnikov: > >>* reported the original issue for the TDUP IR > >> > >>Sergey Kaplun: > >>* added the description and the test for the problem > >> > >>Part of tarantool/tarantool#8516 > >>--- > >> > >>Side note: I don't mention the 981 issue by intend -- I don't want to > >>bother Mike with force pushes:). I suppose Igor should add this line (if > >>he wants) went this commit will be cherry-picked to our master branch > >>(a.k.a. tarantool). > >> > >> src/lj_record.c | 2 + > >> .../tarantool-tests/lj-981-folding-0.test.lua | 57 +++++++++++++++++++ > >> 2 files changed, 59 insertions(+) > >> create mode 100644 test/tarantool-tests/lj-981-folding-0.test.lua > >> > >>diff --git a/src/lj_record.c b/src/lj_record.c > >>index 9e2e1d9e..cc44db8d 100644 > >>--- a/src/lj_record.c > >>+++ b/src/lj_record.c > >>diff --git a/test/tarantool-tests/lj-981-folding-0.test.lua b/test/tarantool-tests/lj-981-folding-0.test.lua > >>new file mode 100644 > >>index 00000000..251da24d > >>--- /dev/null > >>+++ b/test/tarantool-tests/lj-981-folding-0.test.lua > >>2.34.1 > >-- > >Best regards, > >Maxim Kokryashkin -- Best regards, Sergey Kaplun