xref: /llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/vget-overloaded.c (revision 18888ec6c56275d29863ae1193f1efe0244b3b35)
1b9f75827SeopXD // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2b9f75827SeopXD // REQUIRES: riscv-registered-target
3b9f75827SeopXD // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +v \
4b9f75827SeopXD // RUN:   -disable-O0-optnone -emit-llvm %s -o - | opt -S -passes=mem2reg | FileCheck --check-prefix=CHECK-RV64 %s
5b9f75827SeopXD 
6b9f75827SeopXD #include <riscv_vector.h>
7b9f75827SeopXD 
8b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i8m2_i8m1(
9b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
10b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv16i8(<vscale x 16 x i8> [[SRC:%.*]], i64 0)
11b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> [[TMP0]]
12b9f75827SeopXD //
test_vget_v_i8m2_i8m1(vint8m2_t src,size_t index)13b9f75827SeopXD vint8m1_t test_vget_v_i8m2_i8m1(vint8m2_t src, size_t index) {
14*18888ec6SeopXD   return __riscv_vget_i8m1(src, 0);
15b9f75827SeopXD }
16b9f75827SeopXD 
17b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i8m4_i8m1(
18b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
19b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8> [[SRC:%.*]], i64 0)
20b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> [[TMP0]]
21b9f75827SeopXD //
test_vget_v_i8m4_i8m1(vint8m4_t src,size_t index)22b9f75827SeopXD vint8m1_t test_vget_v_i8m4_i8m1(vint8m4_t src, size_t index) {
23*18888ec6SeopXD   return __riscv_vget_i8m1(src, 0);
24b9f75827SeopXD }
25b9f75827SeopXD 
26b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i8m8_i8m1(
27b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
28b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv64i8(<vscale x 64 x i8> [[SRC:%.*]], i64 0)
29b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> [[TMP0]]
30b9f75827SeopXD //
test_vget_v_i8m8_i8m1(vint8m8_t src,size_t index)31b9f75827SeopXD vint8m1_t test_vget_v_i8m8_i8m1(vint8m8_t src, size_t index) {
32*18888ec6SeopXD   return __riscv_vget_i8m1(src, 0);
33b9f75827SeopXD }
34b9f75827SeopXD 
35b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i8m4_i8m2(
36b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
37b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 16 x i8> @llvm.vector.extract.nxv16i8.nxv32i8(<vscale x 32 x i8> [[SRC:%.*]], i64 0)
38b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
39b9f75827SeopXD //
test_vget_v_i8m4_i8m2(vint8m4_t src,size_t index)40b9f75827SeopXD vint8m2_t test_vget_v_i8m4_i8m2(vint8m4_t src, size_t index) {
41*18888ec6SeopXD   return __riscv_vget_i8m2(src, 0);
42b9f75827SeopXD }
43b9f75827SeopXD 
44b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i8m8_i8m2(
45b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
46b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 16 x i8> @llvm.vector.extract.nxv16i8.nxv64i8(<vscale x 64 x i8> [[SRC:%.*]], i64 0)
47b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
48b9f75827SeopXD //
test_vget_v_i8m8_i8m2(vint8m8_t src,size_t index)49b9f75827SeopXD vint8m2_t test_vget_v_i8m8_i8m2(vint8m8_t src, size_t index) {
50*18888ec6SeopXD   return __riscv_vget_i8m2(src, 0);
51b9f75827SeopXD }
52b9f75827SeopXD 
53b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i8m8_i8m4(
54b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
55b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 32 x i8> @llvm.vector.extract.nxv32i8.nxv64i8(<vscale x 64 x i8> [[SRC:%.*]], i64 0)
56b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 32 x i8> [[TMP0]]
57b9f75827SeopXD //
test_vget_v_i8m8_i8m4(vint8m8_t src,size_t index)58b9f75827SeopXD vint8m4_t test_vget_v_i8m8_i8m4(vint8m8_t src, size_t index) {
59*18888ec6SeopXD   return __riscv_vget_i8m4(src, 0);
60b9f75827SeopXD }
61b9f75827SeopXD 
62b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u8m2_u8m1(
63b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
64b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv16i8(<vscale x 16 x i8> [[SRC:%.*]], i64 0)
65b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> [[TMP0]]
66b9f75827SeopXD //
test_vget_v_u8m2_u8m1(vuint8m2_t src,size_t index)67b9f75827SeopXD vuint8m1_t test_vget_v_u8m2_u8m1(vuint8m2_t src, size_t index) {
68*18888ec6SeopXD   return __riscv_vget_u8m1(src, 0);
69b9f75827SeopXD }
70b9f75827SeopXD 
71b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u8m4_u8m1(
72b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
73b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8> [[SRC:%.*]], i64 0)
74b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> [[TMP0]]
75b9f75827SeopXD //
test_vget_v_u8m4_u8m1(vuint8m4_t src,size_t index)76b9f75827SeopXD vuint8m1_t test_vget_v_u8m4_u8m1(vuint8m4_t src, size_t index) {
77*18888ec6SeopXD   return __riscv_vget_u8m1(src, 0);
78b9f75827SeopXD }
79b9f75827SeopXD 
80b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u8m8_u8m1(
81b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
82b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv64i8(<vscale x 64 x i8> [[SRC:%.*]], i64 0)
83b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> [[TMP0]]
84b9f75827SeopXD //
test_vget_v_u8m8_u8m1(vuint8m8_t src,size_t index)85b9f75827SeopXD vuint8m1_t test_vget_v_u8m8_u8m1(vuint8m8_t src, size_t index) {
86*18888ec6SeopXD   return __riscv_vget_u8m1(src, 0);
87b9f75827SeopXD }
88b9f75827SeopXD 
89b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u8m4_u8m2(
90b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
91b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 16 x i8> @llvm.vector.extract.nxv16i8.nxv32i8(<vscale x 32 x i8> [[SRC:%.*]], i64 0)
92b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
93b9f75827SeopXD //
test_vget_v_u8m4_u8m2(vuint8m4_t src,size_t index)94b9f75827SeopXD vuint8m2_t test_vget_v_u8m4_u8m2(vuint8m4_t src, size_t index) {
95*18888ec6SeopXD   return __riscv_vget_u8m2(src, 0);
96b9f75827SeopXD }
97b9f75827SeopXD 
98b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u8m8_u8m2(
99b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
100b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 16 x i8> @llvm.vector.extract.nxv16i8.nxv64i8(<vscale x 64 x i8> [[SRC:%.*]], i64 0)
101b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
102b9f75827SeopXD //
test_vget_v_u8m8_u8m2(vuint8m8_t src,size_t index)103b9f75827SeopXD vuint8m2_t test_vget_v_u8m8_u8m2(vuint8m8_t src, size_t index) {
104*18888ec6SeopXD   return __riscv_vget_u8m2(src, 0);
105b9f75827SeopXD }
106b9f75827SeopXD 
107b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u8m8_u8m4(
108b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
109b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 32 x i8> @llvm.vector.extract.nxv32i8.nxv64i8(<vscale x 64 x i8> [[SRC:%.*]], i64 0)
110b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 32 x i8> [[TMP0]]
111b9f75827SeopXD //
test_vget_v_u8m8_u8m4(vuint8m8_t src,size_t index)112b9f75827SeopXD vuint8m4_t test_vget_v_u8m8_u8m4(vuint8m8_t src, size_t index) {
113*18888ec6SeopXD   return __riscv_vget_u8m4(src, 0);
114b9f75827SeopXD }
115b9f75827SeopXD 
116b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i16m2_i16m1(
117b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
118b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i16> @llvm.vector.extract.nxv4i16.nxv8i16(<vscale x 8 x i16> [[SRC:%.*]], i64 0)
119b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> [[TMP0]]
120b9f75827SeopXD //
test_vget_v_i16m2_i16m1(vint16m2_t src,size_t index)121b9f75827SeopXD vint16m1_t test_vget_v_i16m2_i16m1(vint16m2_t src, size_t index) {
122*18888ec6SeopXD   return __riscv_vget_i16m1(src, 0);
123b9f75827SeopXD }
124b9f75827SeopXD 
125b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i16m4_i16m1(
126b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
127b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i16> @llvm.vector.extract.nxv4i16.nxv16i16(<vscale x 16 x i16> [[SRC:%.*]], i64 0)
128b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> [[TMP0]]
129b9f75827SeopXD //
test_vget_v_i16m4_i16m1(vint16m4_t src,size_t index)130b9f75827SeopXD vint16m1_t test_vget_v_i16m4_i16m1(vint16m4_t src, size_t index) {
131*18888ec6SeopXD   return __riscv_vget_i16m1(src, 0);
132b9f75827SeopXD }
133b9f75827SeopXD 
134b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i16m8_i16m1(
135b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
136b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i16> @llvm.vector.extract.nxv4i16.nxv32i16(<vscale x 32 x i16> [[SRC:%.*]], i64 0)
137b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> [[TMP0]]
138b9f75827SeopXD //
test_vget_v_i16m8_i16m1(vint16m8_t src,size_t index)139b9f75827SeopXD vint16m1_t test_vget_v_i16m8_i16m1(vint16m8_t src, size_t index) {
140*18888ec6SeopXD   return __riscv_vget_i16m1(src, 0);
141b9f75827SeopXD }
142b9f75827SeopXD 
143b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i16m4_i16m2(
144b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
145b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i16> @llvm.vector.extract.nxv8i16.nxv16i16(<vscale x 16 x i16> [[SRC:%.*]], i64 0)
146b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
147b9f75827SeopXD //
test_vget_v_i16m4_i16m2(vint16m4_t src,size_t index)148b9f75827SeopXD vint16m2_t test_vget_v_i16m4_i16m2(vint16m4_t src, size_t index) {
149*18888ec6SeopXD   return __riscv_vget_i16m2(src, 0);
150b9f75827SeopXD }
151b9f75827SeopXD 
152b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i16m8_i16m2(
153b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
154b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i16> @llvm.vector.extract.nxv8i16.nxv32i16(<vscale x 32 x i16> [[SRC:%.*]], i64 0)
155b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
156b9f75827SeopXD //
test_vget_v_i16m8_i16m2(vint16m8_t src,size_t index)157b9f75827SeopXD vint16m2_t test_vget_v_i16m8_i16m2(vint16m8_t src, size_t index) {
158*18888ec6SeopXD   return __riscv_vget_i16m2(src, 0);
159b9f75827SeopXD }
160b9f75827SeopXD 
161b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i16m8_i16m4(
162b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
163b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 16 x i16> @llvm.vector.extract.nxv16i16.nxv32i16(<vscale x 32 x i16> [[SRC:%.*]], i64 0)
164b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 16 x i16> [[TMP0]]
165b9f75827SeopXD //
test_vget_v_i16m8_i16m4(vint16m8_t src,size_t index)166b9f75827SeopXD vint16m4_t test_vget_v_i16m8_i16m4(vint16m8_t src, size_t index) {
167*18888ec6SeopXD   return __riscv_vget_i16m4(src, 0);
168b9f75827SeopXD }
169b9f75827SeopXD 
170b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u16m2_u16m1(
171b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
172b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i16> @llvm.vector.extract.nxv4i16.nxv8i16(<vscale x 8 x i16> [[SRC:%.*]], i64 0)
173b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> [[TMP0]]
174b9f75827SeopXD //
test_vget_v_u16m2_u16m1(vuint16m2_t src,size_t index)175b9f75827SeopXD vuint16m1_t test_vget_v_u16m2_u16m1(vuint16m2_t src, size_t index) {
176*18888ec6SeopXD   return __riscv_vget_u16m1(src, 0);
177b9f75827SeopXD }
178b9f75827SeopXD 
179b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u16m4_u16m1(
180b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
181b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i16> @llvm.vector.extract.nxv4i16.nxv16i16(<vscale x 16 x i16> [[SRC:%.*]], i64 0)
182b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> [[TMP0]]
183b9f75827SeopXD //
test_vget_v_u16m4_u16m1(vuint16m4_t src,size_t index)184b9f75827SeopXD vuint16m1_t test_vget_v_u16m4_u16m1(vuint16m4_t src, size_t index) {
185*18888ec6SeopXD   return __riscv_vget_u16m1(src, 0);
186b9f75827SeopXD }
187b9f75827SeopXD 
188b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u16m8_u16m1(
189b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
190b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i16> @llvm.vector.extract.nxv4i16.nxv32i16(<vscale x 32 x i16> [[SRC:%.*]], i64 0)
191b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> [[TMP0]]
192b9f75827SeopXD //
test_vget_v_u16m8_u16m1(vuint16m8_t src,size_t index)193b9f75827SeopXD vuint16m1_t test_vget_v_u16m8_u16m1(vuint16m8_t src, size_t index) {
194*18888ec6SeopXD   return __riscv_vget_u16m1(src, 0);
195b9f75827SeopXD }
196b9f75827SeopXD 
197b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u16m4_u16m2(
198b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
199b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i16> @llvm.vector.extract.nxv8i16.nxv16i16(<vscale x 16 x i16> [[SRC:%.*]], i64 0)
200b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
201b9f75827SeopXD //
test_vget_v_u16m4_u16m2(vuint16m4_t src,size_t index)202b9f75827SeopXD vuint16m2_t test_vget_v_u16m4_u16m2(vuint16m4_t src, size_t index) {
203*18888ec6SeopXD   return __riscv_vget_u16m2(src, 0);
204b9f75827SeopXD }
205b9f75827SeopXD 
206b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u16m8_u16m2(
207b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
208b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i16> @llvm.vector.extract.nxv8i16.nxv32i16(<vscale x 32 x i16> [[SRC:%.*]], i64 0)
209b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
210b9f75827SeopXD //
test_vget_v_u16m8_u16m2(vuint16m8_t src,size_t index)211b9f75827SeopXD vuint16m2_t test_vget_v_u16m8_u16m2(vuint16m8_t src, size_t index) {
212*18888ec6SeopXD   return __riscv_vget_u16m2(src, 0);
213b9f75827SeopXD }
214b9f75827SeopXD 
215b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u16m8_u16m4(
216b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
217b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 16 x i16> @llvm.vector.extract.nxv16i16.nxv32i16(<vscale x 32 x i16> [[SRC:%.*]], i64 0)
218b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 16 x i16> [[TMP0]]
219b9f75827SeopXD //
test_vget_v_u16m8_u16m4(vuint16m8_t src,size_t index)220b9f75827SeopXD vuint16m4_t test_vget_v_u16m8_u16m4(vuint16m8_t src, size_t index) {
221*18888ec6SeopXD   return __riscv_vget_u16m4(src, 0);
222b9f75827SeopXD }
223b9f75827SeopXD 
224b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i32m2_i32m1(
225b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
226b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.vector.extract.nxv2i32.nxv4i32(<vscale x 4 x i32> [[SRC:%.*]], i64 0)
227b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> [[TMP0]]
228b9f75827SeopXD //
test_vget_v_i32m2_i32m1(vint32m2_t src,size_t index)229b9f75827SeopXD vint32m1_t test_vget_v_i32m2_i32m1(vint32m2_t src, size_t index) {
230*18888ec6SeopXD   return __riscv_vget_i32m1(src, 0);
231b9f75827SeopXD }
232b9f75827SeopXD 
233b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i32m4_i32m1(
234b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
235b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.vector.extract.nxv2i32.nxv8i32(<vscale x 8 x i32> [[SRC:%.*]], i64 0)
236b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> [[TMP0]]
237b9f75827SeopXD //
test_vget_v_i32m4_i32m1(vint32m4_t src,size_t index)238b9f75827SeopXD vint32m1_t test_vget_v_i32m4_i32m1(vint32m4_t src, size_t index) {
239*18888ec6SeopXD   return __riscv_vget_i32m1(src, 0);
240b9f75827SeopXD }
241b9f75827SeopXD 
242b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i32m8_i32m1(
243b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
244b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.vector.extract.nxv2i32.nxv16i32(<vscale x 16 x i32> [[SRC:%.*]], i64 0)
245b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> [[TMP0]]
246b9f75827SeopXD //
test_vget_v_i32m8_i32m1(vint32m8_t src,size_t index)247b9f75827SeopXD vint32m1_t test_vget_v_i32m8_i32m1(vint32m8_t src, size_t index) {
248*18888ec6SeopXD   return __riscv_vget_i32m1(src, 0);
249b9f75827SeopXD }
250b9f75827SeopXD 
251b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i32m4_i32m2(
252b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
253b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.vector.extract.nxv4i32.nxv8i32(<vscale x 8 x i32> [[SRC:%.*]], i64 0)
254b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
255b9f75827SeopXD //
test_vget_v_i32m4_i32m2(vint32m4_t src,size_t index)256b9f75827SeopXD vint32m2_t test_vget_v_i32m4_i32m2(vint32m4_t src, size_t index) {
257*18888ec6SeopXD   return __riscv_vget_i32m2(src, 0);
258b9f75827SeopXD }
259b9f75827SeopXD 
260b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i32m8_i32m2(
261b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
262b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.vector.extract.nxv4i32.nxv16i32(<vscale x 16 x i32> [[SRC:%.*]], i64 0)
263b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
264b9f75827SeopXD //
test_vget_v_i32m8_i32m2(vint32m8_t src,size_t index)265b9f75827SeopXD vint32m2_t test_vget_v_i32m8_i32m2(vint32m8_t src, size_t index) {
266*18888ec6SeopXD   return __riscv_vget_i32m2(src, 0);
267b9f75827SeopXD }
268b9f75827SeopXD 
269b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i32m8_i32m4(
270b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
271b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.vector.extract.nxv8i32.nxv16i32(<vscale x 16 x i32> [[SRC:%.*]], i64 0)
272b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i32> [[TMP0]]
273b9f75827SeopXD //
test_vget_v_i32m8_i32m4(vint32m8_t src,size_t index)274b9f75827SeopXD vint32m4_t test_vget_v_i32m8_i32m4(vint32m8_t src, size_t index) {
275*18888ec6SeopXD   return __riscv_vget_i32m4(src, 0);
276b9f75827SeopXD }
277b9f75827SeopXD 
278b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u32m2_u32m1(
279b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
280b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.vector.extract.nxv2i32.nxv4i32(<vscale x 4 x i32> [[SRC:%.*]], i64 0)
281b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> [[TMP0]]
282b9f75827SeopXD //
test_vget_v_u32m2_u32m1(vuint32m2_t src,size_t index)283b9f75827SeopXD vuint32m1_t test_vget_v_u32m2_u32m1(vuint32m2_t src, size_t index) {
284*18888ec6SeopXD   return __riscv_vget_u32m1(src, 0);
285b9f75827SeopXD }
286b9f75827SeopXD 
287b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u32m4_u32m1(
288b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
289b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.vector.extract.nxv2i32.nxv8i32(<vscale x 8 x i32> [[SRC:%.*]], i64 0)
290b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> [[TMP0]]
291b9f75827SeopXD //
test_vget_v_u32m4_u32m1(vuint32m4_t src,size_t index)292b9f75827SeopXD vuint32m1_t test_vget_v_u32m4_u32m1(vuint32m4_t src, size_t index) {
293*18888ec6SeopXD   return __riscv_vget_u32m1(src, 0);
294b9f75827SeopXD }
295b9f75827SeopXD 
296b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u32m8_u32m1(
297b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
298b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.vector.extract.nxv2i32.nxv16i32(<vscale x 16 x i32> [[SRC:%.*]], i64 0)
299b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> [[TMP0]]
300b9f75827SeopXD //
test_vget_v_u32m8_u32m1(vuint32m8_t src,size_t index)301b9f75827SeopXD vuint32m1_t test_vget_v_u32m8_u32m1(vuint32m8_t src, size_t index) {
302*18888ec6SeopXD   return __riscv_vget_u32m1(src, 0);
303b9f75827SeopXD }
304b9f75827SeopXD 
305b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u32m4_u32m2(
306b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
307b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.vector.extract.nxv4i32.nxv8i32(<vscale x 8 x i32> [[SRC:%.*]], i64 0)
308b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
309b9f75827SeopXD //
test_vget_v_u32m4_u32m2(vuint32m4_t src,size_t index)310b9f75827SeopXD vuint32m2_t test_vget_v_u32m4_u32m2(vuint32m4_t src, size_t index) {
311*18888ec6SeopXD   return __riscv_vget_u32m2(src, 0);
312b9f75827SeopXD }
313b9f75827SeopXD 
314b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u32m8_u32m2(
315b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
316b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.vector.extract.nxv4i32.nxv16i32(<vscale x 16 x i32> [[SRC:%.*]], i64 0)
317b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
318b9f75827SeopXD //
test_vget_v_u32m8_u32m2(vuint32m8_t src,size_t index)319b9f75827SeopXD vuint32m2_t test_vget_v_u32m8_u32m2(vuint32m8_t src, size_t index) {
320*18888ec6SeopXD   return __riscv_vget_u32m2(src, 0);
321b9f75827SeopXD }
322b9f75827SeopXD 
323b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u32m8_u32m4(
324b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
325b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.vector.extract.nxv8i32.nxv16i32(<vscale x 16 x i32> [[SRC:%.*]], i64 0)
326b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x i32> [[TMP0]]
327b9f75827SeopXD //
test_vget_v_u32m8_u32m4(vuint32m8_t src,size_t index)328b9f75827SeopXD vuint32m4_t test_vget_v_u32m8_u32m4(vuint32m8_t src, size_t index) {
329*18888ec6SeopXD   return __riscv_vget_u32m4(src, 0);
330b9f75827SeopXD }
331b9f75827SeopXD 
332b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f32m2_f32m1(
333b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
334b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x float> @llvm.vector.extract.nxv2f32.nxv4f32(<vscale x 4 x float> [[SRC:%.*]], i64 0)
335b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x float> [[TMP0]]
336b9f75827SeopXD //
test_vget_v_f32m2_f32m1(vfloat32m2_t src,size_t index)337b9f75827SeopXD vfloat32m1_t test_vget_v_f32m2_f32m1(vfloat32m2_t src, size_t index) {
338*18888ec6SeopXD   return __riscv_vget_f32m1(src, 0);
339b9f75827SeopXD }
340b9f75827SeopXD 
341b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f32m4_f32m1(
342b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
343b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x float> @llvm.vector.extract.nxv2f32.nxv8f32(<vscale x 8 x float> [[SRC:%.*]], i64 0)
344b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x float> [[TMP0]]
345b9f75827SeopXD //
test_vget_v_f32m4_f32m1(vfloat32m4_t src,size_t index)346b9f75827SeopXD vfloat32m1_t test_vget_v_f32m4_f32m1(vfloat32m4_t src, size_t index) {
347*18888ec6SeopXD   return __riscv_vget_f32m1(src, 0);
348b9f75827SeopXD }
349b9f75827SeopXD 
350b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f32m8_f32m1(
351b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
352b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x float> @llvm.vector.extract.nxv2f32.nxv16f32(<vscale x 16 x float> [[SRC:%.*]], i64 0)
353b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x float> [[TMP0]]
354b9f75827SeopXD //
test_vget_v_f32m8_f32m1(vfloat32m8_t src,size_t index)355b9f75827SeopXD vfloat32m1_t test_vget_v_f32m8_f32m1(vfloat32m8_t src, size_t index) {
356*18888ec6SeopXD   return __riscv_vget_f32m1(src, 0);
357b9f75827SeopXD }
358b9f75827SeopXD 
359b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f32m4_f32m2(
360b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
361b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x float> @llvm.vector.extract.nxv4f32.nxv8f32(<vscale x 8 x float> [[SRC:%.*]], i64 0)
362b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x float> [[TMP0]]
363b9f75827SeopXD //
test_vget_v_f32m4_f32m2(vfloat32m4_t src,size_t index)364b9f75827SeopXD vfloat32m2_t test_vget_v_f32m4_f32m2(vfloat32m4_t src, size_t index) {
365*18888ec6SeopXD   return __riscv_vget_f32m2(src, 0);
366b9f75827SeopXD }
367b9f75827SeopXD 
368b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f32m8_f32m2(
369b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
370b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x float> @llvm.vector.extract.nxv4f32.nxv16f32(<vscale x 16 x float> [[SRC:%.*]], i64 0)
371b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x float> [[TMP0]]
372b9f75827SeopXD //
test_vget_v_f32m8_f32m2(vfloat32m8_t src,size_t index)373b9f75827SeopXD vfloat32m2_t test_vget_v_f32m8_f32m2(vfloat32m8_t src, size_t index) {
374*18888ec6SeopXD   return __riscv_vget_f32m2(src, 0);
375b9f75827SeopXD }
376b9f75827SeopXD 
377b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f32m8_f32m4(
378b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
379b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 8 x float> @llvm.vector.extract.nxv8f32.nxv16f32(<vscale x 16 x float> [[SRC:%.*]], i64 0)
380b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 8 x float> [[TMP0]]
381b9f75827SeopXD //
test_vget_v_f32m8_f32m4(vfloat32m8_t src,size_t index)382b9f75827SeopXD vfloat32m4_t test_vget_v_f32m8_f32m4(vfloat32m8_t src, size_t index) {
383*18888ec6SeopXD   return __riscv_vget_f32m4(src, 0);
384b9f75827SeopXD }
385b9f75827SeopXD 
386b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i64m2_i64m1(
387b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
388b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.vector.extract.nxv1i64.nxv2i64(<vscale x 2 x i64> [[SRC:%.*]], i64 0)
389b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> [[TMP0]]
390b9f75827SeopXD //
test_vget_v_i64m2_i64m1(vint64m2_t src,size_t index)391b9f75827SeopXD vint64m1_t test_vget_v_i64m2_i64m1(vint64m2_t src, size_t index) {
392*18888ec6SeopXD   return __riscv_vget_i64m1(src, 0);
393b9f75827SeopXD }
394b9f75827SeopXD 
395b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i64m4_i64m1(
396b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
397b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.vector.extract.nxv1i64.nxv4i64(<vscale x 4 x i64> [[SRC:%.*]], i64 0)
398b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> [[TMP0]]
399b9f75827SeopXD //
test_vget_v_i64m4_i64m1(vint64m4_t src,size_t index)400b9f75827SeopXD vint64m1_t test_vget_v_i64m4_i64m1(vint64m4_t src, size_t index) {
401*18888ec6SeopXD   return __riscv_vget_i64m1(src, 0);
402b9f75827SeopXD }
403b9f75827SeopXD 
404b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i64m8_i64m1(
405b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
406b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.vector.extract.nxv1i64.nxv8i64(<vscale x 8 x i64> [[SRC:%.*]], i64 0)
407b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> [[TMP0]]
408b9f75827SeopXD //
test_vget_v_i64m8_i64m1(vint64m8_t src,size_t index)409b9f75827SeopXD vint64m1_t test_vget_v_i64m8_i64m1(vint64m8_t src, size_t index) {
410*18888ec6SeopXD   return __riscv_vget_i64m1(src, 0);
411b9f75827SeopXD }
412b9f75827SeopXD 
413b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i64m4_i64m2(
414b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
415b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i64> @llvm.vector.extract.nxv2i64.nxv4i64(<vscale x 4 x i64> [[SRC:%.*]], i64 0)
416b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
417b9f75827SeopXD //
test_vget_v_i64m4_i64m2(vint64m4_t src,size_t index)418b9f75827SeopXD vint64m2_t test_vget_v_i64m4_i64m2(vint64m4_t src, size_t index) {
419*18888ec6SeopXD   return __riscv_vget_i64m2(src, 0);
420b9f75827SeopXD }
421b9f75827SeopXD 
422b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i64m8_i64m2(
423b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
424b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i64> @llvm.vector.extract.nxv2i64.nxv8i64(<vscale x 8 x i64> [[SRC:%.*]], i64 0)
425b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
426b9f75827SeopXD //
test_vget_v_i64m8_i64m2(vint64m8_t src,size_t index)427b9f75827SeopXD vint64m2_t test_vget_v_i64m8_i64m2(vint64m8_t src, size_t index) {
428*18888ec6SeopXD   return __riscv_vget_i64m2(src, 0);
429b9f75827SeopXD }
430b9f75827SeopXD 
431b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_i64m8_i64m4(
432b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
433b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i64> @llvm.vector.extract.nxv4i64.nxv8i64(<vscale x 8 x i64> [[SRC:%.*]], i64 0)
434b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i64> [[TMP0]]
435b9f75827SeopXD //
test_vget_v_i64m8_i64m4(vint64m8_t src,size_t index)436b9f75827SeopXD vint64m4_t test_vget_v_i64m8_i64m4(vint64m8_t src, size_t index) {
437*18888ec6SeopXD   return __riscv_vget_i64m4(src, 0);
438b9f75827SeopXD }
439b9f75827SeopXD 
440b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u64m2_u64m1(
441b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
442b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.vector.extract.nxv1i64.nxv2i64(<vscale x 2 x i64> [[SRC:%.*]], i64 0)
443b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> [[TMP0]]
444b9f75827SeopXD //
test_vget_v_u64m2_u64m1(vuint64m2_t src,size_t index)445b9f75827SeopXD vuint64m1_t test_vget_v_u64m2_u64m1(vuint64m2_t src, size_t index) {
446*18888ec6SeopXD   return __riscv_vget_u64m1(src, 0);
447b9f75827SeopXD }
448b9f75827SeopXD 
449b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u64m4_u64m1(
450b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
451b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.vector.extract.nxv1i64.nxv4i64(<vscale x 4 x i64> [[SRC:%.*]], i64 0)
452b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> [[TMP0]]
453b9f75827SeopXD //
test_vget_v_u64m4_u64m1(vuint64m4_t src,size_t index)454b9f75827SeopXD vuint64m1_t test_vget_v_u64m4_u64m1(vuint64m4_t src, size_t index) {
455*18888ec6SeopXD   return __riscv_vget_u64m1(src, 0);
456b9f75827SeopXD }
457b9f75827SeopXD 
458b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u64m8_u64m1(
459b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
460b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.vector.extract.nxv1i64.nxv8i64(<vscale x 8 x i64> [[SRC:%.*]], i64 0)
461b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> [[TMP0]]
462b9f75827SeopXD //
test_vget_v_u64m8_u64m1(vuint64m8_t src,size_t index)463b9f75827SeopXD vuint64m1_t test_vget_v_u64m8_u64m1(vuint64m8_t src, size_t index) {
464*18888ec6SeopXD   return __riscv_vget_u64m1(src, 0);
465b9f75827SeopXD }
466b9f75827SeopXD 
467b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u64m4_u64m2(
468b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
469b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i64> @llvm.vector.extract.nxv2i64.nxv4i64(<vscale x 4 x i64> [[SRC:%.*]], i64 0)
470b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
471b9f75827SeopXD //
test_vget_v_u64m4_u64m2(vuint64m4_t src,size_t index)472b9f75827SeopXD vuint64m2_t test_vget_v_u64m4_u64m2(vuint64m4_t src, size_t index) {
473*18888ec6SeopXD   return __riscv_vget_u64m2(src, 0);
474b9f75827SeopXD }
475b9f75827SeopXD 
476b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u64m8_u64m2(
477b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
478b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x i64> @llvm.vector.extract.nxv2i64.nxv8i64(<vscale x 8 x i64> [[SRC:%.*]], i64 0)
479b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
480b9f75827SeopXD //
test_vget_v_u64m8_u64m2(vuint64m8_t src,size_t index)481b9f75827SeopXD vuint64m2_t test_vget_v_u64m8_u64m2(vuint64m8_t src, size_t index) {
482*18888ec6SeopXD   return __riscv_vget_u64m2(src, 0);
483b9f75827SeopXD }
484b9f75827SeopXD 
485b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_u64m8_u64m4(
486b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
487b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x i64> @llvm.vector.extract.nxv4i64.nxv8i64(<vscale x 8 x i64> [[SRC:%.*]], i64 0)
488b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x i64> [[TMP0]]
489b9f75827SeopXD //
test_vget_v_u64m8_u64m4(vuint64m8_t src,size_t index)490b9f75827SeopXD vuint64m4_t test_vget_v_u64m8_u64m4(vuint64m8_t src, size_t index) {
491*18888ec6SeopXD   return __riscv_vget_u64m4(src, 0);
492b9f75827SeopXD }
493b9f75827SeopXD 
494b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f64m2_f64m1(
495b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
496b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x double> @llvm.vector.extract.nxv1f64.nxv2f64(<vscale x 2 x double> [[SRC:%.*]], i64 0)
497b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x double> [[TMP0]]
498b9f75827SeopXD //
test_vget_v_f64m2_f64m1(vfloat64m2_t src,size_t index)499b9f75827SeopXD vfloat64m1_t test_vget_v_f64m2_f64m1(vfloat64m2_t src, size_t index) {
500*18888ec6SeopXD   return __riscv_vget_f64m1(src, 0);
501b9f75827SeopXD }
502b9f75827SeopXD 
503b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f64m4_f64m1(
504b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
505b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x double> @llvm.vector.extract.nxv1f64.nxv4f64(<vscale x 4 x double> [[SRC:%.*]], i64 0)
506b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x double> [[TMP0]]
507b9f75827SeopXD //
test_vget_v_f64m4_f64m1(vfloat64m4_t src,size_t index)508b9f75827SeopXD vfloat64m1_t test_vget_v_f64m4_f64m1(vfloat64m4_t src, size_t index) {
509*18888ec6SeopXD   return __riscv_vget_f64m1(src, 0);
510b9f75827SeopXD }
511b9f75827SeopXD 
512b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f64m8_f64m1(
513b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
514b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 1 x double> @llvm.vector.extract.nxv1f64.nxv8f64(<vscale x 8 x double> [[SRC:%.*]], i64 0)
515b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 1 x double> [[TMP0]]
516b9f75827SeopXD //
test_vget_v_f64m8_f64m1(vfloat64m8_t src,size_t index)517b9f75827SeopXD vfloat64m1_t test_vget_v_f64m8_f64m1(vfloat64m8_t src, size_t index) {
518*18888ec6SeopXD   return __riscv_vget_f64m1(src, 0);
519b9f75827SeopXD }
520b9f75827SeopXD 
521b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f64m4_f64m2(
522b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
523b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x double> @llvm.vector.extract.nxv2f64.nxv4f64(<vscale x 4 x double> [[SRC:%.*]], i64 0)
524b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x double> [[TMP0]]
525b9f75827SeopXD //
test_vget_v_f64m4_f64m2(vfloat64m4_t src,size_t index)526b9f75827SeopXD vfloat64m2_t test_vget_v_f64m4_f64m2(vfloat64m4_t src, size_t index) {
527*18888ec6SeopXD   return __riscv_vget_f64m2(src, 0);
528b9f75827SeopXD }
529b9f75827SeopXD 
530b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f64m8_f64m2(
531b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
532b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 2 x double> @llvm.vector.extract.nxv2f64.nxv8f64(<vscale x 8 x double> [[SRC:%.*]], i64 0)
533b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 2 x double> [[TMP0]]
534b9f75827SeopXD //
test_vget_v_f64m8_f64m2(vfloat64m8_t src,size_t index)535b9f75827SeopXD vfloat64m2_t test_vget_v_f64m8_f64m2(vfloat64m8_t src, size_t index) {
536*18888ec6SeopXD   return __riscv_vget_f64m2(src, 0);
537b9f75827SeopXD }
538b9f75827SeopXD 
539b9f75827SeopXD // CHECK-RV64-LABEL: @test_vget_v_f64m8_f64m4(
540b9f75827SeopXD // CHECK-RV64-NEXT:  entry:
541b9f75827SeopXD // CHECK-RV64-NEXT:    [[TMP0:%.*]] = call <vscale x 4 x double> @llvm.vector.extract.nxv4f64.nxv8f64(<vscale x 8 x double> [[SRC:%.*]], i64 0)
542b9f75827SeopXD // CHECK-RV64-NEXT:    ret <vscale x 4 x double> [[TMP0]]
543b9f75827SeopXD //
test_vget_v_f64m8_f64m4(vfloat64m8_t src,size_t index)544b9f75827SeopXD vfloat64m4_t test_vget_v_f64m8_f64m4(vfloat64m8_t src, size_t index) {
545*18888ec6SeopXD   return __riscv_vget_f64m4(src, 0);
546b9f75827SeopXD }
547b9f75827SeopXD 
548