public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/89984] Extra register move
Date: Sat, 04 Sep 2021 06:41:09 +0000 [thread overview]
Message-ID: <bug-89984-4-Ru1w54zVhk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-89984-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89984
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> The problem is here:
> (define_insn_and_split "@xorsign<mode>3_1"
> [(set (match_operand:MODEF 0 "register_operand" "=Yv")
> (unspec:MODEF
> [(match_operand:MODEF 1 "register_operand" "Yv")
> (match_operand:MODEF 2 "register_operand" "0")
> (match_operand:<ssevecmode> 3 "nonimmediate_operand" "Yvm")]
> UNSPEC_XORSIGN))]
> "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
> "#"
> "&& reload_completed"
> [(const_int 0)]
> "ix86_split_xorsign (operands); DONE;")
>
>
> for AVX operand 2 does not need to be the same as operand 0.
> Shouldn't be a hard change for someone starting out to improve this.
Right, The way copysign is defined is like this:
(define_insn "@copysign<mode>3_var"
[(set (match_operand:SSEMODEF 0 "register_operand" "=Yv,Yv,Yv,Yv,Yv")
(unspec:SSEMODEF
[(match_operand:SSEMODEF 2 "register_operand" "Yv,0,0,Yv,Yv")
(match_operand:SSEMODEF 3 "register_operand" "1,1,Yv,1,Yv")
(match_operand:<ssevecmodef> 4
"nonimmediate_operand" "X,Yvm,Yvm,0,0")
(match_operand:<ssevecmodef> 5
"nonimmediate_operand" "0,Yvm,1,Yvm,1")]
UNSPEC_COPYSIGN))
(clobber (match_scratch:<ssevecmodef> 1 "=Yv,Yv,Yv,Yv,Yv"))]
"(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| (TARGET_SSE && (<MODE>mode == TFmode))"
"#")
I suspect xorsign should be improved similarlly.
next prev parent reply other threads:[~2021-09-04 6:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-89984-4@http.gcc.gnu.org/bugzilla/>
2021-09-01 8:42 ` pinskia at gcc dot gnu.org
2021-09-04 6:41 ` pinskia at gcc dot gnu.org [this message]
2021-09-06 12:18 ` cvs-commit at gcc dot gnu.org
2021-09-06 12:35 ` hjl.tools at gmail dot com
2021-09-08 8:24 ` jakub at gcc dot gnu.org
2021-09-08 12:09 ` cvs-commit at gcc dot gnu.org
2021-09-08 12:11 ` 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-89984-4-Ru1w54zVhk@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).