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

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

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

commit r16-8155-gc97e6d7be7d51cd812b2acde680cd9704bae3c70
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.

Reply via email to