From 623475248a9df38fe9c84316d8fdf6a23b7bf744 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sun, 28 Mar 2021 00:03:37 +0000 Subject: [PATCH] [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 --- llvm/test/Transforms/LoopVectorize/pr34681.ll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/test/Transforms/LoopVectorize/pr34681.ll b/llvm/test/Transforms/LoopVectorize/pr34681.ll index e93265e2ed5c..9952336b276b 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>