1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -riscv-v-fixed-length-vector-lmul-max=2 -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+v -riscv-v-fixed-length-vector-lmul-max=2 -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv32 -mattr=+v -riscv-v-fixed-length-vector-lmul-max=1 -verify-machineinstrs < %s | FileCheck %s
5 ; RUN: llc -mtriple=riscv64 -mattr=+v -riscv-v-fixed-length-vector-lmul-max=1 -verify-machineinstrs < %s | FileCheck %s
7 define void @load_store_v1i1(ptr %x, ptr %y) {
8 ; CHECK-LABEL: load_store_v1i1:
10 ; CHECK-NEXT: lbu a0, 0(a0)
11 ; CHECK-NEXT: andi a0, a0, 1
12 ; CHECK-NEXT: sb a0, 0(a1)
14 %a = load <1 x i1>, ptr %x
15 store <1 x i1> %a, ptr %y
19 define void @load_store_v2i1(ptr %x, ptr %y) {
20 ; CHECK-LABEL: load_store_v2i1:
22 ; CHECK-NEXT: lbu a0, 0(a0)
23 ; CHECK-NEXT: andi a0, a0, 3
24 ; CHECK-NEXT: sb a0, 0(a1)
26 %a = load <2 x i1>, ptr %x
27 store <2 x i1> %a, ptr %y
31 define void @load_store_v4i1(ptr %x, ptr %y) {
32 ; CHECK-LABEL: load_store_v4i1:
34 ; CHECK-NEXT: lbu a0, 0(a0)
35 ; CHECK-NEXT: andi a0, a0, 15
36 ; CHECK-NEXT: sb a0, 0(a1)
38 %a = load <4 x i1>, ptr %x
39 store <4 x i1> %a, ptr %y
43 define void @load_store_v8i1(ptr %x, ptr %y) {
44 ; CHECK-LABEL: load_store_v8i1:
46 ; CHECK-NEXT: lbu a0, 0(a0)
47 ; CHECK-NEXT: sb a0, 0(a1)
49 %a = load <8 x i1>, ptr %x
50 store <8 x i1> %a, ptr %y
54 define void @load_store_v16i1(ptr %x, ptr %y) {
55 ; CHECK-LABEL: load_store_v16i1:
57 ; CHECK-NEXT: lh a0, 0(a0)
58 ; CHECK-NEXT: sh a0, 0(a1)
60 %a = load <16 x i1>, ptr %x
61 store <16 x i1> %a, ptr %y
65 define void @load_store_v32i1(ptr %x, ptr %y) {
66 ; CHECK-LABEL: load_store_v32i1:
68 ; CHECK-NEXT: lw a0, 0(a0)
69 ; CHECK-NEXT: sw a0, 0(a1)
71 %a = load <32 x i1>, ptr %x
72 store <32 x i1> %a, ptr %y