https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127379

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <[email protected]>:

https://gcc.gnu.org/g:b3527d9b213fcbe2f4550709d25220ab6ba43184

commit r17-4228-gb3527d9b213fcbe2f4550709d25220ab6ba43184
Author: Dominic P <[email protected]>
Date:   Mon Sep 14 07:24:13 2026 -0600

    [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 <[email protected]>

Reply via email to