+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
+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.
{
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);
}
}
{
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. */