1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
5 define void @load_store_v1i1(ptr %x, ptr %y) {
6 ; CHECK-LABEL: load_store_v1i1:
8 ; CHECK-NEXT: lbu a0, 0(a0)
9 ; CHECK-NEXT: andi a0, a0, 1
10 ; CHECK-NEXT: sb a0, 0(a1)
12 %a = load <1 x i1>, ptr %x
13 store <1 x i1> %a, ptr %y
17 define void @load_store_v2i1(ptr %x, ptr %y) {
18 ; CHECK-LABEL: load_store_v2i1:
20 ; CHECK-NEXT: lbu a0, 0(a0)
21 ; CHECK-NEXT: andi a0, a0, 3
22 ; CHECK-NEXT: sb a0, 0(a1)
24 %a = load <2 x i1>, ptr %x
25 store <2 x i1> %a, ptr %y
29 define void @load_store_v4i1(ptr %x, ptr %y) {
30 ; CHECK-LABEL: load_store_v4i1:
32 ; CHECK-NEXT: lbu a0, 0(a0)
33 ; CHECK-NEXT: andi a0, a0, 15
34 ; CHECK-NEXT: sb a0, 0(a1)
36 %a = load <4 x i1>, ptr %x
37 store <4 x i1> %a, ptr %y
41 define void @load_store_v8i1(ptr %x, ptr %y) {
42 ; CHECK-LABEL: load_store_v8i1:
44 ; CHECK-NEXT: lbu a0, 0(a0)
45 ; CHECK-NEXT: sb a0, 0(a1)
47 %a = load <8 x i1>, ptr %x
48 store <8 x i1> %a, ptr %y
52 define void @load_store_v16i1(ptr %x, ptr %y) {
53 ; CHECK-LABEL: load_store_v16i1:
55 ; CHECK-NEXT: lh a0, 0(a0)
56 ; CHECK-NEXT: sh a0, 0(a1)
58 %a = load <16 x i1>, ptr %x
59 store <16 x i1> %a, ptr %y
63 define void @load_store_v32i1(ptr %x, ptr %y) {
64 ; CHECK-LABEL: load_store_v32i1:
66 ; CHECK-NEXT: lw a0, 0(a0)
67 ; CHECK-NEXT: sw a0, 0(a1)
69 %a = load <32 x i1>, ptr %x
70 store <32 x i1> %a, ptr %y