re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
authorRichard Biener <rguenther@suse.de>
Wed, 12 Apr 2017 09:41:02 +0000 (09:41 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Apr 2017 09:41:02 +0000 (09:41 +0000)
2017-04-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79390
* gimple-ssa-split-paths.c (is_feasible_trace): Restrict
threading case even more.

From-SVN: r246869

gcc/ChangeLog
gcc/gimple-ssa-split-paths.c

index 1458921cb449ee9b4a99372089071bbf08548544..d59a0e997ee528b9ecfe1456e15cb70d70bb495d 100644 (file)
@@ -1,3 +1,9 @@
+2017-04-12  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/79390
+       * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
+       threading case even more.
+
 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
 
        PR target/80382
index df88c76aa53fa2c5af6773a281d27f78f7ce33ba..70651c5dea362d32700257c6bf3f2dae1036c9bd 100644 (file)
@@ -249,13 +249,17 @@ is_feasible_trace (basic_block bb)
                  imm_use_iterator iter2;
                  FOR_EACH_IMM_USE_FAST (use2_p, iter2, gimple_phi_result (stmt))
                    {
-                     if (is_gimple_debug (USE_STMT (use2_p)))
+                     gimple *use_stmt = USE_STMT (use2_p);
+                     if (is_gimple_debug (use_stmt))
                        continue;
-                     basic_block use_bb = gimple_bb (USE_STMT (use2_p));
+                     basic_block use_bb = gimple_bb (use_stmt);
                      if (use_bb != bb
                          && dominated_by_p (CDI_DOMINATORS, bb, use_bb))
                        {
-                         found_useful_phi = true;
+                         if (gcond *cond = dyn_cast <gcond *> (use_stmt))
+                           if (gimple_cond_code (cond) == EQ_EXPR
+                               || gimple_cond_code (cond) == NE_EXPR)
+                             found_useful_phi = true;
                          break;
                        }
                    }