1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --extra_scrub
2 ; RUN: llc -mtriple=aarch64 -mattr=+sha3 < %s | FileCheck --check-prefix=SHA3 %s
3 ; RUN: llc -mtriple=aarch64 -mattr=-sha3 < %s | FileCheck --check-prefix=NOSHA3 %s
5 define <16 x i8> @eor3_16x8_left(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2) {
6 ; SHA3-LABEL: eor3_16x8_left:
8 ; SHA3-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
11 ; NOSHA3-LABEL: eor3_16x8_left:
13 ; NOSHA3-NEXT: eor v0.16b, v0.16b, v1.16b
14 ; NOSHA3-NEXT: eor v0.16b, v2.16b, v0.16b
16 %4 = xor <16 x i8> %0, %1
17 %5 = xor <16 x i8> %2, %4
21 define <16 x i8> @eor3_16x8_right(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2) {
22 ; SHA3-LABEL: eor3_16x8_right:
24 ; SHA3-NEXT: eor3 v0.16b, v1.16b, v2.16b, v0.16b
27 ; NOSHA3-LABEL: eor3_16x8_right:
29 ; NOSHA3-NEXT: eor v1.16b, v1.16b, v2.16b
30 ; NOSHA3-NEXT: eor v0.16b, v1.16b, v0.16b
32 %4 = xor <16 x i8> %1, %2
33 %5 = xor <16 x i8> %4, %0
37 define <8 x i16> @eor3_8x16_left(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2) {
38 ; SHA3-LABEL: eor3_8x16_left:
40 ; SHA3-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
43 ; NOSHA3-LABEL: eor3_8x16_left:
45 ; NOSHA3-NEXT: eor v0.16b, v0.16b, v1.16b
46 ; NOSHA3-NEXT: eor v0.16b, v2.16b, v0.16b
48 %4 = xor <8 x i16> %0, %1
49 %5 = xor <8 x i16> %2, %4
53 define <8 x i16> @eor3_8x16_right(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2) {
54 ; SHA3-LABEL: eor3_8x16_right:
56 ; SHA3-NEXT: eor3 v0.16b, v1.16b, v2.16b, v0.16b
59 ; NOSHA3-LABEL: eor3_8x16_right:
61 ; NOSHA3-NEXT: eor v1.16b, v1.16b, v2.16b
62 ; NOSHA3-NEXT: eor v0.16b, v1.16b, v0.16b
64 %4 = xor <8 x i16> %1, %2
65 %5 = xor <8 x i16> %4, %0
69 define <4 x i32> @eor3_4x32_left(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) {
70 ; SHA3-LABEL: eor3_4x32_left:
72 ; SHA3-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
75 ; NOSHA3-LABEL: eor3_4x32_left:
77 ; NOSHA3-NEXT: eor v0.16b, v0.16b, v1.16b
78 ; NOSHA3-NEXT: eor v0.16b, v2.16b, v0.16b
80 %4 = xor <4 x i32> %0, %1
81 %5 = xor <4 x i32> %2, %4
85 define <4 x i32> @eor3_4x32_right(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) {
86 ; SHA3-LABEL: eor3_4x32_right:
88 ; SHA3-NEXT: eor3 v0.16b, v1.16b, v2.16b, v0.16b
91 ; NOSHA3-LABEL: eor3_4x32_right:
93 ; NOSHA3-NEXT: eor v1.16b, v1.16b, v2.16b
94 ; NOSHA3-NEXT: eor v0.16b, v1.16b, v0.16b
96 %4 = xor <4 x i32> %1, %2
97 %5 = xor <4 x i32> %4, %0
101 define <2 x i64> @eor3_2x64_left(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) {
102 ; SHA3-LABEL: eor3_2x64_left:
104 ; SHA3-NEXT: eor3 v0.16b, v0.16b, v1.16b, v2.16b
107 ; NOSHA3-LABEL: eor3_2x64_left:
109 ; NOSHA3-NEXT: eor v0.16b, v0.16b, v1.16b
110 ; NOSHA3-NEXT: eor v0.16b, v2.16b, v0.16b
112 %4 = xor <2 x i64> %0, %1
113 %5 = xor <2 x i64> %2, %4
117 define <2 x i64> @eor3_2x64_right(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) {
118 ; SHA3-LABEL: eor3_2x64_right:
120 ; SHA3-NEXT: eor3 v0.16b, v1.16b, v2.16b, v0.16b
123 ; NOSHA3-LABEL: eor3_2x64_right:
125 ; NOSHA3-NEXT: eor v1.16b, v1.16b, v2.16b
126 ; NOSHA3-NEXT: eor v0.16b, v1.16b, v0.16b
128 %4 = xor <2 x i64> %1, %2
129 %5 = xor <2 x i64> %4, %0
133 define <2 x i64> @eor3_vnot(<2 x i64> %0, <2 x i64> %1) {
134 ; SHA3-LABEL: eor3_vnot:
136 ; SHA3-NEXT: eor v0.16b, v0.16b, v1.16b
137 ; SHA3-NEXT: mvn v0.16b, v0.16b
140 ; NOSHA3-LABEL: eor3_vnot:
142 ; NOSHA3-NEXT: eor v0.16b, v0.16b, v1.16b
143 ; NOSHA3-NEXT: mvn v0.16b, v0.16b
145 %3 = xor <2 x i64> %0, <i64 -1, i64 -1>
146 %4 = xor <2 x i64> %3, %1