+2015-08-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/67221
+ * tree-ssa-sccvn.c (visit_phi): Keep all-TOP args TOP.
+ (sccvn_dom_walker::before_dom_children): Mark backedges of
+ non-executable blocks as not executable.
+
2015-08-17 David Sherwood <david.sherwood@arm.com>
* config/arm/arm.c (neon_element_bits): Replace call to
+2015-08-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/67221
+ * gcc.dg/torture/pr67221.c: New testcase.
+
2015-08-17 Mike Stump <mikestump@comcast.net>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
break;
}
}
+
+ /* If none of the edges was executable or all incoming values are
+ undefined keep the value-number at VN_TOP. */
+ if (sameval == VN_TOP)
+ return set_ssa_val_to (PHI_RESULT (phi), VN_TOP);
/* First see if it is equivalent to a phi node in this block. We prefer
this as it allows IV elimination - see PRs 66502 and 67167. */
reachable |= (e->flags & EDGE_EXECUTABLE);
/* If the block is not reachable all outgoing edges are not
- executable. */
+ executable. Neither are incoming edges with src dominated by us. */
if (!reachable)
{
if (dump_file && (dump_flags & TDF_DETAILS))
FOR_EACH_EDGE (e, ei, bb->succs)
e->flags &= ~EDGE_EXECUTABLE;
+
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ {
+ if (dominated_by_p (CDI_DOMINATORS, e->src, bb))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "Marking backedge from BB %d into "
+ "unreachable BB %d as not executable\n",
+ e->src->index, bb->index);
+ e->flags &= ~EDGE_EXECUTABLE;
+ }
+ }
return;
}