55 lines · plain
1# RUN: llc -run-pass=aarch64-ldst-opt -mtriple=aarch64 -verify-machineinstrs -o - %s | FileCheck %s2 3# This test checks that aarch64 load store optimizer is not throwing an4# assertion:5# "Rename register used between paired instruction, trashing the content".6#7# The assertion was previously triggered because q0 is picked as renamable8# register, which overlap with renamable undef d0 used by ZIP2 instruction.9# However, the content of an undef register is not used in meaningful way,10# aarch64 load store optimizer should not throw an assertion if a renamable11# register picked overlap with a renamable undef register.12 13# This test also checks that pairwise store STP is generated.14 15# CHECK-LABLE: test16# CHECK: bb.0:17# CHECK-NEXT: liveins: $x0, $x17, $x1818# CHECK: renamable $q13_q14_q15 = LD3Threev16b undef renamable $x17 :: (load (s384) from `ptr undef`, align 64)19# CHECK-NEXT: renamable $q23_q24_q25 = LD3Threev16b undef renamable $x18 :: (load (s384) from `ptr undef`, align 64)20# CHECK-NEXT: $q0 = EXTv16i8 renamable $q23, renamable $q23, 821# CHECK-NEXT: renamable $q20 = EXTv16i8 renamable $q14, renamable $q14, 822# CHECK-NEXT: STRQui killed renamable $q20, $sp, 4 :: (store (s128))23# CHECK-NEXT: renamable $d6 = ZIP2v8i8 renamable $d23, undef renamable $d024# CHECK-NEXT: STRDui killed renamable $d6, $sp, 11 :: (store (s64))25# CHECK-NEXT: renamable $q6 = EXTv16i8 renamable $q13, renamable $q13, 826# CHECK-NEXT: STPQi killed renamable $q6, killed $q0, $sp, 6 :: (store (s128))27# CHECK-NEXT: RET undef $lr28 29---30name: test31alignment: 432tracksRegLiveness: true33liveins:34 - { reg: '$x0', virtual-reg: '' }35frameInfo:36 maxAlignment: 1637 maxCallFrameSize: 038fixedStack: []39machineFunctionInfo: {}40body: |41 bb.0:42 liveins: $x0, $x17, $x1843 renamable $q13_q14_q15 = LD3Threev16b undef renamable $x17 :: (load (s384) from `ptr undef`, align 64)44 renamable $q23_q24_q25 = LD3Threev16b undef renamable $x18 :: (load (s384) from `ptr undef`, align 64)45 renamable $q20 = EXTv16i8 renamable $q23, renamable $q23, 846 STRQui killed renamable $q20, $sp, 7 :: (store (s128))47 renamable $q20 = EXTv16i8 renamable $q14, renamable $q14, 848 STRQui killed renamable $q20, $sp, 4 :: (store (s128))49 renamable $d6 = ZIP2v8i8 renamable $d23, undef renamable $d050 STRDui killed renamable $d6, $sp, 11 :: (store (s64))51 renamable $q6 = EXTv16i8 renamable $q13, renamable $q13, 852 STRQui killed renamable $q6, $sp, 6 :: (store (s128))53 RET undef $lr54...55