Skip to content
Snippets Groups Projects
Commit 975da6fa authored by Andrew Pinski's avatar Andrew Pinski
Browse files

MATCH: [PR111679] Add alternative simplification of `a | ((~a) ^ b)`

So currently we have a simplification for `a | ~(a ^ b)` but
that does not match the case where we had originally `(~a) | (a ^ b)`
so we need to add a new pattern that matches that and uses bitwise_inverted_equal_p
that also catches comparisons too.

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

	PR tree-optimization/111679

gcc/ChangeLog:

	* match.pd (`a | ((~a) ^ b)`): New pattern.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/bitops-5.c: New test.
parent 5bb6a876
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment