On 6/12/25 11:41 AM, Jakub Jelinek wrote:
Hi! 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. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/15.2/14.4? 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.
OK. jeff