[Mlir-commits] [llvm] [mlir] Reland [OMPIRBuilder] Don't use invalid debug loc in reduction fn. (PR #211566)
Abid Qadeer
llvmlistbot at llvm.org
Thu Jul 23 08:00:17 PDT 2026
abidh wrote:
> Verified this on `d1d3891077f6`. It covers the barrier case that my narrower PR missed, and it applies cleanly.
>
> suite result
> check-flang 4608 passed, 11 expected failures, 0 failures
> clang/test/OpenMP 1573 passed
> mlir/test/Target/LLVMIR 407 passed
> LLVMFrontendTests 1281 passed
> One thing worth knowing: the end-to-end symptom no longer reproduces at tip. Unpatched, the reproducer from #211385 now builds clean at `-O2 -g` and `-O3 -g`. The bad IR is still there, though; `_omp_reduction_shuffle_and_reduce_func` and `_omp_reduction_inter_warp_copy_func` carry 61 and 48 `!dbg` scoped to the kernel's subprogram. So the failure is latent rather than fixed, and a test at the IR level like yours is the right guard.
>
> I have a flang integration test that checks the same thing through the Fortran driver (`flang/test/Integration/OpenMP/target-reduction-debug-loc.f90`). Your MLIR test covers the bug, so take it only if you want driver-level coverage as well; otherwise ignore this.
>
> I will close #211395 in favor of this.
Thanks for review and testing. We add tests in flang integration directory only if there is no other good way to test the change. You will see a header in many of the test files there
```
! This directory can be used to add Integration tests involving multiple
! stages of the compiler (for eg. from Fortran to LLVM IR). It should not
! contain executable tests. We should only add tests here sparingly and only
! if there is no other way to test. Repeat this message in each test that is
! added to this directory and sub-directories.
```
https://github.com/llvm/llvm-project/pull/211566
More information about the Mlir-commits
mailing list