[flang-commits] [flang] [flang][OpenMP] Rewrite min/max with more than 2 arguments (PR #146423)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue Jul 1 03:35:33 PDT 2025
================
@@ -0,0 +1,24 @@
+!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 %s -o - | FileCheck %s
+
+! Check that the presence tests are done outside of the atomic update
+! construct.
+
+!CHECK: %[[IS_PRESENT:[a-z0-9]+]] = fir.is_present
+!CHECK: %[[IF_VAL:[a-z0-9]+]] = fir.if %[[IS_PRESENT]] -> (f32) {
+!CHECK: fir.result {{.*}} : f32
----------------
tblah wrote:
Please could you add checks for the non-atomic max operation here so that it is clearer where that part goes
https://github.com/llvm/llvm-project/pull/146423
More information about the flang-commits
mailing list