From: Uros Bizjak <ubizjak@gmail.com>
To: Roger Sayle <roger@nextmovesoftware.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [x86 PATCH] Fix libitm.c/memset-1.c test fails with new peephole2s.
Date: Sun, 13 Mar 2022 18:41:07 +0100 [thread overview]
Message-ID: <CAFULd4aOL=Hu=-UYJORAF04p=rqEOWS1xBs7rnsXj1vovsaxag@mail.gmail.com> (raw)
In-Reply-To: <003401d83642$0b222c40$216684c0$@nextmovesoftware.com>
On Sat, Mar 12, 2022 at 7:50 PM Roger Sayle <roger@nextmovesoftware.com> wrote:
>
>
> My sincere apologies for the breakage, but alas handling SImode in the
> recently added "xorl;movb -> movzbl" peephole2 turns out to be slightly
> more complicated that just using SWI48 as a mode iterator. I'd failed
> to check the machine description carefully, but the *zero_extend<mode>si2
> define_insn is conditionally defined, based on x86 target tuning using
> TARGET_ZERO_EXTEND_WITH_AND, and therefore unavailable on 486 and pentium
> unless optimizing the code for size. It turns out that the libitm testsuite
> specifies -m486 with make check RUNTESTFLAGS="--target_board='unix{-m32}'"
> and therefore encounters/catches my oversight.
>
> Fixed by adding the appropriate conditions to the new peephole2 patterns.
> It don't think it's worth the effort to provide an equivalent optimization
> for
> these (very) old architectures.
>
> Tested on x86_64-pc-linux-gnu with make bootstrap and make -k check
> with no new failures. Confirmed using RUNTESTFLAGS that this
> fixes the above failure, and the recently added testcase with -march=i486.
> Ok for mainline?
>
>
> 2022-03-12 Roger Sayle <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
> * config/i386/i386.md (peephole2 xorl;movb -> movzbl): Disable
> transformation when *zero_extend<mode>si2 is not available.
>
> gcc/testsuite/ChangeLog
> * gcc.target/i386/pr98335.c: Skip this test if tuning for i486
> or pentium, and not optimizing for size.
OK, but please use:
<MODE>mode != SImode
instead of
<SWI48:MODE_SIZE> != 4
Thanks,
Uros.
prev parent reply other threads:[~2022-03-13 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-12 18:50 Roger Sayle
2022-03-13 17:41 ` 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='CAFULd4aOL=Hu=-UYJORAF04p=rqEOWS1xBs7rnsXj1vovsaxag@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).