[Mlir-commits] [mlir] [mlir][LLVMIR][OpenMP] fix dominance for reduction init block (PR #96052)
Tom Eccles
llvmlistbot at llvm.org
Wed Jun 19 06:15:22 PDT 2024
================
@@ -0,0 +1,342 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// generated by flang-new:
+// subroutine missordered_blocks(x,y)
+// integer, allocatable :: x, y
+// !$omp parallel reduction(+:x,y)
+// x = 42
+// y = 24
+// !$omp end parallel
+// end subroutine
+
+// This is basically a test that we don't crash while translating this IR
+
+omp.declare_reduction @add_reduction_byref_box_heap_i32 : !llvm.ptr init {
----------------
tblah wrote:
I ran canonicalization and cse. I didn't do manual modification because I wanted to keep this equivalent(*) to the fortran example code.
(*) I took out the malloc and free to avoid needing those function declarations
https://github.com/llvm/llvm-project/pull/96052
More information about the Mlir-commits
mailing list