On 12/3/24 3:28 AM, Jovan Vukic wrote:
Thank you for the feedback. I have made the minor changes that were requested.
Additionally, I extracted the repetitive code into a reusable helper function,
match_plus_neg_pattern, making the code much more readable. Furthermore, the
logic, code, and tests remain the same as in version 2 of the patch.

2024-12-03  Jovan Vukic<jovan.vu...@rt-rk.com>

gcc/ChangeLog:

         * match.pd: New pattern.
         * simplify-rtx.cc (match_plus_neg_pattern): New helper function.
         (simplify_context::simplify_binary_operation_1): New
         code to handle (a - 1) & -a, (a - 1) | -a and (a - 1) ^ -a.

gcc/testsuite/ChangeLog:

         * gcc.dg/tree-ssa/bitops-11.c: New test.
Thanks. I didn't see any note about testing, so I did the usual bootstrap & regression test on x86_64 without any issues.

Pushed to the trunk..  Thanks again!

jeff

Reply via email to