public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/85730] complex code for modifying lowest byte in a 4-byte vector
Date: Tue, 12 Oct 2021 16:21:47 +0000	[thread overview]
Message-ID: <bug-85730-4-3RN81WejpN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-85730-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:b37351e3279d192d5d4682f002abe5b2e133bba6

commit r12-4359-gb37351e3279d192d5d4682f002abe5b2e133bba6
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Tue Oct 12 18:20:38 2021 +0200

    i386: Improve workaround for PR82524 LRA limitation [PR85730]

    As explained in PR82524, LRA is not able to reload strict_low_part inout
    operand with matched input operand. The patch introduces a workaround,
    where we allow LRA to generate an instruction with non-matched input
operand
    which is split post reload to an instruction that inserts non-matched input
    operand to an inout operand and the instruction that uses matched operand.

    The generated code improves from:

            movsbl  %dil, %edx
            movl    %edi, %eax
            sall    $3, %edx
            movb    %dl, %al

    to:

            movl    %edi, %eax
            movb    %dil, %al
            salb    $3, %al

    which is still not optimal, but the code is one instruction shorter and
    does not use a temporary register.

    2021-10-12  Uroš Bizjak  <ubizjak@gmail.com>

    gcc/
            PR target/85730
            PR target/82524
            * config/i386/i386.md (*add<mode>_1_slp): Rewrite as
            define_insn_and_split pattern.  Add alternative 1 and split it
            post reload to insert operand 1 into the low part of operand 0.
            (*sub<mode>_1_slp): Ditto.
            (*and<mode>_1_slp): Ditto.
            (*<any_or:code><mode>_1_slp): Ditto.
            (*ashl<mode>3_1_slp): Ditto.
            (*<any_shiftrt:insn><mode>3_1_slp): Ditto.
            (*<any_rotate:insn><mode>3_1_slp): Ditto.
            (*neg<mode>_1_slp): New insn_and_split pattern.
            (*one_cmpl<mode>_1_slp): Ditto.

    gcc/testsuite/
            PR target/85730
            PR target/82524
            * gcc.target/i386/pr85730.c: New test.

      parent reply	other threads:[~2021-10-12 16:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-85730-4@http.gcc.gnu.org/bugzilla/>
2021-10-04  3:02 ` gabravier at gmail dot com
2021-10-04  8:47 ` zsojka at seznam dot cz
2021-10-04  9:04 ` gabravier at gmail dot com
2021-10-04  9:54 ` rguenth at gcc dot gnu.org
2021-10-04 11:31 ` ubizjak at gmail dot com
2021-10-04 16:13 ` segher at gcc dot gnu.org
2021-10-07 11:51 ` ubizjak at gmail dot com
2021-10-08  9:36 ` ubizjak at gmail dot com
2021-10-12 16:21 ` cvs-commit at gcc dot gnu.org [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=bug-85730-4-3RN81WejpN@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).