[Bug tree-optimization/98028] [8/9/10/11 Regression] __builtin_sub_overflow_p not folded to const when some constraints are known

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 27 11:12:08 GMT 2020


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|__builtin_sub_overflow_p    |[8/9/10/11 Regression]
                   |not folded to const when    |__builtin_sub_overflow_p
                   |some constraints are known  |not folded to const when
                   |                            |some constraints are known
   Last reconfirmed|                            |2020-11-27
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |8.5
                 CC|                            |amacleod at redhat dot com,
                   |                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
f1 changed with r8-2630-g0db8ddfcb660397bab428ce0d271967d24c23177, until then
dom propagated one of those SSA_NAMEs, so we ended up with
__builtin_sub_overflow_p (i, i, (unsigned) 0) which we can still even on the
trunk optimize.

Anyway, I guess all this is a task for the symbolic value ranges in the ranger.


More information about the Gcc-bugs mailing list