This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix 69845


On Tue, Mar 22, 2016 at 6:40 PM, Richard Henderson <rth@redhat.com> wrote:
> In PR68142 you added a check for overflow + __INT_MIN__.
> I can't figure out why the check for __INT_MIN__, except
> that it seems specific to the test case you examined.
>
> And indeed, this test case shows how things go wrong
> with other distributed folding leading to overflow.

Huh, not sure what I was thinking .. but I remember being on
a hunt through various INT_MIN related overflow bugs when
running into this one.

> I added two tests, one signed, one unsigned.  The second
> verifies that we do still fold for the defined-overflow case.
>
> Ok?

Ok.

Note that always when I find bugs in extract_muldiv and try
to decipher what it does I think we need to rip that out,
replacing it with some simple patterns and leaving the rest
to passes like reassoc.  It's simply a beast that proved to
be a can of worms...

Thanks,
Richard.

>
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]