From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C71D398C030; Thu, 28 Jan 2021 11:59:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C71D398C030 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96974] [10/11 Regression] ICE in vect_get_vector_types_for_stmt compiling for SVE Date: Thu, 28 Jan 2021 11:59:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.1.1 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: stammark 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: Thu, 28 Jan 2021 11:59:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96974 --- Comment #9 from rsandifo at gcc dot gnu.org --- (In reply to Stam Markianos-Wright from comment #8) > I have a liiitle bit more progress here, but I have a question about > vect_get_smallest_scalar_type. >=20 > If we look at the comment before the function: >=20 > >/* Return the smallest scalar part of STMT_INFO. > > This is used to determine the vectype of the stmt. We generally set = the > > vectype according to the type of the result (lhs). For stmts whose > > result-type is different than the type of the arguments (e.g., demoti= on, > > promotion), vectype will be reset appropriately (later). Note that w= e have > > to visit the smallest datatype in this function, because that determi= nes the > > VF. If the smallest datatype in the loop is present only as the rhs = of a > > promotion operation - we'd miss it. >=20 > Would this be "smallest datatype in all cases", or is this more like "the > smallest > datatype within the same promotion/demotion chain"? >=20 > i.e. how should we react if we detect a smallest datatype on the rhs of > "float" > when everything else in the stmt has been in the integer chain (int or, > like in this case, long int)? Not sure if this is really answering the question (let me know if it's not), but: for an lhs of int and an rhs of float, the choice doesn't really matte= r, since they're the same size. But for an lhs of long int and an rhs of floa= t, the smallest vectype has to be taken from the float.=