1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zfh,+zvfh,+f,+d -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zfh,+zvfh,+f,+d -verify-machineinstrs < %s | FileCheck %s
5 ; Check that we are able to legalize scalable-vector stores that require widening.
7 define void @store_nxv3i8(<vscale x 3 x i8> %val, ptr %ptr) {
8 ; CHECK-LABEL: store_nxv3i8:
10 ; CHECK-NEXT: csrr a1, vlenb
11 ; CHECK-NEXT: srli a1, a1, 3
12 ; CHECK-NEXT: slli a2, a1, 1
13 ; CHECK-NEXT: add a1, a2, a1
14 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
15 ; CHECK-NEXT: vse8.v v8, (a0)
17 store <vscale x 3 x i8> %val, ptr %ptr
21 define void @store_nxv7f64(<vscale x 7 x double> %val, ptr %ptr) {
22 ; CHECK-LABEL: store_nxv7f64:
24 ; CHECK-NEXT: csrr a1, vlenb
25 ; CHECK-NEXT: srli a2, a1, 3
26 ; CHECK-NEXT: sub a1, a1, a2
27 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
28 ; CHECK-NEXT: vse64.v v8, (a0)
30 store <vscale x 7 x double> %val, ptr %ptr