New in V3:
Added XOR comparison optimization with the appropriate tests.
Any further optimizations involving scalars are left for a
future, separate patch, as these may be considered outside
the scope of Bug 119196, whose focus was on missed folding
of vector comparisons.
-----------------------------------------------------------------------
This patch generalizes existing scalar bitwise comparison simplifications
to vector types by matching patterns of the form
```
(cmp x y) bit_and (cmp x y)
(cmp x y) bit_ior (cmp x y)
(cmp x y) bit_xor (cmp x y)
```
for vector operands, it also enables contradictory comparisons like
`(x < y) && (x > y)` to fold to `false` in vector contexts or always true
comparisons like `(x <= y) || (x > y)`to fold to `true`.
Icen Zeyada (2):
tree-simplify: unify simple_comparison ops in vec_cond for bit
and/or/xor [PR119196]
gimple-fold: extend vector simplification to match scalar bitwise
optimizations [PR119196]
gcc/match.pd | 25 ++++++-
.../gcc.target/aarch64/vector-compare-5.c | 67 +++++++++++++++++++
2 files changed, 90 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/aarch64/vector-compare-5.c
--
2.43.0