2015-09-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/67470
* tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
structure for PHI hoisting by inserting a forwarder block
if appropriate.
* gcc.dg/torture/pr67470.c: New testcase.
From-SVN: r227797
+2015-09-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/67470
+ * tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
+ structure for PHI hoisting by inserting a forwarder block
+ if appropriate.
+
2015-09-15 Christian Bruel <christian.bruel@st.com>
* config/arm/arm.c (TARGET_OPTION_PRINT): Define.
+2015-09-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/67470
+ * gcc.dg/torture/pr67470.c: New testcase.
+
2015-09-15 Alan Lawrence <alan.lawrence@arm.com>
* gcc.target/aarch64/vect_int32x2x4_1.c: New.
--- /dev/null
+/* { dg-do run } */
+
+int a, b, *c, d, e;
+
+void abort (void);
+
+int
+main ()
+{
+ int f, *g, **h = &g;
+ for (; b;)
+ {
+ c = &a;
+ for (e = 0; e < 1; e++)
+ *h = 0;
+ for (; d; d++)
+ if (f)
+ *c = 0;
+ else
+ {
+ *c = e = 0;
+ *h = &a;
+ }
+
+ if (a && !g)
+ abort ();
+
+ }
+ return 0;
+}
if (loop_has_only_one_exit)
ex = split_block_after_labels (ex->dest);
+ else
+ {
+ for (gphi_iterator gpi = gsi_start_phis (ex->dest);
+ !gsi_end_p (gpi); gsi_next (&gpi))
+ {
+ gphi *phi = gpi.phi ();
+ if (virtual_operand_p (gimple_phi_result (phi)))
+ continue;
+
+ /* When the destination has a non-virtual PHI node with multiple
+ predecessors make sure we preserve the PHI structure by
+ forcing a forwarder block so that hoisting of that PHI will
+ still work. */
+ split_edge (ex);
+ break;
+ }
+ }
old_dest = ex->dest;
new_bb = split_edge (ex);