From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5CC5398E49F; Thu, 28 Jan 2021 13:12:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5CC5398E49F From: "rguenth 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 13:12:03 +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: rguenth 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 13:12:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96974 --- Comment #10 from Richard Biener --- Still reproduces on trunk with -fdisable-tree-fre4. So the issue is that for the case of 'long int' and 'float' get_vectype_for_scalar_type when passed 8 as group_size returns V8DI and V4SF - where eventually V16SF does not exist. The vinfos vector mode is E_VNx4SFmode. We're rejecting that because it's 11122 && maybe_ge (TYPE_VECTOR_SUBPARTS (vectype), group_size)) and iterating with get_related_vectype_for_scalar_type arriving at v4sf. OTOH for long int we start with vector([2,2]) long int and iterate to v8di. I guess the assert is really misplaced and it should instead try to find a proper related type based on the nunits vectype? Or give up when we arrive at such incompatible choices for input/output vector types.=