Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / RISCV / rvv-intrinsics-autogenerated / non-policy / non-overloaded / vsetvlmax.c
blob792e43c22f519b304b46fb4df5189966599553bd
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
2 // REQUIRES: riscv-registered-target
3 // RUN: %clang_cc1 -triple riscv64 -target-feature +v -disable-O0-optnone \
4 // RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
5 // RUN: FileCheck --check-prefix=CHECK-RV64 %s
7 #include <riscv_vector.h>
9 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8mf8
10 // CHECK-RV64-SAME: () #[[ATTR0:[0-9]+]] {
11 // CHECK-RV64-NEXT: entry:
12 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 5)
13 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
15 size_t test_vsetvlmax_e8mf8() {
16 return __riscv_vsetvlmax_e8mf8();
19 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8mf4
20 // CHECK-RV64-SAME: () #[[ATTR0]] {
21 // CHECK-RV64-NEXT: entry:
22 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 6)
23 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
25 size_t test_vsetvlmax_e8mf4() {
26 return __riscv_vsetvlmax_e8mf4();
29 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8mf2
30 // CHECK-RV64-SAME: () #[[ATTR0]] {
31 // CHECK-RV64-NEXT: entry:
32 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 7)
33 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
35 size_t test_vsetvlmax_e8mf2() {
36 return __riscv_vsetvlmax_e8mf2();
39 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8m1
40 // CHECK-RV64-SAME: () #[[ATTR0]] {
41 // CHECK-RV64-NEXT: entry:
42 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 0)
43 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
45 size_t test_vsetvlmax_e8m1() {
46 return __riscv_vsetvlmax_e8m1();
49 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8m2
50 // CHECK-RV64-SAME: () #[[ATTR0]] {
51 // CHECK-RV64-NEXT: entry:
52 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 1)
53 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
55 size_t test_vsetvlmax_e8m2() {
56 return __riscv_vsetvlmax_e8m2();
59 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8m4
60 // CHECK-RV64-SAME: () #[[ATTR0]] {
61 // CHECK-RV64-NEXT: entry:
62 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 2)
63 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
65 size_t test_vsetvlmax_e8m4() {
66 return __riscv_vsetvlmax_e8m4();
69 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e8m8
70 // CHECK-RV64-SAME: () #[[ATTR0]] {
71 // CHECK-RV64-NEXT: entry:
72 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 0, i64 3)
73 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
75 size_t test_vsetvlmax_e8m8() {
76 return __riscv_vsetvlmax_e8m8();
79 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e16mf4
80 // CHECK-RV64-SAME: () #[[ATTR0]] {
81 // CHECK-RV64-NEXT: entry:
82 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 1, i64 6)
83 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
85 size_t test_vsetvlmax_e16mf4() {
86 return __riscv_vsetvlmax_e16mf4();
89 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e16mf2
90 // CHECK-RV64-SAME: () #[[ATTR0]] {
91 // CHECK-RV64-NEXT: entry:
92 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 1, i64 7)
93 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
95 size_t test_vsetvlmax_e16mf2() {
96 return __riscv_vsetvlmax_e16mf2();
99 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e16m1
100 // CHECK-RV64-SAME: () #[[ATTR0]] {
101 // CHECK-RV64-NEXT: entry:
102 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 1, i64 0)
103 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
105 size_t test_vsetvlmax_e16m1() {
106 return __riscv_vsetvlmax_e16m1();
109 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e16m2
110 // CHECK-RV64-SAME: () #[[ATTR0]] {
111 // CHECK-RV64-NEXT: entry:
112 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 1, i64 1)
113 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
115 size_t test_vsetvlmax_e16m2() {
116 return __riscv_vsetvlmax_e16m2();
119 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e16m4
120 // CHECK-RV64-SAME: () #[[ATTR0]] {
121 // CHECK-RV64-NEXT: entry:
122 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 1, i64 2)
123 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
125 size_t test_vsetvlmax_e16m4() {
126 return __riscv_vsetvlmax_e16m4();
129 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e16m8
130 // CHECK-RV64-SAME: () #[[ATTR0]] {
131 // CHECK-RV64-NEXT: entry:
132 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 1, i64 3)
133 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
135 size_t test_vsetvlmax_e16m8() {
136 return __riscv_vsetvlmax_e16m8();
139 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e32mf2
140 // CHECK-RV64-SAME: () #[[ATTR0]] {
141 // CHECK-RV64-NEXT: entry:
142 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 2, i64 7)
143 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
145 size_t test_vsetvlmax_e32mf2() {
146 return __riscv_vsetvlmax_e32mf2();
149 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e32m1
150 // CHECK-RV64-SAME: () #[[ATTR0]] {
151 // CHECK-RV64-NEXT: entry:
152 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 2, i64 0)
153 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
155 size_t test_vsetvlmax_e32m1() {
156 return __riscv_vsetvlmax_e32m1();
159 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e32m2
160 // CHECK-RV64-SAME: () #[[ATTR0]] {
161 // CHECK-RV64-NEXT: entry:
162 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 2, i64 1)
163 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
165 size_t test_vsetvlmax_e32m2() {
166 return __riscv_vsetvlmax_e32m2();
169 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e32m4
170 // CHECK-RV64-SAME: () #[[ATTR0]] {
171 // CHECK-RV64-NEXT: entry:
172 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 2, i64 2)
173 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
175 size_t test_vsetvlmax_e32m4() {
176 return __riscv_vsetvlmax_e32m4();
179 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e32m8
180 // CHECK-RV64-SAME: () #[[ATTR0]] {
181 // CHECK-RV64-NEXT: entry:
182 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 2, i64 3)
183 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
185 size_t test_vsetvlmax_e32m8() {
186 return __riscv_vsetvlmax_e32m8();
189 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e64m1
190 // CHECK-RV64-SAME: () #[[ATTR0]] {
191 // CHECK-RV64-NEXT: entry:
192 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 3, i64 0)
193 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
195 size_t test_vsetvlmax_e64m1() {
196 return __riscv_vsetvlmax_e64m1();
199 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e64m2
200 // CHECK-RV64-SAME: () #[[ATTR0]] {
201 // CHECK-RV64-NEXT: entry:
202 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 3, i64 1)
203 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
205 size_t test_vsetvlmax_e64m2() {
206 return __riscv_vsetvlmax_e64m2();
209 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e64m4
210 // CHECK-RV64-SAME: () #[[ATTR0]] {
211 // CHECK-RV64-NEXT: entry:
212 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 3, i64 2)
213 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
215 size_t test_vsetvlmax_e64m4() {
216 return __riscv_vsetvlmax_e64m4();
219 // CHECK-RV64-LABEL: define dso_local i64 @test_vsetvlmax_e64m8
220 // CHECK-RV64-SAME: () #[[ATTR0]] {
221 // CHECK-RV64-NEXT: entry:
222 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.vsetvlimax.i64(i64 3, i64 3)
223 // CHECK-RV64-NEXT: ret i64 [[TMP0]]
225 size_t test_vsetvlmax_e64m8() {
226 return __riscv_vsetvlmax_e64m8();