[flang-commits] [flang] [llvm] [OpenMPIRBuilder] Clear the debug location when emitting reduction helpers (PR #211395)

Spencer Bryngelson via flang-commits flang-commits at lists.llvm.org
Thu Jul 23 06:24:43 PDT 2026


sbryngelson wrote:

Ran the tests. Correcting what I said above: the guards are not the problem, and the failures do not reproduce on current main.

I ported #147950 onto `02c51adb8ff2` (the only conflicts are the `ArrayRef<bool> IsByRef` signature change) and ran it:

| suite | result |
|---|---|
| clang/test/OpenMP | 1573 passed, 0 failed |
| mlir/test/Target/LLVMIR | 404 passed, 0 regressions |
| OpenMPIRBuilder unit tests | 101 passed |

The only failure is your own `omptarget-debug-reduc-fn-loc.mlir`, and it is syntax drift rather than correctness. `omp.target` now requires `kernel_type`:

```
omptarget-debug-reduc-fn-loc.mlir:33:16: error: custom op 'omp.target' expected 'kernel_type'
    omp.target map_entries(%15 -> %arg0, %16 -> %arg1, %18 -> %arg2 : !llvm.ptr, !llvm.ptr, !llvm.ptr) {
```

So #147950 looks relandable once that test is updated. My earlier guess that the added guards changed IR without debug info was wrong, and I should not have offered it without running anything.

The narrow version in this PR is clean on the same three suites plus check-flang (4602 passed).

Happy to close this in favor of your reland.


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


More information about the flang-commits mailing list