From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2205E3858C53; Fri, 25 Aug 2023 07:16:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2205E3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692947779; bh=mWR3+phkFfzjTOwoI+nK9jm35Z7a/c4n0peETs6gxhs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=elIUFivl38igpThEbbnpfl+xFYZdOnM5BV9CFkrrhSgrZPXdZNrKKMpO6eSIX8H7A TELwRflGlqr8eGe9YTZdtgeloL1iZZir/Cyy4/9FuX/MOI9X6e2aBIGk3BbLT8SI+T 7yKDtufWakz8iHsUmQqe+NoZ8/rPw5M430hmHF9Y= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111151] [12/13/14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu Date: Fri, 25 Aug 2023 07:16:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status 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=3D111151 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-08-25 --- Comment #1 from Richard Biener --- a =3D MAX_EXPR <(long long unsigned int) t + 4503599, 32739>; b =3D a * 18446744073709551606; printf ((const char *) "%llu (Split calculation result)\n", b); c =3D MAX_EXPR <(long long unsigned int) t * 18446744073709551606 + 18446744073664515626, 18446744073709224226>; printf ((const char *) "%llu (Combine calculation result)\n", c); smells like extract_muldiv, but Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:5475, generic-match-8.cc:1606 Applying pattern match.pd:4256, generic-match-8.cc:2977 Applying pattern match.pd:5113, generic-match-4.cc:2339 Applying pattern match.pd:4392, generic-match-8.cc:3091 Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:5475, generic-match-8.cc:1606 Applying pattern match.pd:4256, generic-match-8.cc:2977 Applying pattern match.pd:5113, generic-match-4.cc:2339 Applying pattern match.pd:4392, generic-match-8.cc:3091 it would be nice to have fold-const.cc report "matches" as well. Maybe replace all return ; with return report (); with a report macro doing dumping like above if is non-NULL.=