1; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu | FileCheck %s
2
3@var32 = global i32 0
4@var64 = global i64 0
5
6define void @foo() {
7; CHECK-LABEL: foo:
8
9  %val1 = load volatile i32, i32* @var32
10  %tst1 = icmp eq i32 %val1, 0
11  br i1 %tst1, label %end, label %test2
12; CHECK: cbz {{w[0-9]+}}, .LBB
13
14test2:
15  %val2 = load volatile i32, i32* @var32
16  %tst2 = icmp ne i32 %val2, 0
17  br i1 %tst2, label %end, label %test3
18; CHECK: cbnz {{w[0-9]+}}, .LBB
19
20test3:
21  %val3 = load volatile i64, i64* @var64
22  %tst3 = icmp eq i64 %val3, 0
23  br i1 %tst3, label %end, label %test4
24; CHECK: cbz {{x[0-9]+}}, .LBB
25
26test4:
27  %val4 = load volatile i64, i64* @var64
28  %tst4 = icmp ne i64 %val4, 0
29  br i1 %tst4, label %end, label %test5
30; CHECK: cbnz {{x[0-9]+}}, .LBB
31
32test5:
33  store volatile i64 %val4, i64* @var64
34  ret void
35
36end:
37  ret void
38}
39