[Bug tree-optimization/96272] Failure to optimize overflow check

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 11 15:37:24 GMT 2020


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49744
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49744&action=edit
gcc11-pr96272.patch

Untested fix.  The addition is then CSEd by RTL PRE, and the reason why we
don't emit a conditional move is something in the CE.  Though it is a question
if we want to use a conditional move, generally predicting overflows don't
happen is a good idea and so the overflow case should be pretty cold.


More information about the Gcc-bugs mailing list