thopre created this revision. thopre added reviewers: hliao, craig.topper, neil.hickey, yaxunl, baldrick. Herald added subscribers: ldrumm, Anastasia. thopre requested review of this revision. Herald added a project: clang.
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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D99857 Files: clang/test/CodeGenOpenCL/fpmath.cl Index: clang/test/CodeGenOpenCL/fpmath.cl =================================================================== --- clang/test/CodeGenOpenCL/fpmath.cl +++ clang/test/CodeGenOpenCL/fpmath.cl @@ -9,7 +9,7 @@ // 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 @@ // CHECK: @spvectordiv // CHECK: fdiv{{.*}}, // NODIVOPT: !fpmath ![[MD]] - // DIVOPT-NOT: !fpmath ![[MD]] + // DIVOPT-NOT: !fpmath !{{[0-9]+}} return a / b; }
Index: clang/test/CodeGenOpenCL/fpmath.cl =================================================================== --- clang/test/CodeGenOpenCL/fpmath.cl +++ clang/test/CodeGenOpenCL/fpmath.cl @@ -9,7 +9,7 @@ // 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 @@ // CHECK: @spvectordiv // CHECK: fdiv{{.*}}, // NODIVOPT: !fpmath ![[MD]] - // DIVOPT-NOT: !fpmath ![[MD]] + // DIVOPT-NOT: !fpmath !{{[0-9]+}} return a / b; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits