[Bug middle-end/94785] Failure to detect abs pattern using multiplication
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 31 10:08:53 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94785
--- Comment #3 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:8f12ce2ea3be12de4f83d3c419bdb1dc5036b202
commit r11-6377-g8f12ce2ea3be12de4f83d3c419bdb1dc5036b202
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Dec 31 11:08:15 2020 +0100
match.pd: Add (-(X < 0) | 1) * X -> abs (X) etc. simplifications [PR94785]
The following patch adds two simplifications to recognize idioms
for ABS_EXPR resp. ABSU_EXPR.
2020-12-31 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94785
* match.pd ((-(X < 0) | 1) * X -> abs (X)): New simplification.
((-(X < 0) | 1U) * X -> absu (X)): Likewise.
* gcc.dg/tree-ssa/pr94785.c: New test.
More information about the Gcc-bugs
mailing list