[flang-commits] [flang] [flang][OpenMP] Lower DO, SIMD, and DO SIMD metadirective variants (PR #218555)

via flang-commits flang-commits at lists.llvm.org
Mon Aug 24 20:57:41 PDT 2026


================
@@ -0,0 +1,562 @@
+! Test lowering of metadirectives with ordinary loop-associated variants.
+
+! RUN: %flang_fc1 -fopenmp -emit-hlfir -fopenmp-version=52 %s -o - | FileCheck %s
+
+! CHECK: #loop_unroll = #llvm.loop_unroll<disable = false, count = 4 : i64>
+! CHECK: #loop_annotation = #llvm.loop_annotation<unroll = #loop_unroll>
+
+! CHECK-LABEL: func.func @_QPtest_do(
+! CHECK-NOT:     omp.parallel
+! CHECK:         omp.wsloop
----------------
MattPD wrote:

The `test_do` CHECK block still passes when the compiler output omits the `private(...)` clause from `omp.wsloop`. The `test_begin_do` CHECK block has the same gap. Both tests would still pass if lowering omitted the private binding for the Fortran induction variable.

Could the `private(...)` checks require `Ei_private_i32` in two places: `test_do` and the selected branch of `test_begin_do`?

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


More information about the flang-commits mailing list