1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s | FileCheck %s
4 target triple = "aarch64"
6 ; This function would normally scavenge a stackslot from the callee-save
7 ; area, which would lead to spilling 's0' to that stackslot before the
8 ; smstop and filling it with 'addvl + <offset>' after the smstop because
9 ; the frame-pointer is not available.
10 ; This would not be valid, since the vector-length has changed so 'addvl'
11 ; cannot be used. This is testing that the stackslot-scavenging is disabled
12 ; when there are any streaming-mode-changing call-sequences in the
14 define void @test_no_stackslot_scavenging(float %f) #0 {
15 ; CHECK-LABEL: test_no_stackslot_scavenging:
17 ; CHECK-NEXT: stp d15, d14, [sp, #-96]! // 16-byte Folded Spill
18 ; CHECK-NEXT: stp d13, d12, [sp, #16] // 16-byte Folded Spill
19 ; CHECK-NEXT: stp d11, d10, [sp, #32] // 16-byte Folded Spill
20 ; CHECK-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
21 ; CHECK-NEXT: str x29, [sp, #64] // 8-byte Folded Spill
22 ; CHECK-NEXT: stp x30, x24, [sp, #80] // 16-byte Folded Spill
23 ; CHECK-NEXT: addvl sp, sp, #-1
24 ; CHECK-NEXT: sub sp, sp, #16
25 ; CHECK-NEXT: str s0, [sp, #12] // 4-byte Folded Spill
27 ; CHECK-NEXT: //NO_APP
28 ; CHECK-NEXT: smstop sm
29 ; CHECK-NEXT: ldr s0, [sp, #12] // 4-byte Folded Reload
30 ; CHECK-NEXT: bl use_f
31 ; CHECK-NEXT: smstart sm
32 ; CHECK-NEXT: addvl sp, sp, #1
33 ; CHECK-NEXT: add sp, sp, #16
34 ; CHECK-NEXT: ldp x30, x24, [sp, #80] // 16-byte Folded Reload
35 ; CHECK-NEXT: ldr x29, [sp, #64] // 8-byte Folded Reload
36 ; CHECK-NEXT: ldp d9, d8, [sp, #48] // 16-byte Folded Reload
37 ; CHECK-NEXT: ldp d11, d10, [sp, #32] // 16-byte Folded Reload
38 ; CHECK-NEXT: ldp d13, d12, [sp, #16] // 16-byte Folded Reload
39 ; CHECK-NEXT: ldp d15, d14, [sp], #96 // 16-byte Folded Reload
41 %ptr = alloca <vscale x 16 x i8>
42 call void asm sideeffect "", "~{x24}"() nounwind
43 call void @use_f(float %f)
47 declare void @use_f(float)
49 attributes #0 = { nounwind "target-features"="+sme" "aarch64_pstate_sm_enabled" }