[Bug tree-optimization/94921] Failure to optimize nots with sub into single add
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 6 09:20:51 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94921
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:a7b76d574b19190da190a60c065f347f40bab59e
commit r11-132-ga7b76d574b19190da190a60c065f347f40bab59e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed May 6 11:20:20 2020 +0200
match.pd: Optimize ~(~X +- Y) into (X -+ Y) [PR94921]
According to my verification proglet, this transformation for signed types
with undefined overflow doesn't introduce nor remove any UB cases, so
should
be valid even for signed integral types.
Not using a for because of the :c on plus which can't be there on minus.
2020-05-06 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94921
* match.pd (~(~X - Y) -> X + Y, ~(~X + Y) -> X - Y): New
simplifications.
* gcc.dg/tree-ssa/pr94921.c: New test.
More information about the Gcc-bugs
mailing list