1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple riscv32 -mattr=+v %s -o - \
3 ; RUN: -verify-machineinstrs | FileCheck %s
4 ; RUN: llc -mtriple riscv64 -mattr=+v %s -o - \
5 ; RUN: -verify-machineinstrs | FileCheck %s
7 define void @test_load_mask_64(ptr %pa, ptr %pb) {
8 ; CHECK-LABEL: test_load_mask_64:
10 ; CHECK-NEXT: vsetvli a2, zero, e8, m8, ta, ma
11 ; CHECK-NEXT: vlm.v v8, (a0)
12 ; CHECK-NEXT: vsm.v v8, (a1)
14 %a = load <vscale x 64 x i1>, ptr %pa
15 store <vscale x 64 x i1> %a, ptr %pb
19 define void @test_load_mask_32(ptr %pa, ptr %pb) {
20 ; CHECK-LABEL: test_load_mask_32:
22 ; CHECK-NEXT: vsetvli a2, zero, e8, m4, ta, ma
23 ; CHECK-NEXT: vlm.v v8, (a0)
24 ; CHECK-NEXT: vsm.v v8, (a1)
26 %a = load <vscale x 32 x i1>, ptr %pa
27 store <vscale x 32 x i1> %a, ptr %pb
31 define void @test_load_mask_16(ptr %pa, ptr %pb) {
32 ; CHECK-LABEL: test_load_mask_16:
34 ; CHECK-NEXT: vsetvli a2, zero, e8, m2, ta, ma
35 ; CHECK-NEXT: vlm.v v8, (a0)
36 ; CHECK-NEXT: vsm.v v8, (a1)
38 %a = load <vscale x 16 x i1>, ptr %pa
39 store <vscale x 16 x i1> %a, ptr %pb
43 define void @test_load_mask_8(ptr %pa, ptr %pb) {
44 ; CHECK-LABEL: test_load_mask_8:
46 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
47 ; CHECK-NEXT: vlm.v v8, (a0)
48 ; CHECK-NEXT: vsm.v v8, (a1)
50 %a = load <vscale x 8 x i1>, ptr %pa
51 store <vscale x 8 x i1> %a, ptr %pb
55 define void @test_load_mask_4(ptr %pa, ptr %pb) {
56 ; CHECK-LABEL: test_load_mask_4:
58 ; CHECK-NEXT: vsetvli a2, zero, e8, mf2, ta, ma
59 ; CHECK-NEXT: vlm.v v8, (a0)
60 ; CHECK-NEXT: vsm.v v8, (a1)
62 %a = load <vscale x 4 x i1>, ptr %pa
63 store <vscale x 4 x i1> %a, ptr %pb
67 define void @test_load_mask_2(ptr %pa, ptr %pb) {
68 ; CHECK-LABEL: test_load_mask_2:
70 ; CHECK-NEXT: vsetvli a2, zero, e8, mf4, ta, ma
71 ; CHECK-NEXT: vlm.v v8, (a0)
72 ; CHECK-NEXT: vsm.v v8, (a1)
74 %a = load <vscale x 2 x i1>, ptr %pa
75 store <vscale x 2 x i1> %a, ptr %pb
79 define void @test_load_mask_1(ptr %pa, ptr %pb) {
80 ; CHECK-LABEL: test_load_mask_1:
82 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
83 ; CHECK-NEXT: vlm.v v8, (a0)
84 ; CHECK-NEXT: vsm.v v8, (a1)
86 %a = load <vscale x 1 x i1>, ptr %pa
87 store <vscale x 1 x i1> %a, ptr %pb