llvm/llvm/test/CodeGen/AArch64/ldrpre-ldr-merge.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
# RUN: llc -o - %s -mtriple=aarch64 -mcpu=cortex-a55 -lsr-preferred-addressing-mode=preindexed -stop-after=aarch64-ldst-opt | FileCheck %s

---
name:            1-ldrwpre-ldrwui-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$w0' }
  - { reg: '$w1' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $w0, $w1, $x1
    ; CHECK-LABEL: name: 1-ldrwpre-ldrwui-merge
    ; CHECK: liveins: $w0, $w1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $w0, renamable $w2 = LDPWpre renamable $x1, 5 :: (load (s32))
    ; CHECK-NEXT: STPWi renamable $w0, killed renamable $w2, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $w0 = LDRWpre killed renamable $x1, 20 :: (load (s32))
    renamable $w2 = LDRWui renamable $x1, 1 :: (load (s32))
    STRWui killed renamable $w0, renamable $x1, 0 :: (store (s32))
    STRWui killed renamable $w2, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            2-ldrxpre-ldrxui-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$x2' }
  - { reg: '$x3' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x2, $x3, $x1
    ; CHECK-LABEL: name: 2-ldrxpre-ldrxui-merge
    ; CHECK: liveins: $x1, $x2, $x3
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $x2, renamable $x3 = LDPXpre renamable $x1, 3 :: (load (s64))
    ; CHECK-NEXT: STPXi renamable $x2, renamable $x3, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $x2 = LDRXpre killed renamable $x1, 24 :: (load (s64))
    renamable $x3 = LDRXui renamable $x1, 1 :: (load (s64))
    STRXui killed renamable $x2, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x3, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            3-ldrspre-ldrsui-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$s0' }
  - { reg: '$s1' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $s0, $s1, $x1
    ; CHECK-LABEL: name: 3-ldrspre-ldrsui-merge
    ; CHECK: liveins: $s0, $s1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $s0, renamable $s1 = LDPSpre renamable $x1, 3 :: (load (s32))
    ; CHECK-NEXT: STPSi renamable $s0, renamable $s1, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $s0 = LDRSpre killed renamable $x1, 12 :: (load (s32))
    renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    STRSui killed renamable $s0, renamable $x1, 0 :: (store (s32))
    STRSui killed renamable $s1, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            4-ldrqdre-ldrdui-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$d0' }
  - { reg: '$d1' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $d0, $d1, $x1
    ; CHECK-LABEL: name: 4-ldrqdre-ldrdui-merge
    ; CHECK: liveins: $d0, $d1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $d0, renamable $d1 = LDPDpre renamable $x1, 16 :: (load (s64))
    ; CHECK-NEXT: STPDi renamable $d0, renamable $d1, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $d0 = LDRDpre killed renamable $x1, 128 :: (load (s64))
    renamable $d1 = LDRDui renamable $x1, 1 :: (load (s64))
    STRDui killed renamable $d0, renamable $x1, 0 :: (store (s64))
    STRDui killed renamable $d1, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            5-ldrqpre-ldrqui-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 5-ldrqpre-ldrqui-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $q0, renamable $q1 = LDPQpre renamable $x1, 3 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 48 :: (load (s128))
    renamable $q1 = LDRQui renamable $x1, 1 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            6-ldrqui-ldrqpre-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 6-ldrqui-ldrqpre-no-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: renamable $q1 = LDRQui renamable $x1, 1 :: (load (s128))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q0 = LDRQpre renamable $x1, 48, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    renamable $q1 = LDRQui renamable $x1, 1 :: (load (s128))
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 48 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            7-ldrqpre-ldrqui-max-offset-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 7-ldrqpre-ldrqui-max-offset-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $q0, renamable $q1 = LDPQpre renamable $x1, 15 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 240 :: (load (s128))
    renamable $q1 = LDRQui renamable $x1, 1 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            8-ldrqpre-ldrqui-min-offset-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 8-ldrqpre-ldrqui-min-offset-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $q0, renamable $q1 = LDPQpre renamable $x1, -16 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, -256 :: (load (s128))
    renamable $q1 = LDRQui renamable $x1, 1 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            9-ldrspre-ldrsui-mod-base-reg-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$s0' }
  - { reg: '$s1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $s0, $s1, $x0, $x1
    ; CHECK-LABEL: name: 9-ldrspre-ldrsui-mod-base-reg-no-merge
    ; CHECK: liveins: $s0, $s1, $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: dead early-clobber renamable $x1, renamable $s0 = LDRSpre renamable $x1, 12, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: renamable $x1 = LDRXui renamable $x0, 1 :: (load (s64))
    ; CHECK-NEXT: renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    ; CHECK-NEXT: STPSi renamable $s0, renamable $s1, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $s0 = LDRSpre killed renamable $x1, 12 :: (load (s32))
    renamable $x1 = LDRXui renamable $x0, 1 :: (load (s64))
    renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    STRSui killed renamable $s0, renamable $x1, 0 :: (store (s32))
    STRSui killed renamable $s1, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            10-ldrspre-ldrsui-used-base-reg-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$s0' }
  - { reg: '$s1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $s0, $s1, $x0, $x1
    ; CHECK-LABEL: name: 10-ldrspre-ldrsui-used-base-reg-no-merge
    ; CHECK: liveins: $s0, $s1, $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $s0 = LDRSpre renamable $x1, 12, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: renamable $x0 = LDRXui renamable $x1, 1 :: (load (s64))
    ; CHECK-NEXT: STRXui renamable $x0, renamable $x0, 1 :: (store (s64))
    ; CHECK-NEXT: renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    ; CHECK-NEXT: STPSi renamable $s0, renamable $s1, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $s0 = LDRSpre killed renamable $x1, 12 :: (load (s32))
    renamable $x0 = LDRXui renamable $x1, 1 :: (load (s64))
    STRXui killed renamable $x0, renamable $x0, 1 :: (store (s64))
    renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    STRSui killed renamable $s0, renamable $x1, 0 :: (store (s32))
    STRSui killed renamable $s1, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            11-ldrqpre-ldrqpre-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 11-ldrqpre-ldrqpre-no-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $q0 = LDRQpre renamable $x1, 48, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $q1 = LDRQpre renamable $x1, 1, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $q0 = LDRQpre renamable $x1, 16, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $q1 = LDRQpre renamable $x1, 12, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q0 = LDRQpre renamable $x1, 16, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q1 = LDRQpre renamable $x1, 16, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 48 :: (load (s128))
    early-clobber renamable $x1, renamable $q1 = LDRQpre killed renamable $x1, 1  :: (load (s128))
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 16 :: (load (s128))
    early-clobber renamable $x1, renamable $q1 = LDRQpre killed renamable $x1, 12  :: (load (s128))
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 16 :: (load (s128))
    early-clobber renamable $x1, renamable $q1 = LDRQpre killed renamable $x1, 16  :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            12-ldrspre-ldrsui-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$s0' }
  - { reg: '$s1' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $s0, $s1, $x1


    ; CHECK-LABEL: name: 12-ldrspre-ldrsui-no-merge
    ; CHECK: liveins: $s0, $s1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $s0 = LDRSpre renamable $x1, 12, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: renamable $s1 = LDRSui renamable $x1, 2 :: (load (s32))
    ; CHECK-NEXT: STPSi renamable $s0, renamable $s1, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $s0 = LDRSpre killed renamable $x1, 12 :: (load (s32))
    renamable $s1 = LDRSui renamable $x1, 2 :: (load (s32))
    STRSui killed renamable $s0, renamable $x1, 0 :: (store (s32))
    STRSui killed renamable $s1, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            13-ldrqpre-ldrdui-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$d1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $d1, $x1
    ; CHECK-LABEL: name: 13-ldrqpre-ldrdui-no-merge
    ; CHECK: liveins: $d1, $q0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q0 = LDRQpre renamable $x1, 32, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: renamable $d1 = LDRDui renamable $x1, 1 :: (load (s64))
    ; CHECK-NEXT: STRQui renamable $q0, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: STRDui renamable $d1, renamable $x1, 1 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 32 :: (load (s128))
    renamable $d1 = LDRDui renamable $x1, 1 :: (load (s64))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRDui killed renamable $d1, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            14-ldrqpre-strqui-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 14-ldrqpre-strqui-no-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q0 = LDRQpre renamable $x1, 32, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: STRQui renamable $q0, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 32 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    RET undef $lr
...


---
name:            15-ldrqpre-ldrqui-same-dst-reg-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $x1
    ; CHECK-LABEL: name: 15-ldrqpre-ldrqui-same-dst-reg-no-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, dead $q2, renamable $q0 = LDPQpre renamable $x1, 2 :: (load (s128))
    ; CHECK-NEXT: STRQui renamable $q0, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 32 :: (load (s128))
    renamable $q0 = LDRQui renamable $x1, 1 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    RET undef $lr
...


---
name:            16-ldrqpre-ldrqui-diff-base-reg-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$x2' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1, $x2
    ; CHECK-LABEL: name: 16-ldrqpre-ldrqui-diff-base-reg-no-merge
    ; CHECK: liveins: $q0, $q1, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q0 = LDRQpre renamable $x1, 32, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: renamable $q1 = LDRQui renamable $x2, 1 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 32 :: (load (s128))
    renamable $q1 = LDRQui renamable $x2, 1 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            17-ldrqpre-ldurqi-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 17-ldrqpre-ldurqi-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $q0, renamable $q1 = LDPQpre renamable $x1, 2 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 32 :: (load (s128))
    renamable $q1 = LDURQi renamable $x1, 16 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            18-ldrqpre-ldurqi-no-merge
alignment:       4
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$q0' }
  - { reg: '$q1' }
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $q0, $q1, $x1
    ; CHECK-LABEL: name: 18-ldrqpre-ldurqi-no-merge
    ; CHECK: liveins: $q0, $q1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $q0 = LDRQpre renamable $x1, 32, implicit $w1 :: (load (s128))
    ; CHECK-NEXT: renamable $q1 = LDURQi renamable $x1, 1 :: (load (s128))
    ; CHECK-NEXT: STPQi renamable $q0, renamable $q1, renamable $x1, 0 :: (store (s128))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $q0 = LDRQpre killed renamable $x1, 32 :: (load (s128))
    renamable $q1 = LDURQi renamable $x1, 1 :: (load (s128))
    STRQui killed renamable $q0, renamable $x1, 0 :: (store (s128))
    STRQui killed renamable $q1, renamable $x1, 1 :: (store (s128))
    RET undef $lr
...


---
name:            19-ldrspre-ldrsui-max-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$s0' }
  - { reg: '$s1' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $s0, $s1, $x1
    ; CHECK-LABEL: name: 19-ldrspre-ldrsui-max-merge
    ; CHECK: liveins: $s0, $s1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $s0, renamable $s1 = LDPSpre renamable $x1, 63 :: (load (s32))
    ; CHECK-NEXT: STPSi renamable $s0, renamable $s1, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $s0 = LDRSpre killed renamable $x1, 252 :: (load (s32))
    renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    STRSui killed renamable $s0, renamable $x1, 0 :: (store (s32))
    STRSui killed renamable $s1, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            20-ldrspre-ldrsui-unaligned-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x1' }
  - { reg: '$s0' }
  - { reg: '$s1' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $s0, $s1, $x1
    ; CHECK-LABEL: name: 20-ldrspre-ldrsui-unaligned-no-merge
    ; CHECK: liveins: $s0, $s1, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $s0 = LDRSpre renamable $x1, 251, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    ; CHECK-NEXT: STPSi renamable $s0, renamable $s1, renamable $x1, 0 :: (store (s32))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $s0 = LDRSpre killed renamable $x1, 251 :: (load (s32))
    renamable $s1 = LDRSui renamable $x1, 1 :: (load (s32))
    STRSui killed renamable $s0, renamable $x1, 0 :: (store (s32))
    STRSui killed renamable $s1, renamable $x1, 1 :: (store (s32))
    RET undef $lr
...


---
name:            21-ldrswpre-ldrswui-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 21-ldrswpre-ldrswui-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $x0, renamable $x2 = LDPSWpre renamable $x1, 10 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 40 :: (load (s32))
    renamable $x2 = LDRSWui renamable $x1, 1 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            22-ldrswpre-ldurswi-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 22-ldrswpre-ldurswi-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber $x1, renamable $x0, renamable $x2 = LDPSWpre renamable $x1, 10 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 40 :: (load (s32))
    renamable $x2 = LDURSWi renamable $x1, 4 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            23-ldrswui-ldrswpre-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 23-ldrswui-ldrswpre-no-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: renamable $x2 = LDRSWui renamable $x1, 1 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $x0 = LDRSWpre renamable $x1, 40, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    renamable $x2 = LDRSWui renamable $x1, 1 :: (load (s32))
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 40 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            24-ldurswi-ldrswpre-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 24-ldurswi-ldrswpre-no-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: renamable $x2 = LDURSWi renamable $x1, 4 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $x0 = LDRSWpre renamable $x1, 40, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    renamable $x2 = LDURSWi renamable $x1, 4 :: (load (s32))
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 40 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            25-ldrswpre-ldrswpre-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 25-ldrswpre-ldrswpre-no-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $x0 = LDRSWpre renamable $x1, 48, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $x2 = LDRSWpre renamable $x1, 1, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $x0 = LDRSWpre renamable $x1, 16, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, dead renamable $x2 = LDRSWpre renamable $x1, 12, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $x0 = LDRSWpre renamable $x1, 16, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $x2 = LDRSWpre renamable $x1, 16, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 48 :: (load (s32))
    early-clobber renamable $x1, renamable $x2 = LDRSWpre killed renamable $x1, 1 :: (load (s32))
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 16 :: (load (s32))
    early-clobber renamable $x1, renamable $x2 = LDRSWpre killed renamable $x1, 12 :: (load (s32))
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 16 :: (load (s32))
    early-clobber renamable $x1, renamable $x2 = LDRSWpre killed renamable $x1, 16 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            26-ldrswpre-ldrwui-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 26-ldrswpre-ldrwui-no-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $x0 = LDRSWpre renamable $x1, 40, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: renamable $w2 = LDRWui renamable $x1, 1, implicit-def $x2 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $x0 = LDRSWpre killed renamable $x1, 40 :: (load (s32))
    renamable $w2 = LDRWui renamable $x1, 1 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            27-ldrwpre-ldrswui-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x0' }
  - { reg: '$x1' }
  - { reg: '$x2' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x1, $x2
    ; CHECK-LABEL: name: 27-ldrwpre-ldrswui-no-merge
    ; CHECK: liveins: $x0, $x1, $x2
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x1, renamable $w0 = LDRWpre renamable $x1, 40, implicit $w1 :: (load (s32))
    ; CHECK-NEXT: renamable $x2 = LDRSWui renamable $x1, 1 :: (load (s32))
    ; CHECK-NEXT: STPXi renamable $x0, renamable $x2, renamable $x1, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x1, renamable $w0 = LDRWpre killed renamable $x1, 40 :: (load (s32))
    renamable $x2 = LDRSWui renamable $x1, 1 :: (load (s32))
    STRXui killed renamable $x0, renamable $x1, 0 :: (store (s64))
    STRXui killed renamable $x2, renamable $x1, 1 :: (store (s64))
    RET undef $lr
...


---
name:            28-ldrswpre-ldrwpre-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x11' }
  - { reg: '$x13' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x11, $x13
    ; CHECK-LABEL: name: 28-ldrswpre-ldrwpre-no-merge
    ; CHECK: liveins: $x11, $x13
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x11, dead renamable $x10 = LDRSWpre renamable $x11, 8, implicit $w11 :: (load (s32), align 8)
    ; CHECK-NEXT: $x14 = EORXrs renamable $x11, renamable $x13, 0
    ; CHECK-NEXT: early-clobber renamable $x11, dead renamable $w12 = LDRWpre renamable $x11, 4, implicit $w11 :: (load (s32))
    ; CHECK-NEXT: $x13 = EORXrs renamable $x11, renamable $x13, 0
    ; CHECK-NEXT: STPXi renamable $x13, renamable $x14, renamable $x11, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x11, renamable $x10 = LDRSWpre killed renamable $x11, 8 :: (load (s32), align 8)
    $x14 = EORXrs renamable $x11, renamable $x13, 0
    early-clobber renamable $x11, renamable $w12 = LDRWpre killed renamable $x11, 4 :: (load (s32))
    $x13 = EORXrs renamable $x11, killed renamable $x13, 0
    STRXui killed renamable $x13, renamable $x11, 0 :: (store (s64))
    STRXui killed renamable $x14, renamable $x11, 1 :: (store (s64))
    RET undef $lr
...


---
name:            29-ldrwpre-ldrswpre-no-merge
tracksRegLiveness: true
liveins:
  - { reg: '$x11' }
  - { reg: '$x13' }
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x11, $x13
    ; CHECK-LABEL: name: 29-ldrwpre-ldrswpre-no-merge
    ; CHECK: liveins: $x11, $x13
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: early-clobber renamable $x11, dead renamable $w12 = LDRWpre renamable $x11, 8, implicit $w11 :: (load (s32))
    ; CHECK-NEXT: $x14 = EORXrs renamable $x11, renamable $x13, 0
    ; CHECK-NEXT: early-clobber renamable $x11, dead renamable $x10 = LDRSWpre renamable $x11, 4, implicit $w11 :: (load (s32), align 8)
    ; CHECK-NEXT: $x13 = EORXrs renamable $x11, renamable $x13, 0
    ; CHECK-NEXT: STPXi renamable $x13, renamable $x14, renamable $x11, 0 :: (store (s64))
    ; CHECK-NEXT: RET undef $lr
    early-clobber renamable $x11, renamable $w12 = LDRWpre killed renamable $x11, 8 :: (load (s32))
    $x14 = EORXrs renamable $x11, renamable $x13, 0
    early-clobber renamable $x11, renamable $x10 = LDRSWpre killed renamable $x11, 4 :: (load (s32), align 8)
    $x13 = EORXrs renamable $x11, killed renamable $x13, 0
    STRXui killed renamable $x13, renamable $x11, 0 :: (store (s64))
    STRXui killed renamable $x14, renamable $x11, 1 :: (store (s64))
    RET undef $lr
...