Commit 4c445590 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/56984 (ICE in tree_vrp.c)

	PR tree-optimization/56984
	* tree-vrp.c (register_edge_assert_for_2): For (x >> M) < N
	and (x >> M) >= N don't register any assertion if N << M is the
	minimum value.

	* gcc.c-torture/compile/pr56984.c: New test.

From-SVN: r198051
parent ae1e2600
2013-04-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56984
* tree-vrp.c (register_edge_assert_for_2): For (x >> M) < N
and (x >> M) >= N don't register any assertion if N << M is the
minimum value.
2013-04-18 Steven Bosscher <steven@gcc.gnu.org>
* lower-subreg.c (resolve_simple_move): If called self-recursive,
......
2013-04-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56984
* gcc.c-torture/compile/pr56984.c: New test.
PR rtl-optimization/56992
* gcc.dg/pr56992.c: New test.
......
/* PR tree-optimization/56984 */
int
foo (int x)
{
if ((x >> 31) < -1)
x++;
return x;
}
......@@ -4895,7 +4895,13 @@ register_edge_assert_for_2 (tree name, edge e, gimple_stmt_iterator bsi,
new_comp_code = comp_code == EQ_EXPR ? LE_EXPR : GT_EXPR;
}
else if (comp_code == LT_EXPR || comp_code == GE_EXPR)
new_val = val2;
{
double_int minval
= double_int::min_value (prec, TYPE_UNSIGNED (TREE_TYPE (val)));
new_val = val2;
if (minval == tree_to_double_int (new_val))
new_val = NULL_TREE;
}
else
{
double_int maxval
......
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