[Mlir-commits] [mlir] [MLIR][OpenMP] Lowering support for Order clause in SIMD directive (PR #96866)
Kiran Chandramohan
llvmlistbot at llvm.org
Thu Jun 27 02:40:58 PDT 2024
================
@@ -826,6 +826,30 @@ llvm.func @simd_if(%arg0: !llvm.ptr {fir.bindc_name = "n"}, %arg1: !llvm.ptr {fi
// -----
+// CHECK-LABEL: @simd_order
+llvm.func @simd_order() {
+ %0 = llvm.mlir.constant(1 : i64) : i64
+ %1 = llvm.alloca %0 x i32 {bindc_name = "i", pinned} : (i64) -> !llvm.ptr
+ %2 = llvm.mlir.constant(1 : i64) : i64
+ %3 = llvm.alloca %2 x i32 {bindc_name = "i"} : (i64) -> !llvm.ptr
+ %4 = llvm.mlir.constant(1 : i32) : i32
+ %5 = llvm.mlir.constant(10 : i32) : i32
+ %6 = llvm.mlir.constant(1 : i32) : i32
+ omp.simd order(concurrent) safelen(2) {
+ omp.loop_nest (%arg0) : i32 = (%4) to (%5) inclusive step (%6) {
+ llvm.store %arg0, %1 : i32, !llvm.ptr
+ omp.yield
+ }
+ }
+ llvm.return
+}
+// If clause order(concurrent) is specified then the memory instructions
+// are marked parallel even if 'safelen' is finite.
+// CHECK: llvm.loop.parallel_accesses
----------------
kiranchandramohan wrote:
Is it the parallel accesses that comes with `concurrent`?
https://github.com/llvm/llvm-project/pull/96866
More information about the Mlir-commits
mailing list