[Bug tree-optimization/106164] (a > b) & (a >= b) does not get optimized until reassoc1
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 31 17:12:43 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106164
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:ac0e0966ebf08c454d53042a649403e2880ccbc1
commit r14-2887-gac0e0966ebf08c454d53042a649403e2880ccbc1
Author: Andrew Pinski <apinski@marvell.com>
Date: Sat Jul 29 21:52:31 2023 -0700
MATCH: Add `a == b | a cmp b` and `a != b & a cmp b` simplifications
Even though these are done by combine_comparisons, we can add them to match
to allow simplifcations during match rather than just during
reassoc/ifcombine.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
PR tree-optimization/106164
* match.pd (`a != b & a <= b`, `a != b & a >= b`,
`a == b | a < b`, `a == b | a > b`): Handle these cases
too.
gcc/testsuite/ChangeLog:
PR tree-optimization/106164
* gcc.dg/tree-ssa/cmpbit-2.c: New test.
More information about the Gcc-bugs
mailing list