1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc %s -mtriple=aarch64 -mattr=+v8.3a,+sha3 -o - | FileCheck %s
4 define <2 x i64> @test_vsha512h(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
5 ; CHECK-LABEL: test_vsha512h:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: sha512h q0, q1, v2.2d
10 %vsha512h.i = tail call <2 x i64> @llvm.aarch64.crypto.sha512h(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
11 ret <2 x i64> %vsha512h.i
14 define <2 x i64> @test_vsha512h2(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
15 ; CHECK-LABEL: test_vsha512h2:
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: sha512h2 q0, q1, v2.2d
20 %vsha512h2.i = tail call <2 x i64> @llvm.aarch64.crypto.sha512h2(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
21 ret <2 x i64> %vsha512h2.i
24 define <2 x i64> @test_vsha512su0(<2 x i64> %a, <2 x i64> %b) {
25 ; CHECK-LABEL: test_vsha512su0:
26 ; CHECK: // %bb.0: // %entry
27 ; CHECK-NEXT: sha512su0 v0.2d, v1.2d
30 %vsha512su0.i = tail call <2 x i64> @llvm.aarch64.crypto.sha512su0(<2 x i64> %a, <2 x i64> %b)
31 ret <2 x i64> %vsha512su0.i
34 define <2 x i64> @test_vsha512su1(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
35 ; CHECK-LABEL: test_vsha512su1:
36 ; CHECK: // %bb.0: // %entry
37 ; CHECK-NEXT: sha512su1 v0.2d, v1.2d, v2.2d
40 %vsha512su1.i = tail call <2 x i64> @llvm.aarch64.crypto.sha512su1(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
41 ret <2 x i64> %vsha512su1.i
44 define <2 x i64> @test_vrax1(<2 x i64> %a, <2 x i64> %b) {
45 ; CHECK-LABEL: test_vrax1:
46 ; CHECK: // %bb.0: // %entry
47 ; CHECK-NEXT: rax1 v0.2d, v0.2d, v1.2d
50 %vrax1.i = tail call <2 x i64> @llvm.aarch64.crypto.rax1(<2 x i64> %a, <2 x i64> %b)
51 ret <2 x i64> %vrax1.i
54 define <2 x i64> @test_vxar(<2 x i64> %a, <2 x i64> %b) {
55 ; CHECK-LABEL: test_vxar:
56 ; CHECK: // %bb.0: // %entry
57 ; CHECK-NEXT: xar v0.2d, v0.2d, v1.2d, #1
60 %vxar.i = tail call <2 x i64> @llvm.aarch64.crypto.xar(<2 x i64> %a, <2 x i64> %b, i64 1)
64 define <16 x i8> @test_bcax_8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
65 ; CHECK-LABEL: test_bcax_8:
66 ; CHECK: // %bb.0: // %entry
67 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
70 %vbcax_8.i = tail call <16 x i8> @llvm.aarch64.crypto.bcaxu.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c)
71 ret <16 x i8> %vbcax_8.i
74 define <16 x i8> @test_eor3_8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
75 ; CHECK-LABEL: test_eor3_8:
76 ; CHECK: // %bb.0: // %entry
77 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
80 %veor3_8.i = tail call <16 x i8> @llvm.aarch64.crypto.eor3u.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c)
81 ret <16 x i8> %veor3_8.i
84 define <16 x i8> @test_bcax_s8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
85 ; CHECK-LABEL: test_bcax_s8:
86 ; CHECK: // %bb.0: // %entry
87 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
90 %vbcax_8.i = tail call <16 x i8> @llvm.aarch64.crypto.bcaxs.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c)
91 ret <16 x i8> %vbcax_8.i
94 define <16 x i8> @test_eor3_s8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
95 ; CHECK-LABEL: test_eor3_s8:
96 ; CHECK: // %bb.0: // %entry
97 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
100 %veor3_8.i = tail call <16 x i8> @llvm.aarch64.crypto.eor3s.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c)
101 ret <16 x i8> %veor3_8.i
104 define <8 x i16> @test_bcax_16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
105 ; CHECK-LABEL: test_bcax_16:
106 ; CHECK: // %bb.0: // %entry
107 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
110 %vbcax_16.i = tail call <8 x i16> @llvm.aarch64.crypto.bcaxu.v8i16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c)
111 ret <8 x i16> %vbcax_16.i
114 define <8 x i16> @test_eor3_16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
115 ; CHECK-LABEL: test_eor3_16:
116 ; CHECK: // %bb.0: // %entry
117 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
120 %veor3_16.i = tail call <8 x i16> @llvm.aarch64.crypto.eor3u.v8i16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c)
121 ret <8 x i16> %veor3_16.i
124 define <8 x i16> @test_bcax_s16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
125 ; CHECK-LABEL: test_bcax_s16:
126 ; CHECK: // %bb.0: // %entry
127 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
130 %vbcax_16.i = tail call <8 x i16> @llvm.aarch64.crypto.bcaxs.v8i16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c)
131 ret <8 x i16> %vbcax_16.i
134 define <8 x i16> @test_eor3_s16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
135 ; CHECK-LABEL: test_eor3_s16:
136 ; CHECK: // %bb.0: // %entry
137 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
140 %veor3_16.i = tail call <8 x i16> @llvm.aarch64.crypto.eor3s.v8i16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c)
141 ret <8 x i16> %veor3_16.i
144 define <4 x i32> @test_bcax_32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
145 ; CHECK-LABEL: test_bcax_32:
146 ; CHECK: // %bb.0: // %entry
147 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
150 %vbcax_32.i = tail call <4 x i32> @llvm.aarch64.crypto.bcaxu.v4i32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
151 ret <4 x i32> %vbcax_32.i
154 define <4 x i32> @test_eor3_32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
155 ; CHECK-LABEL: test_eor3_32:
156 ; CHECK: // %bb.0: // %entry
157 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
160 %veor3_32.i = tail call <4 x i32> @llvm.aarch64.crypto.eor3u.v4i32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
161 ret <4 x i32> %veor3_32.i
164 define <4 x i32> @test_bcax_s32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
165 ; CHECK-LABEL: test_bcax_s32:
166 ; CHECK: // %bb.0: // %entry
167 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
170 %vbcax_32.i = tail call <4 x i32> @llvm.aarch64.crypto.bcaxs.v4i32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
171 ret <4 x i32> %vbcax_32.i
174 define <4 x i32> @test_eor3_s32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
175 ; CHECK-LABEL: test_eor3_s32:
176 ; CHECK: // %bb.0: // %entry
177 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
180 %veor3_32.i = tail call <4 x i32> @llvm.aarch64.crypto.eor3s.v4i32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
181 ret <4 x i32> %veor3_32.i
184 define <2 x i64> @test_bcax_64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
185 ; CHECK-LABEL: test_bcax_64:
186 ; CHECK: // %bb.0: // %entry
187 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
190 %vbcax_64.i = tail call <2 x i64> @llvm.aarch64.crypto.bcaxu.v2i64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
191 ret <2 x i64> %vbcax_64.i
194 define <2 x i64> @test_eor3_64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
195 ; CHECK-LABEL: test_eor3_64:
196 ; CHECK: // %bb.0: // %entry
197 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
200 %veor3_64.i = tail call <2 x i64> @llvm.aarch64.crypto.eor3u.v2i64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
201 ret <2 x i64> %veor3_64.i
204 define <2 x i64> @test_bcax_s64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
205 ; CHECK-LABEL: test_bcax_s64:
206 ; CHECK: // %bb.0: // %entry
207 ; CHECK-NEXT: bcax v0.16b, v0.16b, v1.16b, v2.16b
210 %vbcax_64.i = tail call <2 x i64> @llvm.aarch64.crypto.bcaxs.v2i64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
211 ret <2 x i64> %vbcax_64.i
214 define <2 x i64> @test_eor3_s64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
215 ; CHECK-LABEL: test_eor3_s64:
216 ; CHECK: // %bb.0: // %entry
217 ; CHECK-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
220 %veor3_64.i = tail call <2 x i64> @llvm.aarch64.crypto.eor3s.v2i64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
221 ret <2 x i64> %veor3_64.i
224 declare <2 x i64> @llvm.aarch64.crypto.sha512h(<2 x i64>, <2 x i64>, <2 x i64>)
225 declare <2 x i64> @llvm.aarch64.crypto.sha512h2(<2 x i64>, <2 x i64>, <2 x i64>)
226 declare <2 x i64> @llvm.aarch64.crypto.sha512su0(<2 x i64>, <2 x i64>)
227 declare <2 x i64> @llvm.aarch64.crypto.sha512su1(<2 x i64>, <2 x i64>, <2 x i64>)
228 declare <2 x i64> @llvm.aarch64.crypto.rax1(<2 x i64>, <2 x i64>)
229 declare <2 x i64> @llvm.aarch64.crypto.xar(<2 x i64>, <2 x i64>, i64 immarg)
230 declare <16 x i8> @llvm.aarch64.crypto.bcaxu.v16i8(<16 x i8>, <16 x i8>, <16 x i8>)
231 declare <8 x i16> @llvm.aarch64.crypto.bcaxu.v8i16(<8 x i16>, <8 x i16>, <8 x i16>)
232 declare <4 x i32> @llvm.aarch64.crypto.bcaxu.v4i32(<4 x i32>, <4 x i32>, <4 x i32>)
233 declare <2 x i64> @llvm.aarch64.crypto.bcaxu.v2i64(<2 x i64>, <2 x i64>, <2 x i64>)
234 declare <16 x i8> @llvm.aarch64.crypto.bcaxs.v16i8(<16 x i8>, <16 x i8>, <16 x i8>)
235 declare <8 x i16> @llvm.aarch64.crypto.bcaxs.v8i16(<8 x i16>, <8 x i16>, <8 x i16>)
236 declare <4 x i32> @llvm.aarch64.crypto.bcaxs.v4i32(<4 x i32>, <4 x i32>, <4 x i32>)
237 declare <2 x i64> @llvm.aarch64.crypto.bcaxs.v2i64(<2 x i64>, <2 x i64>, <2 x i64>)
238 declare <16 x i8> @llvm.aarch64.crypto.eor3u.v16i8(<16 x i8>, <16 x i8>, <16 x i8>)
239 declare <8 x i16> @llvm.aarch64.crypto.eor3u.v8i16(<8 x i16>, <8 x i16>, <8 x i16>)
240 declare <4 x i32> @llvm.aarch64.crypto.eor3u.v4i32(<4 x i32>, <4 x i32>, <4 x i32>)
241 declare <2 x i64> @llvm.aarch64.crypto.eor3u.v2i64(<2 x i64>, <2 x i64>, <2 x i64>)
242 declare <16 x i8> @llvm.aarch64.crypto.eor3s.v16i8(<16 x i8>, <16 x i8>, <16 x i8>)
243 declare <8 x i16> @llvm.aarch64.crypto.eor3s.v8i16(<8 x i16>, <8 x i16>, <8 x i16>)
244 declare <4 x i32> @llvm.aarch64.crypto.eor3s.v4i32(<4 x i32>, <4 x i32>, <4 x i32>)
245 declare <2 x i64> @llvm.aarch64.crypto.eor3s.v2i64(<2 x i64>, <2 x i64>, <2 x i64>)