[llvm] 6234752 - [test, LoopVectorize] Fix use of var defined in CHECK-NOT

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 02:01:58 PDT 2021


Author: Thomas Preud'homme
Date: 2021-04-09T10:01:57+01:00
New Revision: 623475248a9df38fe9c84316d8fdf6a23b7bf744

URL: https://github.com/llvm/llvm-project/commit/623475248a9df38fe9c84316d8fdf6a23b7bf744
DIFF: https://github.com/llvm/llvm-project/commit/623475248a9df38fe9c84316d8fdf6a23b7bf744.diff

LOG: [test, LoopVectorize] Fix use of var defined in CHECK-NOT

LLVM test Transforms/LoopVectorize/pr34681.ll tries to check for the
absence of a sequence of instructions with several CHECK-NOT with one of
those directives using a variable defined in another. However CHECK-NOT
are checked independently so that is using a variable defined in a
pattern that should not occur in the input.

This commit only checks for the absence of icmp ne 1 which rules out the
presence of the whole sequence and does not involve an undefined
variable.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D99582

Added: 
    

Modified: 
    llvm/test/Transforms/LoopVectorize/pr34681.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/LoopVectorize/pr34681.ll b/llvm/test/Transforms/LoopVectorize/pr34681.ll
index e93265e2ed5cd..9952336b276b1 100644
--- a/llvm/test/Transforms/LoopVectorize/pr34681.ll
+++ b/llvm/test/Transforms/LoopVectorize/pr34681.ll
@@ -23,8 +23,8 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 ; CHECK-LABEL: @foo1
 ; CHECK: for.body.lr.ph
 ; CHECK-NOT: %ident.check = icmp ne i32 %N, 1
-; CHECK-NOT: %[[TEST:[0-9]+]] = or i1 false, %ident.check
-; CHECK-NOT: br i1 %[[TEST]], label %scalar.ph, label %vector.ph
+; CHECK-NOT: %{{[0-9]+}} = or i1 false, %ident.check
+; CHECK-NOT: br i1 %{{[0-9]+}}, label %scalar.ph, label %vector.ph
 ; CHECK: vector.ph
 ; CHECK: vector.body
 ; CHECK: <4 x i32>
@@ -82,8 +82,8 @@ for.end:
 ; CHECK-LABEL: @foo2
 ; CHECK: for.body.lr.ph
 ; CHECK-NOT: %ident.check = icmp ne i16 %N, 1
-; CHECK-NOT: %[[TEST:[0-9]+]] = or i1 false, %ident.check
-; CHECK-NOT: br i1 %[[TEST]], label %scalar.ph, label %vector.ph
+; CHECK-NOT: %{{[0-9]+}} = or i1 false, %ident.check
+; CHECK-NOT: br i1 %{{[0-9]+}}, label %scalar.ph, label %vector.ph
 ; CHECK: vector.ph
 ; CHECK: vector.body
 ; CHECK: <4 x i32>


        


More information about the llvm-commits mailing list