[all-commits] [llvm/llvm-project] a11c24: [mlir][OpenMP] Fix teams reduction assert with sib...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Wed Apr 15 09:13:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a11c24d34aba240777cbc944bd4e39f0c1349bb8
      https://github.com/llvm/llvm-project/commit/a11c24d34aba240777cbc944bd4e39f0c1349bb8
  Author: Chi-Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Target/LLVMIR/openmp-teams-distribute-reduction.mlir

  Log Message:
  -----------
  [mlir][OpenMP] Fix teams reduction assert with sibling distributes (#191475)

Avoid double-mapping teams reduction block arguments when multiple
sibling `omp.distribute` ops appear under the same `omp.teams`.

Replace `teamsReductionContainedInDistribute` with
`getDistributeCapturingTeamsReduction`, which returns the unique
`omp::DistributeOp` containing all non-debug uses of the teams reduction
block arguments, or null if no such distribute exists. In that case,
reduction setup falls back to the teams op.

This ensures only the owning distribute handles reduction setup and
prevents `moduleTranslation.mapValue()` from being called multiple times
for the same block arguments.

Fixes https://github.com/llvm/llvm-project/issues/191470

Assisted with Copilot and GPT-5.4



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list