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

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

https://gcc.gnu.org/g:327310ba37c528b18f805c387529c4aa4f5f9bdd

commit r16-5629-g327310ba37c528b18f805c387529c4aa4f5f9bdd
Author: Tamar Christina <[email protected]>
Date:   Wed Nov 26 14:19:43 2025 +0000

    middle-end: Correctly detect unsigned vec_cbranch [PR122861]

    In emit_cmp_and_jump_insns I tried to detect if the operation is signed or
    unsigned in order to convert the condition code into an unsigned code.

    However I did this based on the incoming tree compare, which is done on the
    boolean result.  Since booleans are always signed in tree the result was
that
    we never used an unsigned compare when needed.

    This checks one of the arguments of the compare instead.

    Bootstrapped Regtested on aarch64-none-linux-gnu,
    arm-none-linux-gnueabihf, x86_64-pc-linux-gnu
    -m32, -m64 and no issues.
    Ok for master?

    Ok for master?

    Thanks,
    Tamar

    gcc/ChangeLog:

            PR tree-optimization/122861
            * optabs.cc (emit_cmp_and_jump_insns): Check argument instead of
result.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/122861
            * gcc.target/aarch64/sve/vect-early-break-cbranch_10.c: New test.
            * gcc.target/aarch64/sve/vect-early-break-cbranch_11.c: New test.
            * gcc.target/aarch64/sve/vect-early-break-cbranch_12.c: New test.
            * gcc.target/aarch64/sve/vect-early-break-cbranch_13.c: New test.
            * gcc.target/aarch64/sve/vect-early-break-cbranch_14.c: New test.
            * gcc.target/aarch64/sve/vect-early-break-cbranch_15.c: New test.
            * gcc.target/aarch64/sve/vect-early-break-cbranch_9.c: New test.
            * gcc.target/aarch64/vect-early-break-cbranch_4.c: New test.
            * gcc.target/aarch64/vect-early-break-cbranch_5.c: New test.

Reply via email to