File: neon-sm4-sm3.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (102 lines) | stat: -rw-r--r-- 4,043 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc %s -mtriple=aarch64 -mattr=+v8.3a,+sm4 -o - | FileCheck %s

define <4 x i32> @test_vsm3partw1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3partw1:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3partw1 v0.4s, v1.4s, v2.4s
; CHECK-NEXT:    ret
entry:
  %vsm3partw1.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3partw1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
  ret <4 x i32> %vsm3partw1.i
}

define <4 x i32> @test_vsm3partw2(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3partw2:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3partw2 v0.4s, v1.4s, v2.4s
; CHECK-NEXT:    ret
entry:
  %vsm3partw2.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3partw2(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
  ret <4 x i32> %vsm3partw2.i
}

define <4 x i32> @test_vsm3ss1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3ss1:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3ss1 v0.4s, v0.4s, v1.4s, v2.4s
; CHECK-NEXT:    ret
entry:
  %vsm3ss1.i = tail call <4 x i32> @llvm.aarch64.crypto.sm3ss1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
  ret <4 x i32> %vsm3ss1.i
}

define <4 x i32> @test_vsm3tt1a(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3tt1a:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3tt1a v0.4s, v1.4s, v2.s[2]
; CHECK-NEXT:    ret
entry:
  %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)
  ret <4 x i32> %vsm3tt1a.i
}

define <4 x i32> @test_vsm3tt1b(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3tt1b:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3tt1b v0.4s, v1.4s, v2.s[2]
; CHECK-NEXT:    ret
entry:
  %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)
  ret <4 x i32> %vsm3tt1b.i
}

define <4 x i32> @test_vsm3tt2a(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3tt2a:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3tt2a v0.4s, v1.4s, v2.s[2]
; CHECK-NEXT:    ret
entry:
  %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)
  ret <4 x i32> %vsm3tt2a.i
}

define <4 x i32> @test_vsm3tt2b(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
; CHECK-LABEL: test_vsm3tt2b:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm3tt2b v0.4s, v1.4s, v2.s[2]
; CHECK-NEXT:    ret
entry:
  %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)
  ret <4 x i32> %vsm3tt2b.i
}

define <4 x i32> @test_vsm4e(<4 x i32> %a, <4 x i32> %b) {
; CHECK-LABEL: test_vsm4e:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm4e v0.4s, v1.4s
; CHECK-NEXT:    ret
entry:
  %vsm4e.i = tail call <4 x i32> @llvm.aarch64.crypto.sm4e(<4 x i32> %a, <4 x i32> %b)
  ret <4 x i32> %vsm4e.i
}

define <4 x i32> @test_vsm4ekey(<4 x i32> %a, <4 x i32> %b) {
; CHECK-LABEL: test_vsm4ekey:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    sm4ekey v0.4s, v0.4s, v1.4s
; CHECK-NEXT:    ret
entry:
  %vsm4ekey.i = tail call <4 x i32> @llvm.aarch64.crypto.sm4ekey(<4 x i32> %a, <4 x i32> %b)
  ret <4 x i32> %vsm4ekey.i
}

declare <4 x i32> @llvm.aarch64.crypto.sm3partw1(<4 x i32>, <4 x i32>, <4 x i32>)
declare <4 x i32> @llvm.aarch64.crypto.sm3partw2(<4 x i32>, <4 x i32>, <4 x i32>)
declare <4 x i32> @llvm.aarch64.crypto.sm3ss1(<4 x i32>, <4 x i32>, <4 x i32>)
declare <4 x i32> @llvm.aarch64.crypto.sm3tt1a(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
declare <4 x i32> @llvm.aarch64.crypto.sm3tt2b(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
declare <4 x i32> @llvm.aarch64.crypto.sm3tt2a(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
declare <4 x i32> @llvm.aarch64.crypto.sm3tt1b(<4 x i32>, <4 x i32>, <4 x i32>, i64 immarg)
declare <4 x i32> @llvm.aarch64.crypto.sm4e(<4 x i32>, <4 x i32>)
declare <4 x i32> @llvm.aarch64.crypto.sm4ekey(<4 x i32>, <4 x i32>)