public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-81] tree-optimization/105394 - vector lowering of compares Date: Tue, 3 May 2022 09:19:15 +0000 (GMT) [thread overview] Message-ID: <20220503091915.74E303858C74@sourceware.org> (raw) https://gcc.gnu.org/g:dfae0c5a29f336cdab234b28999f9ba9dc20a4d0 commit r13-81-gdfae0c5a29f336cdab234b28999f9ba9dc20a4d0 Author: Richard Biener <rguenther@suse.de> Date: Fri Apr 29 11:54:45 2022 +0200 tree-optimization/105394 - vector lowering of compares The following fixes missing handling of non-integer mode but masked (SVE or MVE) compares in vector lowering by using the appropriate mask element width to extract the components and adjust the index. 2022-04-29 Richard Biener <rguenther@suse.de> PR tree-optimization/105394 * tree-vect-generic.cc (expand_vector_condition): Adjust comp_width for non-integer mode masks as well. Diff: --- gcc/tree-vect-generic.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc index 8b7227e8b58..e5bd9dc7c76 100644 --- a/gcc/tree-vect-generic.cc +++ b/gcc/tree-vect-generic.cc @@ -1122,6 +1122,9 @@ expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) tree atype = build_nonstandard_integer_type (prec, 1); a = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, atype, a); } + else if (!a_is_comparison + && VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (a))) + comp_width = vector_element_bits_tree (TREE_TYPE (a)); int nunits = nunits_for_known_piecewise_op (type); vec_alloc (v, nunits); @@ -1148,7 +1151,7 @@ expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) build_zero_cst (TREE_TYPE (a))); } else - aa = tree_vec_extract (gsi, cond_type, a, width, index); + aa = tree_vec_extract (gsi, cond_type, a, comp_width, comp_index); result = gimplify_build3 (gsi, COND_EXPR, inner_type, aa, bb, cc); if (!CONSTANT_CLASS_P (result)) constant_p = false;
reply other threads:[~2022-05-03 9:19 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220503091915.74E303858C74@sourceware.org \ --to=rguenth@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).