diff options
| author | Sairudra More <sairudra60@gmail.com> | 2025-11-21 18:13:18 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-21 18:28:18 +0545 |
| commit | 622f72f4bef8b177e1e4f318465260fbdb7711ef (patch) | |
| tree | 4c1dd701479e8c85060256b414e07c66b766725e /clang/test | |
| parent | 41a9df2389b6db45b5159073c52232dd867c7f25 (diff) | |
[OpenMP] Fix firstprivate pointer handling in target regions (#167879)
Firstprivate pointers in OpenMP target regions were not being lowered
correctly, causing the runtime to perform unnecessary present table
lookups instead of passing pointer values directly.
This patch adds the OMP_MAP_LITERAL flag for firstprivate pointers,
enabling the runtime to pass pointer values directly without lookups.
The fix handles both explicit firstprivate clauses and implicit
firstprivate semantics from defaultmap clauses.
Key changes:
- Track defaultmap(firstprivate:...) clauses in MappableExprsHandler
- Add isEffectivelyFirstprivate() to check both explicit and implicit
firstprivate semantics
- Apply OMP_MAP_LITERAL flag to firstprivate pointers in
generateDefaultMapInfo()
Map type values:
- 288 = OMP_MAP_TARGET_PARAM | OMP_MAP_LITERAL (explicit firstprivate)
- 800 = OMP_MAP_TARGET_PARAM | OMP_MAP_LITERAL | OMP_MAP_IS_PTR
(implicit firstprivate from defaultmap)
Before: Pointers got 544 (TARGET_PARAM | IS_PTR) causing runtime lookups
After: Pointers get 288 or 800 (includes LITERAL) for direct pass
Updated the 16 existing test cases in OpenMP that were expecting the
previous (buggy) behavior. The tests were checking for map type values
of 544 (TARGET_PARAM | IS_PTR) and 32 (TARGET_PARAM) for firstprivate
pointers, which lacked the LITERAL flag (256). With this fix,
firstprivate pointers now correctly include the LITERAL flag, resulting
in map types 800 (TARGET_PARAM | LITERAL | IS_PTR) for implicit
firstprivate and 288 (TARGET_PARAM | LITERAL) for explicit firstprivate.
The updated tests now validate the correct behavior as per OpenMP 5.2
semantics, where firstprivate variables should be passed by value rather
than requiring runtime present table lookups.
---------
Co-authored-by: Sairudra More <moresair@pe31.hpc.amslabs.hpecorp.net>
Co-authored-by: Alexey Bataev <a.bataev@gmx.com>
Diffstat (limited to 'clang/test')
17 files changed, 192 insertions, 22 deletions
diff --git a/clang/test/OpenMP/target_codegen.cpp b/clang/test/OpenMP/target_codegen.cpp index ff126fbe4d02..d2c000420401 100644 --- a/clang/test/OpenMP/target_codegen.cpp +++ b/clang/test/OpenMP/target_codegen.cpp @@ -78,7 +78,7 @@ // code and have mapped arguments, and only 6 have all-constant map sizes. // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: [[SIZET2:@.+]] = private unnamed_addr constant [1 x i{{32|64}}] [i64 2] // CHECK-DAG: [[MAPT2:@.+]] = private unnamed_addr constant [1 x i64] [i64 800] // CHECK-DAG: [[SIZET3:@.+]] = private unnamed_addr constant [2 x i64] [i64 4, i64 2] diff --git a/clang/test/OpenMP/target_defaultmap_codegen_01.cpp b/clang/test/OpenMP/target_defaultmap_codegen_01.cpp index 0936aa08e21e..652794e6b9d9 100644 --- a/clang/test/OpenMP/target_defaultmap_codegen_01.cpp +++ b/clang/test/OpenMP/target_defaultmap_codegen_01.cpp @@ -735,7 +735,7 @@ void explicit_maps_single (){ // CK14: [[SIZE09:@.+]] = private {{.*}}constant [1 x i64] zeroinitializer // Map types: OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 544 -// CK14: [[MTYPE09:@.+]] = private {{.*}}constant [1 x i64] [i64 544] +// CK14: [[MTYPE09:@.+]] = private {{.*}}constant [1 x i64] [i64 800] // CK14-LABEL: explicit_maps_single{{.*}}( void explicit_maps_single (){ @@ -1235,7 +1235,7 @@ void implicit_maps_struct (int a){ // CK22-DAG: [[SIZES:@.+]] = {{.+}}constant [1 x i64] zeroinitializer // Map types: OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 544 -// CK22-DAG: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 544] +// CK22-DAG: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 800] // CK22-LABEL: implicit_maps_pointer{{.*}}( void implicit_maps_pointer (){ diff --git a/clang/test/OpenMP/target_depend_codegen.cpp b/clang/test/OpenMP/target_depend_codegen.cpp index 73ffa120452c..b9c30f3e73dd 100644 --- a/clang/test/OpenMP/target_depend_codegen.cpp +++ b/clang/test/OpenMP/target_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 {{16|12}}] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [3 x i64] [i64 544, i64 800, i64 3] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [3 x i64] [i64 800, i64 800, i64 3] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_firstprivate_pointer_codegen.cpp b/clang/test/OpenMP/target_firstprivate_pointer_codegen.cpp new file mode 100644 index 000000000000..326bc812d7d3 --- /dev/null +++ b/clang/test/OpenMP/target_firstprivate_pointer_codegen.cpp @@ -0,0 +1,169 @@ +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// expected-no-diagnostics + +#ifndef HEADER +#define HEADER + +/// ======================================================================== +/// Test: Firstprivate pointer handling in OpenMP target regions +/// ======================================================================== +/// +/// This test verifies that pointers with firstprivate semantics get the +/// OMP_MAP_LITERAL flag, enabling the runtime to pass pointer values directly +/// without performing present table lookups. +/// +/// Map type values: +/// 288 = OMP_MAP_TARGET_PARAM (32) + OMP_MAP_LITERAL (256) +/// Used for explicit firstprivate(ptr) +/// +/// 800 = OMP_MAP_TARGET_PARAM (32) + OMP_MAP_LITERAL (256) + OMP_MAP_IS_PTR (512) +/// Used for implicit firstprivate pointers (e.g., from defaultmap clauses) +/// Note: 512 is OMP_MAP_IS_PTR, not IMPLICIT. Implicitness is tracked separately. +/// +/// 544 = OMP_MAP_TARGET_PARAM (32) + OMP_MAP_IS_PTR (512) +/// Incorrect behavior - missing LITERAL flag, causes runtime present table lookup +/// + +///========================================================================== +/// Test 1: Explicit firstprivate(pointer) → map type 288 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{[^.]*}} = private unnamed_addr constant [1 x i64] [i64 288] +// CHECK-DAG: @.offload_sizes{{[^.]*}} = private unnamed_addr constant [1 x i64] zeroinitializer + +void test1_explicit_firstprivate() { + double *ptr = nullptr; + + // Explicit firstprivate should generate map type 288 + // (TARGET_PARAM | LITERAL, no IS_PTR flag for explicit clauses) + #pragma omp target firstprivate(ptr) + { + if (ptr) ptr[0] = 1.0; + } +} + +///========================================================================== +/// Test 2: defaultmap(firstprivate:pointer) → map type 800 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{.*}} = private unnamed_addr constant [1 x i64] [i64 800] +// CHECK-DAG: @.offload_sizes{{.*}} = private unnamed_addr constant [1 x i64] zeroinitializer + +void test2_defaultmap_firstprivate_pointer() { + double *ptr = nullptr; + + // defaultmap(firstprivate:pointer) creates implicit firstprivate + // Should generate map type 800 (TARGET_PARAM | LITERAL | IS_PTR) + #pragma omp target defaultmap(firstprivate:pointer) + { + if (ptr) ptr[0] = 2.0; + } +} + +///========================================================================== +/// Test 3: defaultmap(firstprivate:scalar) with double → map type 800 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{.*}} = private unnamed_addr constant [1 x i64] [i64 800] + +void test3_defaultmap_scalar_double() { + double d = 3.0; + + // OpenMP's "scalar" category excludes pointers but includes arithmetic types + // Double gets implicit firstprivate → map type 800 + #pragma omp target defaultmap(firstprivate:scalar) + { + d += 1.0; + } +} + +///========================================================================== +/// Test 4: Pointer with defaultmap(firstprivate:scalar) → map type 800 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{.*}} = private unnamed_addr constant [1 x i64] [i64 800] +// CHECK-DAG: @.offload_sizes{{.*}} = private unnamed_addr constant [1 x i64] zeroinitializer + +void test4_pointer_with_scalar_defaultmap() { + double *ptr = nullptr; + + // Note: defaultmap(firstprivate:scalar) does NOT apply to pointers (scalar excludes pointers). + // However, the pointer still gets 800 because in OpenMP 5.0+, pointers without explicit + // data-sharing attributes are implicitly firstprivate and lowered as IS_PTR|LITERAL|TARGET_PARAM. + // This is the default pointer behavior, NOT due to the scalar defaultmap. + #pragma omp target defaultmap(firstprivate:scalar) + { + if (ptr) ptr[0] = 4.0; + } +} + +///========================================================================== +/// Test 5: Multiple pointers with explicit firstprivate → all get 288 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{.*}} = private unnamed_addr constant [3 x i64] [i64 288, i64 288, i64 288] +// CHECK-DAG: @.offload_sizes{{.*}} = private unnamed_addr constant [3 x i64] zeroinitializer + +void test5_multiple_firstprivate() { + int *a = nullptr; + float *b = nullptr; + double *c = nullptr; + + // All explicit firstprivate pointers get map type 288 + #pragma omp target firstprivate(a, b, c) + { + if (a) a[0] = 6; + if (b) b[0] = 7.0f; + if (c) c[0] = 8.0; + } +} + +///========================================================================== +/// Test 6: Pointer to const with firstprivate → map type 288 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{.*}} = private unnamed_addr constant [1 x i64] [i64 288] +// CHECK-DAG: @.offload_sizes{{.*}} = private unnamed_addr constant [1 x i64] zeroinitializer + +void test6_const_pointer() { + const double *const_ptr = nullptr; + + // Const pointer with explicit firstprivate → 288 + #pragma omp target firstprivate(const_ptr) + { + if (const_ptr) { + double val = const_ptr[0]; + (void)val; + } + } +} + +///========================================================================== +/// Test 7: Pointer-to-pointer with firstprivate → map type 288 +///========================================================================== + +// CHECK-DAG: @.offload_maptypes{{.*}} = private unnamed_addr constant [1 x i64] [i64 288] +// CHECK-DAG: @.offload_sizes{{.*}} = private unnamed_addr constant [1 x i64] zeroinitializer + +void test7_pointer_to_pointer() { + int **pp = nullptr; + + // Pointer-to-pointer with explicit firstprivate → 288 + #pragma omp target firstprivate(pp) + { + if (pp && *pp) (*pp)[0] = 9; + } +} + +///========================================================================== +/// Verification: The key fix is that firstprivate pointers now include +/// the LITERAL flag (256), which tells the runtime to pass the pointer +/// value directly instead of performing a present table lookup. +/// +/// Before fix: Pointers got 544 (TARGET_PARAM | IS_PTR) → runtime lookup +/// After fix: Pointers get 288 or 800 (includes LITERAL) → direct pass +///========================================================================== + +#endif // HEADER diff --git a/clang/test/OpenMP/target_map_codegen_01.cpp b/clang/test/OpenMP/target_map_codegen_01.cpp index 9f3553d2377c..2285e9b7964f 100644 --- a/clang/test/OpenMP/target_map_codegen_01.cpp +++ b/clang/test/OpenMP/target_map_codegen_01.cpp @@ -38,12 +38,12 @@ // CK2-LABEL: @.__omp_offloading_{{.*}}implicit_maps_reference{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK2: [[SIZES:@.+]] = {{.+}}constant [1 x i64] [i64 4] -// Map types: OMP_MAP_PRIVATE_VAL | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 800 +// Map types: OMP_MAP_LITERAL | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 800 // CK2: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 800] // CK2-LABEL: @.__omp_offloading_{{.*}}implicit_maps_reference{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK2: [[SIZES2:@.+]] = {{.+}}constant [1 x i64] zeroinitializer -// Map types: OMP_MAP_IS_PTR | OMP_MAP_IMPLICIT = 544 -// CK2: [[TYPES2:@.+]] = {{.+}}constant [1 x i64] [i64 544] +// Map types: OMP_MAP_IS_PTR | OMP_MAP_LITERAL | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 800 +// CK2: [[TYPES2:@.+]] = {{.+}}constant [1 x i64] [i64 800] // CK2-LABEL: implicit_maps_reference{{.*}}( void implicit_maps_reference (int a, int *b){ diff --git a/clang/test/OpenMP/target_map_codegen_09.cpp b/clang/test/OpenMP/target_map_codegen_09.cpp index eebd811b50c3..2b825562d180 100644 --- a/clang/test/OpenMP/target_map_codegen_09.cpp +++ b/clang/test/OpenMP/target_map_codegen_09.cpp @@ -36,8 +36,8 @@ // CK10-LABEL: @.__omp_offloading_{{.*}}implicit_maps_pointer{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK10-DAG: [[SIZES:@.+]] = {{.+}}constant [1 x i64] zeroinitializer -// Map types: OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 544 -// CK10-DAG: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 544] +// Map types: OMP_MAP_IS_PTR | OMP_MAP_LITERAL | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 800 +// CK10-DAG: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 800] // CK10-LABEL: implicit_maps_pointer{{.*}}( void implicit_maps_pointer (){ diff --git a/clang/test/OpenMP/target_map_codegen_10.cpp b/clang/test/OpenMP/target_map_codegen_10.cpp index 5f8f4dc7771a..67c531169390 100644 --- a/clang/test/OpenMP/target_map_codegen_10.cpp +++ b/clang/test/OpenMP/target_map_codegen_10.cpp @@ -32,7 +32,8 @@ // CK11_5-DAG: [[SIZES:@.+]] = {{.+}}constant [2 x i64] [i64 16, i64 0] // Map types: OMP_MAP_TO | OMP_MAP_FROM | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 547 // CK11_4-DAG: [[TYPES:@.+]] = {{.+}}constant [2 x i64] [i64 547, i64 547] -// CK11_5-DAG: [[TYPES:@.+]] = {{.+}}constant [2 x i64] [i64 547, i64 544] +// Map types: OMP_MAP_TO | OMP_MAP_FROM | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 547, OMP_MAP_IS_PTR | OMP_MAP_LITERAL | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 800 +// CK11_5-DAG: [[TYPES:@.+]] = {{.+}}constant [2 x i64] [i64 547, i64 800] // CK11-LABEL: implicit_maps_double_complex{{.*}}( void implicit_maps_double_complex (int a, int *b){ diff --git a/clang/test/OpenMP/target_map_codegen_26.cpp b/clang/test/OpenMP/target_map_codegen_26.cpp index 2bc1092685ac..00a42c017d7e 100644 --- a/clang/test/OpenMP/target_map_codegen_26.cpp +++ b/clang/test/OpenMP/target_map_codegen_26.cpp @@ -35,7 +35,7 @@ // CK27-LABEL: @.__omp_offloading_{{.*}}zero_size_section_and_private_maps{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK27: [[SIZE00:@.+]] = private {{.*}}constant [1 x i64] zeroinitializer -// CK27: [[MTYPE00:@.+]] = private {{.*}}constant [1 x i64] [i64 544] +// CK27: [[MTYPE00:@.+]] = private {{.*}}constant [1 x i64] [i64 800] // CK27-LABEL: @.__omp_offloading_{{.*}}zero_size_section_and_private_maps{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK27: [[SIZE01:@.+]] = private {{.*}}constant [1 x i64] zeroinitializer @@ -52,7 +52,7 @@ // CK27-LABEL: @.__omp_offloading_{{.*}}zero_size_section_and_private_maps{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK27-LABEL: @.__omp_offloading_{{.*}}zero_size_section_and_private_maps{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK27: [[SIZE05:@.+]] = private {{.*}}constant [1 x i64] zeroinitializer -// CK27: [[MTYPE05:@.+]] = private {{.*}}constant [1 x i64] [i64 32] +// CK27: [[MTYPE05:@.+]] = private {{.*}}constant [1 x i64] [i64 288] // CK27-LABEL: @.__omp_offloading_{{.*}}zero_size_section_and_private_maps{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 // CK27-LABEL: @.__omp_offloading_{{.*}}zero_size_section_and_private_maps{{.*}}_l{{[0-9]+}}.region_id = weak constant i8 0 diff --git a/clang/test/OpenMP/target_parallel_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_depend_codegen.cpp index 52264ee79e12..106c34518cce 100644 --- a/clang/test/OpenMP/target_parallel_depend_codegen.cpp +++ b/clang/test/OpenMP/target_parallel_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp index aec4feda15cf..ae01116b8310 100644 --- a/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp +++ b/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp index 62f772ea7915..2e8731e766e1 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_simd_depend_codegen.cpp b/clang/test/OpenMP/target_simd_depend_codegen.cpp index d813173dffbe..4a0196b996d2 100644 --- a/clang/test/OpenMP/target_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_simd_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_teams_depend_codegen.cpp b/clang/test/OpenMP/target_teams_depend_codegen.cpp index b2280b80995f..65c3d88103b7 100644 --- a/clang/test/OpenMP/target_teams_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp index f9306d3091ee..de5e1f3ff799 100644 --- a/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp index 4d93515c738e..db5fa66cf707 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp index ed760d7e2e00..c462bd21f6aa 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp @@ -44,7 +44,7 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] diff --git a/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp index 9335c65bb229..a7f5ac38abba 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp @@ -53,11 +53,11 @@ // TCHECK: [[ENTTY:%.+]] = type { i64, i16, i16, i32, ptr, ptr, i64, i64, ptr } // OMP45-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] -// OMP45-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] +// OMP45-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // OMP45-DAG: @{{.*}} = weak constant i8 0 // OMP50-DAG: [[SIZET:@.+]] = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 1] -// OMP50-DAG: [[MAPT:@.+]] = private unnamed_addr constant [3 x i64] [i64 544, i64 800, i64 800] +// OMP50-DAG: [[MAPT:@.+]] = private unnamed_addr constant [3 x i64] [i64 800, i64 800, i64 800] // OMP50-DAG: @{{.*}} = weak constant i8 0 |
