[PATCH] match.pd: Add new bitwise arithmetic pattern [PR98304]
commitd9fa599dc7584d89e758a09a3d68982f12d8751c
authorSam Feifer <sfeifer@redhat.com>
Sat, 9 Jul 2022 16:08:01 +0000 (9 12:08 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Sat, 9 Jul 2022 16:08:01 +0000 (9 12:08 -0400)
treeff71ed921050fc43db5734a79c56ddbf972c6951
parent46dc26fdfbf3e64f82188e21aa6a13ec23108e8e
[PATCH] match.pd: Add new bitwise arithmetic pattern [PR98304]

PR tree-optimization/98304

gcc:

* match.pd (n - (((n > C1) ? n : C1) & -C2)): New simplification.

gcc/testsuite:

* gcc.c-torture/execute/pr98304-2.c: New test.
* gcc.dg/pr98304-1.c: New test.
gcc/match.pd
gcc/testsuite/gcc.c-torture/execute/pr98304-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr98304-1.c [new file with mode: 0644]