public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Philipp Tomsich <ptomsich@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/vrull/heads/slp-improvements)] Fix element_prevision check for vec_perm+view_convert pattern Date: Wed, 17 Jan 2024 19:14:31 +0000 (GMT) [thread overview] Message-ID: <20240117191431.44A223858C33@sourceware.org> (raw) https://gcc.gnu.org/g:2cbf158bb6bce94f9dcb5850e2a1ba995449b75c commit 2cbf158bb6bce94f9dcb5850e2a1ba995449b75c Author: Manolis Tsamis <manolis.tsamis@vrull.eu> Date: Fri Nov 24 10:08:24 2023 +0100 Fix element_prevision check for vec_perm+view_convert pattern Addresses the blender_r ICE reported as part of #343. Ref #343 Diff: --- gcc/match.pd | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gcc/match.pd b/gcc/match.pd index 59a664293ea..d3ee2ae79f8 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -9929,20 +9929,21 @@ and, d = VEC_PERM_EXPR <a, b, NEW_VCST>; */ (simplify - (vec_perm (view_convert?@0 (vec_perm @1 @2 VECTOR_CST@3)) @0 VECTOR_CST@4) + (vec_perm (view_convert?@0 (vec_perm@1 @2 @3 VECTOR_CST@4)) @0 VECTOR_CST@5) (if (TYPE_VECTOR_SUBPARTS (type).is_constant ()) (with { machine_mode result_mode = TYPE_MODE (type); - machine_mode op_mode = TYPE_MODE (TREE_TYPE (@1)); + machine_mode op_mode = TYPE_MODE (TREE_TYPE (@2)); int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant (); vec_perm_builder builder0; vec_perm_builder builder1; vec_perm_builder builder2 (nelts, nelts, 1); } - (if (tree_to_vec_perm_builder (&builder0, @3) - && tree_to_vec_perm_builder (&builder1, @4) - && element_precision (type) == element_precision (TREE_TYPE (@0))) + (if (tree_to_vec_perm_builder (&builder0, @4) + && tree_to_vec_perm_builder (&builder1, @5) + && element_precision (TREE_TYPE (@0)) + == element_precision (TREE_TYPE (@1))) (with { vec_perm_indices sel0 (builder0, 2, nelts); @@ -9964,10 +9965,10 @@ and, ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false) || !can_vec_perm_const_p (result_mode, op_mode, sel1, false)) : !can_vec_perm_const_p (result_mode, op_mode, sel1, false))) - op0 = vec_perm_indices_to_tree (TREE_TYPE (@4), sel2); + op0 = vec_perm_indices_to_tree (TREE_TYPE (@5), sel2); } (if (op0) - (view_convert (vec_perm @1 @2 { op0; })))))))) + (view_convert (vec_perm @2 @3 { op0; })))))))) /* Merge c = VEC_PERM_EXPR <a, b, VCST0>;
next reply other threads:[~2024-01-17 19:14 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-17 19:14 Philipp Tomsich [this message] -- strict thread matches above, loose matches on Subject: below -- 2024-01-23 20:57 Philipp Tomsich 2023-11-28 13:35 Philipp Tomsich
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240117191431.44A223858C33@sourceware.org \ --to=ptomsich@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).