From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F16E83858401; Tue, 2 Jan 2024 17:06:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F16E83858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704215211; bh=JWcY99bXyY1xfUMrLJgExMOdBPzRcByq8avjG6Kpdn0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZvsZivq6VDP8swEZR76S7ApQI7EXsTX9STGrnu4qfr1vogKI3lR4HRUwJ1+JthrLo faDb6nL37pABSJLLx5zAm8xJ4eMtDBGz6Jz9rARYybWejzEJqNyBV5XchzENT5OA68 XwKVMCv56vqgSfc8na0hNIYyLq1s5o92OwAOlRXw= From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/113175] [11/12/13/14 Regression] testsuite/std/ranges/iota/max_size_type.cc 5x times slower Date: Tue, 02 Jan 2024 17:06:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to everconfirmed bug_status short_desc target_milestone cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113175 Patrick Palka changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot g= nu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Summary|[14 Regression] |[11/12/13/14 Regression] |testsuite/std/ranges/iota/m |testsuite/std/ranges/iota/m |ax_size_type.cc 5x times |ax_size_type.cc 5x times |slower |slower Target Milestone|--- |11.5 Last reconfirmed| |2024-01-02 --- Comment #8 from Patrick Palka --- (In reply to Hans-Peter Nilsson from comment #3) > There's one single regression event, bringing the host runtime to about 1= .63 > seconds. Then some time later, an additional 0.1 second was added > (accumulated). > I did not look into that latter regression. The big one is clouded by a > large range of commits where max_size_type failed, due to > r14-159-g03cebd304955a6. > This was fixed in r14-205-g83470a5cd4c3d2, at which time there the big > regression is seen for the first time. That is also the "cause" for the > commit, because applying that commit to r14-158-g7d115e01411156 shows the > same number as for r14-205-g83470a5cd4c3d2. Interesting, thanks for bisecting this. Before r14-205, the two main loops= in max_size_type.cc were effectively dead in the signed case because the 'sign= ed' qualifier in using hw_type =3D std::conditional_t; was being silently dropped (until r14-159, after which it was correctly rejected). This meant that when signed_p is true, the for loop for (hw_type i =3D min; i <=3D max; i++) was equivalent to for (unsigned __int128 i =3D -1000; i <=3D 1000; i++) so the loop body was never run! When r14-205 fixed that, the total number = of loop iterations increased by approximately 4x (2x due to symmetry with unsigned, 2x due to the loop range being -limit...limit instead of 0...limi= t) which is roughly consistent with a 5x increase in test execution time. > Maybe the higher number for the execution time is actually the "right" on= e and the range > should be cut down to -100..100 for *all* targets? That sounds good to me.. I can prepare a simple patch for that, which prob= ably should be backported to all release branches that r14-205 was backported to= .=