================
@@ -17,10 +17,17 @@
//
// If these helpers ever gain a DISubprogram of their own, the checks below
// should be relaxed to require that the scope describes the helper itself.
+//
+// Reduction combiners are also emitted into outlined functions with a
+// DISubprogram. For a user-defined reduction, the combiner is a function call
+// that must retain a debug location in its outlined caller.
+
+#pragma omp declare reduction(plus : int : omp_out += omp_in) \
+ initializer(omp_priv = 0)
void foo() {
int T = 0;
-#pragma omp target teams distribute parallel for reduction(+ : T)
+#pragma omp target teams distribute parallel for reduction(plus : T)
----------------
abidh wrote:
Please leave the existing test in so that we check with and without combiner.
https://github.com/llvm/llvm-project/pull/236574
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits