public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107627] [13 Regression] int128_t shift generates extra xor/or.
Date: Tue, 29 Nov 2022 19:12:58 +0000	[thread overview]
Message-ID: <bug-107627-4-ng0cPh4o31@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107627-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107627

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Roger Sayle from comment #4)
> Perhaps:
> (define_insn_and_split "*concat<mode><dwi>3_1"
>   [(set (match_operand:<DWI> 0 "nonimmediate_operand" "=ro,r,r")
>         (any_or_plus:<DWI>
>           (ashift:<DWI> (match_operand:<DWI> 1 "nonimmediate_operand"
> "r,o,r")
>                         (match_operand:<DWI> 2 "const_int_operand"))
>           (zero_extend:<DWI> (match_operand:DWIH 3 "nonimmediate_operand"
> "r,r,o"))))]
> 
> I hope this helps.

You're probably right, but:
1) I don't see why operands[1] or operands[3] can't be both memory operands
2) I don't see why they should use o constraint, while for operands[0] we need
   it to be offsettable, because we need to refer to both of its halves, but
   for the others we just refer to those memories or their low parts (which on
   little endian comes first).  Though, maybe it isn't a good idea to narrow
   128-bit or 64-bit loads to just 64-bit or 32-bit loads of their low half,
   the former might trap while the latter might succeed; so maybe limit
   nonimmediate_operand on inputs to zero_extend operands?
On the other side, split_double_concat needs to take into account when the
destination
and/or source are MEMs and some registers are used in their addresses.

  parent reply	other threads:[~2022-11-29 19:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  2:06 [Bug target/107627] New: [13] Regression " crazylht at gmail dot com
2022-11-11  7:05 ` [Bug target/107627] " crazylht at gmail dot com
2022-11-11  7:09 ` [Bug target/107627] [13 Regression] " pinskia at gcc dot gnu.org
2022-11-11  9:41 ` rguenth at gcc dot gnu.org
2022-11-21 10:34 ` marxin at gcc dot gnu.org
2022-11-22 12:52 ` jakub at gcc dot gnu.org
2022-11-25 23:40 ` roger at nextmovesoftware dot com
2022-11-29 19:12 ` jakub at gcc dot gnu.org [this message]
2022-11-29 19:55 ` jakub at gcc dot gnu.org
2022-11-30 13:03 ` jakub at gcc dot gnu.org
2022-12-01  8:35 ` cvs-commit at gcc dot gnu.org
2022-12-01  8:36 ` jakub at gcc dot gnu.org
2022-12-07 14:31 ` jakub at gcc dot gnu.org
2022-12-08 13:57 ` 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-107627-4-ng0cPh4o31@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).