[PATCH] match.pd: Restrict the X | -X range test to scalars [PR127379]
The X | -X matcher of the range-test patterns has no constant operand,
so vectors reach it and the shift form converts a scalar comparison to
a vector type. As Andrea Pinski suggested, limit it to integral types;
the other matchers are already scalar through their INTEGER_CST.
Bootstrapped on x86_64-pc-linux-gnu; tree-ssa, vect, dg and dg-torture
tests show no regressions.
Assisted-by: Claude Opus 5 (Anthropic)
PR tree-optimization/127379
gcc/ChangeLog:
* match.pd (ior_range_test_0): Require an integral type.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr127379.c: New test.
Signed-off-by: Dominic P <gcc@gcc.dp11.uk>
2 files changed