[Bug tree-optimization/101223] [11/12 Regression] evrp produces wrong code since r11-3685-gfcae5121154d1c33

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 2 13:14:55 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101223

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rsandifo@gcc.gnu.org from comment #8)
> (In reply to Andrew Macleod from comment #7)
> > wi::sub  sets the overflow flag for 0 - 1 with 1 bit signed...   so the
> > comparison ends up being undefined, and we then make incorrect choices
> > because we think we can.
> Isn't that a bug in wi::sub though?  I think we should fix it rather
> than work around it in callers.

How can one write 0 - 1 in 1-bit signed though?  1 isn't in the range...
One can only do 0 + -1 which doesn't overflow, or 0 - -1 which does.


More information about the Gcc-bugs mailing list