From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6EFAE3842414; Wed, 9 Dec 2020 16:51:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EFAE3842414 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/97092] [10/11 Regression] aarch64, SVE: ICE in ira-color.c since r10-4752-g2d56600c Date: Wed, 09 Dec 2020 16:51:21 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: akrl at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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 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: Wed, 09 Dec 2020 16:51:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97092 --- Comment #6 from rsandifo at gcc dot gnu.org --- (In reply to Andrea Corallo from comment #5) > "rsandifo at gcc dot gnu.org via Gcc-bugs" > writes: >=20 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97092 > > > > --- Comment #4 from rsandifo at gcc dot gnu.org --- > > (In reply to Andrea Corallo from comment #3) > >> Created attachment 49710 [details] > >> PR97092.patch > >>=20 > >> What is going on is that in 'update_costs_from_allocno' we try to > >> identify the smallest mode using narrower_subreg_mode to then update t= he > >> costs. > >>=20 > >> The two modes involved here are E_DImode and E_VNx2QImode, cause these > >> are not ordered we ICE in 'paradoxical_subreg_p'. > >>=20 > >> Now I don't know if the strategy we want is: > >>=20 > >> - In 'update_costs_from_allocno' when modes are not ordered instead of > >> calling 'narrower_subreg_mode' just keep the current one. > >>=20 > >> - Always select the cheapest mode in terms of cost. > >>=20 > >> The attached I'm testing implements the second. >=20 > Hi Richard, >=20 > thanks for commenting. >=20 > > I think instead we should consider recomputing =E2=80=9Cmode=E2=80=9D i= n each > > iteration of the loop, rather than carry over the result of > > previous iterations. I.e. use: > > > > mode =3D narrower_subreg_mode (ALLOCNO_MODE (cp->first), > > ALLOCNO_MODE (cp->second)); >=20 > Are we garanteed to have ALLOCNO_MODE (cp->first) and ALLOCNO_MODE > (cp->second) always satisfying 'ordered_p'? Yeah, I think so. If the modes aren't ordered then we shouldn't create a copy between them. > I thought we select the smallest because is the cheapest, so not to use 'narrower_subreg_mode' I compared directly the costs. I think the difficulty is that for the x86 situation described in the comment, the cost for the wider mode might not be meaningful. It might be dangerous to rely on it having a larger value than the narrower (meaningful) mode.=