MATCH: Add ABSU<a> == 0 to a == 0 simplification
commit6fe385eac6ff8ecddb6cbdff2c706b27b5137006
authorAndrew Pinski <apinski@marvell.com>
Thu, 4 May 2023 23:37:51 +0000 (4 23:37 +0000)
committerAndrew Pinski <apinski@marvell.com>
Fri, 5 May 2023 05:22:23 +0000 (5 05:22 +0000)
tree8253c1d99b449b61b273c06ef9a08733074aacb1
parent6f18f344338b370031e75924eed2bdd1ce5c8dba
MATCH: Add ABSU<a> == 0 to a == 0 simplification

There is already an `ABS<a> == 0` to `a == 0` pattern,
this just extends that to ABSU too.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

PR tree-optimization/109722

gcc/ChangeLog:

* match.pd: Extend the `ABS<a> == 0` pattern
to cover `ABSU<a> == 0` too.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/abs-1.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/tree-ssa/abs-1.c [new file with mode: 0644]