brintos

brintos / llvm-project-archived public Read only

0
0
Text · 28.2 KiB · 02fef34 Raw
844 lines · plain
1# RUN: llc -run-pass=aarch64-ldst-opt -mtriple=arm64-apple-iphoneos -verify-machineinstrs -aarch64-load-store-renaming=true -o - %s | FileCheck %s2# RUN: llc -run-pass=aarch64-ldst-opt -mtriple=arm64-apple-iphoneos -verify-machineinstrs -aarch64-load-store-renaming=false -o - %s | FileCheck --check-prefix=NO-RENAME %s3 4# NO-RENAME-NOT: STP5# NO-RENAME:     test126# NO-RENAME:     STP7# NO-RENAME-NOT: STP8#9---10# CHECK-LABEL: name: test111# CHECK: bb.0:12# CHECK-NEXT: liveins: $x0, $x113# CHECK:       $x10, renamable $x8 = LDPXi renamable $x0, 0 :: (load (s64))14# CHECK-NEXT:  renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))15# CHECK-NEXT:  STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)16# CHECK-NEXT:  renamable $x8 = ADDXrr $x8, $x817# CHECK-NEXT:  STPXi renamable $x8, killed $x10, renamable $x0, 10 :: (store (s64), align 4)18# CHECK-NEXT:  RET undef $lr19 20name:            test121alignment:       422tracksRegLiveness: true23liveins:24  - { reg: '$x0' }25  - { reg: '$x1' }26  - { reg: '$x8' }27frameInfo:28  maxAlignment:    129  maxCallFrameSize: 030machineFunctionInfo: {}31body:             |32  bb.0:33    liveins: $x0, $x134    renamable $x9, renamable $x8 = LDPXi renamable $x0, 0 :: (load (s64))35    STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)36    renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))37    STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)38    renamable $x8 = ADDXrr $x8, $x839    STRXui renamable $x8, renamable $x0, 10 :: (store (s64), align 4)40    RET undef $lr41 42...43---44# CHECK-LABEL: name: test245# CHECK-LABEL: bb.0:46# CHECK-NEXT:    liveins: $x0, $x9, $x147 48# CHECK:         $x10, renamable $x8 = LDPXi renamable $x9, 0 :: (load (s64))49# CHECK-NEXT:    renamable $x9 = LDRXui renamable $x0, 2 :: (load (s64))50# CHECK-NEXT:    STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)51# CHECK-NEXT:    renamable $x8 = ADDXrr $x8, $x852# CHECK-NEXT:    STPXi renamable $x8, killed $x10, renamable $x0, 10 :: (store (s64), align 4)53# CHECK-NEXT:    RET undef $lr54 55name:            test256alignment:       457tracksRegLiveness: true58liveins:59  - { reg: '$x0' }60  - { reg: '$x1' }61  - { reg: '$x9' }62frameInfo:63  maxAlignment:    164  maxCallFrameSize: 065machineFunctionInfo: {}66body:             |67  bb.0:68    liveins: $x0, $x9, $x169    renamable $x9, renamable $x8 = LDPXi renamable $x9, 0 :: (load (s64))70    STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)71    renamable $x9 = LDRXui renamable $x0, 2 :: (load (s64))72    STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)73    renamable $x8 = ADDXrr $x8, $x874    STRXui renamable $x8, renamable $x0, 10 :: (store (s64), align 4)75    RET undef $lr76 77...78---79# MOVK has a tied operand and we currently do not rename across tied defs.80# CHECK-LABEL: bb.0:81# CHECK-NEXT:    liveins: $x082#83# CHECK:         renamable $x8 = MRS 5888084# CHECK-NEXT:    renamable $x8 = MOVZXi 15309, 085# CHECK-NEXT:    renamable $x8 = MOVKXi renamable $x8, 26239, 1686# CHECK-NEXT:    STRXui renamable $x8, renamable $x0, 0, implicit killed $x8 :: (store (s64))87# CHECK-NEXT:    renamable $x8 = MRS 5584088# CHECK-NEXT:    STRXui killed renamable $x8, killed renamable $x0, 1, implicit killed $x8 :: (store (s64))89# CHECK-NEXT:    RET undef $lr90#91name:            test392alignment:       293tracksRegLiveness: true94liveins:95  - { reg: '$x0' }96frameInfo:97  maxCallFrameSize: 098machineFunctionInfo: {}99body:             |100  bb.0:101    liveins: $x0102 103    renamable $x8 = MRS 58880, implicit-def $nzcv104    renamable $x8 = MOVZXi 15309, 0105    renamable $x8 = MOVKXi renamable $x8, 26239, 16106    STRXui renamable $x8, renamable $x0, 0, implicit killed $x8 :: (store (s64))107    renamable $x8 = MRS 55840, implicit-def $nzcv108    STRXui killed renamable  $x8, renamable killed $x0, 1, implicit killed $x8 :: (store (s64))109    RET undef $lr110 111...112---113# CHECK-LABEL: name: test4114# CHECK-LABEL:  bb.0:115# CHECK-NEXT:    liveins: $x0, $x1116 117# CHECK:         $x9 = MRS 58880118# CHECK-NEXT:    renamable $x8 = MRS 55840119# CHECK-NEXT:    STPXi $x9, killed renamable $x8, killed renamable $x0, 0 :: (store (s32))120# CHECK-NEXT:    RET undef $lr121 122name:            test4123alignment:       4124tracksRegLiveness: true125liveins:126  - { reg: '$x0' }127  - { reg: '$x1' }128  - { reg: '$x8' }129frameInfo:130  maxAlignment:    1131  maxCallFrameSize: 0132machineFunctionInfo: {}133body:             |134  bb.0:135    liveins: $x0, $x1136 137    renamable $x8 = MRS 58880, implicit-def $nzcv138    STRXui renamable $x8, renamable $x0, 0, implicit killed $x8 :: (store (s32))139    renamable $x8 = MRS 55840, implicit-def $nzcv140    STRXui killed renamable  $x8, renamable killed $x0, 1, implicit killed $x8 :: (store (s32))141    RET undef $lr142 143...144---145# CHECK-LABEL: name: test5146# CHECK-LABEL:  bb.0:147# CHECK-NEXT:    liveins: $x0, $x1148 149# CHECK:         $x9 = MRS 58880150# CHECK-NEXT:    renamable $x8 = MRS 55840151# CHECK-NEXT:    STPWi $w9, killed renamable $w8, killed renamable $x0, 0 :: (store (s32))152# CHECK-NEXT:    RET undef $lr153 154name:            test5155alignment:       4156tracksRegLiveness: true157liveins:158  - { reg: '$x0' }159  - { reg: '$x1' }160  - { reg: '$x8' }161frameInfo:162  maxAlignment:    1163  maxCallFrameSize: 0164machineFunctionInfo: {}165body:             |166  bb.0:167    liveins: $x0, $x1168 169    renamable $x8 = MRS 58880, implicit-def $nzcv170    STRWui renamable $w8, renamable $x0, 0, implicit killed $x8 :: (store (s32))171    renamable $x8 = MRS 55840, implicit-def $nzcv172    STRWui killed renamable $w8, renamable killed $x0, 1, implicit killed $x8 :: (store (s32))173    RET undef $lr174 175...176---177# CHECK-LABEL: name: test6178# CHECK-LABEL: bb.0:179# CHECK:    liveins: $x0, $x1, $q3180 181# CHECK:         renamable $q9 = LDRQui $x0, 0 :: (load (s128))182# CHECK-NEXT:    renamable $q9 = XTNv8i16 renamable $q9, killed renamable $q3183# CHECK-NEXT:    STRQui renamable $q9, renamable $x0, 11 :: (store (s128), align 4)184# CHECK-NEXT:    renamable $q9 = FADDv2f64 renamable $q9, renamable $q9, implicit $fpcr185# CHECK-NEXT:    STRQui renamable $q9, renamable $x0, 10 :: (store (s128), align 4)186# CHECK-NEXT:    RET undef $lr187 188# XTN has a tied use-def.189name:            test6190alignment:       4191tracksRegLiveness: true192liveins:193  - { reg: '$x0' }194  - { reg: '$x1' }195  - { reg: '$x8' }196  - { reg: '$q3' }197frameInfo:198  maxAlignment:    1199  maxCallFrameSize: 0200machineFunctionInfo: {}201body:             |202  bb.0:203    liveins: $x0, $x1, $q3204    renamable $q9 = LDRQui $x0, 0 :: (load (s128))205    renamable $q9 = XTNv8i16 renamable $q9, killed renamable $q3206    STRQui renamable $q9, renamable $x0, 11 :: (store (s128), align 4)207    renamable $q9 = FADDv2f64 renamable $q9, renamable $q9, implicit $fpcr208    STRQui renamable $q9, renamable $x0, 10 :: (store (s128), align 4)209    RET undef $lr210 211...212---213# Currently we do not rename across frame-setup instructions.214# CHECK-LABEL: name: test7215# CHECK-LABEL: bb.0:216# CHECK-NEXT:    liveins: $x0, $x1217 218# CHECK:         $sp = frame-setup SUBXri $sp, 64, 0219# CHECK-NEXT:    renamable $x9 = frame-setup LDRXui renamable $x0, 0 :: (load (s64))220# CHECK-NEXT:    STRXui renamable $x9, $x0, 10 :: (store (s64), align 4)221# CHECK-NEXT:    renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))222# CHECK-NEXT:    STRXui renamable $x9, $x0, 11 :: (store (s64), align 4)223# CHECK-NEXT:    RET undef $lr224#225name:            test7226alignment:       4227tracksRegLiveness: true228liveins:229  - { reg: '$x0' }230  - { reg: '$x1' }231  - { reg: '$x8' }232frameInfo:233  stackSize:       64234  maxAlignment:    16235  adjustsStack:    true236  hasCalls:        true237  maxCallFrameSize: 0238stack:239  - { id: 0, type: spill-slot, offset: -48, size: 16, alignment: 16 }240  - { id: 1, type: spill-slot, offset: -64, size: 16, alignment: 16 }241machineFunctionInfo: {}242body:             |243  bb.0:244    liveins: $x0, $x1245    $sp = frame-setup SUBXri $sp, 64, 0246    renamable $x9 = frame-setup LDRXui renamable $x0, 0 :: (load (s64))247    STRXui renamable $x9, $x0, 10 :: (store (s64), align 4)248    renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))249    STRXui renamable $x9, $x0, 11 :: (store (s64), align 4)250    RET undef $lr251...252---253# CHECK-LABEL: name: test8254# CHECK-LABEL:  bb.0:255# CHECK-NEXT:    liveins: $x0, $x1256 257# CHECK:         renamable $x8 = MRS 58880258# CHECK-NEXT:    $w9 = ORRWrs $wzr, killed renamable $w8, 0, implicit-def $x9259# CHECK-NEXT:    renamable $x8 = MRS 55840260# CHECK-NEXT:    STPWi $w9, killed renamable $w8, killed renamable $x0, 0 :: (store (s32))261# CHECK-NEXT:    RET undef $lr262 263name:            test8264alignment:       4265tracksRegLiveness: true266liveins:267  - { reg: '$x0' }268  - { reg: '$x1' }269  - { reg: '$x8' }270frameInfo:271  maxAlignment:    1272  maxCallFrameSize: 0273machineFunctionInfo: {}274body:             |275  bb.0:276    liveins: $x0, $x1277 278    renamable $x8 = MRS 58880, implicit-def $nzcv279    renamable $w8 = ORRWrs $wzr, killed renamable $w8, 0, implicit-def $x8280    STRWui renamable $w8, renamable $x0, 0, implicit killed $x8 :: (store (s32))281    renamable $x8 = MRS 55840, implicit-def $nzcv282    STRWui killed renamable $w8, renamable killed $x0, 1, implicit killed $x8 :: (store (s32))283    RET undef $lr284 285...286---287# The reg class returned for $q9 contains only the first 16 Q registers.288# TODO: Can we check that all instructions that require renaming also support289#       the second 16 Q registers?290# CHECK-LABEL: name: test9291# CHECK-LABEL: bb.0:292# CHECK:    liveins: $x0, $x1, $q0, $q1, $q2, $q3, $q4, $q5, $q6, $q7293 294# CHECK:         renamable $q9 = LDRQui $x0, 0 :: (load (s128))295# CHECK-NEXT:    STRQui killed renamable $q9, renamable $x0, 10 :: (store (s128), align 4)296# CHECK:         renamable $q9 = LDRQui $x0, 1 :: (load (s128))297# CHECK-NEXT:    STRQui renamable $q9, renamable $x0, 11 :: (store (s128), align 4)298# CHECK-NEXT:    RET undef $lr299 300name:            test9301alignment:       4302tracksRegLiveness: true303liveins:304  - { reg: '$x0' }305  - { reg: '$x1' }306  - { reg: '$x8' }307  - { reg: '$q3' }308frameInfo:309  maxAlignment:    1310  maxCallFrameSize: 0311machineFunctionInfo: {}312body:             |313  bb.0:314    liveins: $x0, $x1, $q0, $q1, $q2, $q3, $q4, $q5, $q6, $q7315    renamable $q9 = LDRQui $x0, 0 :: (load (s128))316    STRQui renamable killed $q9, renamable $x0, 10 :: (store (s128), align 4)317    renamable $q9 = LDRQui $x0, 1 :: (load (s128))318    STRQui renamable $q9, renamable $x0, 11 :: (store (s128), align 4)319    RET undef $lr320 321...322---323# The livein $q7 is killed early, so we can re-use it for renaming.324# CHECK-LABEL: name: test10325# CHECK-LABEL: bb.0:326# CHECK:    liveins: $x0, $x1, $q0, $q1, $q2, $q3, $q4, $q5, $q6, $q7327 328# CHECK:         renamable $q7 = FADDv2f64 renamable $q7, renamable $q7, implicit $fpcr329# CHECK-NEXT:    STRQui killed renamable $q7, renamable $x0, 100 :: (store (s128), align 4)330# CHECK-NEXT:    $q7, renamable $q9 = LDPQi $x0, 0 :: (load (s128))331# CHECK-NEXT:    STPQi killed renamable $q9, killed $q7, renamable $x0, 10 :: (store (s128), align 4)332# CHECK-NEXT:    RET undef $lr333 334name:            test10335alignment:       4336tracksRegLiveness: true337liveins:338  - { reg: '$x0' }339  - { reg: '$x1' }340  - { reg: '$x8' }341  - { reg: '$q3' }342frameInfo:343  maxAlignment:    1344  maxCallFrameSize: 0345machineFunctionInfo: {}346body:             |347  bb.0:348    liveins: $x0, $x1, $q0, $q1, $q2, $q3, $q4, $q5, $q6, $q7349    renamable $q7 = FADDv2f64 renamable $q7, renamable $q7, implicit $fpcr350    STRQui renamable killed $q7, renamable $x0, 100 :: (store (s128), align 4)351    renamable $q9 = LDRQui $x0, 0 :: (load (s128))352    STRQui renamable killed $q9, renamable $x0, 11 :: (store (s128), align 4)353    renamable $q9 = LDRQui $x0, 1 :: (load (s128))354    STRQui renamable killed $q9, renamable $x0, 10 :: (store (s128), align 4)355    RET undef $lr356 357...358---359# Make sure we do not use any registers that are defined between paired candidates360# ($x14 in this example)361# CHECK-LABEL: name: test11362# CHECK: bb.0:363# CHECK-NEXT: liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x11, $x12, $x13364 365# CHECK:         renamable $w10 = LDRWui renamable $x0, 0 :: (load (s64))366# CHECK-NEXT:    renamable $x9, renamable $x8 = LDPXi renamable $x0, 1 :: (load (s64))367# CHECK-NEXT:    STRXui killed renamable $x9, renamable $x0, 11 :: (store (s64), align 4)368# CHECK-NEXT:    renamable $x9 = LDRXui renamable $x0, 3 :: (load (s64))369# CHECK-NEXT:    renamable $x14 = LDRXui renamable $x0, 5 :: (load (s64))370# CHECK-NEXT:    STRXui renamable $x9, renamable $x0, 10 :: (store (s64), align 4)371# CHECK-NEXT:    STRXui killed renamable $x14, renamable $x0, 200 :: (store (s64), align 4)372# CHECK-NEXT:    renamable $w8 = ADDWrr $w10, $w10373# CHECK-NEXT:    STRWui renamable $w8, renamable $x0, 100 :: (store (s64), align 4)374# CHECK-NEXT:    RET undef $lr375#376name:            test11377alignment:       4378tracksRegLiveness: true379liveins:380  - { reg: '$x0' }381  - { reg: '$x1' }382  - { reg: '$x8' }383frameInfo:384  maxAlignment:    1385  maxCallFrameSize: 0386machineFunctionInfo: {}387body:             |388  bb.0:389    liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x11, $x12, $x13390    renamable $w10 = LDRWui renamable $x0, 0 :: (load (s64))391    renamable $x9, renamable $x8 = LDPXi renamable $x0, 1 :: (load (s64))392    STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)393    renamable $x9 = LDRXui renamable $x0, 3 :: (load (s64))394    renamable $x14 = LDRXui renamable $x0, 5 :: (load (s64))395    STRXui renamable $x9, renamable $x0, 10 :: (store (s64), align 4)396    STRXui renamable killed $x14, renamable $x0, 200 :: (store (s64), align 4)397    renamable $w8 = ADDWrr $w10, $w10398    STRWui renamable $w8, renamable $x0, 100 :: (store (s64), align 4)399    RET undef $lr400 401...402---403# Check that we correctly deal with killed registers in stores that get merged forward,404# which extends the live range of the first store operand.405# CHECK-LABEL: name: test12406# CHECK: bb.0:407# CHECK-NEXT: liveins: $x0, $x1408#409# CHECK:         renamable $x10 = LDRXui renamable $x0, 0 :: (load (s64))410# CHECK-NEXT:    $x11, renamable $x8 = LDPXi renamable $x0, 3 :: (load (s64))411# CHECK-NEXT:    renamable $x9 = LDRXui renamable $x0, 2 :: (load (s64))412# CHECK-NEXT:    renamable $x8 = ADDXrr $x8, $x8413# CHECK-NEXT:    STPXi renamable $x8, killed $x11, renamable $x0, 10 :: (store (s64), align 4)414# CHECK-NEXT:    STPXi killed renamable $x10, renamable $x9, renamable $x0, 20 :: (store (s64), align 4)415# CHECK-NEXT:    RET undef $lr416 417name:            test12418alignment:       4419tracksRegLiveness: true420liveins:421  - { reg: '$x0' }422  - { reg: '$x1' }423  - { reg: '$x8' }424frameInfo:425  maxAlignment:    1426  maxCallFrameSize: 0427machineFunctionInfo: {}428body:             |429  bb.0:430    liveins: $x0, $x1431    renamable $x10 = LDRXui renamable $x0, 0 :: (load (s64))432    STRXui renamable killed $x10, renamable $x0, 20 :: (store (s64), align 4)433    renamable $x9, renamable $x8 = LDPXi renamable $x0, 3 :: (load (s64))434    STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)435    renamable $x9 = LDRXui renamable $x0, 2 :: (load (s64))436    renamable $x8 = ADDXrr $x8, $x8437    STRXui renamable $x8, renamable $x0, 10 :: (store (s64), align 4)438    STRXui renamable $x9, renamable $x0, 21 :: (store (s64), align 4)439    RET undef $lr440 441...442---443# Make sure we do not use any registers that are defined between def to rename and the first444# paired store. ($x14 in this example)445# CHECK-LABEL: name: test13446# CHECK: bb.0:447# CHECK-NEXT: liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x10, $x11, $x12, $x13448# CHECK:    renamable $x9, renamable $x8 = LDPXi renamable $x0, 0 :: (load (s64))449# CHECK-NEXT:    renamable $x14 = LDRXui renamable $x0, 4 :: (load (s64))450# CHECK-NEXT:    STRXui killed renamable $x14, renamable $x0, 100 :: (store (s64), align 4)451# CHECK-NEXT:    STRXui killed renamable $x9, renamable $x0, 11 :: (store (s64), align 4)452# CHECK-NEXT:    renamable $x9 = LDRXui renamable $x0, 2 :: (load (s64))453# CHECK-NEXT:    STRXui renamable $x9, renamable $x0, 10 :: (store (s64))454# CHECK-NEXT:    RET undef $lr455#456name:            test13457alignment:       4458tracksRegLiveness: true459liveins:460  - { reg: '$x0' }461  - { reg: '$x1' }462  - { reg: '$x8' }463frameInfo:464  maxAlignment:    1465  maxCallFrameSize: 0466machineFunctionInfo: {}467body:             |468  bb.0:469    liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x10, $x11, $x12, $x13470    renamable $x9, renamable $x8 = LDPXi renamable $x0, 0 :: (load (s64))471    renamable $x14 = LDRXui renamable $x0, 4 :: (load (s64))472    STRXui renamable killed $x14, renamable $x0, 100 :: (store (s64), align 4)473    STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)474    renamable $x9 = LDRXui renamable $x0, 2 :: (load (s64))475    STRXui renamable $x9, renamable $x0, 10 :: (store (s64))476    RET undef $lr477 478...479# Make sure we do not rename if pseudo-defs. Noop pseudo instructions like KILL480# may lead to a missing definition of the rename register.481#482# CHECK-LABEL: name: test14_pseudo483# CHECK: bb.0:484# CHECK-NEXT:    liveins: $w8, $fp, $w25485# CHECK:         renamable $w8 = KILL killed renamable $w8, implicit-def $x8486# CHECK-NEXT:    STURXi killed renamable $x8, $fp, -40 :: (store (s64))487# CHECK-NEXT:    $w8 = ORRWrs $wzr, killed $w25, 0, implicit-def $x8488# CHECK-NEXT:    STURXi killed renamable $x8, $fp, -32 :: (store (s64))489# CHECK-NEXT:    RET undef $lr490#491name:            test14_pseudo492alignment:       4493tracksRegLiveness: true494liveins:495  - { reg: '$x0' }496  - { reg: '$x1' }497  - { reg: '$x8' }498frameInfo:499  maxAlignment:    1500  maxCallFrameSize: 0501machineFunctionInfo: {}502body:             |503  bb.0:504    liveins: $w8, $fp, $w25505 506    renamable $w8 = KILL killed renamable $w8, implicit-def $x8507    STURXi killed renamable $x8, $fp, -40 :: (store (s64))508    $w8 = ORRWrs $wzr, killed $w25, 0, implicit-def $x8509    STURXi killed renamable $x8, $fp, -32 :: (store (s64))510    RET undef $lr511...512---513# Make sure we do not pick a register marked as undef for renaming.514#515# CHECK-LABEL: name: test15_undef_op516# CHECK: bb.0:517# CHECK-NEXT: liveins: $x0, $x1, $x8518# CHECK:       renamable $x10, $x11 = LDPXi renamable $x0, 0 :: (load (s64))519# CHECK-NEXT:  renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))520# CHECK-NEXT:  STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)521# CHECK-NEXT:  renamable $x10 = ADDXrr $x10, $x10522# CHECK-NEXT:  STPXi renamable $x10, killed $x11, renamable $x0, 10 :: (store (s64), align 4)523# CHECK-NEXT:  RET undef $lr524#525name:            test15_undef_op526alignment:       4527tracksRegLiveness: true528liveins:529  - { reg: '$x0' }530  - { reg: '$x1' }531  - { reg: '$x8' }532frameInfo:533  maxAlignment:    1534  maxCallFrameSize: 0535machineFunctionInfo: {}536body:             |537  bb.0:538    liveins: $x0, $x1, $x8539    renamable $x10, renamable $x9 = LDPXi renamable $x0, 0 :: (load (s64))540    STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)541    renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))542    STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)543    renamable $x10 = ADDXrr $x10, $x10544    STRXui renamable $x10, renamable $x0, 10 :: (store (s64), align 4)545    RET undef $lr546 547...548 549# During ISel, the order of load/store pairs can be optimized and changed550# so that only a single register is used. Due to this register reuse, LDP/STPs551# are not generated. These tests check that LDP/STPs will be generated after552# register renaming is attempted.553 554---555#556# CHECK-LABEL: name: ldst32557# CHECK: renamable $q0, $q1 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 32)558# CHECK-NEXT: STPQi killed renamable $q0, killed $q1, $sp, 2 :: (store (s128), align 32)559# CHECK-NEXT: RET undef $lr560#561name:            ldst32562alignment:       4563tracksRegLiveness: true564frameInfo:565  maxAlignment:    1566  maxCallFrameSize: 0567machineFunctionInfo:568  hasRedZone:      false569body:             |570  bb.0.entry:571    renamable $q0 = LDRQui $sp, 1 :: (load 16)572    STRQui killed renamable $q0, $sp, 3 :: (store 16, basealign 32)573    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 32)574    STRQui killed renamable $q0, $sp, 2 :: (store 16, align 32)575    RET undef $lr576 577...578---579#580# CHECK-LABEL: name: ldst64581# CHECK: renamable $q0, $q1 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 64)582# CHECK-NEXT: STPQi killed renamable $q0, killed $q1, $sp, 2 :: (store (s128), align 64)583# CHECK-NEXT: RET undef $lr584#585name:            ldst64586alignment:       4587tracksRegLiveness: true588frameInfo:589  maxAlignment:    1590  maxCallFrameSize: 0591machineFunctionInfo:592  hasRedZone:      false593body:             |594  bb.0.entry:595    renamable $q0 = LDRQui $sp, 1 :: (load 16)596    STRQui killed renamable $q0, $sp, 3 :: (store 16, basealign 64)597    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 64)598    STRQui killed renamable $q0, $sp, 2 :: (store 16, align 64)599    RET undef $lr600 601...602---603#604# CHECK-LABEL: name: ldst128605# CHECK: renamable $q0, $q1 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 128)606# CHECK-NEXT: STPQi killed renamable $q0, killed $q1, $sp, 2 :: (store (s128), align 128)607# CHECK-NEXT: RET undef $lr608#609name:            ldst128610alignment:       4611tracksRegLiveness: true612frameInfo:613  maxAlignment:    1614  maxCallFrameSize: 0615machineFunctionInfo:616  hasRedZone:      false617body:             |618  bb.0.entry:619    renamable $q0 = LDRQui $sp, 1 :: (load 16)620    STRQui killed renamable $q0, $sp, 3 :: (store 16, basealign 128)621    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 128)622    STRQui killed renamable $q0, $sp, 2 :: (store 16, align 128)623    RET undef $lr624 625...626---627#628# CHECK-LABEL: name: ldst-no-reg-available629# CHECK: liveins: $q1, $q2, $q3, $q4, $q5, $q6, $q7, $q8, $q9, $q10630# CHECK: renamable $q0 = LDRQui $sp, 1 :: (load (s128))631# CHECK-NEXT: STRQui killed renamable $q0, $sp, 3 :: (store (s128), align 32)632# CHECK-NEXT: renamable $q0 = LDRQui $sp, 0 :: (load (s128), align 32)633# CHECK-NEXT: STRQui killed renamable $q0, $sp, 2 :: (store (s128), align 32)634# CHECK-NEXT: RET undef $lr635#636name:            ldst-no-reg-available637alignment:       4638tracksRegLiveness: true639frameInfo:640  maxAlignment:    1641  maxCallFrameSize: 0642machineFunctionInfo:643  hasRedZone:      false644body:             |645  bb.0.entry:646    liveins: $q1, $q2, $q3, $q4, $q5, $q6, $q7, $q8, $q9, $q10647    renamable $q0 = LDRQui $sp, 1 :: (load 16)648    STRQui killed renamable $q0, $sp, 3 :: (store 16, basealign 32)649    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 32)650    STRQui killed renamable $q0, $sp, 2 :: (store 16, align 32)651    RET undef $lr652 653...654---655#656# CHECK-LABEL: name: ldst-basereg-modified657# CHECK: renamable $q0, $q1 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 32)658# CHECK-NEXT: STRQui killed $q1, $sp, 3 :: (store (s128), align 32)659# CHECK-NEXT: $sp = ADDXri $sp, 16, 0660# CHECK-NEXT: STRQui killed renamable $q0, $sp, 2 :: (store (s128), align 32)661# CHECK-NEXT: RET undef $lr662#663name:            ldst-basereg-modified664alignment:       4665tracksRegLiveness: true666frameInfo:667  maxAlignment:    1668  maxCallFrameSize: 0669machineFunctionInfo:670  hasRedZone:      false671body:             |672  bb.0.entry:673    renamable $q0 = LDRQui $sp, 1 :: (load 16)674    STRQui killed renamable $q0, $sp, 3 :: (store 16, basealign 32)675    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 32)676    $sp = ADDXri $sp, 16, 0677    STRQui killed renamable $q0, $sp, 2 :: (store 16, align 32)678    RET undef $lr679 680...681---682#683# CHECK-LABEL: name: ldr-dest-reg-implicit-killed684# CHECK: renamable $q0, $q1 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 32)685# CHECK-NEXT: STPSi $s1, renamable $s0, $sp, 9 :: (store (s32))686# CHECK-NEXT: RET undef $lr687#688name:            ldr-dest-reg-implicit-killed689alignment:       4690tracksRegLiveness: true691frameInfo:692  maxAlignment:    1693  maxCallFrameSize: 0694machineFunctionInfo:695  hasRedZone:      false696body:             |697  bb.0.entry:698    renamable $q0 = LDRQui $sp, 1 :: (load 16)699    STRSui renamable $s0, $sp, 9, implicit killed $q0 :: (store (s32))700    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 32)701    STRSui renamable $s0, $sp, 10, implicit killed $q0 :: (store (s32))702    RET undef $lr703 704...705---706#707# CHECK-LABEL: name: bundled708# CHECK: renamable $q0, $q1 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 32)709# CHECK-NEXT: STPSi $s1, renamable $s0, $sp, 9 :: (store (s32))710# CHECK-NEXT: BUNDLE implicit-def $z3711# CHECK-NEXT:  $z3 = MOVPRFX_ZZ $z19712# CHECK-NEXT:  $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, renamable $z16713# CHECK-NEXT: }714# CHECK-NEXT: RET undef $lr715#716name:            bundled717alignment:       4718tracksRegLiveness: true719frameInfo:720  maxAlignment:    1721  maxCallFrameSize: 0722machineFunctionInfo:723  hasRedZone:      false724body:             |725  bb.0.entry:726    liveins: $z3, $z19, $p0, $z16727    renamable $q0 = LDRQui $sp, 1 :: (load 16)728    STRSui renamable $s0, $sp, 9, implicit killed $q0 :: (store (s32))729    BUNDLE implicit-def $z3, implicit-def $q3, implicit-def $d3, implicit-def $s3, implicit-def $h3, implicit-def $b3, implicit $z19, implicit $p0, implicit $z16 {730      $z3 = MOVPRFX_ZZ $z19731      $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, renamable $z16732    }733    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 32)734    STRSui renamable $s0, $sp, 10, implicit killed $q0 :: (store (s32))735    RET undef $lr736...737---738name:            bundled_load_rename739alignment:       4740tracksRegLiveness: true741frameInfo:742  maxAlignment:     1743  maxCallFrameSize: 0744machineFunctionInfo:745  hasRedZone:      false746body:             |747  bb.0.entry:748    liveins: $z3, $z19, $p0, $z16749    ; CHECK-LABEL: name: bundled_load_rename750    ; CHECK: liveins: $z3, $z19, $p0, $z16751    ; CHECK-NEXT: {{  $}}752    ; CHECK-NEXT: renamable $q16, $q20 = LDPQi $sp, 0 :: (load (s128)), (load (s128), align 32)753    ; CHECK-NEXT: BUNDLE implicit-def $z3, implicit-def $q3, implicit-def $d3, implicit-def $s3, implicit-def $h3, implicit-def $b3, implicit $z19, implicit $p0, implicit $z20 {754    ; CHECK-NEXT:   $z3 = MOVPRFX_ZZ $z19755    ; CHECK-NEXT:   $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, $z20756    ; CHECK-NEXT: }757    ; CHECK-NEXT: RET undef $lr758    renamable $q16 = LDRQui $sp, 1 :: (load 16)759    BUNDLE implicit-def $z3, implicit-def $q3, implicit-def $d3, implicit-def $s3, implicit-def $h3, implicit-def $b3, implicit $z19, implicit $p0, implicit $z16 {760      $z3 = MOVPRFX_ZZ $z19761      $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, renamable $z16762    }763    renamable $q16 = LDRQui $sp, 0 :: (load 16, align 32)764    RET undef $lr765...766---767#768# CHECK-LABEL: name: bundled_use769# CHECK: renamable $q0 = LDRQui $sp, 1770# CHECK-NEXT: STRQui renamable $q0, $sp, 3, implicit-def $z0771# CHECK-NEXT: BUNDLE implicit-def $z3772# CHECK-NEXT:  $z3 = MOVPRFX_ZZ $z19773# CHECK-NEXT:  $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, renamable $z0774# CHECK-NEXT: }775# CHECK-NEXT: renamable $q0 = LDRQui $sp, 0776# CHECK-NEXT: STRQui killed renamable $q0, $sp, 2777# CHECK-NEXT: RET undef $lr778#779name:            bundled_use780alignment:       4781tracksRegLiveness: true782frameInfo:783  maxAlignment:    1784  maxCallFrameSize: 0785machineFunctionInfo:786  hasRedZone:      false787body:             |788  bb.0.entry:789    liveins: $z3, $z19, $p0, $z16790    renamable $q0 = LDRQui $sp, 1 :: (load 16)791    STRQui renamable $q0, $sp, 3, implicit-def $z0 :: (store 16, basealign 128)792    BUNDLE implicit-def $z3, implicit-def $q3, implicit-def $d3, implicit-def $s3, implicit-def $h3, implicit-def $b3, implicit $z19, implicit $p0, implicit $z0, implicit $q0 {793      $z3 = MOVPRFX_ZZ $z19794      $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, renamable $z0795    }796    renamable $q0 = LDRQui $sp, 0 :: (load 16, align 128)797    STRQui killed renamable $q0, $sp, 2 :: (store 16, align 128)798    RET undef $lr799 800...801---802#803# CHECK-LABEL: name: bundle_at_limit804# CHECK: renamable $x3, $x4 = LDPXi $sp, 1 :: (load (s64))805#806name:            bundle_at_limit807alignment:       4808tracksRegLiveness: true809frameInfo:810  maxAlignment:    1811  maxCallFrameSize: 0812machineFunctionInfo:813  hasRedZone:      false814body:             |815  bb.0.entry:816    liveins: $x0, $x1, $x2, $z0, $p0, $z3, $z19817    renamable $x3 = LDRXui $sp, 2 :: (load (s64))818    $x2 = ADDXri renamable $x2, 1, 0819    $x2 = ADDXri renamable $x3, 1, 0820    $x2 = ADDXri renamable $x2, 1, 0821    $x2 = ADDXri renamable $x2, 1, 0822    $x2 = ADDXri renamable $x2, 1, 0823    $x2 = ADDXri renamable $x2, 1, 0824    $x2 = ADDXri renamable $x2, 1, 0825    $x2 = ADDXri renamable $x2, 1, 0826    $x2 = ADDXri renamable $x2, 1, 0827    $x2 = ADDXri renamable $x2, 1, 0828    $x2 = ADDXri renamable $x2, 1, 0829    $x2 = ADDXri renamable $x2, 1, 0830    $x2 = ADDXri renamable $x2, 1, 0831    $x2 = ADDXri renamable $x2, 1, 0832    $x2 = ADDXri renamable $x2, 1, 0833    $x2 = ADDXri renamable $x2, 1, 0834    $x2 = ADDXri renamable $x3, 1, 0835    BUNDLE implicit-def $z3, implicit-def $q3, implicit-def $d3, implicit-def $s3, implicit-def $h3, implicit-def $b3, implicit $z19, implicit $p0, implicit $z0 {836      $z3 = MOVPRFX_ZZ $z19837      $z3 = FMUL_ZPmZ_S renamable $p0, killed $z3, renamable $z0838    }839    $x2 = ADDXri renamable $x3, 1, 0840    renamable $x3 = LDRXui $sp, 1 :: (load (s64))841    RET undef $lr842 843...844