1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs --riscv-no-aliases < %s | FileCheck %s
4 target triple = "riscv64-unknown-unknown-elf"
6 %my_type = type [3 x <vscale x 1 x double>]
8 define void @test(ptr %addr) {
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: addi sp, sp, -16
12 ; CHECK-NEXT: .cfi_def_cfa_offset 16
13 ; CHECK-NEXT: csrrs a1, vlenb, zero
14 ; CHECK-NEXT: slli a1, a1, 2
15 ; CHECK-NEXT: sub sp, sp, a1
16 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x04, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 4 * vlenb
17 ; CHECK-NEXT: csrrs a1, vlenb, zero
18 ; CHECK-NEXT: add a2, a0, a1
19 ; CHECK-NEXT: vl1re64.v v8, (a2)
20 ; CHECK-NEXT: slli a2, a1, 1
21 ; CHECK-NEXT: vl1re64.v v9, (a0)
22 ; CHECK-NEXT: add a0, a0, a2
23 ; CHECK-NEXT: vl1re64.v v10, (a0)
24 ; CHECK-NEXT: addi a0, sp, 16
25 ; CHECK-NEXT: vs1r.v v9, (a0)
26 ; CHECK-NEXT: add a2, a0, a2
27 ; CHECK-NEXT: vs1r.v v10, (a2)
28 ; CHECK-NEXT: add a0, a0, a1
29 ; CHECK-NEXT: vs1r.v v8, (a0)
30 ; CHECK-NEXT: csrrs a0, vlenb, zero
31 ; CHECK-NEXT: slli a0, a0, 2
32 ; CHECK-NEXT: add sp, sp, a0
33 ; CHECK-NEXT: addi sp, sp, 16
34 ; CHECK-NEXT: jalr zero, 0(ra)
36 %ret = alloca %my_type, align 8
37 %val = load %my_type, ptr %addr
38 store %my_type %val, ptr %ret, align 8