From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF0F03858430; Mon, 10 Oct 2022 16:54:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF0F03858430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665420883; bh=Tbw8mRCz1XxQjEbVufL7cxAPsNU8nu42UYU2ba09A+M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OlvtLT1OTD5+RpTuLB9T1GNgf9B3sAGTh4BHGt0FCKqt4MPcMh3HxuSDtcZUNInZt pZFU2XjvhWmaeV3NDQ8VPEHOX5o6dv/mJ5aBbBfpt6gvUfoVso0/jptqIExzd7nAhw OsgB+5OWZRaHf8YMzVt+9NszuIy+UD5ttUzni3/w= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/107190] [aarch64] regression with optimization -fexpensive-optimizations Date: Mon, 10 Oct 2022 16:54:43 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: component 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=3D107190 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |rtl-optimization --- Comment #1 from Andrew Pinski --- (In reply to vfdff from comment #0) > This case is simplify from > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107090, and we can see tha= t the > codegen of function `test_m` has some regression with optimization > -fexpensive-optimizations, https://gcc.godbolt.org/z/zbKrEox4j >=20 > This is because the pass 208t.widening_mul is controlled by > -fexpensive-optimizations (default on at -O3), it conversion >=20 > ``` > m_12 =3D m_9 + m1_10; > if (m1_10 > m_12) > ``` > into >=20 > ``` > _17 =3D .ADD_OVERFLOW (m_9, m1_10); > m_12 =3D REALPART_EXPR <_17>; > _18 =3D IMAGPART_EXPR <_17>; > if (_18 !=3D 0)`` This should always be better. If ifcvt.cc does not handle this case, then it should be improved.=