aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-06-30 18:39:07 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-07-02 14:26:51 -0700
commit578ccc717937178b50db0e35554da3f77f19e304 (patch)
tree8b944e745c72f8d53a4e4c3518f3484ede8f93b8 /gcc/tree-pass.h
parent1250540a98e0a1dfa4d7834672d88d8543ea70b1 (diff)
downloadgcc-578ccc717937178b50db0e35554da3f77f19e304.zip
gcc-578ccc717937178b50db0e35554da3f77f19e304.tar.gz
gcc-578ccc717937178b50db0e35554da3f77f19e304.tar.bz2
Small optimization for complex addition, real/imag parts the same
This is just a small optimization for the case where the real and imag parts are the same when lowering complex addition/subtraction. We only need to do the addition once when the real and imag parts are the same (on both sides of the operator). This gets done later on by FRE/PRE/DOM but having it done soon allows the cabs lowering to remove the sqrt and just change it to a multiply by a constant. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-complex.cc (expand_complex_addition): If both operands have the same real and imag parts, only add the addition once. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/complex-8.c: 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