[OpenMP, test] Fix uses of undef S*VAR FileCheck var

Fix the many cases of use of undefined SIVAR/SVAR/SFVAR in OpenMP
*private_codegen tests, due to a missing BLOCK directive to capture the
IR variable when it is declared. It also fixes a few typo in its use.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D99770
This commit is contained in:
Thomas Preud'homme 2021-04-01 17:12:14 +01:00
parent 51a07182b3
commit d222a07d30
30 changed files with 43 additions and 14 deletions

View File

@ -147,6 +147,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global i{{[0-9]+}} 1212,
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -110,6 +110,8 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] = {{(dso_local )?}}global double
// BLOCKS: [[SVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS: [[SFVAR:@.+]] = internal global float 0.000000e+00,
// BLOCKS-LABEL: @main
// BLOCKS: call {{.*}}void {{%.+}}(i8
^{

View File

@ -109,6 +109,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -137,7 +138,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store volatile double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -103,6 +103,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -117,7 +118,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -102,6 +102,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -123,7 +124,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store volatile double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -101,6 +101,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -115,7 +116,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -102,7 +102,7 @@ int foo(int n, double *ptr) {
// TCHECK-NOT: alloca double*,
// TCHECK: store double* [[PTR_IN]], double** [[PTR_ADDR]],
// TCHECK: [[PTR_IN_REF:%.+]] = load double*, double** [[PTR_ADDR]],
// TCHECK-NOT: store double* [[PTR_IN_REF]], double** [[PTR_PRIV]],
// TCHECK-NOT: store double* [[PTR_IN_REF]], double** {{%.+}},
return a;
}

View File

@ -237,6 +237,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global i{{[0-9]+}} 1212,
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call
// BLOCKS: call {{.*}}void {{%.+}}(i8

View File

@ -109,6 +109,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -137,7 +138,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -103,6 +103,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -117,7 +118,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -109,6 +109,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -137,7 +138,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -103,6 +103,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -117,7 +118,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -190,6 +190,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] = {{(dso_local )?}}global i{{[0-9]+}} 1212,
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call
// BLOCKS: call{{.*}} void {{%.+}}(i8

View File

@ -133,6 +133,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global i{{[0-9]+}} 1212,
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -148,6 +148,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global i{{[0-9]+}} 1212,
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] = {{(dso_local )?}}global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call {{.*}}void {{%.+}}(i8
^{

View File

@ -117,6 +117,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global i{{[0-9]+}} 1212,
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -87,6 +87,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] = {{(dso_local )?}}global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call {{.*}}void {{%.+}}(i8
^{

View File

@ -131,7 +131,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store volatile double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -102,6 +102,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -123,7 +124,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store volatile double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -103,6 +103,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -117,7 +118,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{

View File

@ -102,6 +102,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -123,7 +124,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store volatile double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -101,6 +101,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{
@ -115,7 +116,7 @@ int main() {
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS: store double 2.0{{.+}}, double*
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
// BLOCKS-NOT: [[ISVAR]]{{[[^:word:]]}}
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: store i{{[0-9]+}} 22, i{{[0-9]+}}*
// BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
// BLOCKS: ret

View File

@ -93,6 +93,7 @@ int main() {
return 0;
#elif defined(BLOCKS)
// BLOCKS: [[G:@.+]] ={{.*}} global double
// BLOCKS: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0,
// BLOCKS-LABEL: @main
// BLOCKS: call void {{%.+}}(i8
^{