public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: Marc Glisse <marc.glisse@inria.fr>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: PR64454: (x % y) % y
Date: Thu, 24 Feb 2022 02:38:56 -0800	[thread overview]
Message-ID: <CA+=Sn1=__uTNydg52F++5EsFwM0gePW-mrCFKftekjY8Bh5-sg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1505141801110.4707@stedding.saclay.inria.fr>

On Thu, May 14, 2015 at 9:33 AM Marc Glisse <marc.glisse@inria.fr> wrote:
>
> Hello,
>
> after this patch I think I'll close the PR. This was regtested on
> ppc64le-redhat-linux.
>
> Apparently I wrote this patch in a file that already had a trivial hunk:
> -1-A -> ~A is rejected for complex while -A-1 isn't, there is no reason
> for this difference (maybe there was before integer_all_onesp /
> integer_minus_onep was introduced), I hope you don't mind.


So this hunk actually was wrong in the end. PR 104675 is opened for
the reason why it was wrong.
-A-1 should also be rejected for complex types too.

I will also notice the gimple verifiers should be catching BIT_* on
the complex types as they don't make sense really but currently is
not. Though that would be something for GCC 13.

Thanks,
Andrew Pinski

>
> I am wondering if we want some helper (like :c for commutative operations)
> to avoid duplicating patterns for x<y and y>x. We could also, when a
> comparison x<=y doesn't simplify, see if !!(x<=y) simplifies better, but
> that's becoming a bit complicated.
>
> 2015-05-15  Marc Glisse  <marc.glisse@inria.fr>
>
>         PR tree-optimization/64454
> gcc/
>         * match.pd ((X % Y) % Y, (X % Y) < Y): New patterns.
>         (-1 - A -> ~A): Remove unnecessary condition.
> gcc/testsuite/
>         * gcc.dg/modmod.c: New testcase.
>
> --
> Marc Glisse

      parent reply	other threads:[~2022-02-24 10:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 16:44 Marc Glisse
2015-05-14 17:46 ` Jeff Law
2022-02-24 10:38 ` Andrew Pinski [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='CA+=Sn1=__uTNydg52F++5EsFwM0gePW-mrCFKftekjY8Bh5-sg@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marc.glisse@inria.fr \
    /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).