Skip to content

Commit 828ec9e

Browse files
author
Thomas Preud'homme
committed
[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
1 parent 780a472 commit 828ec9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/CodeGenOpenCL/fpmath.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ float spscalardiv(float a, float b) {
99
// CHECK: @spscalardiv
1010
// CHECK: fdiv{{.*}},
1111
// NODIVOPT: !fpmath ![[MD:[0-9]+]]
12-
// DIVOPT-NOT: !fpmath ![[MD:[0-9]+]]
12+
// DIVOPT-NOT: !fpmath !{{[0-9]+}}
1313
return a / b;
1414
}
1515

1616
float4 spvectordiv(float4 a, float4 b) {
1717
// CHECK: @spvectordiv
1818
// CHECK: fdiv{{.*}},
1919
// NODIVOPT: !fpmath ![[MD]]
20-
// DIVOPT-NOT: !fpmath ![[MD]]
20+
// DIVOPT-NOT: !fpmath !{{[0-9]+}}
2121
return a / b;
2222
}
2323

0 commit comments

Comments
 (0)