Commit 6be4c4ec by Richard Biener Committed by Richard Biener

re PR tree-optimization/63800 (ICE on valid code at -O3 on x86_64-linux-gnu)

2014-11-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/63800
	* tree-ssa-pre.c (eliminate_push_avail): Push in a way so
	we can restore the previous availability in after_dom_children.
	(eliminate_dom_walker::after_dom_children): Restore
	previous availability.

	* gcc.dg/torture/pr63800.c: New testcase.

From-SVN: r217288
parent 3090fa55
2014-11-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/63800
* tree-ssa-pre.c (eliminate_push_avail): Push in a way so
we can restore the previous availability in after_dom_children.
(eliminate_dom_walker::after_dom_children): Restore
previous availability.
2014-11-10 Richard Biener <rguenther@suse.de>
PR middle-end/63798
* expr.c (expand_expr_real_2): When expanding FMA_EXPRs
properly treat the embedded multiplication as commutative
2014-11-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/63800
* gcc.dg/torture/pr63800.c: New testcase.
2014-11-10 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/align-7.c: Skip for -flto -fno-fat-lto-objects.
......
/* { dg-do compile } */
int a, b, c, d[2];
int
fn1 ()
{
int f = 0;
d[1] = b = 1;
for (; b; b--)
{
for (c = 0; c < 2; c++)
{
d[b] & 1 & b;
if (d[0])
f = d[b] * a;
if (f)
return 0;
}
d[b] && (d[0] = 0);
}
return 0;
}
......@@ -3906,8 +3906,11 @@ eliminate_push_avail (tree op)
{
if (el_avail.length () <= SSA_NAME_VERSION (valnum))
el_avail.safe_grow_cleared (SSA_NAME_VERSION (valnum) + 1);
tree pushop = op;
if (el_avail[SSA_NAME_VERSION (valnum)])
pushop = el_avail[SSA_NAME_VERSION (valnum)];
el_avail_stack.safe_push (pushop);
el_avail[SSA_NAME_VERSION (valnum)] = op;
el_avail_stack.safe_push (op);
}
}
......@@ -4451,7 +4454,14 @@ eliminate_dom_walker::after_dom_children (basic_block)
{
tree entry;
while ((entry = el_avail_stack.pop ()) != NULL_TREE)
el_avail[SSA_NAME_VERSION (VN_INFO (entry)->valnum)] = NULL_TREE;
{
tree valnum = VN_INFO (entry)->valnum;
tree old = el_avail[SSA_NAME_VERSION (valnum)];
if (old == entry)
el_avail[SSA_NAME_VERSION (valnum)] = NULL_TREE;
else
el_avail[SSA_NAME_VERSION (valnum)] = entry;
}
}
/* Eliminate fully redundant computations. */
......
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