[Mlir-commits] [mlir] [mlir][LLVMIR][OpenMP] fix dominance for reduction init block (PR #96052)

Christian Ulmann llvmlistbot at llvm.org
Wed Jun 19 09:55:27 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 {
----------------
Dinistro wrote:

This is an undesired property, as this is a massive maintenance burden for all changes to the LLVM IR export. Furthermore, this will run out of sync quickly, given that flang is modified, which is not great.

Tests for bugs should be as small as possible, while still covering the case the caused the crash. Also, reducing the number of checks is very much desired, especially when they cover something that is not relevant for the actual test.

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


More information about the Mlir-commits mailing list