From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2CC7A3857C4C; Wed, 14 Oct 2020 06:54:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CC7A3857C4C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97405] ICE in get_or_alloc_expr_for in code hoisting with SVE intrinsics Date: Wed, 14 Oct 2020 06:54:31 +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.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status cc 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, 14 Oct 2020 06:54:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97405 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|rguenth at gcc dot gnu.org |unassigned at gcc d= ot gnu.org Status|ASSIGNED |NEW CC| |rsandifo at gcc dot gnu.org --- Comment #2 from Richard Biener --- OK, looks like the code expects POLY_INT_CST [16, 16] /[ex] 16 to be constant folded - looks like poly_int_binop doesn't handle division nor is there a wi::div_trunc for poly_wide_int. This is generated here: Breakpoint 5, copy_reference_ops_from_ref (ref=3D= ,=20 891 /* But record element size in units of the type alignme= nt.=20 */ 892 temp.op2 =3D TREE_OPERAND (ref, 3); 893 temp.align =3D eltype->type_common.align; 894 if (! temp.op2) 895 temp.op2 =3D size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UN= IT (eltype), 896 size_int (TYPE_ALIGN_UNIT (eltype))); Hmm, I see that temp.op2 is indeed always needed unless we want to disrupt valueization. copy_reference_ops_from_ref also isn't really allowed to fai= l. So we absolutely need to be able to fold this EXACT/TRUNC_DIV_EXPR. Richard?=