Author: Thomas Preud'homme
Date: 2021-04-05T21:11:39+01:00
New Revision: 828ec9e9e5da8a2e7d1bfa523b9a712658ee6ffc

URL: 
https://github.com/llvm/llvm-project/commit/828ec9e9e5da8a2e7d1bfa523b9a712658ee6ffc
DIFF: 
https://github.com/llvm/llvm-project/commit/828ec9e9e5da8a2e7d1bfa523b9a712658ee6ffc.diff

LOG: [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

Added: 
    

Modified: 
    clang/test/CodeGenOpenCL/fpmath.cl

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenOpenCL/fpmath.cl 
b/clang/test/CodeGenOpenCL/fpmath.cl
index 36cb8e68ea7c..374b58c9bc04 100644
--- a/clang/test/CodeGenOpenCL/fpmath.cl
+++ b/clang/test/CodeGenOpenCL/fpmath.cl
@@ -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;
 }
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to