[Mlir-commits] [mlir] [mlir][OpenMP] Don't use label prefixes on linear variable rewrite (PR #200900)

Leandro Lupori llvmlistbot at llvm.org
Fri Jun 19 16:43:15 PDT 2026


================
@@ -0,0 +1,33 @@
+// Ensure that omp.wsloop with the linear clause is translated correctly.
+// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
+
+// -----
+
+// %.linear_result must appear only in the loop body and in the
+// linear_lastiter_exit block, where it's used to update the original
+// variable.
+// CHECK-LABEL: void @wsloop_linear_post_use({{.*}})
+// CHECK:           %.linear_result = alloca i32
+// CHECK-NOT:       %.linear_result
+// CHECK:         omp_loop.body:
+// CHECK:           %.linear_result
+// CHECK:         omp_loop.inc:
+// CHECK-NOT:       %.linear_result
+// CHECK:         omp_loop.linear_lastiter_exit:
+// CHECK:           %.linear_result
----------------
luporl wrote:

TODO: check that the load uses %.linear_result but the subsequent store uses the original variable.

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


More information about the Mlir-commits mailing list