[Bug tree-optimization/82188] Missed optimization opportunity for constant folding

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 12 10:08:00 GMT 2017


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There are a few different missed optimizations here that GCC does not do but
LLVM does:

* 1/(2U-x) != 0 is the same as x != 1

* 0!=x/2 is the same as x >= -1 && x <= 1


More information about the Gcc-bugs mailing list