summaryrefslogtreecommitdiff
path: root/test/OpenMP/target_data_codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/target_data_codegen.cpp')
-rw-r--r--test/OpenMP/target_data_codegen.cpp51
1 files changed, 28 insertions, 23 deletions
diff --git a/test/OpenMP/target_data_codegen.cpp b/test/OpenMP/target_data_codegen.cpp
index a149ba9332b9..7e5e267d13b6 100644
--- a/test/OpenMP/target_data_codegen.cpp
+++ b/test/OpenMP/target_data_codegen.cpp
@@ -45,8 +45,10 @@ void foo(int arg) {
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0
- // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[BP0]]
- // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[P0]]
+ // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x double]**
+ // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x double]**
+ // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[CBP0]]
+ // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[CP0]]
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1
@@ -71,10 +73,10 @@ void foo(int arg) {
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0
- // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]]
- // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]]
- // CK1-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8*
- // CK1-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8*
+ // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32**
+ // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32**
+ // CK1-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]]
+ // CK1-DAG: store i32* [[VAR0]], i32** [[CP0]]
// CK1: br label %[[IFEND:[^,]+]]
// CK1: [[IFELSE]]
@@ -103,11 +105,11 @@ void foo(int arg) {
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0
// CK1-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0
- // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]]
- // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]]
+ // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float**
+ // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float**
+ // CK1-DAG: store float* [[VAR0:%.+]], float** [[CBP0]]
+ // CK1-DAG: store float* [[VAR0]], float** [[CP0]]
// CK1-DAG: store i[[sz]] [[CSVAL0:%[^,]+]], i[[sz]]* [[S0]]
- // CK1-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8*
- // CK1-DAG: [[CPVAL0]] = bitcast float* [[VAR0]] to i8*
// CK1-DAG: [[CSVAL0]] = mul nuw i[[sz]] %{{[^,]+}}, 4
// CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1
@@ -128,15 +130,18 @@ void foo(int arg) {
// CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0
// CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0
- // CK1-DAG: store i8* bitcast ([[ST]]* @gb to i8*), i8** [[BP0]]
- // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[P0]]
+ // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]**
+ // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double***
+ // CK1-DAG: store [[ST]]* @gb, [[ST]]** [[CBP0]]
+ // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CP0]]
// CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1
// CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1
- // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[BP1]]
- // CK1-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]]
- // CK1-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%.+]] to i8*
+ // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double***
+ // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double**
+ // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CBP1]]
+ // CK1-DAG: store double* [[SEC1:%.+]], double** [[CP1]]
// CK1-DAG: [[SEC1]] = getelementptr inbounds {{.+}}double* [[SEC11:%[^,]+]], i{{.+}} 0
// CK1-DAG: [[SEC11]] = load double*, double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1),
@@ -191,19 +196,19 @@ int bar(int arg){
// CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0
// CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0
-// CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]]
-// CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]]
-// CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8*
-// CK2-DAG: [[CPVAL0]] = bitcast double** [[SEC0:%[^,]+]] to i8*
+// CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]**
+// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double***
+// CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]]
+// CK2-DAG: store double** [[SEC0:%.+]], double*** [[CP0]]
// CK2-DAG: [[SEC0]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1
// CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1
// CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1
-// CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]]
-// CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]]
-// CK2-DAG: [[CBPVAL1]] = bitcast double** [[SEC0]] to i8*
-// CK2-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%[^,]+]] to i8*
+// CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double***
+// CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double**
+// CK2-DAG: store double** [[SEC0]], double*** [[CBP1]]
+// CK2-DAG: store double* [[SEC1:%.+]], double** [[CP1]]
// CK2-DAG: [[SEC1]] = getelementptr inbounds {{.*}}double* [[SEC11:%[^,]+]], i{{.+}} 1
// CK2-DAG: [[SEC11]] = load double*, double** [[SEC111:%[^,]+]],
// CK2-DAG: [[SEC111]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1