[Mlir-commits] [flang] [mlir] [flang][openmp] Add support for ordered regions in SIMD directives (PR #181012)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Feb 18 20:55:16 PST 2026
================
@@ -0,0 +1,101 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// Test that linear variables in SIMD loops with ordered regions
+// are correctly rewritten to use .linear_result in:
+// 1. The ordered region (omp.ordered.region)
+// 2. Code after the ordered region (omp_region.finalize)
+//
+// This tests "omp ordered simd" nested in "omp simd ordered"
+// !$omp simd
+// do i = 1, n
+// a(i) = b(i) * 10
+// !$omp ordered simd
+// print *, a(i)
+// !$omp end ordered
+// c(i) = a(i) * 2
+// end do
+// !$omp end simd
+// !$omp end do simd
+
+module {
+ omp.private {type = private} @i_private_i32 : i32
+
+ llvm.func @_FortranAioBeginExternalListOutput(i32, !llvm.ptr, i32) -> !llvm.ptr
----------------
NimishMishra wrote:
We can possibly drop these from the test
https://github.com/llvm/llvm-project/pull/181012
More information about the Mlir-commits
mailing list