From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 89B253858D39; Thu, 27 Jul 2023 21:38:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89B253858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690493923; bh=vYtUW5zgp+yXPUYlvncNjjDN9BoySZ37Ijokhf25RGA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Kn7DbQ17w/6FmB3+apVjC1iGwl0PFCWkDsSui0rEF7uB6IrasKIVpgDm7Ple7v4Vl 0nd3RrWDpocwZL/Q8G5MLbcPVZnXO/yjlgUL44F/ZMZ6ucjWVSZ6LQ7SJWrFzAW/Vt KrLFVN2k8wt6N/eEFwEQiskH1C1W8foxXrjW/L3Q= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106293] [13/14 Regression] 456.hmmer at -Ofast -march=native regressed by 19% on zen2 and zen3 in July 2022 Date: Thu, 27 Jul 2023 21:38:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D106293 --- Comment #16 from Jan Hubicka --- It is really hard to make loop splitting to do something. It does not like canonicalized invariant variables since loop exit condition should not be NE_EXPR and it does not like when VRP turns LT/GT into NE. This is what happens in hmmer. There is loop iterating 100 times and split= ting happens just before last BB int M =3D 100; void __attribute__ ((noinline,noipa)) do_something() { } void __attribute__ ((noinline,noipa)) do_something2() { } __attribute__ ((noinline,noipa)) void test1 (int n) { if (n <=3D 0 || n > 100000) return;=20 for (int i =3D 0; i <=3D n; i++) if (i < n) do_something (); else do_something2 (); } int main(int, char **) { for (int i =3D 0 ; i < 1000; i++) test1(M); return 0; }=