1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+v -stop-after=prologepilog %s -o - 2>&1 | FileCheck %s
5 define void @add_scalable_offset(
13 name: add_scalable_offset
14 tracksRegLiveness: true
16 isFrameAddressTaken: true
19 - { id: 0, type: default, offset: 0, size: 1120, alignment: 4,
21 - { id: 1, type: default, offset: 1120, size: 1120, alignment: 4,
23 - { id: 2, offset: 0, size: 8, alignment: 8, stack-id: scalable-vector }
28 ; CHECK-LABEL: name: add_scalable_offset
29 ; CHECK: liveins: $x10, $x11, $x1
31 ; CHECK-NEXT: $x2 = frame-setup ADDI $x2, -2032
32 ; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
33 ; CHECK-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.3)
34 ; CHECK-NEXT: SD killed $x8, $x2, 2016 :: (store (s64) into %stack.4)
35 ; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
36 ; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
37 ; CHECK-NEXT: $x8 = frame-setup ADDI $x2, 2032
38 ; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa $x8, 0
39 ; CHECK-NEXT: $x2 = frame-setup ADDI $x2, -240
40 ; CHECK-NEXT: $x12 = frame-setup PseudoReadVLENB
41 ; CHECK-NEXT: $x12 = frame-setup SLLI killed $x12, 1
42 ; CHECK-NEXT: $x2 = frame-setup SUB $x2, killed $x12
43 ; CHECK-NEXT: dead $x0 = PseudoVSETVLI killed renamable $x11, 216 /* e64, m1, ta, ma */, implicit-def $vl, implicit-def $vtype
44 ; CHECK-NEXT: renamable $v8 = PseudoVLE64_V_M1 undef renamable $v8, killed renamable $x10, $noreg, 6 /* e64 */, 0 /* tu, mu */, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8)
45 ; CHECK-NEXT: $x10 = PseudoReadVLENB
46 ; CHECK-NEXT: $x10 = SLLI killed $x10, 1
47 ; CHECK-NEXT: $x10 = SUB $x8, killed $x10
48 ; CHECK-NEXT: $x10 = ADDI killed $x10, -2048
49 ; CHECK-NEXT: $x10 = ADDI killed $x10, -224
50 ; CHECK-NEXT: VS1R_V killed renamable $v8, killed renamable $x10
51 ; CHECK-NEXT: $x2 = frame-destroy ADDI $x8, -2048
52 ; CHECK-NEXT: $x2 = frame-destroy ADDI killed $x2, -224
53 ; CHECK-NEXT: $x2 = frame-destroy ADDI $x2, 240
54 ; CHECK-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.3)
55 ; CHECK-NEXT: $x8 = LD $x2, 2016 :: (load (s64) from %stack.4)
56 ; CHECK-NEXT: $x2 = frame-destroy ADDI $x2, 2032
57 ; CHECK-NEXT: PseudoRET
58 %1:gprnox0 = COPY $x11
60 %2:vr = PseudoVLE64_V_M1 undef $noreg, %0, %1, 6, 0 :: (load unknown-size from %ir.pa, align 8)
61 %3:gpr = ADDI %stack.2, 0
62 VS1R_V killed %2:vr, %3:gpr