[Mlir-commits] [mlir] [mlir][OpenMP] Model recursive memory effects of omp.master (PR #230190)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 15 02:26:56 PDT 2026
================
@@ -143,3 +143,34 @@ func.func @constant_hoisting_target(%x : !llvm.ptr) {
// CHECK-NOT: arith.constant
// CHECK: omp.target
// CHECK: arith.constant
+
+// -----
+
+// Master has no implicit barrier, so a body without side effects can be removed.
+// CHECK-LABEL: func.func @master_no_side_effects
+// CHECK-NEXT: return
+func.func @master_no_side_effects(%a: i32, %b: i32) {
+ omp.master {
+ %unused = arith.addi %a, %b : i32
+ omp.terminator
+ }
+ return
+}
+
+// -----
+
+// Master must consider recursive side effects.
----------------
JRP-arm wrote:
Done
https://github.com/llvm/llvm-project/pull/230190
More information about the Mlir-commits
mailing list