summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ter.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ter.c')
-rw-r--r--gcc/tree-ssa-ter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c
index 684e6135e07..96b3959e9a8 100644
--- a/gcc/tree-ssa-ter.c
+++ b/gcc/tree-ssa-ter.c
@@ -438,8 +438,8 @@ ter_is_replaceable_p (gimple stmt)
block1 = LOCATION_BLOCK (locus1);
locus1 = LOCATION_LOCUS (locus1);
- if (gimple_code (use_stmt) == GIMPLE_PHI)
- locus2 = gimple_phi_arg_location (use_stmt,
+ if (gphi *phi = dyn_cast <gphi *> (use_stmt))
+ locus2 = gimple_phi_arg_location (phi,
PHI_ARG_INDEX_FROM_USE (use_p));
else
locus2 = gimple_location (use_stmt);