1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v \
3 ; RUN: -verify-machineinstrs | FileCheck %s
4 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v \
5 ; RUN: -verify-machineinstrs | FileCheck %s
7 declare <vscale x 1 x i1> @llvm.riscv.vmset.nxv1i1(
10 define <vscale x 1 x i1> @intrinsic_vmset_m_pseudo_nxv1i1(iXLen %0) nounwind {
11 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv1i1:
12 ; CHECK: # %bb.0: # %entry
13 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
14 ; CHECK-NEXT: vmset.m v0
17 %a = call <vscale x 1 x i1> @llvm.riscv.vmset.nxv1i1(
20 ret <vscale x 1 x i1> %a
23 declare <vscale x 2 x i1> @llvm.riscv.vmset.nxv2i1(
26 define <vscale x 2 x i1> @intrinsic_vmset_m_pseudo_nxv2i1(iXLen %0) nounwind {
27 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv2i1:
28 ; CHECK: # %bb.0: # %entry
29 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
30 ; CHECK-NEXT: vmset.m v0
33 %a = call <vscale x 2 x i1> @llvm.riscv.vmset.nxv2i1(
36 ret <vscale x 2 x i1> %a
39 declare <vscale x 4 x i1> @llvm.riscv.vmset.nxv4i1(
42 define <vscale x 4 x i1> @intrinsic_vmset_m_pseudo_nxv4i1(iXLen %0) nounwind {
43 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv4i1:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
46 ; CHECK-NEXT: vmset.m v0
49 %a = call <vscale x 4 x i1> @llvm.riscv.vmset.nxv4i1(
52 ret <vscale x 4 x i1> %a
55 declare <vscale x 8 x i1> @llvm.riscv.vmset.nxv8i1(
58 define <vscale x 8 x i1> @intrinsic_vmset_m_pseudo_nxv8i1(iXLen %0) nounwind {
59 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv8i1:
60 ; CHECK: # %bb.0: # %entry
61 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
62 ; CHECK-NEXT: vmset.m v0
65 %a = call <vscale x 8 x i1> @llvm.riscv.vmset.nxv8i1(
68 ret <vscale x 8 x i1> %a
71 declare <vscale x 16 x i1> @llvm.riscv.vmset.nxv16i1(
74 define <vscale x 16 x i1> @intrinsic_vmset_m_pseudo_nxv16i1(iXLen %0) nounwind {
75 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv16i1:
76 ; CHECK: # %bb.0: # %entry
77 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
78 ; CHECK-NEXT: vmset.m v0
81 %a = call <vscale x 16 x i1> @llvm.riscv.vmset.nxv16i1(
84 ret <vscale x 16 x i1> %a
87 declare <vscale x 32 x i1> @llvm.riscv.vmset.nxv32i1(
90 define <vscale x 32 x i1> @intrinsic_vmset_m_pseudo_nxv32i1(iXLen %0) nounwind {
91 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv32i1:
92 ; CHECK: # %bb.0: # %entry
93 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
94 ; CHECK-NEXT: vmset.m v0
97 %a = call <vscale x 32 x i1> @llvm.riscv.vmset.nxv32i1(
100 ret <vscale x 32 x i1> %a
103 declare <vscale x 64 x i1> @llvm.riscv.vmset.nxv64i1(
106 define <vscale x 64 x i1> @intrinsic_vmset_m_pseudo_nxv64i1(iXLen %0) nounwind {
107 ; CHECK-LABEL: intrinsic_vmset_m_pseudo_nxv64i1:
108 ; CHECK: # %bb.0: # %entry
109 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
110 ; CHECK-NEXT: vmset.m v0
113 %a = call <vscale x 64 x i1> @llvm.riscv.vmset.nxv64i1(
116 ret <vscale x 64 x i1> %a