diff options
author | Richard Biener <rguenther@suse.de> | 2018-10-23 11:34:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-10-23 11:34:56 +0000 |
commit | 1cab645d3e321132dca5e43d9d5057c60852a17c (patch) | |
tree | 51747567d200a1864458cc228e3655d135fb351a /gcc/tree-cfg.c | |
parent | 7a43314023a15cbcd3e5bf8f3ccbc67bce8ef119 (diff) | |
download | gcc-1cab645d3e321132dca5e43d9d5057c60852a17c.zip gcc-1cab645d3e321132dca5e43d9d5057c60852a17c.tar.gz gcc-1cab645d3e321132dca5e43d9d5057c60852a17c.tar.bz2 |
re PR tree-optimization/87105 (Autovectorization [X86, SSE2, AVX2, DoublePrecision])
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87105
PR tree-optimization/87608
* passes.def (pass_all_early_optimizations): Add early phi-opt
after dce.
* tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
addition to debug stmts.
(tree_ssa_phiopt_worker): Add early_p argument, do only min/max
and abs replacement early.
* tree-cfg.c (gimple_empty_block_p): Likewise.
* g++.dg/tree-ssa/phiopt-1.C: New testcase.
g++.dg/vect/slp-pr87105.cc: Likewise.
* g++.dg/tree-ssa/pr21463.C: Scan phiopt2 because this testcase
relies on phiprop run before.
* g++.dg/tree-ssa/pr30738.C: Likewise.
* g++.dg/tree-ssa/pr57380.C: Likewise.
* gcc.dg/tree-ssa/pr84859.c: Likewise.
* gcc.dg/tree-ssa/pr45397.c: Scan phiopt2 because phiopt1 is
confused by copies in the IL left by EVRP.
* gcc.dg/tree-ssa/phi-opt-5.c: Likewise, this time confused
by predictors.
* gcc.dg/tree-ssa/phi-opt-12.c: Scan phiopt2.
* gcc.dg/pr24574.c: Likewise.
* g++.dg/tree-ssa/pr86544.C: Scan phiopt4.
From-SVN: r265421
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index d30e4ac..5f334ca 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -6104,11 +6104,19 @@ gimple_empty_block_p (basic_block bb) gimple_stmt_iterator gsi = gsi_after_labels (bb); if (phi_nodes (bb)) return false; - if (gsi_end_p (gsi)) - return true; - if (is_gimple_debug (gsi_stmt (gsi))) - gsi_next_nondebug (&gsi); - return gsi_end_p (gsi); + while (!gsi_end_p (gsi)) + { + gimple *stmt = gsi_stmt (gsi); + if (is_gimple_debug (stmt)) + ; + else if (gimple_code (stmt) == GIMPLE_NOP + || gimple_code (stmt) == GIMPLE_PREDICT) + ; + else + return false; + gsi_next (&gsi); + } + return true; } |