Commit 0741209
authored
[flang][OpenMP] Guard lastprivate scoping on DO (#157760)
Add HLFIR FileCheck ensuring `lastprivate(v)` on an `omp do` is realized
as privatization on the inner wsloop and not on the enclosing `omp
parallel`.
This matches OpenMP semantics and prevents regressions.
- No `private(v)` at `omp.parallel`
- `omp.wsloop ... private(...)` present
Unable to reproduce #157035 on current main; this test documents the
expected lowering.
p.s- do refer to
[delayed-privatization](https://lists.llvm.org/pipermail/mlir-commits/2025-January/088206.html?utm_source=chatgpt.com)
<img width="2940" height="1912" alt="image"
src="https://github.com/user-attachments/assets/5c3a0656-fe0a-4bd5-be98-b626a7a719c1"
/>1 parent 95d5d98 commit 0741209
1 file changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments