diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-06-30 12:57:14 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-07-02 14:26:51 -0700 |
commit | d8fe4f05ef448e6a136398d38c0f2170d3c6bb0d (patch) | |
tree | 07d388c5dfbd1733bd9233230b8e1079c0fd603e /gcc/tree-pass.h | |
parent | 578ccc717937178b50db0e35554da3f77f19e304 (diff) | |
download | gcc-d8fe4f05ef448e6a136398d38c0f2170d3c6bb0d.zip gcc-d8fe4f05ef448e6a136398d38c0f2170d3c6bb0d.tar.gz gcc-d8fe4f05ef448e6a136398d38c0f2170d3c6bb0d.tar.bz2 |
Move cabs expansion from powcabs to complex lowering [PR115710]
Expanding cabs in powcab might be too late as forwprop might
recombine the load from a memory with the complex expr. Moving
instead to complex lowering allows us to use directly the real/imag
component from the loads instead. This allows for vectorization too.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR tree-optimization/115710
gcc/ChangeLog:
* tree-complex.cc (init_dont_simulate_again): Handle CABS.
(gimple_expand_builtin_cabs): New function, moved mostly
from tree-ssa-math-opts.cc.
(expand_complex_operations_1): Call gimple_expand_builtin_cabs.
* tree-ssa-math-opts.cc (gimple_expand_builtin_cabs): Remove.
(build_and_insert_binop): Remove.
(pass_data_expand_powcabs): Update comment.
(pass_expand_powcabs::execute): Don't handle CABS.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/cabs-1.c: New test.
* gcc.dg/tree-ssa/cabs-2.c: New test.
* gfortran.dg/vect/pr115710.f90: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions