[all-commits] [llvm/llvm-project] 2428b6: [Flang][MLIR][OpenMP] Fix Target Data if (present(...
agozillon via All-commits
all-commits at lists.llvm.org
Thu Jan 30 08:33:58 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2428b6ec40bc60bfcdf1d481f92f34f7279fb5f3
https://github.com/llvm/llvm-project/commit/2428b6ec40bc60bfcdf1d481f92f34f7279fb5f3
Author: agozillon <Andrew.Gozillon at amd.com>
Date: 2025-01-30 (Thu, 30 Jan 2025)
Changed paths:
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
A offload/test/offloading/fortran/target-data-map-if-present.f90
Log Message:
-----------
[Flang][MLIR][OpenMP] Fix Target Data if (present(...)) causing LLVM-IR branching error (#123771)
Currently if we generate code for the below target data map that uses an
optional mapping:
!$omp target data if(present(a)) map(alloc:a)
do i = 1, 10
a(i) = i
end do
!$omp end target data
We yield an LLVM-IR error as the branch for the else path is not
generated. This occurs because we enter the NoDupPriv path of the call
back function when generating the else branch, however, the emitBranch
function needs to be set to a block for it to functionally generate and
link in a follow up branch. The NoDupPriv path currently doesn't do
this, while it's not supposed to generate anything (as far as I am
aware) we still need to at least set the builders placement back so that
it emits the appropriate follow up branch. This avoids the missing
terminator LLVM-IR verification error by correctly generating the follow
up branch.
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