aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r--gcc/tree-chrec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c
index 04d33ef..896ff35 100644
--- a/gcc/tree-chrec.c
+++ b/gcc/tree-chrec.c
@@ -375,10 +375,12 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
default:
{
- if (tree_contains_chrecs (op0, NULL)
- || tree_contains_chrecs (op1, NULL))
+ int size = 0;
+ if ((tree_contains_chrecs (op0, &size)
+ || tree_contains_chrecs (op1, &size))
+ && size < PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
return build2 (code, type, op0, op1);
- else
+ else if (size < PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
{
if (code == POINTER_PLUS_EXPR)
return fold_build_pointer_plus (fold_convert (type, op0),
@@ -388,6 +390,8 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
fold_convert (type, op0),
fold_convert (type, op1));
}
+ else
+ return chrec_dont_know;
}
}
}