1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc %s -mtriple=aarch64 -mattr=+v8.3a,+sm4 -o - | FileCheck %s
4 define <4 x i32> @test_vsm3partw1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
5 ; CHECK-LABEL: test_vsm3partw1:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: sm3partw1 v0.4s, v1.4s, v2.4s
10 %vsm3partw1.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3partw1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
11 ret <4 x i32> %vsm3partw1.i
14 define <4 x i32> @test_vsm3partw2(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
15 ; CHECK-LABEL: test_vsm3partw2:
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: sm3partw2 v0.4s, v1.4s, v2.4s
20 %vsm3partw2.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3partw2(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
21 ret <4 x i32> %vsm3partw2.i
24 define <4 x i32> @test_vsm3ss1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
25 ; CHECK-LABEL: test_vsm3ss1:
26 ; CHECK: // %bb.0: // %entry
27 ; CHECK-NEXT: sm3ss1 v0.4s, v0.4s, v1.4s, v2.4s
30 %vsm3ss1.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3ss1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
31 ret <4 x i32> %vsm3ss1.i
34 define <4 x i32> @test_vsm3tt1a(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
35 ; CHECK-LABEL: test_vsm3tt1a:
36 ; CHECK: // %bb.0: // %entry
37 ; CHECK-NEXT: sm3tt1a v0.4s, v1.4s, v2.s[2]
40 %vsm3tt1a.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3tt1a(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, i64 2)
41 ret <4 x i32> %vsm3tt1a.i
44 define <4 x i32> @test_vsm3tt1b(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
45 ; CHECK-LABEL: test_vsm3tt1b:
46 ; CHECK: // %bb.0: // %entry
47 ; CHECK-NEXT: sm3tt1b v0.4s, v1.4s, v2.s[2]
50 %vsm3tt1b.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3tt1b(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, i64 2)
51 ret <4 x i32> %vsm3tt1b.i
54 define <4 x i32> @test_vsm3tt2a(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
55 ; CHECK-LABEL: test_vsm3tt2a:
56 ; CHECK: // %bb.0: // %entry
57 ; CHECK-NEXT: sm3tt2a v0.4s, v1.4s, v2.s[2]
60 %vsm3tt2a.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3tt2a(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, i64 2)
61 ret <4 x i32> %vsm3tt2a.i
64 define <4 x i32> @test_vsm3tt2b(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
65 ; CHECK-LABEL: test_vsm3tt2b:
66 ; CHECK: // %bb.0: // %entry
67 ; CHECK-NEXT: sm3tt2b v0.4s, v1.4s, v2.s[2]
70 %vsm3tt2b.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3tt2b(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, i64 2)
71 ret <4 x i32> %vsm3tt2b.i
74 define <4 x i32> @test_vsm4e(<4 x i32> %a, <4 x i32> %b) {
75 ; CHECK-LABEL: test_vsm4e:
76 ; CHECK: // %bb.0: // %entry
77 ; CHECK-NEXT: sm4e v0.4s, v1.4s
80 %vsm4e.i = tail call <4 x i32> @llvm.aarch64.crypto.sm4e(<4 x i32> %a, <4 x i32> %b)
81 ret <4 x i32> %vsm4e.i
84 define <4 x i32> @test_vsm4ekey(<4 x i32> %a, <4 x i32> %b) {
85 ; CHECK-LABEL: test_vsm4ekey:
86 ; CHECK: // %bb.0: // %entry
87 ; CHECK-NEXT: sm4ekey v0.4s, v0.4s, v1.4s
90 %vsm4ekey.i = tail call <4 x i32> @llvm.aarch64.crypto.sm4ekey(<4 x i32> %a, <4 x i32> %b)
91 ret <4 x i32> %vsm4ekey.i
94 declare <4 x i32> @llvm.aarch64.crypto.sm3partw1(<4 x i32>, <4 x i32>, <4 x i32>)
95 declare <4 x i32> @llvm.aarch64.crypto.sm3partw2(<4 x i32>, <4 x i32>, <4 x i32>)
96 declare <4 x i32> @llvm.aarch64.crypto.sm3ss1(<4 x i32>, <4 x i32>, <4 x i32>)
97 declare <4 x i32> @llvm.aarch64.crypto.sm3tt1a(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
98 declare <4 x i32> @llvm.aarch64.crypto.sm3tt2b(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
99 declare <4 x i32> @llvm.aarch64.crypto.sm3tt2a(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
100 declare <4 x i32> @llvm.aarch64.crypto.sm3tt1b(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
101 declare <4 x i32> @llvm.aarch64.crypto.sm4e(<4 x i32>, <4 x i32>)
102 declare <4 x i32> @llvm.aarch64.crypto.sm4ekey(<4 x i32>, <4 x i32>)