1 ; RUN: llc -verify-machineinstrs -mcpu=pwr10 -mtriple=powerpc64le-unknown-unknown \
2 ; RUN: -ppc-asm-full-reg-names --ppc-vsr-nums-as-vr < %s | FileCheck %s
4 ; Function Attrs: nounwind
6 ; CHECK: xxlandc v2, v2, v3
8 define dso_local <4 x i32> @and_not(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
10 %neg = xor <4 x i32> %B, <i32 -1, i32 -1, i32 -1, i32 -1>
11 %and = and <4 x i32> %neg, %A
15 ; Function Attrs: nounwind
16 ; CHECK-LABEL: and_and8
17 ; CHECK: xxeval v2, v3, v2, v4, 1
19 define dso_local <16 x i8> @and_and8(<16 x i8> %A, <16 x i8> %B, <16 x i8> %C) local_unnamed_addr #0 {
21 %and = and <16 x i8> %B, %A
22 %and1 = and <16 x i8> %and, %C
26 ; Function Attrs: nounwind
27 ; CHECK-LABEL: and_and16
28 ; CHECK: xxeval v2, v3, v2, v4, 1
30 define dso_local <8 x i16> @and_and16(<8 x i16> %A, <8 x i16> %B, <8 x i16> %C) local_unnamed_addr #0 {
32 %and = and <8 x i16> %B, %A
33 %and1 = and <8 x i16> %and, %C
37 ; Function Attrs: nounwind
38 ; CHECK-LABEL: and_and32
39 ; CHECK: xxeval v2, v3, v2, v4, 1
41 define dso_local <4 x i32> @and_and32(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
43 %and = and <4 x i32> %B, %A
44 %and1 = and <4 x i32> %and, %C
48 ; Function Attrs: nounwind
49 ; CHECK-LABEL: and_and64
50 ; CHECK: xxeval v2, v3, v2, v4, 1
52 define dso_local <2 x i64> @and_and64(<2 x i64> %A, <2 x i64> %B, <2 x i64> %C) local_unnamed_addr #0 {
54 %and = and <2 x i64> %B, %A
55 %and1 = and <2 x i64> %and, %C
59 ; Function Attrs: nounwind
60 ; CHECK-LABEL: and_nand
61 ; CHECK: xxeval v2, v2, v4, v3, 14
63 define dso_local <4 x i32> @and_nand(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
65 %and = and <4 x i32> %C, %B
66 %neg = xor <4 x i32> %and, <i32 -1, i32 -1, i32 -1, i32 -1>
67 %and1 = and <4 x i32> %neg, %A
71 ; Function Attrs: nounwind
73 ; CHECK: xxeval v2, v2, v4, v3, 7
75 define dso_local <4 x i32> @and_or(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
77 %or = or <4 x i32> %C, %B
78 %and = and <4 x i32> %or, %A
82 ; Function Attrs: nounwind
83 ; CHECK-LABEL: and_nor
84 ; CHECK: xxeval v2, v2, v4, v3, 8
86 define dso_local <4 x i32> @and_nor(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
88 %or = or <4 x i32> %C, %B
89 %neg = xor <4 x i32> %or, <i32 -1, i32 -1, i32 -1, i32 -1>
90 %and = and <4 x i32> %neg, %A
94 ; Function Attrs: nounwind
95 ; CHECK-LABEL: and_xor
96 ; CHECK: xxeval v2, v2, v4, v3, 6
98 define dso_local <4 x i32> @and_xor(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
100 %xor = xor <4 x i32> %C, %B
101 %and = and <4 x i32> %xor, %A
105 ; Function Attrs: nounwind
106 ; CHECK-LABEL: and_eqv
107 ; CHECK: xxeval v2, v2, v3, v4, 9
109 define dso_local <4 x i32> @and_eqv(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
111 %xor = xor <4 x i32> %B, <i32 -1, i32 -1, i32 -1, i32 -1>
112 %neg = xor <4 x i32> %xor, %C
113 %and = and <4 x i32> %neg, %A
117 ; Function Attrs: nounwind
118 ; CHECK-LABEL: nand_nand
119 ; CHECK: xxeval v2, v2, v4, v3, 241
121 define dso_local <4 x i32> @nand_nand(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
123 %and = and <4 x i32> %C, %B
124 %A.not = xor <4 x i32> %A, <i32 -1, i32 -1, i32 -1, i32 -1>
125 %neg2 = or <4 x i32> %and, %A.not
129 ; Function Attrs: nounwind
130 ; CHECK-LABEL: nand_and
131 ; CHECK: xxeval v2, v3, v2, v4, 254
133 define dso_local <4 x i32> @nand_and(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
135 %and = and <4 x i32> %B, %A
136 %and1 = and <4 x i32> %and, %C
137 %neg = xor <4 x i32> %and1, <i32 -1, i32 -1, i32 -1, i32 -1>
141 ; Function Attrs: nounwind
142 ; CHECK-LABEL: nand_xor
143 ; CHECK: xxeval v2, v2, v4, v3, 249
145 define dso_local <4 x i32> @nand_xor(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
147 %xor = xor <4 x i32> %C, %B
148 %and = and <4 x i32> %xor, %A
149 %neg = xor <4 x i32> %and, <i32 -1, i32 -1, i32 -1, i32 -1>
153 ; Function Attrs: nounwind
154 ; CHECK-LABEL: nand_eqv
155 ; CHECK: xxeval v2, v2, v4, v3, 246
157 define dso_local <4 x i32> @nand_eqv(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
159 %xor = xor <4 x i32> %C, %B
160 %A.not = xor <4 x i32> %A, <i32 -1, i32 -1, i32 -1, i32 -1>
161 %neg1 = or <4 x i32> %xor, %A.not
165 ; Function Attrs: nounwind
166 ; CHECK-LABEL: nand_or
167 ; CHECK: xxeval v2, v2, v4, v3, 248
169 define dso_local <4 x i32> @nand_or(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
171 %or = or <4 x i32> %C, %B
172 %and = and <4 x i32> %or, %A
173 %neg = xor <4 x i32> %and, <i32 -1, i32 -1, i32 -1, i32 -1>
177 ; Function Attrs: nounwind
178 ; CHECK-LABEL: nand_nor
179 ; CHECK: xxeval v2, v2, v3, v4, 247
181 define dso_local <4 x i32> @nand_nor(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
183 %A.not = xor <4 x i32> %A, <i32 -1, i32 -1, i32 -1, i32 -1>
184 %or = or <4 x i32> %A.not, %B
185 %neg1 = or <4 x i32> %or, %C
189 attributes #0 = { nounwind }