1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -run-pass=aarch64-ldst-opt -verify-machineinstrs %s -o - | FileCheck %s
--- |
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-none-linux-gnu"
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable vscale_range(1,16)
define dso_local void @test(ptr noundef captures(none) %data) local_unnamed_addr #0 {
entry:
br i1 undef, label %while.cond.preheader, label %for.body.preheader
for.body.preheader: ; preds = %entry
br label %for.body
while.cond.preheader.loopexit: ; preds = %for.body
br label %while.cond.preheader
while.cond.preheader: ; preds = %while.cond.preheader.loopexit, %entry
br i1 undef, label %while.body.lr.ph.lr.ph, label %for.cond28.preheader
while.body.lr.ph.lr.ph: ; preds = %while.cond.preheader
br label %while.body.preheader
for.body: ; preds = %for.body, %for.body.preheader
br i1 undef, label %for.body, label %while.cond.preheader.loopexit
for.cond28.preheader: ; preds = %if.then, %if.end, %while.cond.preheader
br i1 undef, label %for.end45, label %for.body36.preheader
for.body36.preheader: ; preds = %for.cond28.preheader
br label %for.body36
while.body: ; preds = %if.end, %while.body.preheader
br i1 undef, label %if.end, label %if.then
if.then: ; preds = %while.body
br i1 undef, label %while.body.preheader, label %for.cond28.preheader
while.body.preheader: ; preds = %if.then, %while.body.lr.ph.lr.ph
br label %while.body
if.end: ; preds = %while.body
br i1 undef, label %for.cond28.preheader, label %while.body
for.body36: ; preds = %for.body36.preheader, %for.body36
br i1 undef, label %for.body36, label %for.end45
for.end45: ; preds = %for.body36, %for.cond28.preheader
ret void
}
...
---
name: test
alignment: 16
exposesReturnsTwice: false
legalized: false
regBankSelected: false
selected: false
failedISel: false
tracksRegLiveness: true
hasWinCFI: false
noPhis: true
isSSA: false
noVRegs: true
hasFakeUses: false
callsEHReturn: false
callsUnwindInit: false
hasEHContTarget: false
hasEHScopes: false
hasEHFunclets: false
isOutlined: false
debugInstrRef: false
failsVerification: false
tracksDebugUserValues: true
registers: []
liveins:
- { reg: '$x0', virtual-reg: '' }
frameInfo:
isFrameAddressTaken: false
isReturnAddressTaken: false
hasStackMap: false
hasPatchPoint: false
stackSize: 0
offsetAdjustment: 0
maxAlignment: 1
adjustsStack: false
hasCalls: false
stackProtector: ''
functionContext: ''
maxCallFrameSize: 0
cvBytesOfCalleeSavedRegisters: 0
hasOpaqueSPAdjustment: false
hasVAStart: false
hasMustTailInVarArgFunc: false
hasTailCall: false
isCalleeSavedInfoValid: true
localFrameSize: 0
savePoint: ''
restorePoint: ''
fixedStack: []
stack: []
entry_values: []
callSites: []
debugValueSubstitutions: []
constants: []
machineFunctionInfo:
hasRedZone: false
body: |
; CHECK-LABEL: name: test
; CHECK: bb.0.entry:
; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.5(0x40000000)
; CHECK-NEXT: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w8 = LDRBBui renamable $x0, 4
; CHECK-NEXT: TBNZW killed renamable $w8, 3, %bb.5
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.1:
; CHECK-NEXT: successors: %bb.2(0x80000000)
; CHECK-NEXT: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w11 = MOVZWi 1, 0
; CHECK-NEXT: renamable $w9 = MOVZWi 1, 0
; CHECK-NEXT: renamable $w8 = MOVZWi 2, 0, implicit-def $x8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.2.while.cond.preheader:
; CHECK-NEXT: successors: %bb.3(0x60000000), %bb.8(0x20000000)
; CHECK-NEXT: liveins: $w9, $w11, $x0, $x8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: dead $wzr = SUBSWri renamable $w11, 299, 0, implicit-def $nzcv
; CHECK-NEXT: Bcc 8, %bb.8, implicit $nzcv
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.3.while.cond.preheader:
; CHECK-NEXT: successors: %bb.4(0x55555555), %bb.8(0x2aaaaaab)
; CHECK-NEXT: liveins: $w9, $x0, $x8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $x10 = nuw ADDXrx renamable $x0, renamable $w9, 18
; CHECK-NEXT: renamable $w11 = LDRWui renamable $x10, 0
; CHECK-NEXT: TBZW killed renamable $w11, 3, %bb.8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.4:
; CHECK-NEXT: successors: %bb.14(0x80000000)
; CHECK-NEXT: liveins: $w9, $x0, $x8, $x10
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w9 = ORRWrs $wzr, killed renamable $w9, 0, implicit-def $x9
; CHECK-NEXT: B %bb.14
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.5.for.body.preheader:
; CHECK-NEXT: successors: %bb.6(0x80000000)
; CHECK-NEXT: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $x10 = ADDXri renamable $x0, 8, 0
; CHECK-NEXT: renamable $w9 = MOVZWi 1, 0
; CHECK-NEXT: renamable $w12 = MOVZWi 2, 0, implicit-def $x12
; CHECK-NEXT: $x11 = ORRXrs $xzr, $x10, 0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.6.for.body:
; CHECK-NEXT: successors: %bb.7(0x7e000000), %bb.2(0x02000000)
; CHECK-NEXT: liveins: $w9, $x0, $x10, $x11, $x12
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w8 = LDURWi renamable $x11, -4
; CHECK-NEXT: STRWui killed renamable $w8, renamable $x11, 0
; CHECK-NEXT: renamable $x8 = nuw nsw ADDXri renamable $x12, 2, 0
; CHECK-NEXT: renamable $w9 = nuw nsw ADDWri killed renamable $w9, 1, 0
; CHECK-NEXT: early-clobber renamable $x10, renamable $w13 = LDRBBpost killed renamable $x10, 4
; CHECK-NEXT: TBZW killed renamable $w13, 3, %bb.2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.7.for.body:
; CHECK-NEXT: successors: %bb.6(0x7df7df7e), %bb.2(0x02082082)
; CHECK-NEXT: liveins: $w9, $x0, $x8, $x10, $x11, $x12
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $x11 = ADDXri killed renamable $x11, 8, 0
; CHECK-NEXT: dead $xzr = SUBSXri killed renamable $x12, 598, 0, implicit-def $nzcv
; CHECK-NEXT: $x12 = ORRXrs $xzr, $x8, 0
; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
; CHECK-NEXT: B %bb.6
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.8.for.cond28.preheader:
; CHECK-NEXT: successors: %bb.12(0x40000000), %bb.9(0x40000000)
; CHECK-NEXT: liveins: $x0, $x8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w9 = LDRBBui renamable $x0, 4
; CHECK-NEXT: TBZW killed renamable $w9, 3, %bb.12
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.9.for.body36.preheader:
; CHECK-NEXT: successors: %bb.10(0x80000000)
; CHECK-NEXT: liveins: $x0, $x8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w9 = MOVZWi 8, 0, implicit-def $x9
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.10.for.body36:
; CHECK-NEXT: successors: %bb.11(0x7e000000), %bb.12(0x02000000)
; CHECK-NEXT: liveins: $x0, $x8, $x9
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w10 = SUBWri renamable $w8, 1, 0
; CHECK-NEXT: renamable $w10 = LDRWroW renamable $x0, killed renamable $w10, 0, 1
; CHECK-NEXT: early-clobber renamable $x8 = STRWpost killed renamable $w10, renamable $x8, 2
; CHECK-NEXT: renamable $w10 = LDRBBroX renamable $x0, renamable $x9, 0, 0
; CHECK-NEXT: TBZW killed renamable $w10, 3, %bb.12
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.11.for.body36:
; CHECK-NEXT: successors: %bb.10(0x7df7df7e), %bb.12(0x02082082)
; CHECK-NEXT: liveins: $x0, $x8, $x9
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: dead $xzr = SUBSXri renamable $x9, 1200, 0, implicit-def $nzcv
; CHECK-NEXT: renamable $x9 = nuw nsw ADDXri killed renamable $x9, 4, 0
; CHECK-NEXT: Bcc 1, %bb.10, implicit $nzcv
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.12.for.end45:
; CHECK-NEXT: RET undef $lr
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.13.if.end:
; CHECK-NEXT: successors: %bb.8(0x04000000), %bb.14(0x7c000000)
; CHECK-NEXT: liveins: $x0, $x8, $x9, $x10
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w11 = LDRBBui renamable $x10, 0
; CHECK-NEXT: TBZW killed renamable $w11, 3, %bb.8
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.14.while.body:
; CHECK-NEXT: successors: %bb.13(0x7c000000), %bb.15(0x04000000)
; CHECK-NEXT: liveins: $x0, $x8, $x9, $x10
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w11 = SUBWri renamable $w8, 1, 0
; CHECK-NEXT: renamable $w11 = LDRWroW renamable $x0, killed renamable $w11, 0, 1
; CHECK-NEXT: early-clobber renamable $x8 = STRWpost renamable $w11, renamable $x8, 2
; CHECK-NEXT: TBZW killed renamable $w11, 2, %bb.13
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.15.if.then:
; CHECK-NEXT: successors: %bb.16(0x7e000000), %bb.8(0x02000000)
; CHECK-NEXT: liveins: $x0, $x9
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $w8 = LDRWui renamable $x0, 4
; CHECK-NEXT: STRWroX killed renamable $w8, renamable $x0, renamable $x9, 0, 1
; CHECK-NEXT: renamable $w8 = MOVZWi 3, 0, implicit-def $x8
; CHECK-NEXT: dead $xzr = SUBSXri renamable $x9, 298, 0, implicit-def $nzcv
; CHECK-NEXT: Bcc 8, %bb.8, implicit $nzcv
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.16.if.then:
; CHECK-NEXT: successors: %bb.14(0x7df7df7e), %bb.8(0x02082082)
; CHECK-NEXT: liveins: $x0, $x8, $x9
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: renamable $x9 = nuw nsw ADDXri killed renamable $x9, 1, 0
; CHECK-NEXT: renamable $x10 = nuw ADDXrs renamable $x0, renamable $x9, 2
; CHECK-NEXT: renamable $w11 = LDRWui renamable $x10, 0
; CHECK-NEXT: TBZW killed renamable $w11, 3, %bb.8
; CHECK-NEXT: B %bb.14
bb.0.entry:
successors: %bb.1(0x40000000), %bb.5(0x40000000)
liveins: $x0
renamable $w8 = LDRBBui renamable $x0, 4
TBNZW killed renamable $w8, 3, %bb.5
bb.1:
successors: %bb.2(0x80000000)
liveins: $x0
renamable $w11 = MOVZWi 1, 0
renamable $w9 = MOVZWi 1, 0
renamable $w8 = MOVZWi 2, 0, implicit-def $x8
bb.2.while.cond.preheader:
successors: %bb.3(0x60000000), %bb.8(0x20000000)
liveins: $w9, $w11, $x0, $x8
dead $wzr = SUBSWri renamable $w11, 299, 0, implicit-def $nzcv
Bcc 8, %bb.8, implicit $nzcv
bb.3.while.cond.preheader:
successors: %bb.4(0x55555555), %bb.8(0x2aaaaaab)
liveins: $w9, $x0, $x8
renamable $x10 = nuw ADDXrx renamable $x0, renamable $w9, 18
renamable $w11 = LDRWui renamable $x10, 0
TBZW killed renamable $w11, 3, %bb.8
bb.4:
successors: %bb.14(0x80000000)
liveins: $w9, $x0, $x8, $x10
renamable $w9 = ORRWrs $wzr, killed renamable $w9, 0, implicit-def $x9
B %bb.14
bb.5.for.body.preheader:
successors: %bb.6(0x80000000)
liveins: $x0
renamable $x10 = ADDXri renamable $x0, 8, 0
renamable $w9 = MOVZWi 1, 0
renamable $w12 = MOVZWi 2, 0, implicit-def $x12
$x11 = ORRXrs $xzr, $x10, 0
bb.6.for.body:
successors: %bb.7(0x7e000000), %bb.2(0x02000000)
liveins: $w9, $x0, $x10, $x11, $x12
renamable $w8 = LDURWi renamable $x11, -4
STRWui killed renamable $w8, renamable $x11, 0
renamable $x8 = nuw nsw ADDXri renamable $x12, 2, 0
renamable $w9 = nuw nsw ADDWri killed renamable $w9, 1, 0
early-clobber renamable $x10, renamable $w13 = LDRBBpost killed renamable $x10, 4
TBZW killed renamable $w13, 3, %bb.2
bb.7.for.body:
successors: %bb.6(0x7df7df7e), %bb.2(0x02082082)
liveins: $w9, $x0, $x8, $x10, $x11, $x12
renamable $x11 = ADDXri killed renamable $x11, 8, 0
dead $xzr = SUBSXri killed renamable $x12, 598, 0, implicit-def $nzcv
$x12 = ORRXrs $xzr, $x8, 0
Bcc 0, %bb.2, implicit $nzcv
B %bb.6
bb.8.for.cond28.preheader:
successors: %bb.12(0x40000000), %bb.9(0x40000000)
liveins: $x0, $x8
renamable $w9 = LDRBBui renamable $x0, 4
TBZW killed renamable $w9, 3, %bb.12
bb.9.for.body36.preheader:
successors: %bb.10(0x80000000)
liveins: $x0, $x8
renamable $w9 = MOVZWi 8, 0, implicit-def $x9
bb.10.for.body36:
successors: %bb.11(0x7e000000), %bb.12(0x02000000)
liveins: $x0, $x8, $x9
renamable $w10 = SUBWri renamable $w8, 1, 0
renamable $w10 = LDRWroW renamable $x0, killed renamable $w10, 0, 1
STRWui killed renamable $w10, renamable $x8, 0
renamable $w10 = LDRBBroX renamable $x0, renamable $x9, 0, 0
TBZW killed renamable $w10, 3, %bb.12
bb.11.for.body36:
successors: %bb.10(0x7df7df7e), %bb.12(0x02082082)
liveins: $x0, $x8, $x9
renamable $x8 = ADDXri renamable $x8, 2, 0, implicit killed $x8, implicit-def $x8
dead $xzr = SUBSXri renamable $x9, 1200, 0, implicit-def $nzcv
renamable $x9 = nuw nsw ADDXri killed renamable $x9, 4, 0
Bcc 1, %bb.10, implicit $nzcv
bb.12.for.end45:
RET undef $lr
bb.13.if.end:
successors: %bb.8(0x04000000), %bb.14(0x7c000000)
liveins: $x0, $x8, $x9, $x10
renamable $x8 = ADDXri renamable $x8, 2, 0, implicit killed $x8, implicit-def $x8
renamable $w11 = LDRBBui renamable $x10, 0
TBZW killed renamable $w11, 3, %bb.8
bb.14.while.body:
successors: %bb.13(0x7c000000), %bb.15(0x04000000)
liveins: $x0, $x8, $x9, $x10
renamable $w11 = SUBWri renamable $w8, 1, 0
renamable $w11 = LDRWroW renamable $x0, killed renamable $w11, 0, 1
STRWui renamable $w11, renamable $x8, 0
TBZW killed renamable $w11, 2, %bb.13
bb.15.if.then:
successors: %bb.16(0x7e000000), %bb.8(0x02000000)
liveins: $x0, $x9
renamable $w8 = LDRWui renamable $x0, 4
STRWroX killed renamable $w8, renamable $x0, renamable $x9, 0, 1
renamable $w8 = MOVZWi 3, 0, implicit-def $x8
dead $xzr = SUBSXri renamable $x9, 298, 0, implicit-def $nzcv
Bcc 8, %bb.8, implicit $nzcv
bb.16.if.then:
successors: %bb.14(0x7df7df7e), %bb.8(0x02082082)
liveins: $x0, $x8, $x9
renamable $x9 = nuw nsw ADDXri killed renamable $x9, 1, 0
renamable $x10 = nuw ADDXrs renamable $x0, renamable $x9, 2
renamable $w11 = LDRWui renamable $x10, 0
TBZW killed renamable $w11, 3, %bb.8
B %bb.14
...
|