1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr10 -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: -ppc-asm-full-reg-names --ppc-vsr-nums-as-vr < %s | FileCheck %s
5 ; (eqv A, (and B, C)) 225
6 define dso_local <2 x i64> @eqvA_andB_C(<2 x i64> %A, <2 x i64> %B, <2 x i64> %C) local_unnamed_addr #0 {
7 ; CHECK-LABEL: eqvA_andB_C:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 225
12 %and = and <2 x i64> %B, %C
13 %xor = xor <2 x i64> %A, %and
14 %neg = xor <2 x i64> %xor, <i64 -1, i64 -1>
18 ; (eqv A, (or B, C)) 135
19 define dso_local <4 x i32> @eqvA_orB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
20 ; CHECK-LABEL: eqvA_orB_C:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 135
25 %or = or <4 x i32> %B, %C
26 %xor = xor <4 x i32> %A, %or
27 %neg = xor <4 x i32> %xor, <i32 -1, i32 -1, i32 -1, i32 -1>
32 define dso_local <8 x i16> @eqvA_B_C(<8 x i16> %A, <8 x i16> %B, <8 x i16> %C) local_unnamed_addr #0 {
33 ; CHECK-LABEL: eqvA_B_C:
34 ; CHECK: # %bb.0: # %entry
35 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 150
38 %and = and <8 x i16> %B, %C
39 %and1 = and <8 x i16> %A, %and
40 %or = or <8 x i16> %B, %C
41 %or1 = or <8 x i16> %A, %or
42 %neg = xor <8 x i16> %or1, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
43 %or2 = or <8 x i16> %and1, %neg
47 ; (nor A, (and B, C)) 224
48 define dso_local <16 x i8> @norA_andB_C(<16 x i8> %A, <16 x i8> %B, <16 x i8> %C) local_unnamed_addr #0 {
49 ; CHECK-LABEL: norA_andB_C:
50 ; CHECK: # %bb.0: # %entry
51 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 224
54 %and = and <16 x i8> %B, %C
55 %or = or <16 x i8> %A, %and
56 %neg = xor <16 x i8> %or, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
60 ; (nor A, (eqv B, C)) 96
61 define dso_local <4 x i32> @norA_eqvB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
62 ; CHECK-LABEL: norA_eqvB_C:
63 ; CHECK: # %bb.0: # %entry
64 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 96
67 %neg = xor <4 x i32> %A, <i32 -1, i32 -1, i32 -1, i32 -1>
68 %xor = xor <4 x i32> %B, %C
69 %and = and <4 x i32> %neg, %xor
73 ; (nor A, (nand B, C)) 16
74 define dso_local <4 x i32> @norA_nandB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
75 ; CHECK-LABEL: norA_nandB_C:
76 ; CHECK: # %bb.0: # %entry
77 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 16
80 %neg = xor <4 x i32> %A, <i32 -1, i32 -1, i32 -1, i32 -1>
81 %and = and <4 x i32> %B, %C
82 %and1 = and <4 x i32> %neg, %and
86 ; (nor A, (nor B, C)) 112
87 define dso_local <4 x i32> @norA_norB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
88 ; CHECK-LABEL: norA_norB_C:
89 ; CHECK: # %bb.0: # %entry
90 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 112
93 %neg = xor <4 x i32> %A, <i32 -1, i32 -1, i32 -1, i32 -1>
94 %or = or <4 x i32> %B, %C
95 %and = and <4 x i32> %neg, %or
99 ; (nor A, (xor B, C)) 144
100 define dso_local <4 x i32> @norA_xorB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
101 ; CHECK-LABEL: norA_xorB_C:
102 ; CHECK: # %bb.0: # %entry
103 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 144
106 %xor = xor <4 x i32> %B, %C
107 %or = or <4 x i32> %A, %xor
108 %neg = xor <4 x i32> %or, <i32 -1, i32 -1, i32 -1, i32 -1>
113 define dso_local <4 x i32> @norA_B_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
114 ; CHECK-LABEL: norA_B_C:
115 ; CHECK: # %bb.0: # %entry
116 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 128
119 %or = or <4 x i32> %B, %C
120 %or1 = or <4 x i32> %A, %or
121 %neg = xor <4 x i32> %or1, <i32 -1, i32 -1, i32 -1, i32 -1>
125 ; (or A, (and B, C)) 31
126 define dso_local <4 x i32> @orA_andB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
127 ; CHECK-LABEL: orA_andB_C:
128 ; CHECK: # %bb.0: # %entry
129 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 31
132 %and = and <4 x i32> %B, %C
133 %or = or <4 x i32> %A, %and
137 ; (or A, (eqv B, C)) 159
138 define dso_local <4 x i32> @orA_eqvB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
139 ; CHECK-LABEL: orA_eqvB_C:
140 ; CHECK: # %bb.0: # %entry
141 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 159
144 %xor = xor <4 x i32> %B, %C
145 %neg = xor <4 x i32> %xor, <i32 -1, i32 -1, i32 -1, i32 -1>
146 %or = or <4 x i32> %A, %neg
150 ; (or A, (nand B, C)) 239
151 define dso_local <4 x i32> @orA_nandB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
152 ; CHECK-LABEL: orA_nandB_C:
153 ; CHECK: # %bb.0: # %entry
154 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 239
157 %and = and <4 x i32> %B, %C
158 %neg = xor <4 x i32> %and, <i32 -1, i32 -1, i32 -1, i32 -1>
159 %or = or <4 x i32> %A, %neg
163 ; (or A, (nor B, C)) 143
164 define dso_local <4 x i32> @orA_norB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
165 ; CHECK-LABEL: orA_norB_C:
166 ; CHECK: # %bb.0: # %entry
167 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 143
170 %or = or <4 x i32> %B, %C
171 %neg = xor <4 x i32> %or, <i32 -1, i32 -1, i32 -1, i32 -1>
172 %or1 = or <4 x i32> %A, %neg
176 ; (or A, (xor B, C)) 111
177 define dso_local <4 x i32> @orA_xorB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
178 ; CHECK-LABEL: orA_xorB_C:
179 ; CHECK: # %bb.0: # %entry
180 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 111
183 %xor = xor <4 x i32> %B, %C
184 %or = or <4 x i32> %A, %xor
189 define dso_local <4 x i32> @orA_B_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
190 ; CHECK-LABEL: orA_B_C:
191 ; CHECK: # %bb.0: # %entry
192 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 127
195 %or = or <4 x i32> %B, %C
196 %or1 = or <4 x i32> %A, %or
200 ; (xor A, (and B, C)) 30
201 define dso_local <4 x i32> @xorA_andB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
202 ; CHECK-LABEL: xorA_andB_C:
203 ; CHECK: # %bb.0: # %entry
204 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 30
207 %and = and <4 x i32> %B, %C
208 %xor = xor <4 x i32> %A, %and
212 ; (xor A, (or B, C)) 120
213 define dso_local <4 x i32> @xorA_orB_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
214 ; CHECK-LABEL: xorA_orB_C:
215 ; CHECK: # %bb.0: # %entry
216 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 120
219 %or = or <4 x i32> %B, %C
220 %xor = xor <4 x i32> %A, %or
225 define dso_local <4 x i32> @xorA_B_C(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C) local_unnamed_addr #0 {
226 ; CHECK-LABEL: xorA_B_C:
227 ; CHECK: # %bb.0: # %entry
228 ; CHECK-NEXT: xxeval v2, v2, v3, v4, 105
231 %xor = xor <4 x i32> %B, %C
232 %xor1 = xor <4 x i32> %A, %xor
236 attributes #0 = { nounwind }