[Openmp-commits] [openmp] [OpenMP] Simplify parallel reductions (PR #70983)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Thu Nov 2 10:52:13 PDT 2023
================
@@ -0,0 +1,25 @@
+// RUN: %libomptarget-compilexx-run-and-check-generic
+// RUN: %libomptarget-compileoptxx-run-and-check-generic
+
+#include <omp.h>
+#include <stdio.h>
+__attribute__((optnone)) void optnone(void) {}
+
+int main() {
+ int sum = 0, nt;
+#pragma omp target teams map(tofrom : sum, nt) num_teams(1)
+ {
+ nt = 3 * omp_get_max_threads();
+ optnone();
----------------
jhuber6 wrote:
Is the intention here to prevent some ordering? Usually some inline assembly will accomplish that if you want `nt` not to be constant propagated.
https://github.com/llvm/llvm-project/pull/70983
More information about the Openmp-commits
mailing list