aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index b0d45bc..2ced307 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -165,9 +165,7 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop)
if ((DECL_P (base)
&& TREE_STATIC (base)
&& TREE_READONLY (base)
- && (DECL_INITIAL (base)
- || (!DECL_EXTERNAL (base)
- && targetm.binds_local_p (base))))
+ && varpool_get_node (base)->const_value_known)
|| CONSTANT_CLASS_P (base))
{
/* If so, see if we understand all the indices. */