public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106476] ICE generating FOLD_EXTRACT_LAST
Date: Thu, 15 Sep 2022 12:08:46 +0000 [thread overview]
Message-ID: <bug-106476-4-6HdDbyh192@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106476-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106476
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> I think EXTRACT_LAST_REDUCTION cannot simply do
>
> /* Instead of doing ~x ? y : z do x ? z : y. */
> vec_compare = new_temp;
> std::swap (vec_then_clause, vec_else_clause);
>
> So either the fix could be to not support bitop2 == BIT_NOT_EXPR for
> EXTRACT_LAST_REDUCTION or we have to perform the BIT_NOT_EXPR as
> vector operation.
>
> Richard?
Agreed. This case seems to be specific to EQ_EXPR on booleans,
and I'm not sure why we can't just emit an EQ_EXPR for that case.
Anything else would lead to redundant ops for EXTRACT_LAST_REDUCTION.
There again, having (predicate, predicate → predicate) comparisons for
EQ_EXPR might be a weird special case, and might be similar to having
things like NAND and NOR (which we deliberately don't have). So maybe
emitting the separate NOT_EXPR is better after all.
next prev parent reply other threads:[~2022-09-15 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 13:08 [Bug tree-optimization/106476] New: " ams at gcc dot gnu.org
2022-08-01 9:04 ` [Bug tree-optimization/106476] " rguenth at gcc dot gnu.org
2022-09-15 12:08 ` rsandifo at gcc dot gnu.org [this message]
2023-01-10 10:47 ` rguenth at gcc dot gnu.org
2023-01-10 12:09 ` rguenth 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-106476-4-6HdDbyh192@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: link
Be 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).