[llvm-branch-commits] [Clang][OpenMP] Add codegen test for reduction capture under nested default(firstprivate) (PR #216331)

Julian Brown via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 14 07:32:43 PDT 2026


https://github.com/jtb20 created https://github.com/llvm/llvm-project/pull/216331

Add a CodeGen regression test covering a taskloop with default(firstprivate)
and a reduction nested inside a 'taskgraph' region. It asserts the reduction
variable is captured by reference by the enclosing taskgraph (its address is
stored into the captured record) and that the caller reads the reduced value
back out of that same storage. This guards the Sema fix that consults the
capture level's default DSA rather than the innermost directive's.

Assisted-By: Claude Opus 4.8





More information about the llvm-branch-commits mailing list