public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Roger Sayle <roger@nextmovesoftware.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [x86 PATCH] Use QImode for offsets in zero_extract/sign_extract in i386.md
Date: Sat, 22 Jul 2023 19:16:13 +0200	[thread overview]
Message-ID: <CAFULd4Y-5vBKS-Hs2pU_vC-8x6b=Vc-6QaQbauhC-gjKFNf8TA@mail.gmail.com> (raw)
In-Reply-To: <00c701d9bcb2$733bcdc0$59b36940$@nextmovesoftware.com>

On Sat, Jul 22, 2023 at 5:37 PM Roger Sayle <roger@nextmovesoftware.com> wrote:
>
>
> As suggested by Uros, this patch changes the ZERO_EXTRACTs and SIGN_EXTRACTs
> in i386.md to consistently use QImode for bit offsets (i.e. third and fourth
> operands), matching the use of QImode for bit counts in shifts and rotates.
>
> There's no change in functionality, and the new patterns simply ensure that
> we continue to generate the same code (match revised patterns) as before.
>
> This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
> and make -k check, both with and without --target_board=unix{-m32}
> with no new failures.  Ok for mainline?
>
>
> 2023-07-22  Roger Sayle  <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
>         * config/i386/i386.md (extv<mode>): Use QImode for offsets.
>         (extzv<mode>): Likewise.
>         (insv<mode>): Likewise.
>         (*testqi_ext_3): Likewise.
>         (*btr<mode>_2): Likewise.
>         (define_split): Likewise.
>         (*btsq_imm): Likewise.
>         (*btrq_imm): Likewise.
>         (*btcq_imm): Likewise.
>         (define_peephole2 x3): Likewise.
>         (*bt<mode>): Likewise
>         (*bt<mode>_mask): New define_insn_and_split.
>         (*jcc_bt<mode>): Use QImode for offsets.
>         (*jcc_bt<mode>_1): Delete obsolete pattern.
>         (*jcc_bt<mode>_mask): Use QImode offsets.
>         (*jcc_bt<mode>_mask_1): Likewise.
>         (define_split): Likewise.
>         (*bt<mode>_setcqi): Likewise.
>         (*bt<mode>_setncqi): Likewise.
>         (*bt<mode>_setnc<mode>): Likewise.
>         (*bt<mode>_setncqi_2): Likewise.
>         (*bt<mode>_setc<mode>_mask): New define_insn_and_split.
>         (bmi2_bzhi_<mode>3): Use QImode offsets.
>         (*bmi2_bzhi_<mode>3): Likewise.
>         (*bmi2_bzhi_<mode>3_1): Likewise.
>         (*bmi2_bzhi_<mode>3_1_ccz): Likewise.
>         (@tbm_bextri_<mode>): Likewise.

OK.

Thanks,
Uros.

>
>
> Thanks,
> Roger
> --
>

      reply	other threads:[~2023-07-22 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22 15:37 Roger Sayle
2023-07-22 17:16 ` Uros Bizjak [this message]

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='CAFULd4Y-5vBKS-Hs2pU_vC-8x6b=Vc-6QaQbauhC-gjKFNf8TA@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=roger@nextmovesoftware.com \
    /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).