From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCE273857354; Fri, 2 Jun 2023 04:42:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCE273857354 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685680974; bh=2fCik7cYigA6smoau11hSfBJUztzjuxw9kf7Us1aObQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PA6wwrQPFX8UmQUdH26AlU8cCsLuRuv5LVpDH1b6D8QgCMmt6g7IYYbwlQIEmfl6T tTJIpxdK7852ZGeRECA3DKer/zpgfR+iAhWEin4rYnhM/iXVn29gVPFrmgqFlPQbGe lQ0WK3sFccn1PpCYvSgWb6Cb7LNnk3UBOFYHXXFs= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/88403] [Mips,AArch64] The gcse and division/mod by 1000 prevents if-conversion Date: Fri, 02 Jun 2023 04:42:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 7.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia 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: cf_reconfirmed_on bug_severity everconfirmed short_desc bug_status 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=3D88403 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-06-02 Severity|normal |enhancement Ever confirmed|0 |1 Summary|[Mips,AArch64] The gcse |[Mips,AArch64] The gcse and |prevents if-conversion |division/mod by 1000 | |prevents if-conversion Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- Confirmed. GCSE is doing the right thing, just ifcvt can't handle this currently. Here is a reduced testcase: ``` int f(int a, int b) { if (a % 10000 > 10000/2) a+=3D 10000/2; return a / 10000; } ```=