Commit c1a70a3c by Roger Sayle Committed by Roger Sayle

re PR tree-optimization/26361 (bootstrap failure on Alpha: xgcc runs out of…

re PR tree-optimization/26361 (bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c)


	PR tree-optimization/26361
	* tree-vrp.c (extract_range_from_unary_expr): Handle NEGATE_EXPR
	of unsigned integer types.

	* gcc.dg/tree-ssa/vrp27.c: New test case.

From-SVN: r111327
parent f49712d8
2006-02-20 Roger Sayle <roger@eyesopen.com>
PR tree-optimization/26361
* tree-vrp.c (extract_range_from_unary_expr): Handle NEGATE_EXPR
of unsigned integer types.
2006-02-20 Sebastian Pop <pop@cri.ensmp.fr> 2006-02-20 Sebastian Pop <pop@cri.ensmp.fr>
* tree-chrec.c (eq_evolutions_p): New. * tree-chrec.c (eq_evolutions_p): New.
......
2006-02-20 Roger Sayle <roger@eyesopen.com>
PR tree-optimization/26361
* gcc.dg/tree-ssa/vrp27.c: New test case.
2006-02-20 Andrew Pinski <pinskia@physics.uc.edu> 2006-02-20 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/tree-ssa/complex-3.c: Split out first part into ... * gcc.dg/tree-ssa/complex-3.c: Split out first part into ...
/* PR middle-end/26361. */
/* { dg-do run } */
/* { dg-options "-O2" } */
void abort(void);
__attribute__((noinline))
void gen_rtx_CONST_INT(long long x) {
if (-x > 10)
abort();
}
__attribute__((noinline))
int alpha_expand_prologue(long frame_size)
{
unsigned long long a;
int probed;
if (frame_size <= 1) return;
unsigned long long b = -2;
a = -2;
do {
int a1 = a;
probed = -a1;
gen_rtx_CONST_INT (a1);
a -= 2;
a1 = -a;
probed = a1;
} while (probed < frame_size);
}
int main(void) {
alpha_expand_prologue(10);
return 0;
}
...@@ -1790,6 +1790,24 @@ extract_range_from_unary_expr (value_range_t *vr, tree expr) ...@@ -1790,6 +1790,24 @@ extract_range_from_unary_expr (value_range_t *vr, tree expr)
max = (vr0.min == TYPE_MIN_VALUE (TREE_TYPE (expr)) && !flag_wrapv) max = (vr0.min == TYPE_MIN_VALUE (TREE_TYPE (expr)) && !flag_wrapv)
? TYPE_MAX_VALUE (TREE_TYPE (expr)) ? TYPE_MAX_VALUE (TREE_TYPE (expr))
: fold_unary_to_constant (code, TREE_TYPE (expr), vr0.min); : fold_unary_to_constant (code, TREE_TYPE (expr), vr0.min);
}
else if (code == NEGATE_EXPR
&& TYPE_UNSIGNED (TREE_TYPE (expr)))
{
if (!range_includes_zero_p (&vr0))
{
max = fold_unary_to_constant (code, TREE_TYPE (expr), vr0.min);
min = fold_unary_to_constant (code, TREE_TYPE (expr), vr0.max);
}
else
{
if (range_is_null (&vr0))
set_value_range_to_null (vr, TREE_TYPE (expr));
else
set_value_range_to_varying (vr);
return;
}
} }
else if (code == ABS_EXPR else if (code == ABS_EXPR
&& !TYPE_UNSIGNED (TREE_TYPE (expr))) && !TYPE_UNSIGNED (TREE_TYPE (expr)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment