[Bug tree-optimization/83541] Missed optimization with int overflow

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 12 12:30:34 GMT 2021


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |needs-bisection
      Known to work|                            |12.0
      Known to fail|                            |11.2.0

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems to be fixed on the trunk.




Folding statement: if (x_2(D) == 2147483647)

Visiting conditional with predicate: if (x_2(D) == 2147483647)

With known ranges
        x_2(D): int VARYING

Predicate evaluates to: DON'T KNOW
Matching expression match.pd:2077, gimple-match.c:819
Matching expression match.pd:2080, gimple-match.c:892
Matching expression match.pd:2087, gimple-match.c:952
Not folded
Folding statement: _4 = x_2(D) + 1;
gimple_simplified to _4 = -2147483648;
Folded into: _4 = -2147483648;

Folding statement: // predicted unlikely by early return (on trees) predictor.
Not folded
Folding PHI node: _1 = PHI <_4(3), 42(2)>
Queued PHI for removal.  Folds to: 42
Folding statement: return _1;
Folded into: return 42;


More information about the Gcc-bugs mailing list