aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-09-11 15:35:59 -0700
committerAndrew Pinski <apinski@marvell.com>2023-09-12 08:02:06 -0700
commit895e476f64c308dfdbf49693d0b1166c0b7733de (patch)
tree9d44e9b8cdc287a4c36fead5cbf92b31b95e7476 /gcc/go
parent75f069a6403b5d4217fb5b654a9c656b4dca9dc1 (diff)
downloadgcc-895e476f64c308dfdbf49693d0b1166c0b7733de.zip
gcc-895e476f64c308dfdbf49693d0b1166c0b7733de.tar.gz
gcc-895e476f64c308dfdbf49693d0b1166c0b7733de.tar.bz2
MATCH: Simplify (a CMP1 b) ^ (a CMP2 b)
This adds the missing optimizations here. Note we don't need to match where CMP1 and CMP2 are complements of each other as that is already handled elsewhere. I added a new executable testcase to make sure we optimize it correctly as I had originally messed up one of the entries for the resulting comparison to make sure they were 100% correct. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107881 gcc/ChangeLog: * match.pd (`(a CMP1 b) ^ (a CMP2 b)`): New pattern. (`(a CMP1 b) == (a CMP2 b)`): New pattern. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/pr107881-1.c: New test. * gcc.dg/tree-ssa/cmpeq-4.c: New test. * gcc.dg/tree-ssa/cmpxor-1.c: New test.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions