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

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

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

commit r17-5454-g8afde8eab36eb74ceecfbcc20322693358feba94
Author: Roger Sayle <[email protected]>
Date:   Wed Oct 21 13:21:47 2026 +0100

    PR tree-optimization/126562: vectorizer vs. pow (x, 0.5) -> sqrt

    This patch fixes the vectorizer aspects of PR tree-optimization/126562,
    where GCC is inappropriately converting pow(x, 0.5) into sqrt(x).  The
    scalar aspects were fixed in my patch for PR tree-optimization/127544.
    Unfortunately, this correctness patch required tweaking two existing
    testcases as the vectorizer no longer recognizes opportunities that
    match.pd missed, though these loops are still vectorized with the
    appropriate flags, for example with -Ofast.

    2026-10-21  Roger Sayle  <[email protected]>

    gcc/ChangeLog
            PR tree-optimization/126562
            * tree-vect-patterns.cc (vect_recog_pow_pattern): Update
            square root case to check for signed zero or negative infinity.

    gcc/testsuite/ChangeLog
            PR tree-optimization/126562
            * gcc.dg/vect/no-math-errno-slp-32.c: Update test case.
            * gcc.dg/vect/no-math-errno-vect-pow-1.c: Likewise.
            * gcc.dg/vect/pr126562-1.c: New execution test.
            * gcc.dg/vect/pr126562-2.c: Likewise.

Reply via email to