public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/112816] [11/12/13/14 Regression] ICE unrecognizable_insn with __builtin_signbit and returning struct with int[4]
Date: Mon, 04 Dec 2023 04:12:57 +0000 [thread overview]
Message-ID: <bug-112816-4-P2akY8GVW5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112816-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112816
liuhongt at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |liuhongt at gcc dot gnu.org
--- Comment #6 from liuhongt at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 56767 [details]
> gcc14-pr112816.patch
>
> Untested fix.
>
> Another issue is that the emitted code is terrible:
> pxor %xmm1, %xmm1
> psrld $31, %xmm0
> pcmpeqd %xmm1, %xmm0
> pcmpeqd %xmm1, %xmm0
> Why not just
> psrad $31, %xmm0
> instead of all this?
We have optimization in ix86_expand_int_vcond.
5090 /* Try to optimize x < 0 ? -1 : 0 into (signed) x >> 31
5091 and x < 0 ? 1 : 0 into (unsigned) x >> 31. */
But for signbit case, it's
vect__1.10_4 = MEM <vector(4) float> [(float *)&x];
vect__2.11_3 = .SIGNBIT (vect__1.10_4);
mask__11.12_22 = vect__2.11_3 != { 0, 0, 0, 0 };
vect__13.14_26 = VIEW_CONVERT_EXPR<vector(4) int>(mask__11.12_22);
I'm curious, can we move all of those to the middle-end, like match.pd?
next prev parent reply other threads:[~2023-12-04 4:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 21:12 [Bug middle-end/112816] New: internal compiler error: in extract_insn, at recog.cc:2804, unrecognizable_insn for __builtin_signbit a.elovikov at gmail dot com
2023-12-01 21:17 ` [Bug target/112816] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-12-01 21:19 ` pinskia at gcc dot gnu.org
2023-12-01 21:20 ` [Bug target/112816] [11/12/13/14 Regression] ICE unrecognizable_insn with __builtin_signbit and returning struct with int[4] pinskia at gcc dot gnu.org
2023-12-02 9:05 ` jakub at gcc dot gnu.org
2023-12-02 9:10 ` jakub at gcc dot gnu.org
2023-12-02 9:16 ` jakub at gcc dot gnu.org
2023-12-04 4:12 ` liuhongt at gcc dot gnu.org [this message]
2023-12-04 8:01 ` cvs-commit at gcc dot gnu.org
2023-12-04 8:02 ` [Bug target/112816] [11/12/13 " jakub at gcc dot gnu.org
2023-12-04 17:04 ` a.elovikov at gmail dot com
2023-12-05 8:09 ` cvs-commit at gcc dot gnu.org
2023-12-05 16:32 ` cvs-commit at gcc dot gnu.org
2023-12-05 17:02 ` [Bug target/112816] [11/12 " jakub at gcc dot gnu.org
2023-12-16 0:38 ` cvs-commit at gcc dot gnu.org
2023-12-17 13:55 ` cvs-commit at gcc dot gnu.org
2023-12-18 19:30 ` a.elovikov at gmail dot com
2023-12-18 20:03 ` jakub at gcc dot gnu.org
2023-12-19 9:25 ` cvs-commit at gcc dot gnu.org
2023-12-19 9:33 ` cvs-commit at gcc dot gnu.org
2023-12-19 9:37 ` cvs-commit at gcc dot gnu.org
2023-12-19 9:45 ` cvs-commit at gcc dot gnu.org
2023-12-19 9:46 ` jakub 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-112816-4-P2akY8GVW5@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).