| 1 |
// expected-no-diagnostics |
| 2 |
#ifndef HEADER |
| 3 |
#define HEADER |
| 4 |
|
| 5 |
///==========================================================================/// |
| 6 |
// RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 |
| 7 |
// RUN: %clang_cc1 -DCK1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 8 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 |
| 9 |
// RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 |
| 10 |
// RUN: %clang_cc1 -DCK1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 11 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 |
| 12 |
|
| 13 |
// RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 14 |
// RUN: %clang_cc1 -DCK1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 15 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 16 |
// RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 17 |
// RUN: %clang_cc1 -DCK1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 18 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 19 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 20 |
#ifdef CK1 |
| 21 |
|
| 22 |
// CK1: [[ST:%.+]] = type { i32, ptr } |
| 23 |
template <typename T> |
| 24 |
struct ST { |
| 25 |
T a; |
| 26 |
double *b; |
| 27 |
}; |
| 28 |
|
| 29 |
ST<int> gb; |
| 30 |
double gc[100]; |
| 31 |
|
| 32 |
// CK1: [[IDENT_T:%.+]] = type { i32, i32, i32, i32, ptr } |
| 33 |
// CK1: [[KMP_TASK_T_WITH_PRIVATES:%.+]] = type { [[KMP_TASK_T:%[^,]+]], [[KMP_PRIVATES_T:%.+]] } |
| 34 |
// CK1: [[KMP_TASK_T]] = type { ptr, ptr, i32, %{{[^,]+}}, %{{[^,]+}} } |
| 35 |
// CK1-32: [[KMP_PRIVATES_T]] = type { [1 x i64], [1 x ptr], [1 x ptr] } |
| 36 |
// CK1-64: [[KMP_PRIVATES_T]] = type { [1 x ptr], [1 x ptr], [1 x i64] } |
| 37 |
|
| 38 |
// CK1: [[SIZE00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} 800] |
| 39 |
// CK1: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 2] |
| 40 |
|
| 41 |
// CK1: [[SIZE02:@.+]] = {{.+}}constant [1 x i[[sz]]] [i[[sz]] 4] |
| 42 |
// CK1: [[MTYPE02:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 43 |
|
| 44 |
// CK1: [[MTYPE03:@.+]] = {{.+}}constant [1 x i64] [i64 2] |
| 45 |
|
| 46 |
// CK1: [[SIZE04:@.+]] = {{.+}}constant [1 x i64] [i64 24] |
| 47 |
// CK1: [[MTYPE04:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 48 |
|
| 49 |
// CK1-LABEL: _Z3fooi |
| 50 |
void foo(int arg) { |
| 51 |
int la; |
| 52 |
float lb[arg]; |
| 53 |
|
| 54 |
// Region 00 |
| 55 |
// CK1-DAG: call i32 @__kmpc_omp_task(ptr @{{[^,]+}}, i32 %{{[^,]+}}, ptr [[TASK:%.+]]) |
| 56 |
// CK1-DAG: [[TASK]] = call ptr @__kmpc_omp_target_task_alloc(ptr @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i[[sz:32|64]] {{36|64}}, i{{32|64}} 4, ptr [[OMP_TASK_ENTRY:@[^,]+]], i64 [[DEV:%.+]]) |
| 57 |
// CK1-DAG: [[DEV]] = sext i32 [[DEV32:%.+]] to i64 |
| 58 |
// CK1-DAG: [[PRIVATES:%.+]] = getelementptr inbounds nuw [[KMP_TASK_T_WITH_PRIVATES]], ptr [[TASK]], i32 0, i32 1 |
| 59 |
// CK1-32-DAG: [[FPBPGEP:%.+]] = getelementptr inbounds nuw [[KMP_PRIVATES_T]], ptr [[PRIVATES]], i32 0, i32 1 |
| 60 |
// CK1-64-DAG: [[FPBPGEP:%.+]] = getelementptr inbounds nuw [[KMP_PRIVATES_T]], ptr [[PRIVATES]], i32 0, i32 0 |
| 61 |
// CK1-DAG: call void @llvm.memcpy.p0.p0.i[[sz]](ptr align {{4|8}} [[FPBPGEP]], ptr align {{4|8}} [[BPGEP:%.+]], i[[sz]] {{4|8}}, i1 false) |
| 62 |
// CK1-DAG: [[BPGEP]] = getelementptr inbounds [1 x ptr], ptr [[BP:%.+]], i32 0, i32 0 |
| 63 |
// CK1-DAG: [[BPGEP:%.+]] = getelementptr inbounds [1 x ptr], ptr [[BP]], i32 0, i32 0 |
| 64 |
// CK1-DAG: store ptr [[GC:@[^,]+]], ptr [[BPGEP]], align |
| 65 |
// CK1-32-DAG: [[FPPGEP:%.+]] = getelementptr inbounds nuw [[KMP_PRIVATES_T]], ptr [[PRIVATES]], i32 0, i32 2 |
| 66 |
// CK1-64-DAG: [[FPPGEP:%.+]] = getelementptr inbounds nuw [[KMP_PRIVATES_T]], ptr [[PRIVATES]], i32 0, i32 1 |
| 67 |
// CK1-DAG: call void @llvm.memcpy.p0.p0.i[[sz]](ptr align {{4|8}} [[FPPGEP]], ptr align {{4|8}} [[PGEP:%.+]], i[[sz]] {{4|8}}, i1 false) |
| 68 |
// CK1-DAG: [[PGEP]] = getelementptr inbounds [1 x ptr], ptr [[P:%.+]], i32 0, i32 0 |
| 69 |
// CK1-DAG: [[PGEP:%.+]] = getelementptr inbounds [1 x ptr], ptr [[P]], i32 0, i32 0 |
| 70 |
// CK1-DAG: store ptr [[GC]], ptr [[PGEP]], align |
| 71 |
// CK1-32-DAG: [[FPSZGEP:%.+]] = getelementptr inbounds nuw [[KMP_PRIVATES_T]], ptr [[PRIVATES]], i32 0, i32 0 |
| 72 |
// CK1-64-DAG: [[FPSZGEP:%.+]] = getelementptr inbounds nuw [[KMP_PRIVATES_T]], ptr [[PRIVATES]], i32 0, i32 2 |
| 73 |
// CK1-DAG: call void @llvm.memcpy.p0.p0.i[[sz]](ptr align {{4|8}} [[FPSZGEP]], ptr align {{4|8}} [[SIZE00]], i[[sz]] {{4|8}}, i1 false) |
| 74 |
#pragma omp target update if(1+3-5) device(arg) from(gc) nowait |
| 75 |
{++arg;} |
| 76 |
|
| 77 |
// Region 01 |
| 78 |
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 79 |
#pragma omp target update to(la) if(1+3-4) |
| 80 |
{++arg;} |
| 81 |
|
| 82 |
// Region 02 |
| 83 |
// CK1: br i1 %{{[^,]+}}, label %[[IFTHEN:[^,]+]], label %[[IFELSE:[^,]+]] |
| 84 |
// CK1: [[IFTHEN]] |
| 85 |
// CK1-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 4, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE02]], ptr [[MTYPE02]]{{.+}}, ptr null) |
| 86 |
// CK1-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 87 |
// CK1-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 88 |
|
| 89 |
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 90 |
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 91 |
// CK1-DAG: store ptr [[VAL0:%[^,]+]], ptr [[BP0]] |
| 92 |
// CK1-DAG: store ptr [[VAL0]], ptr [[P0]] |
| 93 |
// CK1: br label %[[IFEND:[^,]+]] |
| 94 |
|
| 95 |
// CK1: [[IFELSE]] |
| 96 |
// CK1: br label %[[IFEND]] |
| 97 |
// CK1: [[IFEND]] |
| 98 |
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 99 |
#pragma omp target update to(arg) if(arg) device(4) |
| 100 |
{++arg;} |
| 101 |
|
| 102 |
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 103 |
{++arg;} |
| 104 |
|
| 105 |
// Region 03 |
| 106 |
// CK1-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[GEPS:%.+]], ptr [[MTYPE03]]{{.+}}, ptr null) |
| 107 |
// CK1-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 108 |
// CK1-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 109 |
// CK1-DAG: [[GEPS]] = getelementptr inbounds {{.+}}[[S:%[^,]+]] |
| 110 |
|
| 111 |
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 112 |
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 113 |
// CK1-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 |
| 114 |
// CK1-DAG: store ptr [[VAL0:%[^,]+]], ptr [[BP0]] |
| 115 |
// CK1-DAG: store ptr [[VAL0]], ptr [[P0]] |
| 116 |
// CK1-DAG: store i64 [[CSVAL0:%[^,]+]], ptr [[S0]] |
| 117 |
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 118 |
// CK1-NOT: __tgt_target_data_end |
| 119 |
#pragma omp target update from(lb) |
| 120 |
{++arg;} |
| 121 |
|
| 122 |
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 123 |
{++arg;} |
| 124 |
|
| 125 |
// Region 04 |
| 126 |
|
| 127 |
// &gb.b[0], &gb.b[0], 3 * sizeof(gb.b[0]), TO |
| 128 |
|
| 129 |
// CK1-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE04]], ptr [[MTYPE04]]{{.+}}, ptr null) |
| 130 |
// CK1-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 131 |
// CK1-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 132 |
|
| 133 |
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 134 |
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 135 |
// CK1-DAG: store ptr [[VAR0:%.+]], ptr [[BP0]] |
| 136 |
// CK1-DAG: store ptr [[SEC0:%.+]], ptr [[P0]] |
| 137 |
// CK1-DAG: [[VAR0]] = load ptr, ptr getelementptr inbounds nuw ([[ST]], ptr @gb, i32 0, i32 1) |
| 138 |
// CK1-DAG: [[SEC0]] = getelementptr inbounds nuw double, ptr [[SEC00:%.+]], i{{.*}} 0 |
| 139 |
// CK1-DAG: [[SEC00]] = load ptr, ptr getelementptr inbounds nuw ([[ST]], ptr @gb, i32 0, i32 1) |
| 140 |
|
| 141 |
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 142 |
// CK1-NOT: __tgt_target_data_end |
| 143 |
#pragma omp target update to(gb.b[:3]) |
| 144 |
{++arg;} |
| 145 |
} |
| 146 |
|
| 147 |
// CK1: define internal {{.*}}i32 [[OMP_TASK_ENTRY]](i32 {{.*}}%{{[^,]+}}, ptr noalias noundef %{{[^,]+}}) |
| 148 |
// CK1-DAG: call void @__tgt_target_data_update_nowait_mapper(ptr @{{.+}}, i64 %{{[^,]+}}, i32 1, ptr [[BP:%[^,]+]], ptr [[P:%[^,]+]], ptr [[SZ:%[^,]+]], ptr [[MTYPE00]], ptr null, ptr null, i32 0, ptr null, i32 0, ptr null) |
| 149 |
// CK1-DAG: [[BP]] = load ptr, ptr [[FPBPADDR:%[^,]+]], align |
| 150 |
// CK1-DAG: [[P]] = load ptr, ptr [[FPPADDR:%[^,]+]], align |
| 151 |
// CK1-DAG: [[SZ]] = load ptr, ptr [[FPSZADDR:%[^,]+]], align |
| 152 |
// CK1-DAG: call void {{%.*}}(ptr %{{[^,]+}}, ptr [[FPBPADDR]], ptr [[FPPADDR]], ptr [[FPSZADDR]]) |
| 153 |
// CK1: ret i32 0 |
| 154 |
// CK1: } |
| 155 |
#endif |
| 156 |
///==========================================================================/// |
| 157 |
// RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 |
| 158 |
// RUN: %clang_cc1 -DCK2 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 159 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 |
| 160 |
// RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 |
| 161 |
// RUN: %clang_cc1 -DCK2 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 162 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 |
| 163 |
|
| 164 |
// RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY1 %s |
| 165 |
// RUN: %clang_cc1 -DCK2 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 166 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s |
| 167 |
// RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY1 %s |
| 168 |
// RUN: %clang_cc1 -DCK2 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 169 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s |
| 170 |
// SIMD-ONLY1-NOT: {{__kmpc|__tgt}} |
| 171 |
#ifdef CK2 |
| 172 |
|
| 173 |
// CK2: [[ST:%.+]] = type { i32, ptr } |
| 174 |
template <typename T> |
| 175 |
struct ST { |
| 176 |
T a; |
| 177 |
double *b; |
| 178 |
|
| 179 |
T foo(T arg) { |
| 180 |
// Region 00 |
| 181 |
#pragma omp target update from(b[1:3]) if(a>123) device(arg) |
| 182 |
{arg++;} |
| 183 |
return arg; |
| 184 |
} |
| 185 |
}; |
| 186 |
|
| 187 |
// CK2: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 24] |
| 188 |
// CK2: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 2] |
| 189 |
|
| 190 |
// CK2-LABEL: _Z3bari |
| 191 |
int bar(int arg){ |
| 192 |
ST<int> A; |
| 193 |
return A.foo(arg); |
| 194 |
} |
| 195 |
|
| 196 |
// Region 00 |
| 197 |
|
| 198 |
// &b[0], &b[1], 3 * sizeof(b[0]), FROM |
| 199 |
|
| 200 |
// CK2: br i1 %{{[^,]+}}, label %[[IFTHEN:[^,]+]], label %[[IFELSE:[^,]+]] |
| 201 |
// CK2: [[IFTHEN]] |
| 202 |
// CK2-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 [[DEV:%[^,]+]], i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 203 |
// CK2-DAG: [[DEV]] = sext i32 [[DEVi32:%[^,]+]] to i64 |
| 204 |
// CK2-DAG: [[DEVi32]] = load i32, ptr %{{[^,]+}}, |
| 205 |
// CK2-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 206 |
// CK2-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 207 |
|
| 208 |
// CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 209 |
// CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 210 |
// CK2-DAG: store ptr [[VAR0:%[^,]+]], ptr [[BP0]] |
| 211 |
// CK2-DAG: store ptr [[SEC0:%[^,]+]], ptr [[P0]] |
| 212 |
// CK2-DAG: [[VAR0]] = load ptr, ptr [[VAR00:%[^,]+]], |
| 213 |
// CK2-DAG: [[VAR00]] = getelementptr inbounds {{.*}}ptr [[THIS:%.+]], i32 0, i32 1 |
| 214 |
// CK2-DAG: [[SEC0]] = getelementptr inbounds {{.*}}ptr [[SEC00:%[^,]+]], i{{.+}} 1 |
| 215 |
// CK2-DAG: [[SEC00]] = load ptr, ptr [[SEC000:%[^,]+]], |
| 216 |
// CK2-DAG: [[SEC000]] = getelementptr inbounds {{.*}}ptr [[THIS]], i32 0, i32 1 |
| 217 |
|
| 218 |
// CK2: br label %[[IFEND:[^,]+]] |
| 219 |
|
| 220 |
// CK2: [[IFELSE]] |
| 221 |
// CK2: br label %[[IFEND]] |
| 222 |
// CK2: [[IFEND]] |
| 223 |
// CK2: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 224 |
#endif |
| 225 |
///==========================================================================/// |
| 226 |
// RUN: %clang_cc1 -DCK3 -verify -Wno-vla -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-64 |
| 227 |
// RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 228 |
// RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-64 |
| 229 |
// RUN: %clang_cc1 -DCK3 -verify -Wno-vla -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-32 |
| 230 |
// RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 231 |
// RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-32 |
| 232 |
|
| 233 |
// RUN: %clang_cc1 -DCK3 -verify -Wno-vla -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s |
| 234 |
// RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 235 |
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY2 %s |
| 236 |
// RUN: %clang_cc1 -DCK3 -verify -Wno-vla -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s |
| 237 |
// RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 238 |
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY2 %s |
| 239 |
// SIMD-ONLY2-NOT: {{__kmpc|__tgt}} |
| 240 |
#ifdef CK3 |
| 241 |
|
| 242 |
// CK3-LABEL: no_target_devices |
| 243 |
void no_target_devices(int arg) { |
| 244 |
// CK3-NOT: tgt_target_data_update |
| 245 |
// CK3: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 246 |
// CK3: ret |
| 247 |
#pragma omp target update to(arg) if(arg) device(4) |
| 248 |
{++arg;} |
| 249 |
} |
| 250 |
#endif |
| 251 |
///==========================================================================/// |
| 252 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-64 |
| 253 |
// RUN: %clang_cc1 -DCK4 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 254 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-64 |
| 255 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-32 |
| 256 |
// RUN: %clang_cc1 -DCK4 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 257 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-32 |
| 258 |
|
| 259 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY3 %s |
| 260 |
// RUN: %clang_cc1 -DCK4 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 261 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY3 %s |
| 262 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY3 %s |
| 263 |
// RUN: %clang_cc1 -DCK4 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 264 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY3 %s |
| 265 |
// SIMD-ONLY3-NOT: {{__kmpc|__tgt}} |
| 266 |
|
| 267 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc |
| 268 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s --check-prefix TCK4 --check-prefix TCK4-64 |
| 269 |
// RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s |
| 270 |
// RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix TCK4 --check-prefix TCK4-64 |
| 271 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc |
| 272 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s --check-prefix TCK4 --check-prefix TCK4-32 |
| 273 |
// RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s |
| 274 |
// RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix TCK4 --check-prefix TCK4-32 |
| 275 |
|
| 276 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc |
| 277 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY4 %s |
| 278 |
// RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s |
| 279 |
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY4 %s |
| 280 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc |
| 281 |
// RUN: %clang_cc1 -DCK4 -verify -Wno-vla -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY4 %s |
| 282 |
// RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s |
| 283 |
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY4 %s |
| 284 |
// SIMD-ONLY4-NOT: {{__kmpc|__tgt}} |
| 285 |
#ifdef CK4 |
| 286 |
|
| 287 |
// CK4-LABEL: device_side_scan |
| 288 |
void device_side_scan(int arg) { |
| 289 |
// CK4: tgt_target_data_update |
| 290 |
// CK4: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 |
| 291 |
// CK4: ret |
| 292 |
// TCK4-NOT: tgt_target_data_update |
| 293 |
#pragma omp target update from(arg) if(arg) device(4) |
| 294 |
{++arg;} |
| 295 |
} |
| 296 |
#endif |
| 297 |
///==========================================================================/// |
| 298 |
// RUN: %clang_cc1 -DCK5 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK5 --check-prefix CK5-64 |
| 299 |
// RUN: %clang_cc1 -DCK5 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 300 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK5 --check-prefix CK5-64 |
| 301 |
// RUN: %clang_cc1 -DCK5 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK5 --check-prefix CK5-32 |
| 302 |
// RUN: %clang_cc1 -DCK5 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 303 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK5 --check-prefix CK5-32 |
| 304 |
|
| 305 |
// RUN: %clang_cc1 -DCK5 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 306 |
// RUN: %clang_cc1 -DCK5 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 307 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 308 |
// RUN: %clang_cc1 -DCK5 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 309 |
// RUN: %clang_cc1 -DCK5 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 310 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 311 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 312 |
|
| 313 |
#ifdef CK5 |
| 314 |
|
| 315 |
// CK5: [[SIZE00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} 4] |
| 316 |
// CK5: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 317 |
|
| 318 |
// CK5-LABEL: lvalue |
| 319 |
void lvalue(int *B, int l, int e) { |
| 320 |
|
| 321 |
// CK5-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 322 |
// CK5-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 323 |
// CK5-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 324 |
|
| 325 |
// CK5-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 326 |
// CK5-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 327 |
// CK5-DAG: store ptr [[B_VAL:%.+]], ptr [[BP0]] |
| 328 |
// CK5-DAG: store ptr [[B_VAL_2:%.+]], ptr [[P0]] |
| 329 |
// CK5-DAG: [[B_VAL]] = load ptr, ptr [[B_ADDR:%.+]] |
| 330 |
// CK5-DAG: [[B_VAL_2]] = load ptr, ptr [[B_ADDR]] |
| 331 |
#pragma omp target update to(*B) |
| 332 |
*B += e; |
| 333 |
#pragma omp target update from(*B) |
| 334 |
} |
| 335 |
|
| 336 |
#endif |
| 337 |
///==========================================================================/// |
| 338 |
// RUN: %clang_cc1 -DCK6 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK6 --check-prefix CK6-64 |
| 339 |
// RUN: %clang_cc1 -DCK6 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 340 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK6 --check-prefix CK6-64 |
| 341 |
// RUN: %clang_cc1 -DCK6 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK6 --check-prefix CK6-32 |
| 342 |
// RUN: %clang_cc1 -DCK6 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 343 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK6 --check-prefix CK6-32 |
| 344 |
|
| 345 |
// RUN: %clang_cc1 -DCK6 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 346 |
// RUN: %clang_cc1 -DCK6 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 347 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 348 |
// RUN: %clang_cc1 -DCK6 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 349 |
// RUN: %clang_cc1 -DCK6 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 350 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 351 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 352 |
|
| 353 |
#ifdef CK6 |
| 354 |
|
| 355 |
// CK6: [[SIZE00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} 4] |
| 356 |
// CK6: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 357 |
|
| 358 |
// CK6-LABEL: lvalue |
| 359 |
void lvalue(int *B, int l, int e) { |
| 360 |
|
| 361 |
// CK6-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 362 |
// CK6-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 363 |
// CK6-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 364 |
|
| 365 |
// CK6-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 366 |
// CK6-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 367 |
// CK6-DAG: store ptr [[TWO:%.+]], ptr [[BP0]] |
| 368 |
// CK6-DAG: store ptr [[ADD_PTR:%.+]], ptr [[P0]] |
| 369 |
// CK6-64-DAG: [[ADD_PTR]] = getelementptr inbounds i32, ptr [[ONE:%.+]], i{{32|64}} [[IDX_EXT:%.+]] |
| 370 |
// CK6-32-DAG: [[ADD_PTR]] = getelementptr inbounds i32, ptr [[ONE:%.+]], i{{32|64}} [[L_VAL:%.+]] |
| 371 |
// CK6-64-DAG: [[IDX_EXT]] = sext i32 [[L_VAL:%.+]] to i64 |
| 372 |
// CK6-DAG: [[L_VAL]] = load i32, ptr [[L_ADDR:%.+]] |
| 373 |
// CK6-DAG: store i32 {{.+}}, ptr [[L_ADDR]] |
| 374 |
// CK6-DAG: [[ONE]] = load ptr, ptr [[B_ADDR:%.+]] |
| 375 |
// CK6-DAG: [[TWO]] = load ptr, ptr [[B_ADDR]] |
| 376 |
#pragma omp target update to(*(B+l)) |
| 377 |
*(B+l) += e; |
| 378 |
#pragma omp target update from(*(B+l)) |
| 379 |
} |
| 380 |
|
| 381 |
#endif |
| 382 |
///==========================================================================/// |
| 383 |
// RUN: %clang_cc1 -DCK7 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK7 --check-prefix CK7-64 |
| 384 |
// RUN: %clang_cc1 -DCK7 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 385 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK7 --check-prefix CK7-64 |
| 386 |
// RUN: %clang_cc1 -DCK7 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK7 --check-prefix CK7-32 |
| 387 |
// RUN: %clang_cc1 -DCK7 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 388 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK7 --check-prefix CK7-32 |
| 389 |
|
| 390 |
// RUN: %clang_cc1 -DCK7 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 391 |
// RUN: %clang_cc1 -DCK7 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 392 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 393 |
// RUN: %clang_cc1 -DCK7 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 394 |
// RUN: %clang_cc1 -DCK7 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 395 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 396 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 397 |
|
| 398 |
#ifdef CK7 |
| 399 |
|
| 400 |
// CK7: [[SIZE00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} 4] |
| 401 |
// CK7: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 402 |
|
| 403 |
// CK7-LABEL: lvalue |
| 404 |
void lvalue(int *B, int l, int e) { |
| 405 |
|
| 406 |
// CK7-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 407 |
// CK7-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 408 |
// CK7-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 409 |
|
| 410 |
// CK7-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 411 |
// CK7-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 412 |
// CK7-DAG: store ptr [[B_VAL:%.+]], ptr [[BP0]] |
| 413 |
// CK7-DAG: store ptr [[ARRAY_IDX:%.+]], ptr [[P0]] |
| 414 |
// CK7-DAG: [[ARRAY_IDX]] = getelementptr inbounds i32, ptr [[ADD_PTR:%.+]], i{{32|64}} [[IDX_PROM:%.+]] |
| 415 |
// CK7-64-DAG: [[ADD_PTR]] = getelementptr inbounds i32, ptr [[ONE:%.+]], i64 [[IDX_EXT:%.+]] |
| 416 |
// CK7-32-DAG: [[ADD_PTR]] = getelementptr inbounds i32, ptr [[B_VAL_2:%.+]], i32 [[L_VAL:%.+]] |
| 417 |
// CK7-32-DAG: [[B_VAL]] = load ptr, ptr [[B_ADDR:%.+]] |
| 418 |
// CK7-32-DAG: [[B_VAL_2]] = load ptr, ptr [[B_ADDR]] |
| 419 |
// CK7-32-DAG: [[L_VAL]] = load i32, ptr [[L_ADDR:%.+]] |
| 420 |
// CK7-32-DAG: [[IDX_PROM]] = load i32, ptr [[L_ADDR]] |
| 421 |
// CK7-64-DAG: [[IDX_EXT:%.+]] = sext i32 [[L_VAL:%.+]] to i64 |
| 422 |
// CK7-64-DAG: [[L_VAL:%.+]] = load i32, ptr [[L_ADDR:%.+]] |
| 423 |
// CK7-64-DAG: [[IDX_PROM]] = sext i32 [[L_VAL_2:%.+]] to i64 |
| 424 |
// CK7-64-DAG: [[L_VAL_2]] = load i32, ptr [[L_ADDR]] |
| 425 |
#pragma omp target update to((B+l)[l]) |
| 426 |
(B+l)[l] += e; |
| 427 |
#pragma omp target update from((B+l)[l]) |
| 428 |
} |
| 429 |
|
| 430 |
#endif |
| 431 |
///==========================================================================/// |
| 432 |
// RUN: %clang_cc1 -DCK8 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK8 --check-prefix CK8-64 |
| 433 |
// RUN: %clang_cc1 -DCK8 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 434 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK8 --check-prefix CK8-64 |
| 435 |
// RUN: %clang_cc1 -DCK8 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK8 --check-prefix CK8-32 |
| 436 |
// RUN: %clang_cc1 -DCK8 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 437 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK8 --check-prefix CK8-32 |
| 438 |
|
| 439 |
// RUN: %clang_cc1 -DCK8 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 440 |
// RUN: %clang_cc1 -DCK8 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 441 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 442 |
// RUN: %clang_cc1 -DCK8 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 443 |
// RUN: %clang_cc1 -DCK8 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 444 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 445 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 446 |
|
| 447 |
#ifdef CK8 |
| 448 |
|
| 449 |
// &(B+l)[1][0], &(B+l)[1][2], sizeof((B+l)[1][2]), TO |
| 450 |
|
| 451 |
// CK8: [[SIZE00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} 4] |
| 452 |
// CK8: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 453 |
|
| 454 |
// CK8-LABEL: lvalue |
| 455 |
void lvalue(int **B, int l, int e) { |
| 456 |
|
| 457 |
// CK8-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 458 |
// CK8-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 459 |
// CK8-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 460 |
|
| 461 |
// CK8-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 462 |
// CK8-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 463 |
// CK8-DAG: store ptr [[ARRAY_IDX_1_VAL:%.+]], ptr [[BP0]] |
| 464 |
// CK8-DAG: store ptr [[ARRAY_IDX_4:%.+]], ptr [[P0]] |
| 465 |
// CK8-DAG: [[ARRAY_IDX_1_VAL]] = load ptr, ptr [[ARRAY_IDX_1:%[^,]+]] |
| 466 |
// CK8-DAG: [[ARRAY_IDX_1]] = getelementptr inbounds ptr, ptr [[ADD_PTR:%.+]], i{{.+}} 1 |
| 467 |
// CK8-64-DAG: [[ADD_PTR]] = getelementptr inbounds ptr, ptr [[B_VAL:%.+]], i{{.+}} [[IDX_EXT:%.+]] |
| 468 |
// CK8-64-DAG: [[IDX_EXT]] = sext i32 [[L_VAL:%.+]] to i64 |
| 469 |
// CK8-DAG: [[ARRAY_IDX_4]] = getelementptr inbounds i32, ptr [[FIVE:%.+]], i{{.+}} 2 |
| 470 |
// CK8-DAG: [[FIVE]] = load ptr, ptr [[ARRAY_IDX_3:%.+]], |
| 471 |
// CK8-64-DAG: [[ARRAY_IDX_3:%.+]] = getelementptr inbounds ptr, ptr [[ADD_PTR_2:%.+]], i{{.+}} 1 |
| 472 |
// CK8-64-DAG: [[ADD_PTR_2]] = getelementptr inbounds ptr, ptr [[B_VAL:%.+]], i{{.+}} [[IDX_EXT_1:%.+]] |
| 473 |
// CK8-64-DAG: [[IDX_EXT_1]] = sext i32 [[L_VAL:%.+]] to i{{.+}} |
| 474 |
// CK8-32-DAG: [[ADD_PTR]] = getelementptr inbounds ptr, ptr [[B_VAL:%.+]], i{{.+}} [[L_VAL:%.+]] |
| 475 |
// CK8-32-DAG: [[ARRAY_IDX_4:%.+]] = getelementptr inbounds ptr, ptr [[ADD_PTR_2:%.+]], i{{.+}} 1 |
| 476 |
// CK8-32-DAG: [[ADD_PTR_2]] = getelementptr inbounds ptr, ptr [[B_VAL:%.+]], i{{.+}} [[L_VAL:%.+]] |
| 477 |
#pragma omp target update to((B+l)[1][2]) |
| 478 |
(B+l)[1][2] += e; |
| 479 |
#pragma omp target update from((B+l)[1][2]) |
| 480 |
} |
| 481 |
|
| 482 |
#endif |
| 483 |
///==========================================================================/// |
| 484 |
// RUN: %clang_cc1 -DCK9 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK9 --check-prefix CK9-64 |
| 485 |
// RUN: %clang_cc1 -DCK9 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 486 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK9 --check-prefix CK9-64 |
| 487 |
// RUN: %clang_cc1 -DCK9 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK9 --check-prefix CK9-32 |
| 488 |
// RUN: %clang_cc1 -DCK9 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 489 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK9 --check-prefix CK9-32 |
| 490 |
|
| 491 |
// RUN: %clang_cc1 -DCK9 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 492 |
// RUN: %clang_cc1 -DCK9 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 493 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 494 |
// RUN: %clang_cc1 -DCK9 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 495 |
// RUN: %clang_cc1 -DCK9 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 496 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 497 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 498 |
|
| 499 |
#ifdef CK9 |
| 500 |
|
| 501 |
struct S { |
| 502 |
double *p; |
| 503 |
}; |
| 504 |
|
| 505 |
// &(s->p[0]), &(s->p[0]), sizeof(s->p[0]), TO |
| 506 |
|
| 507 |
// CK9: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 8] |
| 508 |
// CK9: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 509 |
|
| 510 |
// CK9-LABEL: lvalue |
| 511 |
void lvalue(struct S *s, int l, int e) { |
| 512 |
|
| 513 |
// CK9-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 514 |
// CK9-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 515 |
// CK9-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 516 |
// |
| 517 |
// CK9-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 518 |
// CK9-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 519 |
// CK9-DAG: store ptr [[P_VAL:%.+]], ptr [[BP0]] |
| 520 |
// CK9-DAG: store ptr [[P_VAL_1:%.+]], ptr [[P0]] |
| 521 |
// CK9-DAG: [[P_VAL]] = load ptr, ptr [[P:%.+]], |
| 522 |
// CK9-DAG: [[P]] = getelementptr inbounds nuw [[STRUCT_S:%.+]], ptr [[S_VAL:%.+]], i32 0, i32 0 |
| 523 |
// CK9-DAG: [[S_VAL]] = load ptr, ptr [[S_ADDR:%.+]] |
| 524 |
// CK9-DAG: [[P_VAL_1]] = load ptr, ptr [[P_1:%.+]], |
| 525 |
// CK9-DAG: [[P_1]] = getelementptr inbounds nuw [[STRUCT_S]], ptr [[S_VAL_2:%.+]], i32 0, i32 0 |
| 526 |
// CK9-DAG: [[S_VAL_2]] = load ptr, ptr [[S_ADDR]] |
| 527 |
#pragma omp target update to(*(s->p)) |
| 528 |
*(s->p) += e; |
| 529 |
#pragma omp target update from(*(s->p)) |
| 530 |
} |
| 531 |
|
| 532 |
#endif |
| 533 |
///==========================================================================/// |
| 534 |
// RUN: %clang_cc1 -DCK10 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK10 --check-prefix CK10-64 |
| 535 |
// RUN: %clang_cc1 -DCK10 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 536 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK10 --check-prefix CK10-64 |
| 537 |
// RUN: %clang_cc1 -DCK10 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK10 --check-prefix CK10-32 |
| 538 |
// RUN: %clang_cc1 -DCK10 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 539 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK10 --check-prefix CK10-32 |
| 540 |
|
| 541 |
// RUN: %clang_cc1 -DCK10 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 542 |
// RUN: %clang_cc1 -DCK10 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 543 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 544 |
// RUN: %clang_cc1 -DCK10 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 545 |
// RUN: %clang_cc1 -DCK10 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 546 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 547 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 548 |
#ifdef CK10 |
| 549 |
|
| 550 |
struct S { |
| 551 |
double *p; |
| 552 |
}; |
| 553 |
|
| 554 |
// &((s->p + l)[0]), &((s->p + l)[0]), sizeof((s->p + l)[0]), TO |
| 555 |
|
| 556 |
// CK10: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 8] |
| 557 |
// CK10: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 558 |
|
| 559 |
// CK10-LABEL: lvalue |
| 560 |
void lvalue(struct S *s, int l, int e) { |
| 561 |
|
| 562 |
// CK10-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 563 |
// CK10-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 564 |
// CK10-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 565 |
// |
| 566 |
// CK10-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 567 |
// CK10-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 568 |
// CK10-DAG: store ptr [[S_P:%.+]], ptr [[BP0]] |
| 569 |
// CK10-DAG: store ptr [[ADD_PTR:%.+]], ptr [[P0]] |
| 570 |
// CK10-DAG: [[S_P]] = load ptr, ptr [[P_VAL:%.+]] |
| 571 |
// CK10-DAG: getelementptr inbounds {{.+}}, ptr [[SS:%.+]], i32 0, i32 0 |
| 572 |
// CK10-DAG: [[SS]] = load ptr, ptr [[S_ADDR:%.+]] |
| 573 |
// CK10-64-DAG: [[ADD_PTR]] = getelementptr inbounds double, ptr [[S_P_1:%.+]], i{{.+}} [[IDX_EXT:%.+]] |
| 574 |
// CK10-32-DAG: [[ADD_PTR]] = getelementptr inbounds double, ptr [[S_P_1:%.+]], i{{.+}} [[L_VAL:%.+]] |
| 575 |
// CK10-64-DAG: [[IDX_EXT]] = sext i32 [[L_VAL:%.+]] to i64 |
| 576 |
// CK10-DAG: [[S_P_1]] = load ptr, ptr [[P_VAL_1:%.+]] |
| 577 |
// CK10-DAG: getelementptr inbounds {{.+}}, ptr [[SS_1:%.+]], i32 0, i32 0 |
| 578 |
// CK10-DAG: [[SS_1]] = load ptr, ptr [[S_ADDR]] |
| 579 |
#pragma omp target update to(*(s->p+l)) |
| 580 |
*(s->p+l) += e; |
| 581 |
#pragma omp target update from(*(s->p+l)) |
| 582 |
} |
| 583 |
|
| 584 |
#endif |
| 585 |
///==========================================================================/// |
| 586 |
// RUN: %clang_cc1 -DCK11 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK11 --check-prefix CK11-64 |
| 587 |
// RUN: %clang_cc1 -DCK11 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 588 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK11 --check-prefix CK11-64 |
| 589 |
// RUN: %clang_cc1 -DCK11 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK11 --check-prefix CK11-32 |
| 590 |
// RUN: %clang_cc1 -DCK11 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 591 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK11 --check-prefix CK11-32 |
| 592 |
|
| 593 |
// RUN: %clang_cc1 -DCK11 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 594 |
// RUN: %clang_cc1 -DCK11 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 595 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 596 |
// RUN: %clang_cc1 -DCK11 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 597 |
// RUN: %clang_cc1 -DCK11 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 598 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 599 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 600 |
#ifdef CK11 |
| 601 |
|
| 602 |
struct S { |
| 603 |
double *p; |
| 604 |
}; |
| 605 |
|
| 606 |
// &((s->p + l)[0]), &((s->p + l)[3]), sizeof((s->p + l)[3]), TO |
| 607 |
|
| 608 |
// CK11: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 8] |
| 609 |
// CK11: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 610 |
|
| 611 |
// CK11-LABEL: lvalue |
| 612 |
void lvalue(struct S *s, int l, int e) { |
| 613 |
|
| 614 |
// CK11-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 615 |
// CK11-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 616 |
// CK11-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 617 |
// |
| 618 |
// CK11-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 619 |
// CK11-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 620 |
// CK11-DAG: store ptr [[S_P:%.+]], ptr [[BP0]] |
| 621 |
// CK11-DAG: store ptr [[ARRAY_IDX:%.+]], ptr [[P0]] |
| 622 |
// CK11-DAG: [[S_P]] = load ptr, ptr [[P:%.+]], |
| 623 |
// CK11-DAG: [[P]] = getelementptr inbounds nuw [[STRUCT_S:%.+]], ptr [[SS_1:%.+]], i32 0, i32 0 |
| 624 |
// CK11-DAG: [[ARRAY_IDX]] = getelementptr inbounds double, ptr [[ADD_PTR:%.+]], i{{.+}} 3 |
| 625 |
// CK11-64-DAG: [[ADD_PTR]] = getelementptr inbounds double, ptr [[S_P:%.+]], i{{.+}} [[IDX_EXT:%.+]] |
| 626 |
// CK11-32-DAG: [[ADD_PTR]] = getelementptr inbounds double, ptr [[S_P:%.+]], i{{.+}} [[L_VAL:%.+]] |
| 627 |
// CK11-64-DAG: [[IDX_EXT]] = sext i32 [[L_VAL:%.+]] to i64 |
| 628 |
// CK11-DAG: [[S_P]] = load ptr, ptr [[P_1:%.+]], |
| 629 |
// CK11-DAG: [[P_1]] = getelementptr inbounds nuw [[STRUCT_S]], ptr [[S_ADDR:%.+]], i32 0, i32 0 |
| 630 |
#pragma omp target update to((s->p+l)[3]) |
| 631 |
(s->p+l)[3] += e; |
| 632 |
#pragma omp target update from((s->p+l)[3]) |
| 633 |
} |
| 634 |
|
| 635 |
#endif |
| 636 |
///==========================================================================/// |
| 637 |
// RUN: %clang_cc1 -DCK12 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK12 --check-prefix CK12-64 |
| 638 |
// RUN: %clang_cc1 -DCK12 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 639 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK12 --check-prefix CK12-64 |
| 640 |
// RUN: %clang_cc1 -DCK12 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK12 --check-prefix CK12-32 |
| 641 |
// RUN: %clang_cc1 -DCK12 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 642 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK12 --check-prefix CK12-32 |
| 643 |
|
| 644 |
// RUN: %clang_cc1 -DCK12 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 645 |
// RUN: %clang_cc1 -DCK12 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 646 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 647 |
// RUN: %clang_cc1 -DCK12 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 648 |
// RUN: %clang_cc1 -DCK12 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 649 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 650 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 651 |
#ifdef CK12 |
| 652 |
|
| 653 |
struct S { |
| 654 |
double *p; |
| 655 |
struct S *sp; |
| 656 |
}; |
| 657 |
|
| 658 |
// &((s->sp->p)[0]), &((s->sp->p)[0]), sizeof((s->sp->p)[0]), TO |
| 659 |
|
| 660 |
// CK12: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 8] |
| 661 |
// CK12: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 662 |
|
| 663 |
// CK12-LABEL: lvalue |
| 664 |
void lvalue(struct S *s, int l, int e) { |
| 665 |
|
| 666 |
// CK12-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 667 |
// CK12-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 668 |
// CK12-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 669 |
// |
| 670 |
// CK12-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 671 |
// CK12-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 672 |
// CK12-DAG: store ptr [[PVAL:%.+]], ptr [[BP0]] |
| 673 |
// CK12-DAG: store ptr [[PVAL1:%.+]], ptr [[P0]] |
| 674 |
// CK12-DAG: [[PVAL]] = load ptr, ptr [[P:%[^,]+]] |
| 675 |
// CK12-DAG: [[P]] = getelementptr inbounds nuw %struct.S, ptr [[SPVAL:%.+]], i32 0, i32 0 |
| 676 |
// CK12-DAG: [[SPVAL]] = load ptr, ptr [[SP:%[^,]+]] |
| 677 |
// CK12-DAG: [[SP]] = getelementptr inbounds nuw %struct.S, ptr [[SADDRVAL:%.+]], i32 0, i32 1 |
| 678 |
// CK12-DAG: [[SADDRVAL]] = load ptr, ptr %s.addr |
| 679 |
// CK12-DAG: [[PVAL1]] = load ptr, ptr [[P1:%[^,]+]] |
| 680 |
// CK12-DAG: [[P1]] = getelementptr inbounds nuw %struct.S, ptr [[SPVAL1:%.+]], i32 0, i32 0 |
| 681 |
// CK12-DAG: [[SPVAL1]] = load ptr, ptr [[SP1:%[^,]+]] |
| 682 |
// CK12-DAG: [[SP1]] = getelementptr inbounds nuw %struct.S, ptr [[SADDRVAL1:%.+]], i32 0, i32 1 |
| 683 |
// CK12-DAG: [[SADDRVAL1]] = load ptr, ptr %s.addr |
| 684 |
#pragma omp target update to(*(s->sp->p)) |
| 685 |
*(s->sp->p) = e; |
| 686 |
#pragma omp target update from(*(s->sp->p)) |
| 687 |
} |
| 688 |
|
| 689 |
#endif |
| 690 |
///==========================================================================/// |
| 691 |
// RUN: %clang_cc1 -DCK13 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK13 --check-prefix CK13-64 |
| 692 |
// RUN: %clang_cc1 -DCK13 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 693 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK13 --check-prefix CK13-64 |
| 694 |
// RUN: %clang_cc1 -DCK13 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK13 --check-prefix CK13-32 |
| 695 |
// RUN: %clang_cc1 -DCK13 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 696 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK13 --check-prefix CK13-32 |
| 697 |
|
| 698 |
// RUN: %clang_cc1 -DCK13 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 699 |
// RUN: %clang_cc1 -DCK13 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 700 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 701 |
// RUN: %clang_cc1 -DCK13 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 702 |
// RUN: %clang_cc1 -DCK13 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 703 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 704 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 705 |
#ifdef CK13 |
| 706 |
|
| 707 |
// &((*(BB+a))[0]), &((*(BB+a))[b]), sizeof((*(BB+a))[0]), TO |
| 708 |
|
| 709 |
// CK13: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 4] |
| 710 |
// CK13: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 711 |
|
| 712 |
// CK13-LABEL: lvalue |
| 713 |
void lvalue(int **BB, int a, int b) { |
| 714 |
|
| 715 |
// CK13-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 716 |
// CK13-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 717 |
// CK13-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 718 |
|
| 719 |
// CK13-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 720 |
// CK13-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 721 |
// CK13-DAG: store ptr [[ADD_PTR_VAL:%.+]], ptr [[BP0]] |
| 722 |
// CK13-DAG: store ptr [[ADD_PTR1:%.+]], ptr [[P0]] |
| 723 |
// CK13-DAG: [[ADD_PTR_VAL]] = load ptr, ptr [[ADD_PTR:%[^,]+]] |
| 724 |
// CK13-DAG: [[ADD_PTR]] = getelementptr inbounds ptr, ptr [[BB:%.+]], i{{.*}} [[A_VAL:%[^,]+]] |
| 725 |
// CK13-DAG: [[BB]] = load ptr, ptr %BB.addr |
| 726 |
// CK13-64-DAG: [[A_VAL:%.+]] = sext i32 [[A_VAL:%.+]] to i64 |
| 727 |
// CK13-DAG: [[A_VAL]] = load i32, ptr %a.addr |
| 728 |
|
| 729 |
// CK13-DAG: [[ADD_PTR1]] = getelementptr inbounds i32, ptr [[ADD_PTR_VAL1:%.+]], i{{.*}} [[B_VAL:%[^,]+]] |
| 730 |
// CK13-64-DAG: [[B_VAL]] = sext i32 [[B_VAL:.+]] to i64 |
| 731 |
// CK13-DAG: [[B_VAL]] = load i32, ptr %b.addr |
| 732 |
// CK13-DAG: [[ADD_PTR_VAL1]] = load ptr, ptr [[ADD_PTR2:%[^,]+]] |
| 733 |
// CK13-DAG: [[ADD_PTR2]] = getelementptr inbounds ptr, ptr [[BB1:%.+]], i{{.*}} [[A_VAL1:%[^,]+]] |
| 734 |
// CK13-DAG: [[BB1]] = load ptr, ptr %BB.addr |
| 735 |
// CK13-64-DAG: [[A_VAL1:%.+]] = sext i32 [[A_VAL1:%.+]] to i64 |
| 736 |
// CK13-DAG: [[A_VAL1]] = load i32, ptr %a.addr |
| 737 |
#pragma omp target update to(*(*(BB+a)+b)) |
| 738 |
*(*(BB+a)+b) = 1; |
| 739 |
#pragma omp target update from(*(*(BB+a)+b)) |
| 740 |
} |
| 741 |
|
| 742 |
#endif |
| 743 |
///==========================================================================/// |
| 744 |
// RUN: %clang_cc1 -DCK14 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK14 --check-prefix CK14-64 |
| 745 |
// RUN: %clang_cc1 -DCK14 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 746 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK14 --check-prefix CK14-64 |
| 747 |
// RUN: %clang_cc1 -DCK14 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK14 --check-prefix CK14-32 |
| 748 |
// RUN: %clang_cc1 -DCK14 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 749 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK14 --check-prefix CK14-32 |
| 750 |
|
| 751 |
// RUN: %clang_cc1 -DCK14 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 752 |
// RUN: %clang_cc1 -DCK14 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 753 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 754 |
// RUN: %clang_cc1 -DCK14 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 755 |
// RUN: %clang_cc1 -DCK14 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 756 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 757 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 758 |
#ifdef CK14 |
| 759 |
|
| 760 |
// &(this->d[0]), &(this->d[1]), sizeof(this->d[1]), TO |
| 761 |
|
| 762 |
// CK14: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 8] |
| 763 |
// CK14: [[MTYPE00:@.+]] = private {{.*}}constant [1 x i64] [i64 1] |
| 764 |
|
| 765 |
struct SSA { |
| 766 |
double *p; |
| 767 |
double *≺ |
| 768 |
SSA(double *&pr) : pr(pr) {} |
| 769 |
}; |
| 770 |
|
| 771 |
struct SSB { |
| 772 |
double *d; |
| 773 |
SSA *p; |
| 774 |
SSA *≺ |
| 775 |
SSB(SSA *&pr) : pr(pr) {} |
| 776 |
|
| 777 |
// CK14-LABEL: define {{.+}}foo |
| 778 |
void foo() { |
| 779 |
|
| 780 |
// CK14-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 781 |
// CK14-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 782 |
// CK14-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 783 |
|
| 784 |
// CK14-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 785 |
// CK14-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 786 |
// CK14-DAG: store ptr [[D_VAL:%.+]], ptr [[BP0]] |
| 787 |
// CK14-DAG: store ptr [[ADD_PTR:%.+]], ptr [[P0]] |
| 788 |
// CK14-DAG: [[D_VAL]] = load ptr, ptr [[D:%[^,]+]] |
| 789 |
// CK14-DAG: [[D]] = getelementptr inbounds nuw [[SSB:%struct.SSB]], ptr [[THIS:%.+]], i32 0, i32 0 |
| 790 |
// CK14-DAG: [[ADD_PTR]] = getelementptr inbounds double, ptr [[D_VAL1:%.+]], i{{.+}} 1 |
| 791 |
// CK14-DAG: [[D_VAL1]] = load ptr, ptr [[D1:%[^,]+]] |
| 792 |
// CK14-DAG: [[D1]] = getelementptr inbounds nuw [[SSB]], ptr [[THIS]], i32 0, i32 0 |
| 793 |
|
| 794 |
#pragma omp target update to(*(this->d+1)) |
| 795 |
*(this->d+1) = 1; |
| 796 |
#pragma omp target update from(*(this->d+1)) |
| 797 |
} |
| 798 |
}; |
| 799 |
|
| 800 |
void lvalue_member(SSA *sap) { |
| 801 |
double *d; |
| 802 |
SSA sa(d); |
| 803 |
SSB sb(sap); |
| 804 |
sb.foo(); |
| 805 |
} |
| 806 |
|
| 807 |
#endif |
| 808 |
///==========================================================================/// |
| 809 |
// RUN: %clang_cc1 -DCK15 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK15 --check-prefix CK15-64 |
| 810 |
// RUN: %clang_cc1 -DCK15 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 811 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK15 --check-prefix CK15-64 |
| 812 |
// RUN: %clang_cc1 -DCK15 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK15 --check-prefix CK15-32 |
| 813 |
// RUN: %clang_cc1 -DCK15 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 814 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK15 --check-prefix CK15-32 |
| 815 |
|
| 816 |
// RUN: %clang_cc1 -DCK15 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 817 |
// RUN: %clang_cc1 -DCK15 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 818 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 819 |
// RUN: %clang_cc1 -DCK15 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 820 |
// RUN: %clang_cc1 -DCK15 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 821 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 822 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 823 |
#ifdef CK15 |
| 824 |
|
| 825 |
// &(sap->p[0]), &(sap->p[3]), sizeof(sap->p[1]), TO |
| 826 |
|
| 827 |
// CK15: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 8] |
| 828 |
// CK15: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 829 |
|
| 830 |
struct SSA { |
| 831 |
double *p; |
| 832 |
double *≺ |
| 833 |
SSA(double *&pr) : pr(pr) {} |
| 834 |
}; |
| 835 |
|
| 836 |
//CK-15-LABEL: lvalue_member |
| 837 |
void lvalue_member(SSA *sap) { |
| 838 |
|
| 839 |
// CK15-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 840 |
// CK15-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 841 |
// CK15-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 842 |
|
| 843 |
// CK15-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 844 |
// CK15-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 845 |
// CK15-DAG: store ptr [[P_VAL:%.+]], ptr [[BP0]] |
| 846 |
// CK15-DAG: store ptr [[ADD_PTR:%.+]], ptr [[P0]] |
| 847 |
// CK15-DAG: [[P_VAL]] = load ptr, ptr [[P:%[^,]+]] |
| 848 |
// CK15-DAG: [[P]] = getelementptr inbounds nuw %struct.SSA, ptr [[SAP_VAL:%.+]], i32 0, i32 0 |
| 849 |
// CK15-DAG: [[SAP_VAL]] = load ptr, ptr %sap.addr |
| 850 |
// CK15-DAG: [[ADD_PTR]] = getelementptr inbounds double, ptr [[P_VAL1:%.+]], i{{.*}} 3 |
| 851 |
// CK15-DAG: [[P_VAL1]] = load ptr, ptr [[P1:%[^,]+]] |
| 852 |
// CK15-DAG: [[P1]] = getelementptr inbounds nuw %struct.SSA, ptr [[SAP_VAL1:%.+]], i32 0, i32 0 |
| 853 |
// CK15-DAG: [[SAP_VAL1]] = load ptr, ptr %sap.addr |
| 854 |
#pragma omp target update to(*(3+sap->p)) |
| 855 |
*(3+sap->p) = 1; |
| 856 |
#pragma omp target update from(*(3+sap->p)) |
| 857 |
} |
| 858 |
|
| 859 |
#endif |
| 860 |
///==========================================================================/// |
| 861 |
// RUN: %clang_cc1 -DCK16 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK16 --check-prefix CK16-64 |
| 862 |
// RUN: %clang_cc1 -DCK16 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 863 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK16 --check-prefix CK16-64 |
| 864 |
// RUN: %clang_cc1 -DCK16 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK16 --check-prefix CK16-32 |
| 865 |
// RUN: %clang_cc1 -DCK16 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 866 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK16 --check-prefix CK16-32 |
| 867 |
|
| 868 |
// RUN: %clang_cc1 -DCK16 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 869 |
// RUN: %clang_cc1 -DCK16 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 870 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 871 |
// RUN: %clang_cc1 -DCK16 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 872 |
// RUN: %clang_cc1 -DCK16 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 873 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 874 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 875 |
#ifdef CK16 |
| 876 |
|
| 877 |
// CK16: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 4] |
| 878 |
// CK16: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 879 |
|
| 880 |
//CK16-LABEL: lvalue_find_base |
| 881 |
void lvalue_find_base(float *f, int *i) { |
| 882 |
|
| 883 |
// CK16-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 884 |
// CK16-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 885 |
// CK16-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 886 |
|
| 887 |
// CK16-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 888 |
// CK16-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 889 |
// CK16-DAG: store ptr [[F:%.+]], ptr [[BP0]] |
| 890 |
// CK16-DAG: store ptr [[ADD_PTR:%.+]], ptr [[P0]] |
| 891 |
// CK16-32-DAG: [[ADD_PTR]] = getelementptr inbounds float, ptr [[THREE:%.+]], i32 [[I:%.+]] |
| 892 |
// CK16-64-DAG: [[ADD_PTR]] = getelementptr inbounds float, ptr [[THREE:%.+]], i64 [[IDX_EXT:%.+]] |
| 893 |
// CK16-DAG: [[THREE]] = load ptr, ptr [[F_ADDR:%.+]], |
| 894 |
// CK16-DAG: [[F]] = load ptr, ptr [[F_ADDR]], |
| 895 |
// CK16-64-DAG: [[IDX_EXT]] = sext i32 [[I:%.+]] to i64 |
| 896 |
|
| 897 |
#pragma omp target update to(*(*i+f)) |
| 898 |
*(*i+f) = 1.0; |
| 899 |
#pragma omp target update from(*(*i+f)) |
| 900 |
} |
| 901 |
|
| 902 |
#endif |
| 903 |
///==========================================================================/// |
| 904 |
// RUN: %clang_cc1 -DCK17 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK17 --check-prefix CK17-64 |
| 905 |
// RUN: %clang_cc1 -DCK17 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 906 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK17 --check-prefix CK17-64 |
| 907 |
// RUN: %clang_cc1 -DCK17 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK17 --check-prefix CK17-32 |
| 908 |
// RUN: %clang_cc1 -DCK17 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 909 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK17 --check-prefix CK17-32 |
| 910 |
|
| 911 |
// RUN: %clang_cc1 -DCK17 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 912 |
// RUN: %clang_cc1 -DCK17 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 913 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 914 |
// RUN: %clang_cc1 -DCK17 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 915 |
// RUN: %clang_cc1 -DCK17 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 916 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 917 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 918 |
#ifdef CK17 |
| 919 |
|
| 920 |
// &((*(1+sa->i+f))[0]), &((*(1+sa->i+f))[sa->sa->i]), sizeof((sa->sa->i + *(1+sa->i+f))[0]), TO |
| 921 |
|
| 922 |
// CK17: [[SIZE00:@.+]] = {{.+}}constant [1 x i64] [i64 4] |
| 923 |
// CK17: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 924 |
|
| 925 |
struct SSA { |
| 926 |
int i; |
| 927 |
SSA *sa; |
| 928 |
}; |
| 929 |
|
| 930 |
//CK17-LABEL: lvalue_find_base |
| 931 |
void lvalue_find_base(float **f, SSA *sa) { |
| 932 |
|
| 933 |
// CK17-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[SIZE00]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 934 |
// CK17-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 935 |
// CK17-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 936 |
|
| 937 |
// CK17-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 938 |
// CK17-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 939 |
// CK17-DAG: store ptr [[ADD_PTR_VAL:%.+]], ptr [[BP0]], |
| 940 |
// CK17-DAG: store ptr [[ADD_PTR_I:%.+]], ptr [[P0]], |
| 941 |
// CK17-DAG: [[ADD_PTR_VAL]] = load ptr, ptr [[ADD_PTR:%[^,]+]] |
| 942 |
// CK17-DAG: [[ADD_PTR]] = getelementptr inbounds ptr, ptr [[F:%.+]], i{{.*}} [[I_PLUS_ONE:[^,]*]] |
| 943 |
// CK17-DAG: [[F]] = load ptr, ptr %f.addr |
| 944 |
// CK17-64-DAG: [[I_PLUS_ONE]] = sext i32 [[I_PLUS_ONE:%.+]] to i64 |
| 945 |
// CK17-DAG: [[I_PLUS_ONE]] = add nsw i32 1, [[IVAL:%.+]] |
| 946 |
// CK17-DAG: [[IVAL]] = load i32, ptr [[I:%[^,]+]] |
| 947 |
// CK17-DAG: [[I]] = getelementptr inbounds nuw %struct.SSA, ptr [[SA:%.+]], i32 0, i32 0 |
| 948 |
|
| 949 |
// CK17-DAG: [[ADD_PTR_I]] = getelementptr inbounds float, ptr [[ADD_PTR_VAL1:%.+]], i{{.*}} [[I_VAL1:%.+]] |
| 950 |
// CK17-64-DAG: [[I_VAL1]] = sext i32 [[I_VAL1:%.+]] to i64 |
| 951 |
// CK17-DAG: [[I_VAL1]] = load i32, ptr [[I1:%[^,]+]] |
| 952 |
// CK17-DAG: [[I1]] = getelementptr inbounds nuw %struct.SSA, ptr [[SA_VAL1:%.+]], i32 0, i32 0 |
| 953 |
// CK17-DAG: [[SA_VAL1]] = load ptr, ptr [[SA1:%[^,]+]] |
| 954 |
// CK17-DAG: [[SA1]] = getelementptr inbounds nuw %struct.SSA, ptr [[SA_VAL2:%.+]], i32 0, i32 1 |
| 955 |
// CK17-DAG: [[SA_VAL2]] = load ptr, ptr %sa.addr |
| 956 |
// CK17-DAG: [[ADD_PTR_VAL1]] = load ptr, ptr [[ADD_PTR1:%[^,]+]] |
| 957 |
// CK17-DAG: [[ADD_PTR1]] = getelementptr inbounds ptr, ptr [[F1:%.+]], i{{.*}} [[I_PLUS_ONE1:[^,]*]] |
| 958 |
// CK17-DAG: [[F1]] = load ptr, ptr %f.addr |
| 959 |
// CK17-64-DAG: [[I_PLUS_ONE1]] = sext i32 [[I_PLUS_ONE1:%.+]] to i64 |
| 960 |
// CK17-DAG: [[I_PLUS_ONE1]] = add nsw i32 1, [[IVAL1:%.+]] |
| 961 |
// CK17-DAG: [[IVAL1]] = load i32, ptr [[I2:%[^,]+]] |
| 962 |
// CK17-DAG: [[I2]] = getelementptr inbounds nuw %struct.SSA, ptr [[SA:%.+]], i32 0, i32 0 |
| 963 |
|
| 964 |
#pragma omp target update to(*(sa->sa->i+*(1+sa->i+f))) |
| 965 |
*(sa->sa->i+*(1+sa->i+f)) = 1; |
| 966 |
#pragma omp target update from(*(sa->sa->i+*(1+sa->i+f))) |
| 967 |
} |
| 968 |
|
| 969 |
#endif |
| 970 |
///==========================================================================/// |
| 971 |
// RUN: %clang_cc1 -DCK18 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK18 --check-prefix CK18-64 |
| 972 |
// RUN: %clang_cc1 -DCK18 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 973 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK18 --check-prefix CK18-64 |
| 974 |
// RUN: %clang_cc1 -DCK18 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK18 --check-prefix CK18-32 |
| 975 |
// RUN: %clang_cc1 -DCK18 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 976 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK18 --check-prefix CK18-32 |
| 977 |
|
| 978 |
// RUN: %clang_cc1 -DCK18 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY18 %s |
| 979 |
// RUN: %clang_cc1 -DCK18 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 980 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY18 %s |
| 981 |
// RUN: %clang_cc1 -DCK18 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY18 %s |
| 982 |
// RUN: %clang_cc1 -DCK18 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 983 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY18 %s |
| 984 |
// SIMD-ONLY18-NOT: {{__kmpc|__tgt}} |
| 985 |
#ifdef CK18 |
| 986 |
|
| 987 |
// CK18-DAG: [[MTYPE_TO:@.+]] = {{.+}}constant [1 x i64] [i64 1] |
| 988 |
// CK18-DAG: [[MTYPE_FROM:@.+]] = {{.+}}constant [1 x i64] [i64 2] |
| 989 |
|
| 990 |
//CK18-LABEL: array_shaping |
| 991 |
void array_shaping(float *f, int sa) { |
| 992 |
|
| 993 |
// CK18-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[GEPS:%.+]], ptr [[MTYPE_TO]]{{.+}}, ptr null) |
| 994 |
// CK18-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 995 |
// CK18-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 996 |
// CK18-DAG: [[GEPS]] = getelementptr inbounds {{.+}}[[S:%[^,]+]] |
| 997 |
|
| 998 |
// CK18-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 999 |
// CK18-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 1000 |
// CK18-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 |
| 1001 |
|
| 1002 |
// CK18-DAG: store ptr [[F1:%.+]], ptr [[BP0]], |
| 1003 |
// CK18-DAG: store ptr [[F2:%.+]], ptr [[P0]], |
| 1004 |
// CK18-DAG: store i64 [[SIZE:%.+]], ptr [[S0]], |
| 1005 |
// CK18-DAG: [[F1]] = load ptr, ptr [[F_ADDR:%.+]], |
| 1006 |
// CK18-DAG: [[F2]] = load ptr, ptr [[F_ADDR]], |
| 1007 |
|
| 1008 |
// CK18-64-DAG: [[SIZE]] = mul nuw i64 [[SZ1:%.+]], 4 |
| 1009 |
// CK18-64-DAG: [[SZ1]] = mul nuw i64 12, %{{.+}} |
| 1010 |
// CK18-32-DAG: [[SIZE]] = sext i32 [[SZ1:%.+]] to i64 |
| 1011 |
// CK18-32-DAG: [[SZ1]] = mul nuw i32 [[SZ2:%.+]], 4 |
| 1012 |
// CK18-32-DAG: [[SZ2]] = mul nuw i32 12, %{{.+}} |
| 1013 |
#pragma omp target update to(([3][sa][4])f) |
| 1014 |
sa = 1; |
| 1015 |
// CK18-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[GEPS:%.+]], ptr [[MTYPE_FROM]]{{.+}}, ptr null) |
| 1016 |
// CK18-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 1017 |
// CK18-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1018 |
// CK18-DAG: [[GEPS]] = getelementptr inbounds {{.+}}[[S:%[^,]+]] |
| 1019 |
|
| 1020 |
// CK18-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 1021 |
// CK18-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 1022 |
// CK18-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 |
| 1023 |
|
| 1024 |
// CK18-DAG: store ptr [[F1:%.+]], ptr [[BP0]], |
| 1025 |
// CK18-DAG: store ptr [[F2:%.+]], ptr [[P0]], |
| 1026 |
// CK18-DAG: store i64 [[SIZE:%.+]], ptr [[S0]], |
| 1027 |
// CK18-DAG: [[F1]] = load ptr, ptr [[F_ADDR]], |
| 1028 |
// CK18-DAG: [[F2]] = load ptr, ptr [[F_ADDR]], |
| 1029 |
|
| 1030 |
// CK18-64-DAG: [[SIZE]] = mul nuw i64 [[SZ1:%.+]], 5 |
| 1031 |
// CK18-64-DAG: [[SZ1]] = mul nuw i64 4, %{{.+}} |
| 1032 |
// CK18-32-DAG: [[SIZE]] = sext i32 [[SZ1:%.+]] to i64 |
| 1033 |
// CK18-32-DAG: [[SZ1]] = mul nuw i32 [[SZ2:%.+]], 5 |
| 1034 |
// CK18-32-DAG: [[SZ2]] = mul nuw i32 4, %{{.+}} |
| 1035 |
#pragma omp target update from(([sa][5])f) |
| 1036 |
} |
| 1037 |
|
| 1038 |
#endif |
| 1039 |
///==========================================================================/// |
| 1040 |
// RUN: %clang_cc1 -DCK19 -verify -Wno-vla -fopenmp -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK19 --check-prefix CK19-64 |
| 1041 |
// RUN: %clang_cc1 -DCK19 -fopenmp -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1042 |
// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK19 --check-prefix CK19-64 |
| 1043 |
// RUN: %clang_cc1 -DCK19 -verify -Wno-vla -fopenmp -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK19 --check-prefix CK19-32 |
| 1044 |
// RUN: %clang_cc1 -DCK19 -fopenmp -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1045 |
// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK19 --check-prefix CK19-32 |
| 1046 |
|
| 1047 |
// RUN: %clang_cc1 -DCK19 -verify -Wno-vla -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 1048 |
// RUN: %clang_cc1 -DCK19 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1049 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 1050 |
// RUN: %clang_cc1 -DCK19 -verify -Wno-vla -fopenmp-version=51 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 1051 |
// RUN: %clang_cc1 -DCK19 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1052 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s |
| 1053 |
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} |
| 1054 |
#ifdef CK19 |
| 1055 |
|
| 1056 |
// PRESENT=0x1000 | TO=0x1 = 0x1001 |
| 1057 |
// CK19: [[MTYPE00:@.+]] = {{.+}}constant [1 x i64] [i64 [[#0x1001]]] |
| 1058 |
|
| 1059 |
// PRESENT=0x1000 | FROM=0x2 = 0x1002 |
| 1060 |
// CK19: [[MTYPE01:@.+]] = {{.+}}constant [1 x i64] [i64 [[#0x1002]]] |
| 1061 |
|
| 1062 |
// CK19-LABEL: _Z13check_presenti |
| 1063 |
void check_present(int arg) { |
| 1064 |
int la; |
| 1065 |
float lb[arg]; |
| 1066 |
|
| 1067 |
// Region 00 |
| 1068 |
// CK19-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[GEPS:%.+]], ptr [[MTYPE00]]{{.+}}, ptr null) |
| 1069 |
// CK19-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 1070 |
// CK19-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1071 |
// CK19-DAG: [[GEPS]] = getelementptr inbounds {{.+}}[[S:%[^,]+]] |
| 1072 |
|
| 1073 |
// CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 1074 |
// CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 1075 |
// CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 |
| 1076 |
// CK19-DAG: store ptr [[VAL0:%[^,]+]], ptr [[BP0]] |
| 1077 |
// CK19-DAG: store ptr [[VAL0]], ptr [[P0]] |
| 1078 |
// CK19-DAG: store i64 [[CSVAL0:%[^,]+]], ptr [[S0]] |
| 1079 |
#pragma omp target update to(present: lb) |
| 1080 |
; |
| 1081 |
|
| 1082 |
// Region 01 |
| 1083 |
// CK19-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[GEPS:%.+]], ptr [[MTYPE01]]{{.+}}, ptr null) |
| 1084 |
// CK19-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP:%[^,]+]] |
| 1085 |
// CK19-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1086 |
// CK19-DAG: [[GEPS]] = getelementptr inbounds {{.+}}[[S:%[^,]+]] |
| 1087 |
|
| 1088 |
// CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 |
| 1089 |
// CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 |
| 1090 |
// CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 |
| 1091 |
// CK19-DAG: store ptr [[VAL0:%[^,]+]], ptr [[BP0]] |
| 1092 |
// CK19-DAG: store ptr [[VAL0]], ptr [[P0]] |
| 1093 |
// CK19-DAG: store i64 [[CSVAL0:%[^,]+]], ptr [[S0]] |
| 1094 |
#pragma omp target update from(present: lb) |
| 1095 |
; |
| 1096 |
} |
| 1097 |
#endif |
| 1098 |
|
| 1099 |
///==========================================================================/// |
| 1100 |
// RUN: %clang_cc1 -DCK20 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK20 --check-prefix CK20-64 |
| 1101 |
// RUN: %clang_cc1 -DCK20 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1102 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK20 --check-prefix CK20-64 |
| 1103 |
// RUN: %clang_cc1 -DCK20 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK20 --check-prefix CK20-32 |
| 1104 |
// RUN: %clang_cc1 -DCK20 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1105 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK20 --check-prefix CK20-32 |
| 1106 |
|
| 1107 |
// RUN: %clang_cc1 -DCK20 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1108 |
// RUN: %clang_cc1 -DCK20 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1109 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1110 |
// RUN: %clang_cc1 -DCK20 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1111 |
// RUN: %clang_cc1 -DCK20 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1112 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1113 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1114 |
#ifdef CK20 |
| 1115 |
|
| 1116 |
struct ST { |
| 1117 |
int a; |
| 1118 |
double *b; |
| 1119 |
}; |
| 1120 |
|
| 1121 |
// CK20: [[STRUCT_ST:%.+]] = type { i32, ptr } |
| 1122 |
// CK20: [[STRUCT_DESCRIPTOR:%.+]] = type { i64, i64, i64 } |
| 1123 |
|
| 1124 |
// CK20: [[MSIZE:@.+]] = {{.+}}constant [1 x i64] [i64 3] |
| 1125 |
// CK20: [[MTYPE:@.+]] = {{.+}}constant [1 x i64] [i64 17592186044417] |
| 1126 |
|
| 1127 |
// CK20-LABEL: _Z3foo |
| 1128 |
void foo(int arg) { |
| 1129 |
ST arr[3][4]; |
| 1130 |
// CK20: [[DIMS:%.+]] = alloca [3 x [[STRUCT_DESCRIPTOR]]], |
| 1131 |
// CK20: [[ARRAY_IDX:%.+]] = getelementptr inbounds nuw [3 x [4 x [[STRUCT_ST]]]], ptr [[ARR:%.+]], {{.+}} 0, {{.+}} 0 |
| 1132 |
// CK20: [[ARRAY_DECAY:%.+]] = getelementptr inbounds [4 x [[STRUCT_ST]]], ptr [[ARRAY_IDX]], {{.+}} 0, {{.+}} 0 |
| 1133 |
// CK20: [[ARRAY_IDX_1:%.+]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[ARRAY_DECAY]], {{.+}} |
| 1134 |
// CK20: [[BP0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[BP:%.+]], {{.+}} 0, {{.+}} 0 |
| 1135 |
// CK20: store ptr [[ARR]], ptr [[BP0]], |
| 1136 |
// CK20: [[P0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[P:%.+]], {{.+}} 0, {{.+}} 0 |
| 1137 |
// CK20: store ptr [[ARRAY_IDX_1]], ptr [[P0]], |
| 1138 |
// CK20: [[DIM_1:%.+]] = getelementptr inbounds [3 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 0 |
| 1139 |
// CK20: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 0 |
| 1140 |
// CK20: store i64 0, ptr [[OFFSET]], |
| 1141 |
// CK20: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 1 |
| 1142 |
// CK20: store i64 2, ptr [[COUNT]], |
| 1143 |
// CK20: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 2 |
| 1144 |
// CK20: store i64 {{32|64}}, ptr [[STRIDE]], |
| 1145 |
// CK20: [[DIM_2:%.+]] = getelementptr inbounds [3 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 1 |
| 1146 |
// CK20: [[OFFSET_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 0 |
| 1147 |
// CK20: store i64 1, ptr [[OFFSET_2]], |
| 1148 |
// CK20: [[COUNT_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 1 |
| 1149 |
// CK20: store i64 4, ptr [[COUNT_2]], |
| 1150 |
// CK20: [[STRIDE_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 2 |
| 1151 |
// CK20: store i64 {{8|16}}, ptr [[STRIDE_2]], |
| 1152 |
// CK20: [[DIM_3:%.+]] = getelementptr inbounds [3 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 2 |
| 1153 |
// CK20: [[OFFSET_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 0 |
| 1154 |
// CK20: store i64 0, ptr [[OFFSET_3]], |
| 1155 |
// CK20: [[COUNT_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 1 |
| 1156 |
// CK20: store i64 1, ptr [[COUNT_3]], |
| 1157 |
// CK20: [[STRIDE_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 2 |
| 1158 |
// CK20: store i64 {{8|16}}, ptr [[STRIDE_3]], |
| 1159 |
// CK20-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[MSIZE]], ptr [[MTYPE]]{{.+}}) |
| 1160 |
// CK20-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP]] |
| 1161 |
// CK20-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1162 |
// CK20-DAG: [[PTRS:%.+]] = getelementptr inbounds [1 x ptr], ptr %.offload_ptrs, i32 0, i32 0 |
| 1163 |
// CK20-DAG: store ptr [[DIMS]], ptr [[PTRS]], |
| 1164 |
|
| 1165 |
#pragma omp target update to(arr[0:2][1:4]) |
| 1166 |
{ ++arg; } |
| 1167 |
} |
| 1168 |
|
| 1169 |
#endif |
| 1170 |
///==========================================================================/// |
| 1171 |
// RUN: %clang_cc1 -DCK21 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK21 --check-prefix CK21-64 |
| 1172 |
// RUN: %clang_cc1 -DCK21 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1173 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK21 --check-prefix CK21-64 |
| 1174 |
// RUN: %clang_cc1 -DCK21 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK21 --check-prefix CK21-32 |
| 1175 |
// RUN: %clang_cc1 -DCK21 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1176 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK21 --check-prefix CK21-32 |
| 1177 |
|
| 1178 |
// RUN: %clang_cc1 -DCK21 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1179 |
// RUN: %clang_cc1 -DCK21 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1180 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1181 |
// RUN: %clang_cc1 -DCK21 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1182 |
// RUN: %clang_cc1 -DCK21 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1183 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1184 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1185 |
#ifdef CK21 |
| 1186 |
|
| 1187 |
// CK21: [[STRUCT_ST:%.+]] = type { [10 x [10 x [10 x ptr]]] } |
| 1188 |
// CK21: [[STRUCT_DESCRIPTOR:%.+]] = type { i64, i64, i64 } |
| 1189 |
|
| 1190 |
// CK21: [[SIZE:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] |
| 1191 |
// CK21: [[MTYPE:@.+]] = {{.+}}constant [2 x i64] [i64 0, i64 299067162755073] |
| 1192 |
|
| 1193 |
struct ST { |
| 1194 |
double *dptr[10][10][10]; |
| 1195 |
|
| 1196 |
// CK21: _ZN2ST3fooEv |
| 1197 |
void foo() { |
| 1198 |
// CK21: [[DIMS:%.+]] = alloca [4 x [[STRUCT_DESCRIPTOR]]], |
| 1199 |
// CK21: [[ARRAY_IDX:%.+]] = getelementptr inbounds nuw [10 x [10 x [10 x ptr]]], ptr [[DPTR:%.+]], {{.+}} 0, {{.+}} 0 |
| 1200 |
// CK21: [[ARRAY_DECAY:%.+]] = getelementptr inbounds [10 x [10 x ptr]], ptr [[ARRAY_IDX]], {{.+}} 0, {{.+}} 0 |
| 1201 |
// CK21: [[ARRAY_IDX_1:%.+]] = getelementptr inbounds nuw [10 x ptr], ptr [[ARRAY_DECAY]], {{.+}} 1 |
| 1202 |
// CK21: [[ARRAY_DECAY_2:%.+]] = getelementptr inbounds [10 x ptr], ptr [[ARRAY_IDX_1]], {{.+}} 0, {{.+}} 0 |
| 1203 |
// CK21: [[ARRAY_IDX_3:%.+]] = getelementptr inbounds {{.+}}, ptr [[ARRAY_DECAY_2]], {{.+}} 0 |
| 1204 |
// CK21: [[BP0:%.+]] = getelementptr inbounds [2 x ptr], ptr [[BP:%.+]], {{.+}} 0, {{.+}} 0 |
| 1205 |
// CK21: [[P0:%.+]] = getelementptr inbounds [2 x ptr], ptr [[P:%.+]], i{{.+}} 0, i{{.+}} 0 |
| 1206 |
// CK21: [[DIM_1:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 0 |
| 1207 |
// CK21: [[OFFSET_1:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 0 |
| 1208 |
// CK21: store i64 0, ptr [[OFFSET_1]], |
| 1209 |
// CK21: [[COUNT_1:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 1 |
| 1210 |
// CK21: store i64 2, ptr [[COUNT_1]], |
| 1211 |
// CK21: [[STRIDE_1:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 2 |
| 1212 |
// CK21: store i64 {{400|800}}, ptr [[STRIDE_1]], |
| 1213 |
// CK21: [[DIM_2:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 1 |
| 1214 |
// CK21: [[OFFSET_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 0 |
| 1215 |
// CK21: store i64 1, ptr [[OFFSET_2]], |
| 1216 |
// CK21: [[COUNT_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 1 |
| 1217 |
// CK21: store i64 3, ptr [[COUNT_2]], |
| 1218 |
// CK21: [[STRIDE_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 2 |
| 1219 |
// CK21: store i64 {{40|80}}, ptr [[STRIDE_2]], |
| 1220 |
// CK21: [[DIM_3:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 2 |
| 1221 |
// CK21: [[OFFSET_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 0 |
| 1222 |
// CK21: store i64 0, ptr [[OFFSET_3]], |
| 1223 |
// CK21: [[COUNT_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 1 |
| 1224 |
// CK21: store i64 4, ptr [[COUNT_3]], |
| 1225 |
// CK21: [[STRIDE_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 2 |
| 1226 |
// CK21: store i64 {{4|8}}, ptr [[STRIDE_3]], |
| 1227 |
// CK21: [[DIM_4:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 3 |
| 1228 |
// CK21: [[OFFSET_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 0 |
| 1229 |
// CK21: store i64 0, ptr [[OFFSET_4]], |
| 1230 |
// CK21: [[COUNT_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 1 |
| 1231 |
// CK21: store i64 1, ptr [[COUNT_4]], |
| 1232 |
// CK21: [[STRIDE_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 2 |
| 1233 |
// CK21: store i64 {{4|8}}, ptr [[STRIDE_4]], |
| 1234 |
// CK21-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 2, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[GEPSZ:%.+]], ptr [[MTYPE]]{{.+}}) |
| 1235 |
// CK21-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP]] |
| 1236 |
// CK21-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1237 |
// CK21-DAG: store ptr [[DIMS]], ptr [[PTRS1:%.+]], |
| 1238 |
// CK21-DAG: [[PTRS1]] = getelementptr inbounds [2 x ptr], ptr [[P]], i32 0, i32 1 |
| 1239 |
// CK21: ret void |
| 1240 |
#pragma omp target update to(dptr[0:2][1:3][0:4]) |
| 1241 |
} |
| 1242 |
}; |
| 1243 |
|
| 1244 |
void bar() { |
| 1245 |
ST st; |
| 1246 |
st.foo(); |
| 1247 |
} |
| 1248 |
|
| 1249 |
#endif |
| 1250 |
///==========================================================================/// |
| 1251 |
// RUN: %clang_cc1 -DCK22 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK22 --check-prefix CK22-64 |
| 1252 |
// RUN: %clang_cc1 -DCK22 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1253 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK22 --check-prefix CK22-64 |
| 1254 |
// RUN: %clang_cc1 -DCK22 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK22 --check-prefix CK22-32 |
| 1255 |
// RUN: %clang_cc1 -DCK22 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1256 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK22 --check-prefix CK22-32 |
| 1257 |
|
| 1258 |
// RUN: %clang_cc1 -DCK22 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1259 |
// RUN: %clang_cc1 -DCK22 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1260 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1261 |
// RUN: %clang_cc1 -DCK22 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1262 |
// RUN: %clang_cc1 -DCK22 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1263 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1264 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1265 |
#ifdef CK22 |
| 1266 |
|
| 1267 |
// CK22: [[STRUCT_DESCRIPTOR:%.+]] = type { i64, i64, i64 } |
| 1268 |
|
| 1269 |
// CK22: [[MSIZE:@.+]] = {{.+}}constant [1 x i64] [i64 4] |
| 1270 |
// CK22: [[MTYPE:@.+]] = {{.+}}constant [1 x i64] [i64 17592186044417] |
| 1271 |
|
| 1272 |
struct ST { |
| 1273 |
// CK22: _ZN2ST3fooEPA10_Pi |
| 1274 |
void foo(int *arr[5][10]) { |
| 1275 |
// CK22: [[DIMS:%.+]] = alloca [4 x [[STRUCT_DESCRIPTOR]]], |
| 1276 |
// CK22: [[ARRAY_IDX:%.+]] = getelementptr inbounds nuw [10 x ptr], ptr [[ARR:%.+]], {{.+}} 0 |
| 1277 |
// CK22: [[ARRAY_DECAY:%.+]] = getelementptr inbounds [10 x ptr], ptr [[ARRAY_IDX]], {{.+}} 0, {{.+}} 0 |
| 1278 |
// CK22: [[ARRAY_IDX_2:%.+]] = getelementptr inbounds nuw ptr, ptr [[ARRAY_DECAY:%.+]], {{.+}} 1 |
| 1279 |
// CK22: [[BP0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[BP:%.+]], {{.+}} 0, {{.+}} 0 |
| 1280 |
// CK22: [[P0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[P:%.+]], i{{.+}} 0, i{{.+}} 0 |
| 1281 |
// CK22: [[DIM_1:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 0 |
| 1282 |
// CK22: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 0 |
| 1283 |
// CK22: store i64 0, ptr [[OFFSET]], |
| 1284 |
// CK22: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 1 |
| 1285 |
// CK22: store i64 2, ptr [[COUNT]], |
| 1286 |
// CK22: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 2 |
| 1287 |
// CK22: store i64 200, ptr [[STRIDE]], |
| 1288 |
// CK22: [[DIM_2:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 1 |
| 1289 |
// CK22: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 0 |
| 1290 |
// CK22: store i64 1, ptr [[OFFSET]], |
| 1291 |
// CK22: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 1 |
| 1292 |
// CK22: store i64 3, ptr [[COUNT]], |
| 1293 |
// CK22: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 2 |
| 1294 |
// CK22: store i64 40, ptr [[STRIDE]], |
| 1295 |
// CK22: [[DIM_3:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 2 |
| 1296 |
// CK22: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 0 |
| 1297 |
// CK22: store i64 0, ptr [[OFFSET]], |
| 1298 |
// CK22: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 1 |
| 1299 |
// CK22: store i64 4, ptr [[COUNT]], |
| 1300 |
// CK22: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 2 |
| 1301 |
// CK22: store i64 4, ptr [[STRIDE]], |
| 1302 |
// CK22: [[DIM_4:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 3 |
| 1303 |
// CK22: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 0 |
| 1304 |
// CK22: store i64 0, ptr [[OFFSET]], |
| 1305 |
// CK22: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 1 |
| 1306 |
// CK22: store i64 1, ptr [[COUNT]], |
| 1307 |
// CK22: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 2 |
| 1308 |
// CK22: store i64 4, ptr [[STRIDE]], |
| 1309 |
// CK22-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[MSIZE]], ptr [[MTYPE]]{{.+}}) |
| 1310 |
// CK22-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP]] |
| 1311 |
// CK22-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1312 |
// CK22-DAG: [[PTRS:%.+]] = getelementptr inbounds [1 x ptr], ptr %.offload_ptrs, i32 0, i32 0 |
| 1313 |
// CK22-DAG: store ptr [[DIMS]], ptr [[PTRS]], |
| 1314 |
#pragma omp target update to(arr[0:2][1:3][0:4]) |
| 1315 |
} |
| 1316 |
}; |
| 1317 |
|
| 1318 |
void bar() { |
| 1319 |
ST st; |
| 1320 |
int *arr[5][10]; |
| 1321 |
st.foo(arr); |
| 1322 |
} |
| 1323 |
|
| 1324 |
#endif |
| 1325 |
///==========================================================================/// |
| 1326 |
// RUN: %clang_cc1 -DCK23 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK23 --check-prefix CK23-64 |
| 1327 |
// RUN: %clang_cc1 -DCK23 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1328 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK23 --check-prefix CK23-64 |
| 1329 |
// RUN: %clang_cc1 -DCK23 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK23 --check-prefix CK23-32 |
| 1330 |
// RUN: %clang_cc1 -DCK23 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1331 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK23 --check-prefix CK23-32 |
| 1332 |
|
| 1333 |
// RUN: %clang_cc1 -DCK23 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1334 |
// RUN: %clang_cc1 -DCK23 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1335 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1336 |
// RUN: %clang_cc1 -DCK23 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1337 |
// RUN: %clang_cc1 -DCK23 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1338 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1339 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1340 |
#ifdef CK23 |
| 1341 |
|
| 1342 |
// CK23: [[STRUCT_DESCRIPTOR:%.+]] = type { i64, i64, i64 } |
| 1343 |
|
| 1344 |
// CK23: [[MSIZE:@.+]] = {{.+}}constant [1 x i64] [i64 4] |
| 1345 |
// CK23: [[MTYPE:@.+]] = {{.+}}constant [1 x i64] [i64 17592186044417] |
| 1346 |
|
| 1347 |
// CK23: foo |
| 1348 |
void foo(int arg) { |
| 1349 |
float farr[5][5][5]; |
| 1350 |
// CK23: [[ARG_ADDR:%.+]] = alloca i32, |
| 1351 |
// CK23: [[DIMS:%.+]] = alloca [4 x [[STRUCT_DESCRIPTOR]]], |
| 1352 |
// CK23: [[ARRAY_IDX:%.+]] = getelementptr inbounds nuw [5 x [5 x [5 x float]]], ptr [[ARR:%.+]], {{.+}} 0, {{.+}} 0 |
| 1353 |
// CK23: [[ARRAY_DECAY:%.+]] = getelementptr inbounds [5 x [5 x float]], ptr [[ARRAY_IDX]], {{.+}} 0, {{.+}} 0 |
| 1354 |
// CK23: [[ARRAY_IDX_1:%.+]] = getelementptr inbounds nuw [5 x float], ptr [[ARRAY_DECAY]], {{.+}} |
| 1355 |
// CK23: [[ARRAY_DECAY_2:%.+]] = getelementptr inbounds [5 x float], ptr [[ARRAY_IDX_1]], {{.+}} 0, {{.+}} 0 |
| 1356 |
// CK23: [[ARRAY_IDX_2:%.+]] = getelementptr inbounds nuw float, ptr [[ARRAY_DECAY_2]], {{.+}} |
| 1357 |
// CK23: [[MUL:%.+]] = mul nuw i64 4, |
| 1358 |
// CK23: [[BP0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[BP:%.+]], {{.+}} 0, {{.+}} 0 |
| 1359 |
// CK23: store ptr [[ARR]], ptr [[BP0]], |
| 1360 |
// CK23: [[P0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[P:%.+]], {{.+}} 0, {{.+}} 0 |
| 1361 |
// CK23: store ptr [[ARRAY_IDX_2]], ptr [[P0]], |
| 1362 |
// CK23: [[DIM_1:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 0 |
| 1363 |
// CK23: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 0 |
| 1364 |
// CK23: store i64 0, ptr [[OFFSET]], |
| 1365 |
// CK23: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 1 |
| 1366 |
// CK23: store i64 2, ptr [[COUNT]], |
| 1367 |
// CK23: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 2 |
| 1368 |
// CK23: store i64 200, ptr [[STRIDE]], |
| 1369 |
// CK23: [[DIM_2:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 1 |
| 1370 |
// CK23: [[OFFSET_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 0 |
| 1371 |
// CK23: store i64 1, ptr [[OFFSET_2]], |
| 1372 |
// CK23: [[COUNT_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 1 |
| 1373 |
// CK23: store i64 2, ptr [[COUNT_2]], |
| 1374 |
// CK23: [[STRIDE_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 2 |
| 1375 |
// CK23: store i64 20, ptr [[STRIDE_2]], |
| 1376 |
// CK23: [[DIM_3:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 2 |
| 1377 |
// CK23: [[OFFSET_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 0 |
| 1378 |
// CK23: store i64 0, ptr [[OFFSET_3]], |
| 1379 |
// CK23: [[COUNT_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 1 |
| 1380 |
// CK23: store i64 2, ptr [[COUNT_3]], |
| 1381 |
// CK23: [[STRIDE_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 2 |
| 1382 |
// CK23: store i64 [[MUL]], ptr [[STRIDE_3]], |
| 1383 |
// CK23: [[DIM_4:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 3 |
| 1384 |
// CK23: [[OFFSET_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 0 |
| 1385 |
// CK23: store i64 0, ptr [[OFFSET_4]], |
| 1386 |
// CK23: [[COUNT_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 1 |
| 1387 |
// CK23: store i64 1, ptr [[COUNT_4]], |
| 1388 |
// CK23: [[STRIDE_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 2 |
| 1389 |
// CK23: store i64 4, ptr [[STRIDE_4]], |
| 1390 |
// CK23-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[MSIZE]], ptr [[MTYPE]]{{.+}}) |
| 1391 |
// CK23-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP]] |
| 1392 |
// CK23-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1393 |
// CK23-DAG: [[PTRS:%.+]] = getelementptr inbounds [1 x ptr], ptr %.offload_ptrs, i32 0, i32 0 |
| 1394 |
// CK23-DAG: store ptr [[DIMS]], ptr [[PTRS]], |
| 1395 |
#pragma omp target update to(farr[0:2:2][1:2:1][0:2:arg]) |
| 1396 |
} |
| 1397 |
|
| 1398 |
#endif |
| 1399 |
///==========================================================================/// |
| 1400 |
// RUN: %clang_cc1 -DCK24 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK24 --check-prefix CK24-64 |
| 1401 |
// RUN: %clang_cc1 -DCK24 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1402 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK24 --check-prefix CK24-64 |
| 1403 |
// RUN: %clang_cc1 -DCK24 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK24 --check-prefix CK24-32 |
| 1404 |
// RUN: %clang_cc1 -DCK24 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1405 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK24 --check-prefix CK24-32 |
| 1406 |
|
| 1407 |
// RUN: %clang_cc1 -DCK24 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1408 |
// RUN: %clang_cc1 -DCK24 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1409 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1410 |
// RUN: %clang_cc1 -DCK24 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1411 |
// RUN: %clang_cc1 -DCK24 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1412 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1413 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1414 |
#ifdef CK24 |
| 1415 |
|
| 1416 |
// CK24: [[STRUCT_DESCRIPTOR:%.+]] = type { i64, i64, i64 } |
| 1417 |
|
| 1418 |
// CK24: [[MSIZE:@.+]] = {{.+}}constant [1 x i64] [i64 4] |
| 1419 |
// CK24: [[MTYPE:@.+]] = {{.+}}constant [1 x i64] [i64 17592186044417] |
| 1420 |
|
| 1421 |
// CK24: foo |
| 1422 |
void foo(int arg) { |
| 1423 |
double darr[3][4][5]; |
| 1424 |
// CK24: [[DIMS:%.+]] = alloca [4 x [[STRUCT_DESCRIPTOR]]], |
| 1425 |
// CK24: [[ARRAY_IDX:%.+]] = getelementptr inbounds nuw [3 x [4 x [5 x double]]], ptr [[ARR:%.+]], {{.+}} 0, {{.+}} 0 |
| 1426 |
// CK24: [[ARRAY_DECAY:%.+]] = getelementptr inbounds [4 x [5 x double]], ptr [[ARRAY_IDX]], {{.+}} 0, {{.+}} 0 |
| 1427 |
// CK24: [[ARRAY_IDX_1:%.+]] = getelementptr inbounds nuw [5 x double], ptr [[ARRAY_DECAY]], {{.+}} |
| 1428 |
// CK24: [[ARRAY_DECAY_2:%.+]] = getelementptr inbounds [5 x double], ptr [[ARRAY_IDX_1]], {{.+}} 0, {{.+}} 0 |
| 1429 |
// CK24: [[ARRAY_IDX_2:%.+]] = getelementptr inbounds nuw double, ptr [[ARRAY_DECAY_2]], {{.+}} |
| 1430 |
// CK24: [[MUL:%.+]] = mul nuw i64 8, |
| 1431 |
// CK24: [[SUB:%.+]] = sub nuw i64 4, [[ARG:%.+]] |
| 1432 |
// CK24: [[LEN:%.+]] = udiv {{.+}} [[SUB]], 1 |
| 1433 |
// CK24: [[BP0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[BP:%.+]], {{.+}} 0, {{.+}} 0 |
| 1434 |
// CK24: store ptr [[ARR]], ptr [[BP0]], |
| 1435 |
// CK24: [[P0:%.+]] = getelementptr inbounds [1 x ptr], ptr [[P:%.+]], {{.+}} 0, {{.+}} 0 |
| 1436 |
// CK24: store ptr [[ARRAY_IDX_2]], ptr [[P0]], |
| 1437 |
// CK24: [[DIM_1:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 0 |
| 1438 |
// CK24: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 0 |
| 1439 |
// CK24: store i64 0, ptr [[OFFSET]], |
| 1440 |
// CK24: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 1 |
| 1441 |
// CK24: store i64 2, ptr [[COUNT]], |
| 1442 |
// CK24: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 2 |
| 1443 |
// CK24: store i64 320, ptr [[STRIDE]], |
| 1444 |
// CK24: [[DIM_2:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 1 |
| 1445 |
// CK24: [[OFFSET_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 0 |
| 1446 |
// CK24: store i64 [[ARG]], ptr [[OFFSET_2]], |
| 1447 |
// CK24: [[COUNT_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 1 |
| 1448 |
// CK24: store i64 [[LEN]], ptr [[COUNT_2]], |
| 1449 |
// CK24: [[STRIDE_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 2 |
| 1450 |
// CK24: store i64 40, ptr [[STRIDE_2]], |
| 1451 |
// CK24: [[DIM_3:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 2 |
| 1452 |
// CK24: [[OFFSET_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 0 |
| 1453 |
// CK24: store i64 0, ptr [[OFFSET_3]], |
| 1454 |
// CK24: [[COUNT_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 1 |
| 1455 |
// CK24: store i64 2, ptr [[COUNT_3]], |
| 1456 |
// CK24: [[STRIDE_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 2 |
| 1457 |
// CK24: store i64 [[MUL]], ptr [[STRIDE_3]], |
| 1458 |
// CK24: [[DIM_4:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 3 |
| 1459 |
// CK24: [[OFFSET_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 0 |
| 1460 |
// CK24: store i64 0, ptr [[OFFSET_4]], |
| 1461 |
// CK24: [[COUNT_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 1 |
| 1462 |
// CK24: store i64 1, ptr [[COUNT_4]], |
| 1463 |
// CK24: [[STRIDE_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 2 |
| 1464 |
// CK24: store i64 8, ptr [[STRIDE_4]], |
| 1465 |
// CK24-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[MSIZE]], ptr [[MTYPE]]{{.+}}) |
| 1466 |
// CK24-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP]] |
| 1467 |
// CK24-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1468 |
// CK24-DAG: [[PTRS:%.+]] = getelementptr inbounds [1 x ptr], ptr %.offload_ptrs, i32 0, i32 0 |
| 1469 |
// CK24-DAG: store ptr [[DIMS]], ptr [[PTRS]], |
| 1470 |
#pragma omp target update to(darr[0:2:2][arg: :1][:2:arg]) |
| 1471 |
} |
| 1472 |
#endif |
| 1473 |
///==========================================================================/// |
| 1474 |
// RUN: %clang_cc1 -DCK25 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK25 --check-prefix CK25-64 |
| 1475 |
// RUN: %clang_cc1 -DCK25 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1476 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK25 --check-prefix CK25-64 |
| 1477 |
// RUN: %clang_cc1 -DCK25 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK25 --check-prefix CK25-32 |
| 1478 |
// RUN: %clang_cc1 -DCK25 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1479 |
// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK25 --check-prefix CK25-32 |
| 1480 |
|
| 1481 |
// RUN: %clang_cc1 -DCK25 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1482 |
// RUN: %clang_cc1 -DCK25 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1483 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1484 |
// RUN: %clang_cc1 -DCK25 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1485 |
// RUN: %clang_cc1 -DCK25 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1486 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1487 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1488 |
#ifdef CK25 |
| 1489 |
|
| 1490 |
// CK25: [[STRUCT_DESCRIPTOR:%.+]] = type { i64, i64, i64 } |
| 1491 |
|
| 1492 |
// CK25: [[MSIZE:@.+]] = {{.+}}constant [3 x i64] [i64 4, i64 4, i64 3] |
| 1493 |
// CK25: [[MTYPE:@.+]] = {{.+}}constant [3 x i64] [i64 17592186044417, i64 1, i64 17592186044417] |
| 1494 |
|
| 1495 |
// CK25-LABEL: _Z3foo |
| 1496 |
void foo(int arg) { |
| 1497 |
int arr[3][4][5], x; |
| 1498 |
float farr[4][3]; |
| 1499 |
|
| 1500 |
// CK25: [[DIMS:%.+]] = alloca [4 x [[STRUCT_DESCRIPTOR]]], |
| 1501 |
// CK25: [[DIMS_2:%.+]] = alloca [3 x [[STRUCT_DESCRIPTOR]]], |
| 1502 |
// CK25: [[ARRAY_IDX:%.+]] = getelementptr inbounds nuw [3 x [4 x [5 x i32]]], ptr [[ARR:%.+]], {{.+}} 0, {{.+}} 0 |
| 1503 |
// CK25: [[ARRAY_DECAY:%.+]] = getelementptr inbounds [4 x [5 x i32]], ptr [[ARRAY_IDX]], {{.+}} 0, {{.+}} 0 |
| 1504 |
// CK25: [[ARRAY_IDX_1:%.+]] = getelementptr inbounds nuw [5 x i32], ptr [[ARRAY_DECAY]], {{.+}} |
| 1505 |
// CK25: [[ARRAY_DECAY_2:%.+]] = getelementptr inbounds [5 x i32], ptr [[ARRAY_IDX_1]], {{.+}} 0, {{.+}} 0 |
| 1506 |
// CK25: [[ARRAY_IDX_3:%.+]] = getelementptr inbounds nuw {{.+}}, ptr [[ARRAY_DECAY_2]], {{.+}} 1 |
| 1507 |
// CK25: [[LEN:%.+]] = sub nuw i64 4, [[ARG_ADDR:%.+]] |
| 1508 |
// CK25: [[ARRAY_IDX_4:%.+]] = getelementptr inbounds nuw [4 x [3 x float]], ptr [[FARR:%.+]], {{.+}} 0, {{.+}} 0 |
| 1509 |
// CK25: [[ARRAY_DECAY_5:%.+]] = getelementptr inbounds [3 x float], ptr [[ARRAY_IDX_4]], {{.+}} 0, {{.+}} 0 |
| 1510 |
// CK25: [[ARRAY_IDX_6:%.+]] = getelementptr inbounds nuw float, ptr [[ARRAY_DECAY_5:%.+]], {{.+}} 1 |
| 1511 |
// CK25: [[BP0:%.+]] = getelementptr inbounds [3 x ptr], ptr [[BP:%.+]], i{{.+}} 0, i{{.+}} 0 |
| 1512 |
// CK25: [[P0:%.+]] = getelementptr inbounds [3 x ptr], ptr [[P:%.+]], i{{.+}} 0, i{{.+}} 0 |
| 1513 |
// CK25: [[DIM_1:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 0 |
| 1514 |
// CK25: [[OFFSET:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 0 |
| 1515 |
// CK25: store i64 0, ptr [[OFFSET]], |
| 1516 |
// CK25: [[COUNT:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 1 |
| 1517 |
// CK25: store i64 2, ptr [[COUNT]], |
| 1518 |
// CK25: [[STRIDE:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_1]], {{.+}} 0, {{.+}} 2 |
| 1519 |
// CK25: store i64 80, ptr [[STRIDE]], |
| 1520 |
// CK25: [[DIM_2:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 1 |
| 1521 |
// CK25: [[OFFSET_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 0 |
| 1522 |
// CK25: store i64 [[ARG:%.+]], ptr [[OFFSET_2]], |
| 1523 |
// CK25: [[COUNT_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 1 |
| 1524 |
// CK25: store i64 [[LEN]], ptr [[COUNT_2]], |
| 1525 |
// CK25: [[STRIDE_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_2]], {{.+}} 0, {{.+}} 2 |
| 1526 |
// CK25: store i64 20, ptr [[STRIDE_2]], |
| 1527 |
// CK25: [[DIM_3:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 2 |
| 1528 |
// CK25: [[OFFSET_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 0 |
| 1529 |
// CK25: store i64 1, ptr [[OFFSET_3]], |
| 1530 |
// CK25: [[COUNT_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 1 |
| 1531 |
// CK25: store i64 4, ptr [[COUNT_3]], |
| 1532 |
// CK25: [[STRIDE_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_3]], {{.+}} 0, {{.+}} 2 |
| 1533 |
// CK25: store i64 4, ptr [[STRIDE_3]], |
| 1534 |
// CK25: [[DIM_4:%.+]] = getelementptr inbounds [4 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS]], {{.+}} 0, {{.+}} 3 |
| 1535 |
// CK25: [[OFFSET_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 0 |
| 1536 |
// CK25: store i64 0, ptr [[OFFSET_4]], |
| 1537 |
// CK25: [[COUNT_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 1 |
| 1538 |
// CK25: store i64 1, ptr [[COUNT_4]], |
| 1539 |
// CK25: [[STRIDE_4:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_4]], {{.+}} 0, {{.+}} 2 |
| 1540 |
// CK25: store i64 4, ptr [[STRIDE_4]], |
| 1541 |
// CK25: [[PTRS:%.+]] = getelementptr inbounds [3 x ptr], ptr %.offload_ptrs, i32 0, i32 0 |
| 1542 |
// CK25: store ptr [[DIMS]], ptr [[PTRS]], |
| 1543 |
// CK25: [[DIM_5:%.+]] = getelementptr inbounds [3 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS_2]], {{.+}} 0, {{.+}} 0 |
| 1544 |
// CK25: [[OFFSET_2_1:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_5]], {{.+}} 0, {{.+}} 0 |
| 1545 |
// CK25: store i64 0, ptr [[OFFSET_2_1]], |
| 1546 |
// CK25: [[COUNT_2_1:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_5]], {{.+}} 0, {{.+}} 1 |
| 1547 |
// CK25: store i64 2, ptr [[COUNT_2_1]], |
| 1548 |
// CK25: [[STRIDE_2_1:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_5]], {{.+}} 0, {{.+}} 2 |
| 1549 |
// CK25: store i64 12, ptr [[STRIDE_2_1]], |
| 1550 |
// CK25: [[DIM_6:%.+]] = getelementptr inbounds [3 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS_2]], {{.+}} 0, {{.+}} 1 |
| 1551 |
// CK25: [[OFFSET_2_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_6]], {{.+}} 0, {{.+}} 0 |
| 1552 |
// CK25: store i64 1, ptr [[OFFSET_2_2]], |
| 1553 |
// CK25: [[COUNT_2_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_6]], {{.+}} 0, {{.+}} 1 |
| 1554 |
// CK25: store i64 2, ptr [[COUNT_2_2]], |
| 1555 |
// CK25: [[STRIDE_2_2:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_6]], {{.+}} 0, {{.+}} 2 |
| 1556 |
// CK25: store i64 4, ptr [[STRIDE_2_2]], |
| 1557 |
// CK25: [[DIM_7:%.+]] = getelementptr inbounds [3 x [[STRUCT_DESCRIPTOR]]], ptr [[DIMS_2]], {{.+}} 0, {{.+}} 2 |
| 1558 |
// CK25: [[OFFSET_2_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_7]], {{.+}} 0, {{.+}} 0 |
| 1559 |
// CK25: store i64 0, ptr [[OFFSET_2_3]], |
| 1560 |
// CK25: [[COUNT_2_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_7]], {{.+}} 0, {{.+}} 1 |
| 1561 |
// CK25: store i64 1, ptr [[COUNT_2_3]], |
| 1562 |
// CK25: [[STRIDE_2_3:%.+]] = getelementptr inbounds nuw [[STRUCT_DESCRIPTOR]], ptr [[DIM_7]], {{.+}} 0, {{.+}} 2 |
| 1563 |
// CK25: store i64 4, ptr [[STRIDE_2_3]], |
| 1564 |
// CK25: [[PTRS_2:%.+]] = getelementptr inbounds [3 x ptr], ptr %.offload_ptrs, i32 0, i32 2 |
| 1565 |
// CK25: store ptr [[DIMS_2]], ptr [[PTRS_2]], |
| 1566 |
// CK25-DAG: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 3, ptr [[GEPBP:%.+]], ptr [[GEPP:%.+]], ptr [[MSIZE]], ptr [[MTYPE]]{{.+}}) |
| 1567 |
// CK25-DAG: [[GEPBP]] = getelementptr inbounds {{.+}}[[BP]] |
| 1568 |
// CK25-DAG: [[GEPP]] = getelementptr inbounds {{.+}}[[P:%[^,]+]] |
| 1569 |
|
| 1570 |
#pragma omp target update to(arr[0:2][arg:][1:4], x, farr[0:2][1:2]) |
| 1571 |
{ ++arg; } |
| 1572 |
} |
| 1573 |
|
| 1574 |
#endif |
| 1575 |
// RUN: %clang_cc1 -DCK26 -verify -Wno-vla -fopenmp -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK26 --check-prefix CK26-64 |
| 1576 |
// RUN: %clang_cc1 -DCK26 -fopenmp -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1577 |
// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK26 --check-prefix CK26-64 |
| 1578 |
// RUN: %clang_cc1 -DCK26 -fopenmp-version=51 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK26 --check-prefix CK26-32 |
| 1579 |
// RUN: %clang_cc1 -DCK26 -fopenmp -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1580 |
// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK26 --check-prefix CK26-32 |
| 1581 |
|
| 1582 |
// RUN: %clang_cc1 -DCK26 -verify -Wno-vla -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1583 |
// RUN: %clang_cc1 -DCK26 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s |
| 1584 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1585 |
// RUN: %clang_cc1 -DCK26 -verify -Wno-vla -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1586 |
// RUN: %clang_cc1 -DCK26 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s |
| 1587 |
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=51 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY19 %s |
| 1588 |
// SIMD-ONLY19-NOT: {{__kmpc|__tgt}} |
| 1589 |
#ifdef CK26 |
| 1590 |
void foo() { |
| 1591 |
int a[10]; |
| 1592 |
#pragma omp target update to(iterator(int it = 0:10) : a[it]) |
| 1593 |
// CK26-LABEL: define {{.+}}foo |
| 1594 |
// CK26: %[[ITER:[a-zA-Z0-9_]+]] = alloca i32, align 4 |
| 1595 |
// CK26: %[[LOAD2:.*]] = load i32, ptr %[[ITER]], align 4 |
| 1596 |
} |
| 1597 |
|
| 1598 |
void foo1() { |
| 1599 |
int a[10]; |
| 1600 |
#pragma omp target update from(iterator(int it = 0:10) : a[it]) |
| 1601 |
// CK26-LABEL: define {{.+}}foo1 |
| 1602 |
// CK26: %[[ITER:[a-zA-Z0-9_]+]] = alloca i32, align 4 |
| 1603 |
// CK26: %[[LOAD2:.*]] = load i32, ptr %[[ITER]], align 4 |
| 1604 |
} |
| 1605 |
|
| 1606 |
#endif |
| 1607 |
#endif |