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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Richard Biener
<[email protected]>:

https://gcc.gnu.org/g:8ca429aeafc2afc569900a00e77068c5e39985cb

commit r14-12661-g8ca429aeafc2afc569900a00e77068c5e39985cb
Author: Richard Biener <[email protected]>
Date:   Wed Mar 18 10:15:00 2026 +0100

    tree-optimization/124555 - guard abs patterns for vector support

    The following adds missing vector support checks to abs producing
    match.pd patterns.  The g++.dg/absvect.C shows that we previously
    then lowered this to non-vector unless you add -msse4 on x86_64
    at least.

            PR tree-optimization/124555
            * match.pd ((A - B) >=/> 0 ? (A - B) : (B - A) -> abs (A - B)):
            Guard the vector case with target_supports_op_p checks.
            ((A - B) <=/< 0 ? (A - B) : (B - A) -> -abs (A - B)): Likewise.
            ((type)A >=/> 0 ? A : -A -> abs (A)): Likewise.
            ((type)A <=/< 0 ? A : -A -> -abs (A)): Likewise.

            * gcc.dg/torture/pr124555.c: New testcase.
            * g++.dg/absvect.C: Restrict dump scan to x86-64 and force
            -msse4 there.

    (cherry picked from commit c97e6d7be7d51cd812b2acde680cd9704bae3c70)

Reply via email to