[flang-commits] [flang] [flang][OpenMP] don't privatise loop index marked shared (PR #108176)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Sep 11 02:47:45 PDT 2024


================
@@ -0,0 +1,33 @@
+! RUN: bbc -emit-hlfir -fopenmp %s -o - | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
+
+! CHECK:  func.func @_QQmain() attributes
+! CHECK:    %[[ALLOC_I:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFEi"}
+! CHECK:    %[[DECL_I:.*]]:2 = hlfir.declare %[[ALLOC_I]] {uniq_name = "_QFEi"} :
+! CHECK:    omp.parallel {
+! CHECK:      omp.sections {
+! CHECK:        omp.section {
+! CHECK:          %[[RES:.*]]:2 = fir.do_loop {{.*}} iter_args(%[[ARG:.*]] =
----------------
tblah wrote:

Please could you expend the variables here so we can see what exactly is being used as the loop iteration variable (I know we have the correct store at the end, but I think making it more explicit makes it clearer what the test is checking).

https://github.com/llvm/llvm-project/pull/108176


More information about the flang-commits mailing list