diff options
author | Sergio Afonso <safonsof@amd.com> | 2025-04-01 10:29:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 10:29:08 +0100 |
commit | 66fca0674d83254c70af4a6289496b8acc4377df (patch) | |
tree | c80fc99437a8e5293edef4bbdc9303b9bf9064d7 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | e17d864f55133d46e12614280951ddb2dc43cc74 (diff) | |
download | llvm-66fca0674d83254c70af4a6289496b8acc4377df.zip llvm-66fca0674d83254c70af4a6289496b8acc4377df.tar.gz llvm-66fca0674d83254c70af4a6289496b8acc4377df.tar.bz2 |
[OpenMP] Fix num_iters in __kmpc_*_loop DeviceRTL functions (#133435)
This patch removes the addition of 1 to the number of iterations when
calling the following DeviceRTL functions:
- `__kmpc_distribute_for_static_loop*`
- `__kmpc_distribute_static_loop*`
- `__kmpc_for_static_loop*`
Calls to these functions are currently only produced by the OMPIRBuilder
from flang, which already passes the correct number of iterations to
these functions. By adding 1 to the received `num_iters` variable,
worksharing can produce incorrect results. This impacts flang OpenMP
offloading of `do`, `distribute` and `distribute parallel do`
constructs.
Expecting the application to pass `tripcount - 1` as the argument seems
unexpected as well, so rather than updating flang I think it makes more
sense to update the runtime.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions