public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97085] [11 Regression] aarch64, SVE: ICE in gimple_expand_vec_cond_expr since r11-2610-ga1ee6d507b Date: Wed, 23 Sep 2020 13:53:47 +0000 [thread overview] Message-ID: <bug-97085-4-TQ0toMMxEA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97085-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97085 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- The following also works, and we then expand from mask__31.28_102 = vect__50.25_95 != { 5, ... }; vect_patt_63.29_105 = VEC_COND_EXPR <mask__31.28_102, { 1, ... }, { 0, ... }>; diff --git a/gcc/match.pd b/gcc/match.pd index 7d63bb973cb..e6dcdd0b855 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3521,6 +3521,17 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (if (optimize_vectors_before_lowering_p () && types_match (@0, @1)) (vec_cond (bit_and (bit_not @0) @1) @2 @3))) +/* Canonicalize mask ? { 0, ... } : { -1, ...} to ~mask if the mask + types are compatible. */ +(simplify + (vec_cond @0 VECTOR_CST@1 VECTOR_CST@2) + (if (VECTOR_BOOLEAN_TYPE_P (type) + && types_match (type, TREE_TYPE (@0))) + (if (integer_zerop (@1) && integer_all_onesp (@2)) + (bit_not @0) + (if (integer_all_onesp (@1) && integer_zerop (@2)) + @0)))) + /* Simplification moved from fold_cond_expr_with_comparison. It may also be extended. */ /* This pattern implements two kinds simplification:
next prev parent reply other threads:[~2020-09-23 13:53 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-17 12:54 [Bug tree-optimization/97085] New: " acoplan at gcc dot gnu.org 2020-09-18 6:04 ` [Bug tree-optimization/97085] " rguenth at gcc dot gnu.org 2020-09-23 13:27 ` rguenth at gcc dot gnu.org 2020-09-23 13:45 ` rguenth at gcc dot gnu.org 2020-09-23 13:53 ` rguenth at gcc dot gnu.org [this message] 2020-09-23 15:13 ` glisse at gcc dot gnu.org 2020-09-24 6:47 ` rguenth at gcc dot gnu.org 2020-09-24 7:21 ` glisse at gcc dot gnu.org 2020-09-24 7:48 ` rguenth at gcc dot gnu.org 2020-09-24 8:20 ` cvs-commit at gcc dot gnu.org 2020-09-24 8:20 ` rguenth at gcc dot gnu.org 2020-09-24 11:25 ` rguenth at gcc dot gnu.org 2020-09-24 11:29 ` cvs-commit at gcc dot gnu.org
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=bug-97085-4-TQ0toMMxEA@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).