2019-08-28 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/90637
* tree-ssa-sink.c (statement_sink_location): Honor the
computed sink location for single-uses.
* gcc.dg/gomp/pr90637.c: New testcase.
From-SVN: r274989
+2019-08-28 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-05-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90637
+ * tree-ssa-sink.c (statement_sink_location): Honor the
+ computed sink location for single-uses.
+
2019-08-26 Xiong Hu Luo <luoxhu@linux.ibm.com>
Backport r274411 from trunk to gcc-9-branch.
+2019-08-28 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-05-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90637
+ * gcc.dg/gomp/pr90637.c: New testcase.
+
2019-08-23 Mihailo Stojanovic <mistojanovic@wavecomp.com>
* gcc.target/mips/get-fcsr-3.c: New test.
--- /dev/null
+/* PR tree-optimization/90637 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -O1 --param sink-frequency-threshold=90" } */
+
+int v;
+
+void
+foo (int c)
+{
+ int i;
+#pragma omp for simd if (c) lastprivate (v) schedule (static, 16)
+ for (i = 0; i < 64; ++i)
+ v = i;
+}
if (sinkbb == frombb)
return false;
- *togsi = gsi_for_stmt (use);
+ if (sinkbb == gimple_bb (use))
+ *togsi = gsi_for_stmt (use);
+ else
+ *togsi = gsi_after_labels (sinkbb);
return true;
}