From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] match.pd: Fix up fneg/fadd simplification [PR109230]
Date: Sun, 26 Mar 2023 12:00:58 -0600 [thread overview]
Message-ID: <e1776313-050b-1f3b-9877-3eb2752da647@gmail.com> (raw)
In-Reply-To: <ZBrVY9tS995rgIVj@tucnak>
On 3/22/23 04:16, Jakub Jelinek via Gcc-patches wrote:
> Hi!
>
> The following testcase is miscompiled on aarch64-linux. match.pd
> has a simplification for addsub, where it negates one of the vectors
> in twice as large floating point element vector (effectively negating every
> other element) and then doing addition.
> But a requirement for that is that the permutation picks the right elements,
> in particular 0, nelts+1, 2, nelts+3, 4, nelts+5, ...
> The pattern tests this with sel.series_p (0, 2, 0, 2) check, which as
> documented verifies that the even elements of the permutation mask are
> identity, but doesn't say anything about the others.
> The following patch fixes it by also checking that the odd elements
> start at nelts + 1 with the same step of 2.
>
> Bootstrapped/regtested on aarch64-linux, x86_64-linux and i686-linux,
> ok for trunk?
>
> 2023-03-22 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/109230
> * match.pd (fneg/fadd simplify): Verify also odd permutation indexes.
>
> * gcc.dg/pr109230.c: New test.
OK
Jeff
prev parent reply other threads:[~2023-03-26 18:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 10:16 Jakub Jelinek
2023-03-26 18:00 ` Jeff Law [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=e1776313-050b-1f3b-9877-3eb2752da647@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@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).