Skip to content

Commit 723a3e7

Browse files
committed
[OpenMP] Fix mispelled attribute and warning
Summary: This is spelled `ompx_aligned_barrier` when used directly, but wasn't included in the list of known assumptions. Fix that so now th test works.
1 parent 3b001db commit 723a3e7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

llvm/lib/IR/Assumptions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,5 @@ StringSet<> llvm::KnownAssumptionStrings({
108108
"omp_no_parallelism", // OpenMP 5.1
109109
"ompx_spmd_amenable", // OpenMPOpt extension
110110
"ompx_no_call_asm", // OpenMPOpt extension
111+
"ompx_aligned_barrier", // OpenMPOpt extension
111112
});

offload/DeviceRTL/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ set(bc_flags -c -foffload-lto -std=c++17 -fvisibility=hidden
100100
-nocudalib -nogpulib -nogpuinc -nostdlibinc
101101
-fopenmp -fopenmp-cuda-mode
102102
-Wno-unknown-cuda-version -Wno-openmp-target
103-
-Wno-unknown-assumption # TODO: Fix false-positive warning for ext_aligned_barrier
104103
-DOMPTARGET_DEVICE_RUNTIME
105104
-I${include_directory}
106105
-I${devicertl_base_directory}/../include

offload/DeviceRTL/include/Synchronization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void threads(atomic::OrderingTy Ordering);
197197
/// (hence all threads in the block are "aligned"). Also perform a fence before
198198
/// and after the barrier according to \p Ordering. Note that the
199199
/// fence might be part of the barrier if the target offers this.
200-
[[gnu::noinline, omp::assume("ext_aligned_barrier")]] void
200+
[[gnu::noinline, omp::assume("ompx_aligned_barrier")]] void
201201
threadsAligned(atomic::OrderingTy Ordering);
202202

203203
///}

offload/test/jit/empty_kernel.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ int main(int argc, char** argv) {
3333
}
3434

3535
// Check for an empty kernel (IR level)
36-
// FIRST: define weak_odr {{.*}} void @__omp_offloading_{{.*}}_main
36+
// FIRST: define weak_odr {{.*}} void @__omp_offloading_{{.*}}_main{{.*}}
3737
// FIRST-NEXT: ret void
3838

3939
// Check for two empty kernels (IR level)
40-
// SECOND: define weak_odr {{.*}} void @__omp_offloading_{{.*}}_main
40+
// SECOND: define weak_odr {{.*}} void @__omp_offloading_{{.*}}_main{{.*}}
4141
// SECOND-NEXT: ret void

0 commit comments

Comments
 (0)