1 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass=prologepilog %s -o - | FileCheck %s
3 define void @hasBasepointer() #0 { ret void }
4 define void @hasBasepointer_sme_streaming() #1 { ret void }
6 attributes #0 = { "target-features"="+sve" }
7 attributes #1 = { "target-features"="+sme" "aarch64_pstate_sm_enabled" }
10 # This test verifies that the basepointer is available in presence of SVE stack objects.
12 # CHECK-LABEL: name: hasBasepointer
14 # CHECK: $sp = frame-setup SUBXri $sp, 16, 0
15 # CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -1
16 # CHECK-NEXT: $x19 = ADDXri $sp, 0, 0
17 # CHECK: STRXui $x0, $x19, 0
18 tracksRegLiveness: true
20 isFrameAddressTaken: true
22 - { id: 0, type: variable-sized, alignment: 1 }
23 - { id: 1, name: '', size: 16, alignment: 8 }
24 - { id: 2, stack-id: scalable-vector, size: 16, alignment: 16 }
28 STRXui $x0, %stack.1, 0
32 # Likewise with only SME with a streaming function.
33 name: hasBasepointer_sme_streaming
34 # CHECK-LABEL: name: hasBasepointer_sme_streaming
36 # CHECK: $sp = frame-setup SUBXri $sp, 16, 0
37 # CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -1
38 # CHECK-NEXT: $x19 = ADDXri $sp, 0, 0
39 # CHECK: STRXui $x0, $x19, 0
40 tracksRegLiveness: true
42 isFrameAddressTaken: true
44 - { id: 0, type: variable-sized, alignment: 1 }
45 - { id: 1, name: '', size: 16, alignment: 8 }
46 - { id: 2, stack-id: scalable-vector, size: 16, alignment: 16 }
50 STRXui $x0, %stack.1, 0