This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 85822 - Fix handling of negative constants
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Yuri Gribov <tetra2005 at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, marxin at gcc dot gnu dot org, Marc Glisse <marc dot glisse at inria dot fr>
- Date: Sun, 20 May 2018 15:01:24 +0300 (MSK)
- Subject: Re: [PATCH] PR 85822 - Fix handling of negative constants
- References: <CAJOtW+6myAAbf2ouaZ=w3Kv4iKTaokhAyptRuVdd5SnE7iU3yg@mail.gmail.com>
On Sun, 20 May 2018, Yuri Gribov wrote:
> Hi all,
>
> This fixes PR 85822 by removing incorrect reversal of condition in VRP
> assertion. Bootstrapped and regtested on x86_64.
>
> Ok for trunk?
Please address the following issues:
Use correct PR reference in Changelog.
Double-check the comment before the function, I think NE_EXPR and EQ_EXPR
should be swapped there.
Address Richard's request from the bug report:
>> Ok, please make sure to say why not doing anything special for negative
>> numbers is ok.
Note there are at least three special cases that are handled incorrectly either
before or after the patch:
- not two's complement integers
- mask being 0
- mask being ~0
Alexander