aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-04-27 09:50:43 -0700
committerAndrew Pinski <apinski@marvell.com>2023-05-08 00:36:19 -0700
commit01f3e3768fffa73dc63c261426ebaaf4b9add74b (patch)
treec1ad3f4b6da845095c117915f27df4ba3e3cf40a /libgfortran
parent69f1a8af45d8a42003c21489019ddfb01d88d30d (diff)
downloadgcc-01f3e3768fffa73dc63c261426ebaaf4b9add74b.zip
gcc-01f3e3768fffa73dc63c261426ebaaf4b9add74b.tar.gz
gcc-01f3e3768fffa73dc63c261426ebaaf4b9add74b.tar.bz2
PHIOPT: Loop over calling factor_out_conditional_conversion
After adding diamond shaped bb support to factor_out_conditional_conversion, we can get a case where we have two conversions that needs factored out and then would have another phiopt happen. An example is: ``` static inline unsigned long long g(int t) { unsigned t1 = t; return t1; } unsigned long long f(int c, int d, int e) { unsigned long long t; if (c > d) t = g(c); else t = g(d); return t; } ``` In this case we should get a MAX_EXPR in phiopt1 with two casts. Before this patch, we would just factor out the outer cast and then wait till phiopt2 to factor out the inner cast. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.cc (pass_phiopt::execute): Loop over factor_out_conditional_conversion. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/minmax-17.c: New test.
Diffstat (limited to 'libgfortran')
0 files changed, 0 insertions, 0 deletions