aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-threadedge.cc')
-rw-r--r--gcc/tree-ssa-threadedge.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 3805d92..72a7d4d 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -1193,7 +1193,6 @@ void
jump_threader::thread_outgoing_edges (basic_block bb)
{
int flags = (EDGE_IGNORE | EDGE_COMPLEX | EDGE_ABNORMAL);
- gimple *last;
if (!flag_thread_jumps)
return;
@@ -1204,8 +1203,7 @@ jump_threader::thread_outgoing_edges (basic_block bb)
will be traversed when the incoming edge from BB is traversed. */
if (single_succ_to_potentially_threadable_block (bb))
thread_across_edge (single_succ_edge (bb));
- else if ((last = last_stmt (bb))
- && gimple_code (last) == GIMPLE_COND
+ else if (safe_is_a <gcond *> (*gsi_last_bb (bb))
&& EDGE_COUNT (bb->succs) == 2
&& (EDGE_SUCC (bb, 0)->flags & flags) == 0
&& (EDGE_SUCC (bb, 1)->flags & flags) == 0)