1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
10 ; CHECK-LABEL: name: cbz_s32
12 ; CHECK-NEXT: successors: %bb.0(0x40000000), %bb.1(0x40000000)
13 ; CHECK-NEXT: liveins: $w0
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
16 ; CHECK-NEXT: CBZW [[COPY]], %bb.1
22 successors: %bb.0, %bb.1
24 %0:gpr(s32) = COPY $w0
25 %1:gpr(s32) = G_CONSTANT i32 0
26 %2:gpr(s32) = G_ICMP intpred(eq), %0, %1
39 ; CHECK-LABEL: name: cbz_s64
41 ; CHECK-NEXT: successors: %bb.0(0x40000000), %bb.1(0x40000000)
42 ; CHECK-NEXT: liveins: $x0
44 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
45 ; CHECK-NEXT: CBZX [[COPY]], %bb.1
51 successors: %bb.0, %bb.1
53 %0:gpr(s64) = COPY $x0
54 %1:gpr(s64) = G_CONSTANT i64 0
55 %2:gpr(s32) = G_ICMP intpred(eq), %0, %1
68 ; CHECK-LABEL: name: cbnz_s32
70 ; CHECK-NEXT: successors: %bb.0(0x40000000), %bb.1(0x40000000)
71 ; CHECK-NEXT: liveins: $w0
73 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
74 ; CHECK-NEXT: CBNZW [[COPY]], %bb.1
80 successors: %bb.0, %bb.1
82 %0:gpr(s32) = COPY $w0
83 %1:gpr(s32) = G_CONSTANT i32 0
84 %2:gpr(s32) = G_ICMP intpred(ne), %0, %1
97 ; CHECK-LABEL: name: cbnz_s64
99 ; CHECK-NEXT: successors: %bb.0(0x40000000), %bb.1(0x40000000)
100 ; CHECK-NEXT: liveins: $x0
102 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
103 ; CHECK-NEXT: CBNZX [[COPY]], %bb.1
104 ; CHECK-NEXT: B %bb.0
109 successors: %bb.0, %bb.1
111 %0:gpr(s64) = COPY $x0
112 %1:gpr(s64) = G_CONSTANT i64 0
113 %2:gpr(s32) = G_ICMP intpred(ne), %0, %1
120 name: test_rhs_inttoptr
123 regBankSelected: true
124 tracksRegLiveness: true
126 ; CHECK-LABEL: name: test_rhs_inttoptr
128 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
129 ; CHECK-NEXT: liveins: $x0
131 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
132 ; CHECK-NEXT: CBZX [[COPY]], %bb.2
135 ; CHECK-NEXT: successors: %bb.2(0x80000000)
137 ; CHECK-NEXT: STRXui $xzr, [[COPY]], 0 :: (store (s64))
140 ; CHECK-NEXT: RET_ReallyLR
142 successors: %bb.2, %bb.3
145 %0:gpr(p0) = COPY $x0
146 %2:gpr(s64) = G_CONSTANT i64 0
147 %1:gpr(p0) = G_INTTOPTR %2(s64)
148 %4:gpr(s32) = G_ICMP intpred(eq), %0(p0), %1
152 %5:gpr(s64) = G_CONSTANT i64 0
153 G_STORE %5(s64), %0(p0) :: (store (s64))
160 name: test_rhs_unknown
163 regBankSelected: true
164 tracksRegLiveness: true
166 ; CHECK-LABEL: name: test_rhs_unknown
168 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
169 ; CHECK-NEXT: liveins: $x0
171 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
172 ; CHECK-NEXT: [[LDRXui:%[0-9]+]]:gpr64common = LDRXui [[COPY]], 0 :: (load (s64))
173 ; CHECK-NEXT: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[LDRXui]], 42, 0, implicit-def $nzcv
174 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
177 ; CHECK-NEXT: successors: %bb.2(0x80000000)
179 ; CHECK-NEXT: STRXui $xzr, [[COPY]], 0 :: (store (s64))
182 ; CHECK-NEXT: RET_ReallyLR
184 successors: %bb.2, %bb.3
187 %0:gpr(p0) = COPY $x0
188 %2:gpr(s64) = G_CONSTANT i64 42
189 %4:gpr(s64) = G_CONSTANT i64 0
190 %1:gpr(s64) = G_LOAD %0(p0) :: (load (s64))
191 %5:gpr(s32) = G_ICMP intpred(eq), %1(s64), %2
195 %6:gpr(s64) = G_CONSTANT i64 0
196 G_STORE %6(s64), %0(p0) :: (store (s64))