1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s 2>&1 | FileCheck %s
4 ; CHECK-NOT: warning: Invalid size request on a scalable vector
6 define void @bar() nounwind {
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: addi sp, sp, -96
10 ; CHECK-NEXT: sd ra, 88(sp) # 8-byte Folded Spill
11 ; CHECK-NEXT: sd s0, 80(sp) # 8-byte Folded Spill
12 ; CHECK-NEXT: sd s1, 72(sp) # 8-byte Folded Spill
13 ; CHECK-NEXT: addi s0, sp, 96
14 ; CHECK-NEXT: csrr a0, vlenb
15 ; CHECK-NEXT: slli a0, a0, 3
16 ; CHECK-NEXT: sub sp, sp, a0
17 ; CHECK-NEXT: andi sp, sp, -64
18 ; CHECK-NEXT: mv s1, sp
19 ; CHECK-NEXT: addi sp, sp, -16
20 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
21 ; CHECK-NEXT: vmv.v.i v8, 0
22 ; CHECK-NEXT: addi a0, s1, 64
23 ; CHECK-NEXT: vs8r.v v8, (a0)
24 ; CHECK-NEXT: sd a0, 0(sp)
25 ; CHECK-NEXT: li a0, 0
26 ; CHECK-NEXT: li a1, 0
27 ; CHECK-NEXT: li a2, 0
28 ; CHECK-NEXT: li a3, 0
29 ; CHECK-NEXT: li a4, 0
30 ; CHECK-NEXT: li a5, 0
31 ; CHECK-NEXT: li a6, 0
32 ; CHECK-NEXT: li a7, 0
33 ; CHECK-NEXT: vmv.v.i v16, 0
34 ; CHECK-NEXT: call foo
35 ; CHECK-NEXT: addi sp, sp, 16
36 ; CHECK-NEXT: addi sp, s0, -96
37 ; CHECK-NEXT: ld ra, 88(sp) # 8-byte Folded Reload
38 ; CHECK-NEXT: ld s0, 80(sp) # 8-byte Folded Reload
39 ; CHECK-NEXT: ld s1, 72(sp) # 8-byte Folded Reload
40 ; CHECK-NEXT: addi sp, sp, 96
43 tail call void @foo(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, <vscale x 16 x float> zeroinitializer, <vscale x 16 x float> zeroinitializer, <vscale x 16 x float> zeroinitializer)
47 declare void @foo(i32, i32, i32, i32, i32, i32, i32, i32, <vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x float>) nounwind