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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:7dbf4964b80eaa5f047be24949e294b8b25a2419

commit r14-11843-g7dbf4964b80eaa5f047be24949e294b8b25a2419
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Jun 12 20:22:39 2025 +0200

    recip: Reset range info when replacing sqrt with rsqrt [PR120638]

    This pass reuses a SSA_NAME on the lhs of sqrt etc. call as lhs
    of .RSQRT etc. call.  The following testcase is miscompiled since my recent
    ranger cast changes, because we compute (correct) range for sqrtf argument
    as well as result but then recip pass keeps using that range for the .RQSRT
    call which returns 1. / sqrt, so the function then returns 0.5f
    unconditionally.
    Note, on foo this is a regression from GCC 15, but on bar it regressed
    already with the r14-536 change.

    2025-06-12  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/120638
            * tree-ssa-math-opts.cc (pass_cse_reciprocals::execute): Call
            reset_flow_sensitive_info on arg1.

            * gcc.dg/pr120638.c: New test.

    (cherry picked from commit 8804e5b5b127b27d099d0c361fa2161d0b13edef)

Reply via email to