public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Uros Bizjak <uros@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6422] tree-optimization/103948 - detect vector vec_cmp in expand_vector_condition Date: Mon, 10 Jan 2022 19:40:35 +0000 (GMT) [thread overview] Message-ID: <20220110194035.987BD386EC49@sourceware.org> (raw) https://gcc.gnu.org/g:de0faa56a10406b50fba159957e3a3fd2f95c64b commit r12-6422-gde0faa56a10406b50fba159957e3a3fd2f95c64b Author: Uros Bizjak <ubizjak@gmail.com> Date: Mon Jan 10 20:39:35 2022 +0100 tree-optimization/103948 - detect vector vec_cmp in expand_vector_condition Currently, expand_vector_condition detects only vcondMN and vconduMN named RTX patterns. Teach it to also consider vec_cmpMN and vec_cmpuMN RTX patterns when all ones vector is returned for true and all zeros vector is returned for false. 2022-01-10 Richard Biener <rguenther@suse.de> gcc/ChangeLog: PR tree-optimization/103948 * tree-vect-generic.c (expand_vector_condition): Return true if all ones vector is returned for true, all zeros vector for false and the target defines corresponding vec_cmp{,u}MN named RTX pattern. Diff: --- gcc/tree-vect-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index 6afb6999cd7..5814a71a5bb 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -1052,7 +1052,9 @@ expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) } } - if (expand_vec_cond_expr_p (type, TREE_TYPE (a1), code)) + if (expand_vec_cond_expr_p (type, TREE_TYPE (a1), code) + || (integer_all_onesp (b) && integer_zerop (c) + && expand_vec_cmp_expr_p (type, TREE_TYPE (a1), code))) { gcc_assert (TREE_CODE (a) == SSA_NAME || TREE_CODE (a) == VECTOR_CST); return true;
reply other threads:[~2022-01-10 19:40 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=20220110194035.987BD386EC49@sourceware.org \ --to=uros@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).