From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2912D3892441; Wed, 27 Jan 2021 13:06:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2912D3892441 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98849] [11 Regression] ICE in expand_shift_1, at expmed.c:2658 since g:7432f255b70811dafaf325d9403 Date: Wed, 27 Jan 2021 13:06:16 +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: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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, 27 Jan 2021 13:06:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98849 --- Comment #3 from Jakub Jelinek --- For #c2 I've tried: --- gcc/tree-vect-generic.c.jj 2021-01-04 10:25:38.289239984 +0100 +++ gcc/tree-vect-generic.c 2021-01-27 13:53:28.457752505 +0100 @@ -2147,16 +2147,21 @@ expand_vector_operations_1 (gimple_stmt_ || code =3D=3D LROTATE_EXPR || code =3D=3D RROTATE_EXPR) { - optab opv; + optab opv =3D optab_for_tree_code (code, type, optab_vector); /* Check whether we have vector {x,x,x,x} where x could be a scalar variable or a constant. Transform - vector {x,x,x,x} =3D=3D> vector scalar. */ + vector {x,x,x,x} =3D=3D> vector scalar, unless + the backend only supports vector by vector and not + vecot by scalar. */ if (VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) { tree first; - if ((first =3D ssa_uniform_vector_p (rhs2)) !=3D NULL_TREE) + op =3D optab_for_tree_code (code, type, optab_scalar); + if ((first =3D ssa_uniform_vector_p (rhs2)) !=3D NULL_TREE + && (get_compute_type (code, opv, type) !=3D type + || get_compute_type (code, op, type) =3D=3D type)) { gimple_assign_set_rhs2 (stmt, first); update_stmt (stmt); @@ -2164,7 +2169,6 @@ expand_vector_operations_1 (gimple_stmt_ } } - opv =3D optab_for_tree_code (code, type, optab_vector); if (VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) op =3D opv; else but that doesn't really help, because while veclower21 doesn't undo what the vectorizer carefully did, match.pd during fre5 breaks it again: /* Prefer vector1 << scalar to vector1 << vector2 if vector2 is uniform. */ (for vec (VECTOR_CST CONSTRUCTOR) (simplify (shiftrotate @0 vec@1) (with { tree tem =3D uniform_vector_p (@1); } (if (tem) (shiftrotate @0 { tem; })))))) So, does ARM really only have vector shifts and not scalar? Though, PowerPC seems to have that too, I'll check out what it does on these testcases.=