[OpenCL, test] Fix use of undef FileCheck var

Clang test CodeGenOpenCL/fpmath.cl uses a variable defined in an earlier
CHECK-NOT directive. However, by definition the pattern in that
directive is not supposed to occur so no variable will be defined. This
commit solves the issue by using a regex match with the same regex as in
the definition. It also changes the definition into a regex match since
no variable is going to be defined.

Reviewed By: yaxunl

Differential Revision: https://reviews.llvm.org/D99857
This commit is contained in:
Thomas Preud'homme
2021-04-04 08:31:41 +01:00
parent 780a47285a
commit 828ec9e9e5

View File

@@ -9,7 +9,7 @@ float spscalardiv(float a, float b) {
// CHECK: @spscalardiv
// CHECK: fdiv{{.*}},
// NODIVOPT: !fpmath ![[MD:[0-9]+]]
// DIVOPT-NOT: !fpmath ![[MD:[0-9]+]]
// DIVOPT-NOT: !fpmath !{{[0-9]+}}
return a / b;
}
@@ -17,7 +17,7 @@ float4 spvectordiv(float4 a, float4 b) {
// CHECK: @spvectordiv
// CHECK: fdiv{{.*}},
// NODIVOPT: !fpmath ![[MD]]
// DIVOPT-NOT: !fpmath ![[MD]]
// DIVOPT-NOT: !fpmath !{{[0-9]+}}
return a / b;
}