Debian Codegraph @

clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vaesef.c

raw
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 -target-feature +zvl512b \
4 // RUN: -target-feature +zvbb \
5 // RUN: -target-feature +zvbc \
6 // RUN: -target-feature +zvkb \
7 // RUN: -target-feature +zvkg \
8 // RUN: -target-feature +zvkned \
9 // RUN: -target-feature +zvknhb \
10 // RUN: -target-feature +zvksed \
11 // RUN: -target-feature +zvksh \
12 // RUN: -target-feature +experimental \
13 // RUN: -disable-O0-optnone \
14 // RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
15 // RUN: FileCheck --check-prefix=CHECK-RV64 %s
16
17 #include <riscv_vector.h>
18
19 // CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vaesef_vv_u32mf2
20 // CHECK-RV64-SAME: (<vscale x 1 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] {
21 // CHECK-RV64-NEXT: entry:
22 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i32> @llvm.riscv.vaesef.vv.nxv1i32.i64(<vscale x 1 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 [[VL]], i64 3)
23 // CHECK-RV64-NEXT: ret <vscale x 1 x i32> [[TMP0]]
24 //
25 vuint32mf2_t test_vaesef_vv_u32mf2(vuint32mf2_t vd, vuint32mf2_t vs2, size_t vl) {
26 return __riscv_vaesef_vv(vd, vs2, vl);
27 }
28
29 // CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vaesef_vs_u32mf2_u32mf2
30 // CHECK-RV64-SAME: (<vscale x 1 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
31 // CHECK-RV64-NEXT: entry:
32 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i32> @llvm.riscv.vaesef.vs.nxv1i32.nxv1i32.i64(<vscale x 1 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 [[VL]], i64 3)
33 // CHECK-RV64-NEXT: ret <vscale x 1 x i32> [[TMP0]]
34 //
35 vuint32mf2_t test_vaesef_vs_u32mf2_u32mf2(vuint32mf2_t vd, vuint32mf2_t vs2, size_t vl) {
36 return __riscv_vaesef_vs(vd, vs2, vl);
37 }
38
39 // CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vaesef_vs_u32mf2_u32m1
40 // CHECK-RV64-SAME: (<vscale x 2 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
41 // CHECK-RV64-NEXT: entry:
42 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.riscv.vaesef.vs.nxv2i32.nxv1i32.i64(<vscale x 2 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 [[VL]], i64 3)
43 // CHECK-RV64-NEXT: ret <vscale x 2 x i32> [[TMP0]]
44 //
45 vuint32m1_t test_vaesef_vs_u32mf2_u32m1(vuint32m1_t vd, vuint32mf2_t vs2, size_t vl) {
46 return __riscv_vaesef_vs(vd, vs2, vl);
47 }
48
49 // CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vaesef_vs_u32mf2_u32m2
50 // CHECK-RV64-SAME: (<vscale x 4 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
51 // CHECK-RV64-NEXT: entry:
52 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.vaesef.vs.nxv4i32.nxv1i32.i64(<vscale x 4 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 [[VL]], i64 3)
53 // CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]]
54 //
55 vuint32m2_t test_vaesef_vs_u32mf2_u32m2(vuint32m2_t vd, vuint32mf2_t vs2, size_t vl) {
56 return __riscv_vaesef_vs(vd, vs2, vl);
57 }
58
59 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vaesef_vs_u32mf2_u32m4
60 // CHECK-RV64-SAME: (<vscale x 8 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
61 // CHECK-RV64-NEXT: entry:
62 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.vaesef.vs.nxv8i32.nxv1i32.i64(<vscale x 8 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 [[VL]], i64 3)
63 // CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]
64 //
65 vuint32m4_t test_vaesef_vs_u32mf2_u32m4(vuint32m4_t vd, vuint32mf2_t vs2, size_t vl) {
66 return __riscv_vaesef_vs(vd, vs2, vl);
67 }
68
69 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vaesef_vs_u32mf2_u32m8
70 // CHECK-RV64-SAME: (<vscale x 16 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
71 // CHECK-RV64-NEXT: entry:
72 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.vaesef.vs.nxv16i32.nxv1i32.i64(<vscale x 16 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 [[VL]], i64 3)
73 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
74 //
75 vuint32m8_t test_vaesef_vs_u32mf2_u32m8(vuint32m8_t vd, vuint32mf2_t vs2, size_t vl) {
76 return __riscv_vaesef_vs(vd, vs2, vl);
77 }
78
79 // CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vaesef_vv_u32m1
80 // CHECK-RV64-SAME: (<vscale x 2 x i32> [[VD:%.*]], <vscale x 2 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
81 // CHECK-RV64-NEXT: entry:
82 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.riscv.vaesef.vv.nxv2i32.i64(<vscale x 2 x i32> [[VD]], <vscale x 2 x i32> [[VS2]], i64 [[VL]], i64 3)
83 // CHECK-RV64-NEXT: ret <vscale x 2 x i32> [[TMP0]]
84 //
85 vuint32m1_t test_vaesef_vv_u32m1(vuint32m1_t vd, vuint32m1_t vs2, size_t vl) {
86 return __riscv_vaesef_vv(vd, vs2, vl);
87 }
88
89 // CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vaesef_vs_u32m1_u32m1
90 // CHECK-RV64-SAME: (<vscale x 2 x i32> [[VD:%.*]], <vscale x 2 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
91 // CHECK-RV64-NEXT: entry:
92 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.riscv.vaesef.vs.nxv2i32.nxv2i32.i64(<vscale x 2 x i32> [[VD]], <vscale x 2 x i32> [[VS2]], i64 [[VL]], i64 3)
93 // CHECK-RV64-NEXT: ret <vscale x 2 x i32> [[TMP0]]
94 //
95 vuint32m1_t test_vaesef_vs_u32m1_u32m1(vuint32m1_t vd, vuint32m1_t vs2, size_t vl) {
96 return __riscv_vaesef_vs(vd, vs2, vl);
97 }
98
99 // CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vaesef_vs_u32m1_u32m2
100 // CHECK-RV64-SAME: (<vscale x 4 x i32> [[VD:%.*]], <vscale x 2 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
101 // CHECK-RV64-NEXT: entry:
102 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.vaesef.vs.nxv4i32.nxv2i32.i64(<vscale x 4 x i32> [[VD]], <vscale x 2 x i32> [[VS2]], i64 [[VL]], i64 3)
103 // CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]]
104 //
105 vuint32m2_t test_vaesef_vs_u32m1_u32m2(vuint32m2_t vd, vuint32m1_t vs2, size_t vl) {
106 return __riscv_vaesef_vs(vd, vs2, vl);
107 }
108
109 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vaesef_vs_u32m1_u32m4
110 // CHECK-RV64-SAME: (<vscale x 8 x i32> [[VD:%.*]], <vscale x 2 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
111 // CHECK-RV64-NEXT: entry:
112 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.vaesef.vs.nxv8i32.nxv2i32.i64(<vscale x 8 x i32> [[VD]], <vscale x 2 x i32> [[VS2]], i64 [[VL]], i64 3)
113 // CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]
114 //
115 vuint32m4_t test_vaesef_vs_u32m1_u32m4(vuint32m4_t vd, vuint32m1_t vs2, size_t vl) {
116 return __riscv_vaesef_vs(vd, vs2, vl);
117 }
118
119 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vaesef_vs_u32m1_u32m8
120 // CHECK-RV64-SAME: (<vscale x 16 x i32> [[VD:%.*]], <vscale x 2 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
121 // CHECK-RV64-NEXT: entry:
122 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.vaesef.vs.nxv16i32.nxv2i32.i64(<vscale x 16 x i32> [[VD]], <vscale x 2 x i32> [[VS2]], i64 [[VL]], i64 3)
123 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
124 //
125 vuint32m8_t test_vaesef_vs_u32m1_u32m8(vuint32m8_t vd, vuint32m1_t vs2, size_t vl) {
126 return __riscv_vaesef_vs(vd, vs2, vl);
127 }
128
129 // CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vaesef_vv_u32m2
130 // CHECK-RV64-SAME: (<vscale x 4 x i32> [[VD:%.*]], <vscale x 4 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
131 // CHECK-RV64-NEXT: entry:
132 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.vaesef.vv.nxv4i32.i64(<vscale x 4 x i32> [[VD]], <vscale x 4 x i32> [[VS2]], i64 [[VL]], i64 3)
133 // CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]]
134 //
135 vuint32m2_t test_vaesef_vv_u32m2(vuint32m2_t vd, vuint32m2_t vs2, size_t vl) {
136 return __riscv_vaesef_vv(vd, vs2, vl);
137 }
138
139 // CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vaesef_vs_u32m2_u32m2
140 // CHECK-RV64-SAME: (<vscale x 4 x i32> [[VD:%.*]], <vscale x 4 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
141 // CHECK-RV64-NEXT: entry:
142 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.vaesef.vs.nxv4i32.nxv4i32.i64(<vscale x 4 x i32> [[VD]], <vscale x 4 x i32> [[VS2]], i64 [[VL]], i64 3)
143 // CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]]
144 //
145 vuint32m2_t test_vaesef_vs_u32m2_u32m2(vuint32m2_t vd, vuint32m2_t vs2, size_t vl) {
146 return __riscv_vaesef_vs(vd, vs2, vl);
147 }
148
149 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vaesef_vs_u32m2_u32m4
150 // CHECK-RV64-SAME: (<vscale x 8 x i32> [[VD:%.*]], <vscale x 4 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
151 // CHECK-RV64-NEXT: entry:
152 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.vaesef.vs.nxv8i32.nxv4i32.i64(<vscale x 8 x i32> [[VD]], <vscale x 4 x i32> [[VS2]], i64 [[VL]], i64 3)
153 // CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]
154 //
155 vuint32m4_t test_vaesef_vs_u32m2_u32m4(vuint32m4_t vd, vuint32m2_t vs2, size_t vl) {
156 return __riscv_vaesef_vs(vd, vs2, vl);
157 }
158
159 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vaesef_vs_u32m2_u32m8
160 // CHECK-RV64-SAME: (<vscale x 16 x i32> [[VD:%.*]], <vscale x 4 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
161 // CHECK-RV64-NEXT: entry:
162 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.vaesef.vs.nxv16i32.nxv4i32.i64(<vscale x 16 x i32> [[VD]], <vscale x 4 x i32> [[VS2]], i64 [[VL]], i64 3)
163 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
164 //
165 vuint32m8_t test_vaesef_vs_u32m2_u32m8(vuint32m8_t vd, vuint32m2_t vs2, size_t vl) {
166 return __riscv_vaesef_vs(vd, vs2, vl);
167 }
168
169 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vaesef_vv_u32m4
170 // CHECK-RV64-SAME: (<vscale x 8 x i32> [[VD:%.*]], <vscale x 8 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
171 // CHECK-RV64-NEXT: entry:
172 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.vaesef.vv.nxv8i32.i64(<vscale x 8 x i32> [[VD]], <vscale x 8 x i32> [[VS2]], i64 [[VL]], i64 3)
173 // CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]
174 //
175 vuint32m4_t test_vaesef_vv_u32m4(vuint32m4_t vd, vuint32m4_t vs2, size_t vl) {
176 return __riscv_vaesef_vv(vd, vs2, vl);
177 }
178
179 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vaesef_vs_u32m4_u32m4
180 // CHECK-RV64-SAME: (<vscale x 8 x i32> [[VD:%.*]], <vscale x 8 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
181 // CHECK-RV64-NEXT: entry:
182 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.vaesef.vs.nxv8i32.nxv8i32.i64(<vscale x 8 x i32> [[VD]], <vscale x 8 x i32> [[VS2]], i64 [[VL]], i64 3)
183 // CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]
184 //
185 vuint32m4_t test_vaesef_vs_u32m4_u32m4(vuint32m4_t vd, vuint32m4_t vs2, size_t vl) {
186 return __riscv_vaesef_vs(vd, vs2, vl);
187 }
188
189 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vaesef_vs_u32m4_u32m8
190 // CHECK-RV64-SAME: (<vscale x 16 x i32> [[VD:%.*]], <vscale x 8 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
191 // CHECK-RV64-NEXT: entry:
192 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.vaesef.vs.nxv16i32.nxv8i32.i64(<vscale x 16 x i32> [[VD]], <vscale x 8 x i32> [[VS2]], i64 [[VL]], i64 3)
193 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
194 //
195 vuint32m8_t test_vaesef_vs_u32m4_u32m8(vuint32m8_t vd, vuint32m4_t vs2, size_t vl) {
196 return __riscv_vaesef_vs(vd, vs2, vl);
197 }
198
199 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vaesef_vv_u32m8
200 // CHECK-RV64-SAME: (<vscale x 16 x i32> [[VD:%.*]], <vscale x 16 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
201 // CHECK-RV64-NEXT: entry:
202 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.vaesef.vv.nxv16i32.i64(<vscale x 16 x i32> [[VD]], <vscale x 16 x i32> [[VS2]], i64 [[VL]], i64 3)
203 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
204 //
205 vuint32m8_t test_vaesef_vv_u32m8(vuint32m8_t vd, vuint32m8_t vs2, size_t vl) {
206 return __riscv_vaesef_vv(vd, vs2, vl);
207 }
208