[Hexagon, test] Fix use of undef FileCheck var
authorThomas Preud'homme <thomasp@graphcore.ai>
Thu, 1 Apr 2021 23:54:06 +0000 (00:54 +0100)
committerThomas Preud'homme <thomasp@graphcore.ai>
Fri, 2 Apr 2021 17:47:49 +0000 (18:47 +0100)
LLVM test CodeGen/Hexagon/hwloop3.ll tries to check for the absence of a
sequence of consecutive 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 merges the two CHECK-NOT into a single CHECK-NOT that
matches the content of two successive non-blank lines, thereby allowing
to preserve the intent of the test.

Reviewed By: bcahoon

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

llvm/test/CodeGen/Hexagon/hwloop3.ll

index 1135e06..21778f9 100644 (file)
@@ -3,8 +3,7 @@
 ; Remove the unconditional jump to following instruction.
 
 ; CHECK: endloop0
-; CHECK-NOT: jump [[L1:.]]
-; CHECK-NOT: [[L1]]
+; CHECK-NOT: jump [[L1:.]]{{.*[[:space:]]+}}[[L1]]
 
 define void @test(i32* nocapture %a, i32 %n) nounwind {
 entry: