From 0a9f857bf500ac6478cf1354be4424a20482fd24 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sun, 28 Mar 2021 00:03:37 +0000 Subject: [PATCH] [test, HardwareLoops] Fix use of var defined in CHECK-NOT LLVM test Transforms/HardwareLoops/ARM/structure.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 llvm.loop.decrement.i32 which rules out the presence of the whole sequence and does not involve an undefined variable. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D99591 --- test/Transforms/HardwareLoops/ARM/structure.ll | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/Transforms/HardwareLoops/ARM/structure.ll b/test/Transforms/HardwareLoops/ARM/structure.ll index c611bc21779..236cc30eadd 100644 --- a/test/Transforms/HardwareLoops/ARM/structure.ll +++ b/test/Transforms/HardwareLoops/ARM/structure.ll @@ -60,8 +60,7 @@ do.end: ; CHECK: [[CMP:%[^ ]+]] = icmp ne i32 [[LOOP_DEC]], 0 ; CHECK: br i1 [[CMP]], label %while.body3.us, label %while.cond1.while.end_crit_edge.us -; CHECK-NOT: [[LOOP_DEC1:%[^ ]+]] = call i1 @llvm.loop.decrement.i32(i32 1) -; CHECK-NOT: br i1 [[LOOP_DEC1]], label %while.cond1.preheader.us, label %while.end7 +; CHECK-NOT: %{{[^ ]+}} = call i1 @llvm.loop.decrement.i32(i32 1) define void @nested(i32* nocapture %A, i32 %N) { entry: