summaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-split-paths.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-12 09:41:02 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-12 09:41:02 +0000
commitd592b7eb01d951389d742e4ebc5eae0d7fecacde (patch)
treebcf8e9fbdfc31a7ebdbb48a33d5e1ac9a7ec130d /gcc/gimple-ssa-split-paths.c
parent6edc0ab7ef627859ecc47f793479b4cfc594fc30 (diff)
downloadgcc-d592b7eb01d951389d742e4ebc5eae0d7fecacde.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246869 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-ssa-split-paths.c')
-rw-r--r--gcc/gimple-ssa-split-paths.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/gimple-ssa-split-paths.c b/gcc/gimple-ssa-split-paths.c
index df88c76aa53..70651c5dea3 100644
--- a/gcc/gimple-ssa-split-paths.c
+++ b/gcc/gimple-ssa-split-paths.c
@@ -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;
}
}