Skip to content

Commit 638d70b

Browse files
author
Thomas Preud'homme
committed
[test, AArch64] Fix use of var defined in CHECK-NOT
LLVM test CodeGen/AArch64/aarch64-tbz.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 removes the definition and uses of variable to check each line independently, making the check stronger than the current one. It also removes unnecessary regex match for labels. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D99602
1 parent 2fc761a commit 638d70b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/test/CodeGen/AArch64/aarch64-tbz.ll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
; CHECK-LABEL: test1
55
; CHECK: tbz {{w[0-9]}}, #3, {{.LBB0_3}}
66
; CHECK: tbz w[[REG1:[0-9]+]], #2, {{.LBB0_3}}
7-
; CHECK-NOT: and [[REG2:x[0-9]+]], x[[REG1]], #0x4
8-
; CHECK-NOT: cbz [[REG2]], {{.LBB0_3}}
7+
; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]], #0x4
8+
; CHECK-NOT: cbz x{{[0-9]+}}, .LBB0_3
99

1010
; CHECK: b
1111
define void @test1(i64 %A, i64 %B) {
@@ -28,8 +28,8 @@ if.end3: ; preds = %if.then2, %entry
2828
; CHECK-LABEL: test2
2929
; CHECK: cbz {{x[0-9]}}, {{.LBB1_3}}
3030
; CHECK: tbz w[[REG1:[0-9]+]], #3, {{.LBB1_3}}
31-
; CHECK-NOT: and [REG2:x[0-9]+], x[[REG1]], #0x08
32-
; CHECK-NOT: cbz [[REG2]], {{.LBB1_3}}
31+
; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]], #0x08
32+
; CHECK-NOT: cbz x{{[0-9]+}}, .LBB1_3
3333

3434
define void @test2(i64 %A, i64* readonly %B) #0 {
3535
entry:
@@ -52,8 +52,8 @@ if.end3: ; preds = %entry, %if.then2
5252
; CHECK-LABEL: test3
5353
; CHECK: tbz {{w[0-9]}}, #3, {{.LBB2_3}}
5454
; CHECK: tbz w[[REG1:[0-9]+]], #28, {{.LBB2_3}}
55-
; CHECK-NOT: and [[REG2:x[0-9]+]], x[[REG1]]
56-
; CHECK-NOT: cbz [[REG2]], {{.LBB2_3}}
55+
; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]]
56+
; CHECK-NOT: cbz x{{[0-9]+}}, .LBB2_3
5757
define void @test3(i64 %A, i64 %B) {
5858
entry:
5959
%shift = shl i64 1, 28
@@ -75,8 +75,8 @@ if.end3: ; preds = %if.then2, %entry
7575
; CHECK-LABEL: test4
7676
; CHECK: tbz {{w[0-9]}}, #3, {{.LBB3_3}}
7777
; CHECK: tbz [[REG1:x[0-9]+]], #35, {{.LBB3_3}}
78-
; CHECK-NOT: and [[REG2:x[0-9]+]], x[[REG1]]
79-
; CHECK-NOT: cbz [[REG2]], {{.LBB2_3}}
78+
; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]]
79+
; CHECK-NOT: cbz x{{[0-9]+}}, .LBB2_3
8080
define void @test4(i64 %A, i64 %B) {
8181
entry:
8282
%shift = shl i64 1, 35

0 commit comments

Comments
 (0)