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) ``` 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 [PR119196] gimple-fold: extend vector simplification to match scalar bitwise optimizations [PR119196] gcc/match.pd | 21 +++++++- .../gcc.target/aarch64/vector-compare-5.c | 49 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/vector-compare-5.c -- 2.43.0