From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 677263857025; Fri, 19 Mar 2021 12:43:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 677263857025 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99540] [10/11 Regression] ICE: Segmentation fault in aarch64_add_offset Date: Fri, 19 Mar 2021 12:43:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2021 12:43:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99540 rsandifo at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot= gnu.org --- Comment #7 from rsandifo at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #6) > As a fix maybe even better > --- gcc/config/aarch64/aarch64.c.jj 2021-03-19 10:14:18.302936161 +0100 > +++ gcc/config/aarch64/aarch64.c 2021-03-19 13:33:35.367973092 +0100 > @@ -4639,7 +4639,7 @@ aarch64_add_offset (scalar_int_mode mode > if (can_create_pseudo_p ()) > { > rtx coeff1 =3D gen_int_mode (factor, mode); > - val =3D expand_mult (mode, val, coeff1, NULL_RTX, false, true); > + val =3D expand_mult (mode, val, coeff1, NULL_RTX, true, true); > } > else > { >=20 > I mean, for 2's complement target (GCC doesn't support any other), the > difference between non-widening/highpart signed and unsigned multiplicati= on > is just in that flag_trapv case, for 64-bit x 64-bit -> 64-bit > multiplication the result bits are identical whether it is signed or > unsigned and that is the reason why we only have MULT in RTL and not SMULT > and UMULT. Yeah, this looks good to me, thanks. In this context (coming from rtl rather than trees) there's really no sign to speak of, so the choice of argument was probably pretty arbitrary. I didn't think about the effect on flag_trapv. I'll take the bug to test that and add a testcase.=