]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/rs6000/fusion.md
Update copyright years.
[thirdparty/gcc.git] / gcc / config / rs6000 / fusion.md
1 ;; Generated automatically by genfusion.pl
2
3 ;; Copyright (C) 2020-2022 Free Software Foundation, Inc.
4 ;;
5 ;; This file is part of GCC.
6 ;;
7 ;; GCC is free software; you can redistribute it and/or modify it under
8 ;; the terms of the GNU General Public License as published by the Free
9 ;; Software Foundation; either version 3, or (at your option) any later
10 ;; version.
11 ;;
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 ;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 ;; for more details.
16 ;;
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>.
20
21 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
22 ;; load mode is DI result mode is clobber compare mode is CC extend is none
23 (define_insn_and_split "*ld_cmpdi_cr0_DI_clobber_CC_none"
24 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
25 (compare:CC (match_operand:DI 1 "ds_form_mem_operand" "m")
26 (match_operand:DI 3 "const_m1_to_1_operand" "n")))
27 (clobber (match_scratch:DI 0 "=r"))]
28 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
29 "ld%X1 %0,%1\;cmpdi %2,%0,%3"
30 "&& reload_completed
31 && (cc_reg_not_cr0_operand (operands[2], CCmode)
32 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
33 DImode, NON_PREFIXED_DS))"
34 [(set (match_dup 0) (match_dup 1))
35 (set (match_dup 2)
36 (compare:CC (match_dup 0) (match_dup 3)))]
37 ""
38 [(set_attr "type" "fused_load_cmpi")
39 (set_attr "cost" "8")
40 (set_attr "length" "8")])
41
42 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
43 ;; load mode is DI result mode is clobber compare mode is CCUNS extend is none
44 (define_insn_and_split "*ld_cmpldi_cr0_DI_clobber_CCUNS_none"
45 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
46 (compare:CCUNS (match_operand:DI 1 "ds_form_mem_operand" "m")
47 (match_operand:DI 3 "const_0_to_1_operand" "n")))
48 (clobber (match_scratch:DI 0 "=r"))]
49 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
50 "ld%X1 %0,%1\;cmpldi %2,%0,%3"
51 "&& reload_completed
52 && (cc_reg_not_cr0_operand (operands[2], CCmode)
53 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
54 DImode, NON_PREFIXED_DS))"
55 [(set (match_dup 0) (match_dup 1))
56 (set (match_dup 2)
57 (compare:CCUNS (match_dup 0) (match_dup 3)))]
58 ""
59 [(set_attr "type" "fused_load_cmpi")
60 (set_attr "cost" "8")
61 (set_attr "length" "8")])
62
63 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
64 ;; load mode is DI result mode is DI compare mode is CC extend is none
65 (define_insn_and_split "*ld_cmpdi_cr0_DI_DI_CC_none"
66 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
67 (compare:CC (match_operand:DI 1 "ds_form_mem_operand" "m")
68 (match_operand:DI 3 "const_m1_to_1_operand" "n")))
69 (set (match_operand:DI 0 "gpc_reg_operand" "=r") (match_dup 1))]
70 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
71 "ld%X1 %0,%1\;cmpdi %2,%0,%3"
72 "&& reload_completed
73 && (cc_reg_not_cr0_operand (operands[2], CCmode)
74 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
75 DImode, NON_PREFIXED_DS))"
76 [(set (match_dup 0) (match_dup 1))
77 (set (match_dup 2)
78 (compare:CC (match_dup 0) (match_dup 3)))]
79 ""
80 [(set_attr "type" "fused_load_cmpi")
81 (set_attr "cost" "8")
82 (set_attr "length" "8")])
83
84 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
85 ;; load mode is DI result mode is DI compare mode is CCUNS extend is none
86 (define_insn_and_split "*ld_cmpldi_cr0_DI_DI_CCUNS_none"
87 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
88 (compare:CCUNS (match_operand:DI 1 "ds_form_mem_operand" "m")
89 (match_operand:DI 3 "const_0_to_1_operand" "n")))
90 (set (match_operand:DI 0 "gpc_reg_operand" "=r") (match_dup 1))]
91 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
92 "ld%X1 %0,%1\;cmpldi %2,%0,%3"
93 "&& reload_completed
94 && (cc_reg_not_cr0_operand (operands[2], CCmode)
95 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
96 DImode, NON_PREFIXED_DS))"
97 [(set (match_dup 0) (match_dup 1))
98 (set (match_dup 2)
99 (compare:CCUNS (match_dup 0) (match_dup 3)))]
100 ""
101 [(set_attr "type" "fused_load_cmpi")
102 (set_attr "cost" "8")
103 (set_attr "length" "8")])
104
105 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
106 ;; load mode is SI result mode is clobber compare mode is CC extend is none
107 (define_insn_and_split "*lwa_cmpdi_cr0_SI_clobber_CC_none"
108 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
109 (compare:CC (match_operand:SI 1 "ds_form_mem_operand" "m")
110 (match_operand:SI 3 "const_m1_to_1_operand" "n")))
111 (clobber (match_scratch:SI 0 "=r"))]
112 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
113 "lwa%X1 %0,%1\;cmpdi %2,%0,%3"
114 "&& reload_completed
115 && (cc_reg_not_cr0_operand (operands[2], CCmode)
116 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
117 SImode, NON_PREFIXED_DS))"
118 [(set (match_dup 0) (match_dup 1))
119 (set (match_dup 2)
120 (compare:CC (match_dup 0) (match_dup 3)))]
121 ""
122 [(set_attr "type" "fused_load_cmpi")
123 (set_attr "cost" "8")
124 (set_attr "length" "8")])
125
126 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
127 ;; load mode is SI result mode is clobber compare mode is CCUNS extend is none
128 (define_insn_and_split "*lwz_cmpldi_cr0_SI_clobber_CCUNS_none"
129 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
130 (compare:CCUNS (match_operand:SI 1 "non_update_memory_operand" "m")
131 (match_operand:SI 3 "const_0_to_1_operand" "n")))
132 (clobber (match_scratch:SI 0 "=r"))]
133 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
134 "lwz%X1 %0,%1\;cmpldi %2,%0,%3"
135 "&& reload_completed
136 && (cc_reg_not_cr0_operand (operands[2], CCmode)
137 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
138 SImode, NON_PREFIXED_D))"
139 [(set (match_dup 0) (match_dup 1))
140 (set (match_dup 2)
141 (compare:CCUNS (match_dup 0) (match_dup 3)))]
142 ""
143 [(set_attr "type" "fused_load_cmpi")
144 (set_attr "cost" "8")
145 (set_attr "length" "8")])
146
147 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
148 ;; load mode is SI result mode is SI compare mode is CC extend is none
149 (define_insn_and_split "*lwa_cmpdi_cr0_SI_SI_CC_none"
150 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
151 (compare:CC (match_operand:SI 1 "ds_form_mem_operand" "m")
152 (match_operand:SI 3 "const_m1_to_1_operand" "n")))
153 (set (match_operand:SI 0 "gpc_reg_operand" "=r") (match_dup 1))]
154 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
155 "lwa%X1 %0,%1\;cmpdi %2,%0,%3"
156 "&& reload_completed
157 && (cc_reg_not_cr0_operand (operands[2], CCmode)
158 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
159 SImode, NON_PREFIXED_DS))"
160 [(set (match_dup 0) (match_dup 1))
161 (set (match_dup 2)
162 (compare:CC (match_dup 0) (match_dup 3)))]
163 ""
164 [(set_attr "type" "fused_load_cmpi")
165 (set_attr "cost" "8")
166 (set_attr "length" "8")])
167
168 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
169 ;; load mode is SI result mode is SI compare mode is CCUNS extend is none
170 (define_insn_and_split "*lwz_cmpldi_cr0_SI_SI_CCUNS_none"
171 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
172 (compare:CCUNS (match_operand:SI 1 "non_update_memory_operand" "m")
173 (match_operand:SI 3 "const_0_to_1_operand" "n")))
174 (set (match_operand:SI 0 "gpc_reg_operand" "=r") (match_dup 1))]
175 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
176 "lwz%X1 %0,%1\;cmpldi %2,%0,%3"
177 "&& reload_completed
178 && (cc_reg_not_cr0_operand (operands[2], CCmode)
179 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
180 SImode, NON_PREFIXED_D))"
181 [(set (match_dup 0) (match_dup 1))
182 (set (match_dup 2)
183 (compare:CCUNS (match_dup 0) (match_dup 3)))]
184 ""
185 [(set_attr "type" "fused_load_cmpi")
186 (set_attr "cost" "8")
187 (set_attr "length" "8")])
188
189 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
190 ;; load mode is SI result mode is EXTSI compare mode is CC extend is sign
191 (define_insn_and_split "*lwa_cmpdi_cr0_SI_EXTSI_CC_sign"
192 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
193 (compare:CC (match_operand:SI 1 "ds_form_mem_operand" "m")
194 (match_operand:SI 3 "const_m1_to_1_operand" "n")))
195 (set (match_operand:EXTSI 0 "gpc_reg_operand" "=r") (sign_extend:EXTSI (match_dup 1)))]
196 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
197 "lwa%X1 %0,%1\;cmpdi %2,%0,%3"
198 "&& reload_completed
199 && (cc_reg_not_cr0_operand (operands[2], CCmode)
200 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
201 SImode, NON_PREFIXED_DS))"
202 [(set (match_dup 0) (sign_extend:EXTSI (match_dup 1)))
203 (set (match_dup 2)
204 (compare:CC (match_dup 0) (match_dup 3)))]
205 ""
206 [(set_attr "type" "fused_load_cmpi")
207 (set_attr "cost" "8")
208 (set_attr "length" "8")])
209
210 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
211 ;; load mode is SI result mode is EXTSI compare mode is CCUNS extend is zero
212 (define_insn_and_split "*lwz_cmpldi_cr0_SI_EXTSI_CCUNS_zero"
213 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
214 (compare:CCUNS (match_operand:SI 1 "non_update_memory_operand" "m")
215 (match_operand:SI 3 "const_0_to_1_operand" "n")))
216 (set (match_operand:EXTSI 0 "gpc_reg_operand" "=r") (zero_extend:EXTSI (match_dup 1)))]
217 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
218 "lwz%X1 %0,%1\;cmpldi %2,%0,%3"
219 "&& reload_completed
220 && (cc_reg_not_cr0_operand (operands[2], CCmode)
221 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
222 SImode, NON_PREFIXED_D))"
223 [(set (match_dup 0) (zero_extend:EXTSI (match_dup 1)))
224 (set (match_dup 2)
225 (compare:CCUNS (match_dup 0) (match_dup 3)))]
226 ""
227 [(set_attr "type" "fused_load_cmpi")
228 (set_attr "cost" "8")
229 (set_attr "length" "8")])
230
231 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
232 ;; load mode is HI result mode is clobber compare mode is CC extend is sign
233 (define_insn_and_split "*lha_cmpdi_cr0_HI_clobber_CC_sign"
234 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
235 (compare:CC (match_operand:HI 1 "non_update_memory_operand" "m")
236 (match_operand:HI 3 "const_m1_to_1_operand" "n")))
237 (clobber (match_scratch:GPR 0 "=r"))]
238 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
239 "lha%X1 %0,%1\;cmpdi %2,%0,%3"
240 "&& reload_completed
241 && (cc_reg_not_cr0_operand (operands[2], CCmode)
242 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
243 HImode, NON_PREFIXED_D))"
244 [(set (match_dup 0) (sign_extend:GPR (match_dup 1)))
245 (set (match_dup 2)
246 (compare:CC (match_dup 0) (match_dup 3)))]
247 ""
248 [(set_attr "type" "fused_load_cmpi")
249 (set_attr "cost" "8")
250 (set_attr "length" "8")])
251
252 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
253 ;; load mode is HI result mode is clobber compare mode is CCUNS extend is zero
254 (define_insn_and_split "*lhz_cmpldi_cr0_HI_clobber_CCUNS_zero"
255 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
256 (compare:CCUNS (match_operand:HI 1 "non_update_memory_operand" "m")
257 (match_operand:HI 3 "const_0_to_1_operand" "n")))
258 (clobber (match_scratch:GPR 0 "=r"))]
259 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
260 "lhz%X1 %0,%1\;cmpldi %2,%0,%3"
261 "&& reload_completed
262 && (cc_reg_not_cr0_operand (operands[2], CCmode)
263 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
264 HImode, NON_PREFIXED_D))"
265 [(set (match_dup 0) (zero_extend:GPR (match_dup 1)))
266 (set (match_dup 2)
267 (compare:CCUNS (match_dup 0) (match_dup 3)))]
268 ""
269 [(set_attr "type" "fused_load_cmpi")
270 (set_attr "cost" "8")
271 (set_attr "length" "8")])
272
273 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
274 ;; load mode is HI result mode is EXTHI compare mode is CC extend is sign
275 (define_insn_and_split "*lha_cmpdi_cr0_HI_EXTHI_CC_sign"
276 [(set (match_operand:CC 2 "cc_reg_operand" "=x")
277 (compare:CC (match_operand:HI 1 "non_update_memory_operand" "m")
278 (match_operand:HI 3 "const_m1_to_1_operand" "n")))
279 (set (match_operand:EXTHI 0 "gpc_reg_operand" "=r") (sign_extend:EXTHI (match_dup 1)))]
280 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
281 "lha%X1 %0,%1\;cmpdi %2,%0,%3"
282 "&& reload_completed
283 && (cc_reg_not_cr0_operand (operands[2], CCmode)
284 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
285 HImode, NON_PREFIXED_D))"
286 [(set (match_dup 0) (sign_extend:EXTHI (match_dup 1)))
287 (set (match_dup 2)
288 (compare:CC (match_dup 0) (match_dup 3)))]
289 ""
290 [(set_attr "type" "fused_load_cmpi")
291 (set_attr "cost" "8")
292 (set_attr "length" "8")])
293
294 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
295 ;; load mode is HI result mode is EXTHI compare mode is CCUNS extend is zero
296 (define_insn_and_split "*lhz_cmpldi_cr0_HI_EXTHI_CCUNS_zero"
297 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
298 (compare:CCUNS (match_operand:HI 1 "non_update_memory_operand" "m")
299 (match_operand:HI 3 "const_0_to_1_operand" "n")))
300 (set (match_operand:EXTHI 0 "gpc_reg_operand" "=r") (zero_extend:EXTHI (match_dup 1)))]
301 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
302 "lhz%X1 %0,%1\;cmpldi %2,%0,%3"
303 "&& reload_completed
304 && (cc_reg_not_cr0_operand (operands[2], CCmode)
305 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
306 HImode, NON_PREFIXED_D))"
307 [(set (match_dup 0) (zero_extend:EXTHI (match_dup 1)))
308 (set (match_dup 2)
309 (compare:CCUNS (match_dup 0) (match_dup 3)))]
310 ""
311 [(set_attr "type" "fused_load_cmpi")
312 (set_attr "cost" "8")
313 (set_attr "length" "8")])
314
315 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
316 ;; load mode is QI result mode is clobber compare mode is CCUNS extend is zero
317 (define_insn_and_split "*lbz_cmpldi_cr0_QI_clobber_CCUNS_zero"
318 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
319 (compare:CCUNS (match_operand:QI 1 "non_update_memory_operand" "m")
320 (match_operand:QI 3 "const_0_to_1_operand" "n")))
321 (clobber (match_scratch:GPR 0 "=r"))]
322 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
323 "lbz%X1 %0,%1\;cmpldi %2,%0,%3"
324 "&& reload_completed
325 && (cc_reg_not_cr0_operand (operands[2], CCmode)
326 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
327 QImode, NON_PREFIXED_D))"
328 [(set (match_dup 0) (zero_extend:GPR (match_dup 1)))
329 (set (match_dup 2)
330 (compare:CCUNS (match_dup 0) (match_dup 3)))]
331 ""
332 [(set_attr "type" "fused_load_cmpi")
333 (set_attr "cost" "8")
334 (set_attr "length" "8")])
335
336 ;; load-cmpi fusion pattern generated by gen_ld_cmpi_p10
337 ;; load mode is QI result mode is GPR compare mode is CCUNS extend is zero
338 (define_insn_and_split "*lbz_cmpldi_cr0_QI_GPR_CCUNS_zero"
339 [(set (match_operand:CCUNS 2 "cc_reg_operand" "=x")
340 (compare:CCUNS (match_operand:QI 1 "non_update_memory_operand" "m")
341 (match_operand:QI 3 "const_0_to_1_operand" "n")))
342 (set (match_operand:GPR 0 "gpc_reg_operand" "=r") (zero_extend:GPR (match_dup 1)))]
343 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LD_CMPI)"
344 "lbz%X1 %0,%1\;cmpldi %2,%0,%3"
345 "&& reload_completed
346 && (cc_reg_not_cr0_operand (operands[2], CCmode)
347 || !address_is_non_pfx_d_or_x (XEXP (operands[1], 0),
348 QImode, NON_PREFIXED_D))"
349 [(set (match_dup 0) (zero_extend:GPR (match_dup 1)))
350 (set (match_dup 2)
351 (compare:CCUNS (match_dup 0) (match_dup 3)))]
352 ""
353 [(set_attr "type" "fused_load_cmpi")
354 (set_attr "cost" "8")
355 (set_attr "length" "8")])
356
357
358 ;; logical-logical fusion pattern generated by gen_logical_addsubf
359 ;; scalar and -> and
360 (define_insn "*fuse_and_and"
361 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
362 (and:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
363 (match_operand:GPR 1 "gpc_reg_operand" "%r,r,r,r"))
364 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
365 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
366 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
367 "@
368 and %3,%1,%0\;and %3,%3,%2
369 and %3,%1,%0\;and %3,%3,%2
370 and %3,%1,%0\;and %3,%3,%2
371 and %4,%1,%0\;and %3,%4,%2"
372 [(set_attr "type" "fused_arith_logical")
373 (set_attr "cost" "6")
374 (set_attr "length" "8")])
375
376 ;; logical-logical fusion pattern generated by gen_logical_addsubf
377 ;; scalar andc -> and
378 (define_insn "*fuse_andc_and"
379 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
380 (and:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
381 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
382 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
383 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
384 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
385 "@
386 andc %3,%1,%0\;and %3,%3,%2
387 andc %3,%1,%0\;and %3,%3,%2
388 andc %3,%1,%0\;and %3,%3,%2
389 andc %4,%1,%0\;and %3,%4,%2"
390 [(set_attr "type" "fused_arith_logical")
391 (set_attr "cost" "6")
392 (set_attr "length" "8")])
393
394 ;; logical-logical fusion pattern generated by gen_logical_addsubf
395 ;; scalar eqv -> and
396 (define_insn "*fuse_eqv_and"
397 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
398 (and:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
399 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
400 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
401 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
402 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
403 "@
404 eqv %3,%1,%0\;and %3,%3,%2
405 eqv %3,%1,%0\;and %3,%3,%2
406 eqv %3,%1,%0\;and %3,%3,%2
407 eqv %4,%1,%0\;and %3,%4,%2"
408 [(set_attr "type" "fused_arith_logical")
409 (set_attr "cost" "6")
410 (set_attr "length" "8")])
411
412 ;; logical-logical fusion pattern generated by gen_logical_addsubf
413 ;; scalar nand -> and
414 (define_insn "*fuse_nand_and"
415 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
416 (and:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
417 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
418 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
419 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
420 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
421 "@
422 nand %3,%1,%0\;and %3,%3,%2
423 nand %3,%1,%0\;and %3,%3,%2
424 nand %3,%1,%0\;and %3,%3,%2
425 nand %4,%1,%0\;and %3,%4,%2"
426 [(set_attr "type" "fused_arith_logical")
427 (set_attr "cost" "6")
428 (set_attr "length" "8")])
429
430 ;; logical-logical fusion pattern generated by gen_logical_addsubf
431 ;; scalar nor -> and
432 (define_insn "*fuse_nor_and"
433 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
434 (and:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
435 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
436 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
437 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
438 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
439 "@
440 nor %3,%1,%0\;and %3,%3,%2
441 nor %3,%1,%0\;and %3,%3,%2
442 nor %3,%1,%0\;and %3,%3,%2
443 nor %4,%1,%0\;and %3,%4,%2"
444 [(set_attr "type" "fused_arith_logical")
445 (set_attr "cost" "6")
446 (set_attr "length" "8")])
447
448 ;; logical-logical fusion pattern generated by gen_logical_addsubf
449 ;; scalar or -> and
450 (define_insn "*fuse_or_and"
451 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
452 (and:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
453 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
454 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
455 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
456 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
457 "@
458 or %3,%1,%0\;and %3,%3,%2
459 or %3,%1,%0\;and %3,%3,%2
460 or %3,%1,%0\;and %3,%3,%2
461 or %4,%1,%0\;and %3,%4,%2"
462 [(set_attr "type" "fused_arith_logical")
463 (set_attr "cost" "6")
464 (set_attr "length" "8")])
465
466 ;; logical-logical fusion pattern generated by gen_logical_addsubf
467 ;; scalar orc -> and
468 (define_insn "*fuse_orc_and"
469 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
470 (and:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
471 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
472 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
473 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
474 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
475 "@
476 orc %3,%1,%0\;and %3,%3,%2
477 orc %3,%1,%0\;and %3,%3,%2
478 orc %3,%1,%0\;and %3,%3,%2
479 orc %4,%1,%0\;and %3,%4,%2"
480 [(set_attr "type" "fused_arith_logical")
481 (set_attr "cost" "6")
482 (set_attr "length" "8")])
483
484 ;; logical-logical fusion pattern generated by gen_logical_addsubf
485 ;; scalar xor -> and
486 (define_insn "*fuse_xor_and"
487 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
488 (and:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
489 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
490 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
491 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
492 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
493 "@
494 xor %3,%1,%0\;and %3,%3,%2
495 xor %3,%1,%0\;and %3,%3,%2
496 xor %3,%1,%0\;and %3,%3,%2
497 xor %4,%1,%0\;and %3,%4,%2"
498 [(set_attr "type" "fused_arith_logical")
499 (set_attr "cost" "6")
500 (set_attr "length" "8")])
501
502 ;; add-logical fusion pattern generated by gen_logical_addsubf
503 ;; scalar add -> and
504 (define_insn "*fuse_add_and"
505 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
506 (and:GPR (plus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
507 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
508 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
509 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
510 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
511 "@
512 add %3,%1,%0\;and %3,%3,%2
513 add %3,%1,%0\;and %3,%3,%2
514 add %3,%1,%0\;and %3,%3,%2
515 add %4,%1,%0\;and %3,%4,%2"
516 [(set_attr "type" "fused_arith_logical")
517 (set_attr "cost" "6")
518 (set_attr "length" "8")])
519
520 ;; add-logical fusion pattern generated by gen_logical_addsubf
521 ;; scalar subf -> and
522 (define_insn "*fuse_subf_and"
523 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
524 (and:GPR (minus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
525 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
526 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
527 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
528 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
529 "@
530 subf %3,%1,%0\;and %3,%3,%2
531 subf %3,%1,%0\;and %3,%3,%2
532 subf %3,%1,%0\;and %3,%3,%2
533 subf %4,%1,%0\;and %3,%4,%2"
534 [(set_attr "type" "fused_arith_logical")
535 (set_attr "cost" "6")
536 (set_attr "length" "8")])
537
538 ;; logical-logical fusion pattern generated by gen_logical_addsubf
539 ;; scalar and -> andc
540 (define_insn "*fuse_and_andc"
541 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
542 (and:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
543 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
544 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
545 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
546 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
547 "@
548 and %3,%1,%0\;andc %3,%3,%2
549 and %3,%1,%0\;andc %3,%3,%2
550 and %3,%1,%0\;andc %3,%3,%2
551 and %4,%1,%0\;andc %3,%4,%2"
552 [(set_attr "type" "fused_arith_logical")
553 (set_attr "cost" "6")
554 (set_attr "length" "8")])
555
556 ;; logical-logical fusion pattern generated by gen_logical_addsubf
557 ;; scalar andc -> andc
558 (define_insn "*fuse_andc_andc"
559 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
560 (and:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
561 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
562 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
563 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
564 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
565 "@
566 andc %3,%1,%0\;andc %3,%3,%2
567 andc %3,%1,%0\;andc %3,%3,%2
568 andc %3,%1,%0\;andc %3,%3,%2
569 andc %4,%1,%0\;andc %3,%4,%2"
570 [(set_attr "type" "fused_arith_logical")
571 (set_attr "cost" "6")
572 (set_attr "length" "8")])
573
574 ;; logical-logical fusion pattern generated by gen_logical_addsubf
575 ;; scalar eqv -> andc
576 (define_insn "*fuse_eqv_andc"
577 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
578 (and:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
579 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
580 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
581 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
582 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
583 "@
584 eqv %3,%1,%0\;andc %3,%3,%2
585 eqv %3,%1,%0\;andc %3,%3,%2
586 eqv %3,%1,%0\;andc %3,%3,%2
587 eqv %4,%1,%0\;andc %3,%4,%2"
588 [(set_attr "type" "fused_arith_logical")
589 (set_attr "cost" "6")
590 (set_attr "length" "8")])
591
592 ;; logical-logical fusion pattern generated by gen_logical_addsubf
593 ;; scalar nand -> andc
594 (define_insn "*fuse_nand_andc"
595 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
596 (and:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
597 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
598 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
599 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
600 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
601 "@
602 nand %3,%1,%0\;andc %3,%3,%2
603 nand %3,%1,%0\;andc %3,%3,%2
604 nand %3,%1,%0\;andc %3,%3,%2
605 nand %4,%1,%0\;andc %3,%4,%2"
606 [(set_attr "type" "fused_arith_logical")
607 (set_attr "cost" "6")
608 (set_attr "length" "8")])
609
610 ;; logical-logical fusion pattern generated by gen_logical_addsubf
611 ;; scalar nor -> andc
612 (define_insn "*fuse_nor_andc"
613 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
614 (and:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
615 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
616 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
617 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
618 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
619 "@
620 nor %3,%1,%0\;andc %3,%3,%2
621 nor %3,%1,%0\;andc %3,%3,%2
622 nor %3,%1,%0\;andc %3,%3,%2
623 nor %4,%1,%0\;andc %3,%4,%2"
624 [(set_attr "type" "fused_arith_logical")
625 (set_attr "cost" "6")
626 (set_attr "length" "8")])
627
628 ;; logical-logical fusion pattern generated by gen_logical_addsubf
629 ;; scalar or -> andc
630 (define_insn "*fuse_or_andc"
631 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
632 (and:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
633 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
634 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
635 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
636 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
637 "@
638 or %3,%1,%0\;andc %3,%3,%2
639 or %3,%1,%0\;andc %3,%3,%2
640 or %3,%1,%0\;andc %3,%3,%2
641 or %4,%1,%0\;andc %3,%4,%2"
642 [(set_attr "type" "fused_arith_logical")
643 (set_attr "cost" "6")
644 (set_attr "length" "8")])
645
646 ;; logical-logical fusion pattern generated by gen_logical_addsubf
647 ;; scalar orc -> andc
648 (define_insn "*fuse_orc_andc"
649 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
650 (and:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
651 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
652 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
653 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
654 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
655 "@
656 orc %3,%1,%0\;andc %3,%3,%2
657 orc %3,%1,%0\;andc %3,%3,%2
658 orc %3,%1,%0\;andc %3,%3,%2
659 orc %4,%1,%0\;andc %3,%4,%2"
660 [(set_attr "type" "fused_arith_logical")
661 (set_attr "cost" "6")
662 (set_attr "length" "8")])
663
664 ;; logical-logical fusion pattern generated by gen_logical_addsubf
665 ;; scalar xor -> andc
666 (define_insn "*fuse_xor_andc"
667 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
668 (and:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
669 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
670 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
671 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
672 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
673 "@
674 xor %3,%1,%0\;andc %3,%3,%2
675 xor %3,%1,%0\;andc %3,%3,%2
676 xor %3,%1,%0\;andc %3,%3,%2
677 xor %4,%1,%0\;andc %3,%4,%2"
678 [(set_attr "type" "fused_arith_logical")
679 (set_attr "cost" "6")
680 (set_attr "length" "8")])
681
682 ;; logical-logical fusion pattern generated by gen_logical_addsubf
683 ;; scalar and -> eqv
684 (define_insn "*fuse_and_eqv"
685 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
686 (not:GPR (xor:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
687 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
688 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
689 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
690 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
691 "@
692 and %3,%1,%0\;eqv %3,%3,%2
693 and %3,%1,%0\;eqv %3,%3,%2
694 and %3,%1,%0\;eqv %3,%3,%2
695 and %4,%1,%0\;eqv %3,%4,%2"
696 [(set_attr "type" "fused_arith_logical")
697 (set_attr "cost" "6")
698 (set_attr "length" "8")])
699
700 ;; logical-logical fusion pattern generated by gen_logical_addsubf
701 ;; scalar andc -> eqv
702 (define_insn "*fuse_andc_eqv"
703 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
704 (not:GPR (xor:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
705 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
706 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
707 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
708 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
709 "@
710 andc %3,%1,%0\;eqv %3,%3,%2
711 andc %3,%1,%0\;eqv %3,%3,%2
712 andc %3,%1,%0\;eqv %3,%3,%2
713 andc %4,%1,%0\;eqv %3,%4,%2"
714 [(set_attr "type" "fused_arith_logical")
715 (set_attr "cost" "6")
716 (set_attr "length" "8")])
717
718 ;; logical-logical fusion pattern generated by gen_logical_addsubf
719 ;; scalar eqv -> eqv
720 (define_insn "*fuse_eqv_eqv"
721 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
722 (not:GPR (xor:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
723 (match_operand:GPR 1 "gpc_reg_operand" "%r,r,r,r")))
724 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
725 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
726 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
727 "@
728 eqv %3,%1,%0\;eqv %3,%3,%2
729 eqv %3,%1,%0\;eqv %3,%3,%2
730 eqv %3,%1,%0\;eqv %3,%3,%2
731 eqv %4,%1,%0\;eqv %3,%4,%2"
732 [(set_attr "type" "fused_arith_logical")
733 (set_attr "cost" "6")
734 (set_attr "length" "8")])
735
736 ;; logical-logical fusion pattern generated by gen_logical_addsubf
737 ;; scalar nand -> eqv
738 (define_insn "*fuse_nand_eqv"
739 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
740 (not:GPR (xor:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
741 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
742 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
743 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
744 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
745 "@
746 nand %3,%1,%0\;eqv %3,%3,%2
747 nand %3,%1,%0\;eqv %3,%3,%2
748 nand %3,%1,%0\;eqv %3,%3,%2
749 nand %4,%1,%0\;eqv %3,%4,%2"
750 [(set_attr "type" "fused_arith_logical")
751 (set_attr "cost" "6")
752 (set_attr "length" "8")])
753
754 ;; logical-logical fusion pattern generated by gen_logical_addsubf
755 ;; scalar nor -> eqv
756 (define_insn "*fuse_nor_eqv"
757 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
758 (not:GPR (xor:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
759 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
760 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
761 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
762 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
763 "@
764 nor %3,%1,%0\;eqv %3,%3,%2
765 nor %3,%1,%0\;eqv %3,%3,%2
766 nor %3,%1,%0\;eqv %3,%3,%2
767 nor %4,%1,%0\;eqv %3,%4,%2"
768 [(set_attr "type" "fused_arith_logical")
769 (set_attr "cost" "6")
770 (set_attr "length" "8")])
771
772 ;; logical-logical fusion pattern generated by gen_logical_addsubf
773 ;; scalar or -> eqv
774 (define_insn "*fuse_or_eqv"
775 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
776 (not:GPR (xor:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
777 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
778 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
779 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
780 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
781 "@
782 or %3,%1,%0\;eqv %3,%3,%2
783 or %3,%1,%0\;eqv %3,%3,%2
784 or %3,%1,%0\;eqv %3,%3,%2
785 or %4,%1,%0\;eqv %3,%4,%2"
786 [(set_attr "type" "fused_arith_logical")
787 (set_attr "cost" "6")
788 (set_attr "length" "8")])
789
790 ;; logical-logical fusion pattern generated by gen_logical_addsubf
791 ;; scalar orc -> eqv
792 (define_insn "*fuse_orc_eqv"
793 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
794 (not:GPR (xor:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
795 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
796 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
797 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
798 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
799 "@
800 orc %3,%1,%0\;eqv %3,%3,%2
801 orc %3,%1,%0\;eqv %3,%3,%2
802 orc %3,%1,%0\;eqv %3,%3,%2
803 orc %4,%1,%0\;eqv %3,%4,%2"
804 [(set_attr "type" "fused_arith_logical")
805 (set_attr "cost" "6")
806 (set_attr "length" "8")])
807
808 ;; logical-logical fusion pattern generated by gen_logical_addsubf
809 ;; scalar xor -> eqv
810 (define_insn "*fuse_xor_eqv"
811 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
812 (not:GPR (xor:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
813 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
814 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
815 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
816 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
817 "@
818 xor %3,%1,%0\;eqv %3,%3,%2
819 xor %3,%1,%0\;eqv %3,%3,%2
820 xor %3,%1,%0\;eqv %3,%3,%2
821 xor %4,%1,%0\;eqv %3,%4,%2"
822 [(set_attr "type" "fused_arith_logical")
823 (set_attr "cost" "6")
824 (set_attr "length" "8")])
825
826 ;; logical-logical fusion pattern generated by gen_logical_addsubf
827 ;; scalar and -> nand
828 (define_insn "*fuse_and_nand"
829 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
830 (ior:GPR (not:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
831 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
832 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
833 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
834 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
835 "@
836 and %3,%1,%0\;nand %3,%3,%2
837 and %3,%1,%0\;nand %3,%3,%2
838 and %3,%1,%0\;nand %3,%3,%2
839 and %4,%1,%0\;nand %3,%4,%2"
840 [(set_attr "type" "fused_arith_logical")
841 (set_attr "cost" "6")
842 (set_attr "length" "8")])
843
844 ;; logical-logical fusion pattern generated by gen_logical_addsubf
845 ;; scalar andc -> nand
846 (define_insn "*fuse_andc_nand"
847 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
848 (ior:GPR (not:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
849 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
850 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
851 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
852 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
853 "@
854 andc %3,%1,%0\;nand %3,%3,%2
855 andc %3,%1,%0\;nand %3,%3,%2
856 andc %3,%1,%0\;nand %3,%3,%2
857 andc %4,%1,%0\;nand %3,%4,%2"
858 [(set_attr "type" "fused_arith_logical")
859 (set_attr "cost" "6")
860 (set_attr "length" "8")])
861
862 ;; logical-logical fusion pattern generated by gen_logical_addsubf
863 ;; scalar eqv -> nand
864 (define_insn "*fuse_eqv_nand"
865 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
866 (ior:GPR (not:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
867 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
868 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
869 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
870 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
871 "@
872 eqv %3,%1,%0\;nand %3,%3,%2
873 eqv %3,%1,%0\;nand %3,%3,%2
874 eqv %3,%1,%0\;nand %3,%3,%2
875 eqv %4,%1,%0\;nand %3,%4,%2"
876 [(set_attr "type" "fused_arith_logical")
877 (set_attr "cost" "6")
878 (set_attr "length" "8")])
879
880 ;; logical-logical fusion pattern generated by gen_logical_addsubf
881 ;; scalar nand -> nand
882 (define_insn "*fuse_nand_nand"
883 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
884 (ior:GPR (not:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
885 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
886 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
887 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
888 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
889 "@
890 nand %3,%1,%0\;nand %3,%3,%2
891 nand %3,%1,%0\;nand %3,%3,%2
892 nand %3,%1,%0\;nand %3,%3,%2
893 nand %4,%1,%0\;nand %3,%4,%2"
894 [(set_attr "type" "fused_arith_logical")
895 (set_attr "cost" "6")
896 (set_attr "length" "8")])
897
898 ;; logical-logical fusion pattern generated by gen_logical_addsubf
899 ;; scalar nor -> nand
900 (define_insn "*fuse_nor_nand"
901 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
902 (ior:GPR (not:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
903 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
904 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
905 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
906 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
907 "@
908 nor %3,%1,%0\;nand %3,%3,%2
909 nor %3,%1,%0\;nand %3,%3,%2
910 nor %3,%1,%0\;nand %3,%3,%2
911 nor %4,%1,%0\;nand %3,%4,%2"
912 [(set_attr "type" "fused_arith_logical")
913 (set_attr "cost" "6")
914 (set_attr "length" "8")])
915
916 ;; logical-logical fusion pattern generated by gen_logical_addsubf
917 ;; scalar or -> nand
918 (define_insn "*fuse_or_nand"
919 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
920 (ior:GPR (not:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
921 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
922 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
923 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
924 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
925 "@
926 or %3,%1,%0\;nand %3,%3,%2
927 or %3,%1,%0\;nand %3,%3,%2
928 or %3,%1,%0\;nand %3,%3,%2
929 or %4,%1,%0\;nand %3,%4,%2"
930 [(set_attr "type" "fused_arith_logical")
931 (set_attr "cost" "6")
932 (set_attr "length" "8")])
933
934 ;; logical-logical fusion pattern generated by gen_logical_addsubf
935 ;; scalar orc -> nand
936 (define_insn "*fuse_orc_nand"
937 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
938 (ior:GPR (not:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
939 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
940 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
941 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
942 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
943 "@
944 orc %3,%1,%0\;nand %3,%3,%2
945 orc %3,%1,%0\;nand %3,%3,%2
946 orc %3,%1,%0\;nand %3,%3,%2
947 orc %4,%1,%0\;nand %3,%4,%2"
948 [(set_attr "type" "fused_arith_logical")
949 (set_attr "cost" "6")
950 (set_attr "length" "8")])
951
952 ;; logical-logical fusion pattern generated by gen_logical_addsubf
953 ;; scalar xor -> nand
954 (define_insn "*fuse_xor_nand"
955 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
956 (ior:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
957 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
958 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
959 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
960 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
961 "@
962 xor %3,%1,%0\;nand %3,%3,%2
963 xor %3,%1,%0\;nand %3,%3,%2
964 xor %3,%1,%0\;nand %3,%3,%2
965 xor %4,%1,%0\;nand %3,%4,%2"
966 [(set_attr "type" "fused_arith_logical")
967 (set_attr "cost" "6")
968 (set_attr "length" "8")])
969
970 ;; add-logical fusion pattern generated by gen_logical_addsubf
971 ;; scalar add -> nand
972 (define_insn "*fuse_add_nand"
973 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
974 (ior:GPR (not:GPR (plus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
975 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
976 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
977 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
978 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
979 "@
980 add %3,%1,%0\;nand %3,%3,%2
981 add %3,%1,%0\;nand %3,%3,%2
982 add %3,%1,%0\;nand %3,%3,%2
983 add %4,%1,%0\;nand %3,%4,%2"
984 [(set_attr "type" "fused_arith_logical")
985 (set_attr "cost" "6")
986 (set_attr "length" "8")])
987
988 ;; add-logical fusion pattern generated by gen_logical_addsubf
989 ;; scalar subf -> nand
990 (define_insn "*fuse_subf_nand"
991 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
992 (ior:GPR (not:GPR (minus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
993 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
994 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
995 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
996 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
997 "@
998 subf %3,%1,%0\;nand %3,%3,%2
999 subf %3,%1,%0\;nand %3,%3,%2
1000 subf %3,%1,%0\;nand %3,%3,%2
1001 subf %4,%1,%0\;nand %3,%4,%2"
1002 [(set_attr "type" "fused_arith_logical")
1003 (set_attr "cost" "6")
1004 (set_attr "length" "8")])
1005
1006 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1007 ;; scalar and -> nor
1008 (define_insn "*fuse_and_nor"
1009 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1010 (and:GPR (not:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1011 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1012 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1013 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1014 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1015 "@
1016 and %3,%1,%0\;nor %3,%3,%2
1017 and %3,%1,%0\;nor %3,%3,%2
1018 and %3,%1,%0\;nor %3,%3,%2
1019 and %4,%1,%0\;nor %3,%4,%2"
1020 [(set_attr "type" "fused_arith_logical")
1021 (set_attr "cost" "6")
1022 (set_attr "length" "8")])
1023
1024 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1025 ;; scalar andc -> nor
1026 (define_insn "*fuse_andc_nor"
1027 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1028 (and:GPR (not:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1029 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1030 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1031 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1032 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1033 "@
1034 andc %3,%1,%0\;nor %3,%3,%2
1035 andc %3,%1,%0\;nor %3,%3,%2
1036 andc %3,%1,%0\;nor %3,%3,%2
1037 andc %4,%1,%0\;nor %3,%4,%2"
1038 [(set_attr "type" "fused_arith_logical")
1039 (set_attr "cost" "6")
1040 (set_attr "length" "8")])
1041
1042 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1043 ;; scalar eqv -> nor
1044 (define_insn "*fuse_eqv_nor"
1045 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1046 (and:GPR (not:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1047 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
1048 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1049 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1050 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1051 "@
1052 eqv %3,%1,%0\;nor %3,%3,%2
1053 eqv %3,%1,%0\;nor %3,%3,%2
1054 eqv %3,%1,%0\;nor %3,%3,%2
1055 eqv %4,%1,%0\;nor %3,%4,%2"
1056 [(set_attr "type" "fused_arith_logical")
1057 (set_attr "cost" "6")
1058 (set_attr "length" "8")])
1059
1060 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1061 ;; scalar nand -> nor
1062 (define_insn "*fuse_nand_nor"
1063 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1064 (and:GPR (not:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1065 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
1066 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1067 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1068 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1069 "@
1070 nand %3,%1,%0\;nor %3,%3,%2
1071 nand %3,%1,%0\;nor %3,%3,%2
1072 nand %3,%1,%0\;nor %3,%3,%2
1073 nand %4,%1,%0\;nor %3,%4,%2"
1074 [(set_attr "type" "fused_arith_logical")
1075 (set_attr "cost" "6")
1076 (set_attr "length" "8")])
1077
1078 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1079 ;; scalar nor -> nor
1080 (define_insn "*fuse_nor_nor"
1081 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1082 (and:GPR (not:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1083 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
1084 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1085 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1086 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1087 "@
1088 nor %3,%1,%0\;nor %3,%3,%2
1089 nor %3,%1,%0\;nor %3,%3,%2
1090 nor %3,%1,%0\;nor %3,%3,%2
1091 nor %4,%1,%0\;nor %3,%4,%2"
1092 [(set_attr "type" "fused_arith_logical")
1093 (set_attr "cost" "6")
1094 (set_attr "length" "8")])
1095
1096 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1097 ;; scalar or -> nor
1098 (define_insn "*fuse_or_nor"
1099 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1100 (and:GPR (not:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1101 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1102 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1103 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1104 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1105 "@
1106 or %3,%1,%0\;nor %3,%3,%2
1107 or %3,%1,%0\;nor %3,%3,%2
1108 or %3,%1,%0\;nor %3,%3,%2
1109 or %4,%1,%0\;nor %3,%4,%2"
1110 [(set_attr "type" "fused_arith_logical")
1111 (set_attr "cost" "6")
1112 (set_attr "length" "8")])
1113
1114 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1115 ;; scalar orc -> nor
1116 (define_insn "*fuse_orc_nor"
1117 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1118 (and:GPR (not:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1119 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1120 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1121 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1122 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1123 "@
1124 orc %3,%1,%0\;nor %3,%3,%2
1125 orc %3,%1,%0\;nor %3,%3,%2
1126 orc %3,%1,%0\;nor %3,%3,%2
1127 orc %4,%1,%0\;nor %3,%4,%2"
1128 [(set_attr "type" "fused_arith_logical")
1129 (set_attr "cost" "6")
1130 (set_attr "length" "8")])
1131
1132 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1133 ;; scalar xor -> nor
1134 (define_insn "*fuse_xor_nor"
1135 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1136 (and:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1137 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1138 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1139 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1140 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1141 "@
1142 xor %3,%1,%0\;nor %3,%3,%2
1143 xor %3,%1,%0\;nor %3,%3,%2
1144 xor %3,%1,%0\;nor %3,%3,%2
1145 xor %4,%1,%0\;nor %3,%4,%2"
1146 [(set_attr "type" "fused_arith_logical")
1147 (set_attr "cost" "6")
1148 (set_attr "length" "8")])
1149
1150 ;; add-logical fusion pattern generated by gen_logical_addsubf
1151 ;; scalar add -> nor
1152 (define_insn "*fuse_add_nor"
1153 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1154 (and:GPR (not:GPR (plus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1155 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1156 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1157 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1158 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
1159 "@
1160 add %3,%1,%0\;nor %3,%3,%2
1161 add %3,%1,%0\;nor %3,%3,%2
1162 add %3,%1,%0\;nor %3,%3,%2
1163 add %4,%1,%0\;nor %3,%4,%2"
1164 [(set_attr "type" "fused_arith_logical")
1165 (set_attr "cost" "6")
1166 (set_attr "length" "8")])
1167
1168 ;; add-logical fusion pattern generated by gen_logical_addsubf
1169 ;; scalar subf -> nor
1170 (define_insn "*fuse_subf_nor"
1171 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1172 (and:GPR (not:GPR (minus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1173 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1174 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1175 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1176 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
1177 "@
1178 subf %3,%1,%0\;nor %3,%3,%2
1179 subf %3,%1,%0\;nor %3,%3,%2
1180 subf %3,%1,%0\;nor %3,%3,%2
1181 subf %4,%1,%0\;nor %3,%4,%2"
1182 [(set_attr "type" "fused_arith_logical")
1183 (set_attr "cost" "6")
1184 (set_attr "length" "8")])
1185
1186 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1187 ;; scalar and -> or
1188 (define_insn "*fuse_and_or"
1189 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1190 (ior:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1191 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1192 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1193 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1194 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1195 "@
1196 and %3,%1,%0\;or %3,%3,%2
1197 and %3,%1,%0\;or %3,%3,%2
1198 and %3,%1,%0\;or %3,%3,%2
1199 and %4,%1,%0\;or %3,%4,%2"
1200 [(set_attr "type" "fused_arith_logical")
1201 (set_attr "cost" "6")
1202 (set_attr "length" "8")])
1203
1204 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1205 ;; scalar andc -> or
1206 (define_insn "*fuse_andc_or"
1207 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1208 (ior:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1209 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1210 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1211 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1212 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1213 "@
1214 andc %3,%1,%0\;or %3,%3,%2
1215 andc %3,%1,%0\;or %3,%3,%2
1216 andc %3,%1,%0\;or %3,%3,%2
1217 andc %4,%1,%0\;or %3,%4,%2"
1218 [(set_attr "type" "fused_arith_logical")
1219 (set_attr "cost" "6")
1220 (set_attr "length" "8")])
1221
1222 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1223 ;; scalar eqv -> or
1224 (define_insn "*fuse_eqv_or"
1225 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1226 (ior:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1227 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1228 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1229 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1230 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1231 "@
1232 eqv %3,%1,%0\;or %3,%3,%2
1233 eqv %3,%1,%0\;or %3,%3,%2
1234 eqv %3,%1,%0\;or %3,%3,%2
1235 eqv %4,%1,%0\;or %3,%4,%2"
1236 [(set_attr "type" "fused_arith_logical")
1237 (set_attr "cost" "6")
1238 (set_attr "length" "8")])
1239
1240 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1241 ;; scalar nand -> or
1242 (define_insn "*fuse_nand_or"
1243 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1244 (ior:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1245 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1246 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1247 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1248 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1249 "@
1250 nand %3,%1,%0\;or %3,%3,%2
1251 nand %3,%1,%0\;or %3,%3,%2
1252 nand %3,%1,%0\;or %3,%3,%2
1253 nand %4,%1,%0\;or %3,%4,%2"
1254 [(set_attr "type" "fused_arith_logical")
1255 (set_attr "cost" "6")
1256 (set_attr "length" "8")])
1257
1258 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1259 ;; scalar nor -> or
1260 (define_insn "*fuse_nor_or"
1261 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1262 (ior:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1263 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1264 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1265 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1266 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1267 "@
1268 nor %3,%1,%0\;or %3,%3,%2
1269 nor %3,%1,%0\;or %3,%3,%2
1270 nor %3,%1,%0\;or %3,%3,%2
1271 nor %4,%1,%0\;or %3,%4,%2"
1272 [(set_attr "type" "fused_arith_logical")
1273 (set_attr "cost" "6")
1274 (set_attr "length" "8")])
1275
1276 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1277 ;; scalar or -> or
1278 (define_insn "*fuse_or_or"
1279 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1280 (ior:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1281 (match_operand:GPR 1 "gpc_reg_operand" "%r,r,r,r"))
1282 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1283 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1284 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1285 "@
1286 or %3,%1,%0\;or %3,%3,%2
1287 or %3,%1,%0\;or %3,%3,%2
1288 or %3,%1,%0\;or %3,%3,%2
1289 or %4,%1,%0\;or %3,%4,%2"
1290 [(set_attr "type" "fused_arith_logical")
1291 (set_attr "cost" "6")
1292 (set_attr "length" "8")])
1293
1294 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1295 ;; scalar orc -> or
1296 (define_insn "*fuse_orc_or"
1297 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1298 (ior:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1299 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1300 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1301 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1302 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1303 "@
1304 orc %3,%1,%0\;or %3,%3,%2
1305 orc %3,%1,%0\;or %3,%3,%2
1306 orc %3,%1,%0\;or %3,%3,%2
1307 orc %4,%1,%0\;or %3,%4,%2"
1308 [(set_attr "type" "fused_arith_logical")
1309 (set_attr "cost" "6")
1310 (set_attr "length" "8")])
1311
1312 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1313 ;; scalar xor -> or
1314 (define_insn "*fuse_xor_or"
1315 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1316 (ior:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1317 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1318 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1319 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1320 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1321 "@
1322 xor %3,%1,%0\;or %3,%3,%2
1323 xor %3,%1,%0\;or %3,%3,%2
1324 xor %3,%1,%0\;or %3,%3,%2
1325 xor %4,%1,%0\;or %3,%4,%2"
1326 [(set_attr "type" "fused_arith_logical")
1327 (set_attr "cost" "6")
1328 (set_attr "length" "8")])
1329
1330 ;; add-logical fusion pattern generated by gen_logical_addsubf
1331 ;; scalar add -> or
1332 (define_insn "*fuse_add_or"
1333 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1334 (ior:GPR (plus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1335 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1336 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1337 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1338 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
1339 "@
1340 add %3,%1,%0\;or %3,%3,%2
1341 add %3,%1,%0\;or %3,%3,%2
1342 add %3,%1,%0\;or %3,%3,%2
1343 add %4,%1,%0\;or %3,%4,%2"
1344 [(set_attr "type" "fused_arith_logical")
1345 (set_attr "cost" "6")
1346 (set_attr "length" "8")])
1347
1348 ;; add-logical fusion pattern generated by gen_logical_addsubf
1349 ;; scalar subf -> or
1350 (define_insn "*fuse_subf_or"
1351 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1352 (ior:GPR (minus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1353 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1354 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1355 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1356 "(TARGET_P10_FUSION && TARGET_P10_FUSION_ADDLOG)"
1357 "@
1358 subf %3,%1,%0\;or %3,%3,%2
1359 subf %3,%1,%0\;or %3,%3,%2
1360 subf %3,%1,%0\;or %3,%3,%2
1361 subf %4,%1,%0\;or %3,%4,%2"
1362 [(set_attr "type" "fused_arith_logical")
1363 (set_attr "cost" "6")
1364 (set_attr "length" "8")])
1365
1366 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1367 ;; scalar and -> orc
1368 (define_insn "*fuse_and_orc"
1369 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1370 (ior:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1371 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1372 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1373 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1374 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1375 "@
1376 and %3,%1,%0\;orc %3,%3,%2
1377 and %3,%1,%0\;orc %3,%3,%2
1378 and %3,%1,%0\;orc %3,%3,%2
1379 and %4,%1,%0\;orc %3,%4,%2"
1380 [(set_attr "type" "fused_arith_logical")
1381 (set_attr "cost" "6")
1382 (set_attr "length" "8")])
1383
1384 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1385 ;; scalar andc -> orc
1386 (define_insn "*fuse_andc_orc"
1387 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1388 (ior:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1389 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1390 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1391 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1392 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1393 "@
1394 andc %3,%1,%0\;orc %3,%3,%2
1395 andc %3,%1,%0\;orc %3,%3,%2
1396 andc %3,%1,%0\;orc %3,%3,%2
1397 andc %4,%1,%0\;orc %3,%4,%2"
1398 [(set_attr "type" "fused_arith_logical")
1399 (set_attr "cost" "6")
1400 (set_attr "length" "8")])
1401
1402 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1403 ;; scalar eqv -> orc
1404 (define_insn "*fuse_eqv_orc"
1405 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1406 (ior:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1407 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1408 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1409 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1410 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1411 "@
1412 eqv %3,%1,%0\;orc %3,%3,%2
1413 eqv %3,%1,%0\;orc %3,%3,%2
1414 eqv %3,%1,%0\;orc %3,%3,%2
1415 eqv %4,%1,%0\;orc %3,%4,%2"
1416 [(set_attr "type" "fused_arith_logical")
1417 (set_attr "cost" "6")
1418 (set_attr "length" "8")])
1419
1420 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1421 ;; scalar nand -> orc
1422 (define_insn "*fuse_nand_orc"
1423 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1424 (ior:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1425 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1426 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1427 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1428 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1429 "@
1430 nand %3,%1,%0\;orc %3,%3,%2
1431 nand %3,%1,%0\;orc %3,%3,%2
1432 nand %3,%1,%0\;orc %3,%3,%2
1433 nand %4,%1,%0\;orc %3,%4,%2"
1434 [(set_attr "type" "fused_arith_logical")
1435 (set_attr "cost" "6")
1436 (set_attr "length" "8")])
1437
1438 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1439 ;; scalar nor -> orc
1440 (define_insn "*fuse_nor_orc"
1441 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1442 (ior:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1443 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1444 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1445 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1446 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1447 "@
1448 nor %3,%1,%0\;orc %3,%3,%2
1449 nor %3,%1,%0\;orc %3,%3,%2
1450 nor %3,%1,%0\;orc %3,%3,%2
1451 nor %4,%1,%0\;orc %3,%4,%2"
1452 [(set_attr "type" "fused_arith_logical")
1453 (set_attr "cost" "6")
1454 (set_attr "length" "8")])
1455
1456 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1457 ;; scalar or -> orc
1458 (define_insn "*fuse_or_orc"
1459 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1460 (ior:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1461 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1462 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1463 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1464 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1465 "@
1466 or %3,%1,%0\;orc %3,%3,%2
1467 or %3,%1,%0\;orc %3,%3,%2
1468 or %3,%1,%0\;orc %3,%3,%2
1469 or %4,%1,%0\;orc %3,%4,%2"
1470 [(set_attr "type" "fused_arith_logical")
1471 (set_attr "cost" "6")
1472 (set_attr "length" "8")])
1473
1474 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1475 ;; scalar orc -> orc
1476 (define_insn "*fuse_orc_orc"
1477 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1478 (ior:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1479 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1480 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1481 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1482 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1483 "@
1484 orc %3,%1,%0\;orc %3,%3,%2
1485 orc %3,%1,%0\;orc %3,%3,%2
1486 orc %3,%1,%0\;orc %3,%3,%2
1487 orc %4,%1,%0\;orc %3,%4,%2"
1488 [(set_attr "type" "fused_arith_logical")
1489 (set_attr "cost" "6")
1490 (set_attr "length" "8")])
1491
1492 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1493 ;; scalar xor -> orc
1494 (define_insn "*fuse_xor_orc"
1495 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1496 (ior:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1497 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1498 (not:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r"))))
1499 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1500 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1501 "@
1502 xor %3,%1,%0\;orc %3,%3,%2
1503 xor %3,%1,%0\;orc %3,%3,%2
1504 xor %3,%1,%0\;orc %3,%3,%2
1505 xor %4,%1,%0\;orc %3,%4,%2"
1506 [(set_attr "type" "fused_arith_logical")
1507 (set_attr "cost" "6")
1508 (set_attr "length" "8")])
1509
1510 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1511 ;; scalar and -> xor
1512 (define_insn "*fuse_and_xor"
1513 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1514 (xor:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1515 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1516 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1517 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1518 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1519 "@
1520 and %3,%1,%0\;xor %3,%3,%2
1521 and %3,%1,%0\;xor %3,%3,%2
1522 and %3,%1,%0\;xor %3,%3,%2
1523 and %4,%1,%0\;xor %3,%4,%2"
1524 [(set_attr "type" "fused_arith_logical")
1525 (set_attr "cost" "6")
1526 (set_attr "length" "8")])
1527
1528 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1529 ;; scalar andc -> xor
1530 (define_insn "*fuse_andc_xor"
1531 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1532 (xor:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1533 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1534 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1535 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1536 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1537 "@
1538 andc %3,%1,%0\;xor %3,%3,%2
1539 andc %3,%1,%0\;xor %3,%3,%2
1540 andc %3,%1,%0\;xor %3,%3,%2
1541 andc %4,%1,%0\;xor %3,%4,%2"
1542 [(set_attr "type" "fused_arith_logical")
1543 (set_attr "cost" "6")
1544 (set_attr "length" "8")])
1545
1546 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1547 ;; scalar eqv -> xor
1548 (define_insn "*fuse_eqv_xor"
1549 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1550 (xor:GPR (not:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1551 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1552 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1553 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1554 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1555 "@
1556 eqv %3,%1,%0\;xor %3,%3,%2
1557 eqv %3,%1,%0\;xor %3,%3,%2
1558 eqv %3,%1,%0\;xor %3,%3,%2
1559 eqv %4,%1,%0\;xor %3,%4,%2"
1560 [(set_attr "type" "fused_arith_logical")
1561 (set_attr "cost" "6")
1562 (set_attr "length" "8")])
1563
1564 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1565 ;; scalar nand -> xor
1566 (define_insn "*fuse_nand_xor"
1567 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1568 (xor:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1569 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1570 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1571 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1572 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1573 "@
1574 nand %3,%1,%0\;xor %3,%3,%2
1575 nand %3,%1,%0\;xor %3,%3,%2
1576 nand %3,%1,%0\;xor %3,%3,%2
1577 nand %4,%1,%0\;xor %3,%4,%2"
1578 [(set_attr "type" "fused_arith_logical")
1579 (set_attr "cost" "6")
1580 (set_attr "length" "8")])
1581
1582 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1583 ;; scalar nor -> xor
1584 (define_insn "*fuse_nor_xor"
1585 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1586 (xor:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1587 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1588 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1589 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1590 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1591 "@
1592 nor %3,%1,%0\;xor %3,%3,%2
1593 nor %3,%1,%0\;xor %3,%3,%2
1594 nor %3,%1,%0\;xor %3,%3,%2
1595 nor %4,%1,%0\;xor %3,%4,%2"
1596 [(set_attr "type" "fused_arith_logical")
1597 (set_attr "cost" "6")
1598 (set_attr "length" "8")])
1599
1600 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1601 ;; scalar or -> xor
1602 (define_insn "*fuse_or_xor"
1603 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1604 (xor:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1605 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1606 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1607 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1608 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1609 "@
1610 or %3,%1,%0\;xor %3,%3,%2
1611 or %3,%1,%0\;xor %3,%3,%2
1612 or %3,%1,%0\;xor %3,%3,%2
1613 or %4,%1,%0\;xor %3,%4,%2"
1614 [(set_attr "type" "fused_arith_logical")
1615 (set_attr "cost" "6")
1616 (set_attr "length" "8")])
1617
1618 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1619 ;; scalar orc -> xor
1620 (define_insn "*fuse_orc_xor"
1621 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1622 (xor:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1623 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1624 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1625 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1626 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1627 "@
1628 orc %3,%1,%0\;xor %3,%3,%2
1629 orc %3,%1,%0\;xor %3,%3,%2
1630 orc %3,%1,%0\;xor %3,%3,%2
1631 orc %4,%1,%0\;xor %3,%4,%2"
1632 [(set_attr "type" "fused_arith_logical")
1633 (set_attr "cost" "6")
1634 (set_attr "length" "8")])
1635
1636 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1637 ;; scalar xor -> xor
1638 (define_insn "*fuse_xor_xor"
1639 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1640 (xor:GPR (xor:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1641 (match_operand:GPR 1 "gpc_reg_operand" "%r,r,r,r"))
1642 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1643 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1644 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1645 "@
1646 xor %3,%1,%0\;xor %3,%3,%2
1647 xor %3,%1,%0\;xor %3,%3,%2
1648 xor %3,%1,%0\;xor %3,%3,%2
1649 xor %4,%1,%0\;xor %3,%4,%2"
1650 [(set_attr "type" "fused_arith_logical")
1651 (set_attr "cost" "6")
1652 (set_attr "length" "8")])
1653
1654 ;; logical-add fusion pattern generated by gen_logical_addsubf
1655 ;; scalar and -> add
1656 (define_insn "*fuse_and_add"
1657 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1658 (plus:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1659 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1660 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1661 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1662 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1663 "@
1664 and %3,%1,%0\;add %3,%3,%2
1665 and %3,%1,%0\;add %3,%3,%2
1666 and %3,%1,%0\;add %3,%3,%2
1667 and %4,%1,%0\;add %3,%4,%2"
1668 [(set_attr "type" "fused_arith_logical")
1669 (set_attr "cost" "6")
1670 (set_attr "length" "8")])
1671
1672 ;; logical-add fusion pattern generated by gen_logical_addsubf
1673 ;; scalar nand -> add
1674 (define_insn "*fuse_nand_add"
1675 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1676 (plus:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1677 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1678 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1679 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1680 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1681 "@
1682 nand %3,%1,%0\;add %3,%3,%2
1683 nand %3,%1,%0\;add %3,%3,%2
1684 nand %3,%1,%0\;add %3,%3,%2
1685 nand %4,%1,%0\;add %3,%4,%2"
1686 [(set_attr "type" "fused_arith_logical")
1687 (set_attr "cost" "6")
1688 (set_attr "length" "8")])
1689
1690 ;; logical-add fusion pattern generated by gen_logical_addsubf
1691 ;; scalar nor -> add
1692 (define_insn "*fuse_nor_add"
1693 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1694 (plus:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1695 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1696 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1697 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1698 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1699 "@
1700 nor %3,%1,%0\;add %3,%3,%2
1701 nor %3,%1,%0\;add %3,%3,%2
1702 nor %3,%1,%0\;add %3,%3,%2
1703 nor %4,%1,%0\;add %3,%4,%2"
1704 [(set_attr "type" "fused_arith_logical")
1705 (set_attr "cost" "6")
1706 (set_attr "length" "8")])
1707
1708 ;; logical-add fusion pattern generated by gen_logical_addsubf
1709 ;; scalar or -> add
1710 (define_insn "*fuse_or_add"
1711 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1712 (plus:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1713 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1714 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1715 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1716 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1717 "@
1718 or %3,%1,%0\;add %3,%3,%2
1719 or %3,%1,%0\;add %3,%3,%2
1720 or %3,%1,%0\;add %3,%3,%2
1721 or %4,%1,%0\;add %3,%4,%2"
1722 [(set_attr "type" "fused_arith_logical")
1723 (set_attr "cost" "6")
1724 (set_attr "length" "8")])
1725
1726 ;; logical-add fusion pattern generated by gen_logical_addsubf
1727 ;; scalar and -> subf
1728 (define_insn "*fuse_and_subf"
1729 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1730 (minus:GPR (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1731 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1732 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1733 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1734 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1735 "@
1736 and %3,%1,%0\;subf %3,%2,%3
1737 and %3,%1,%0\;subf %3,%2,%3
1738 and %3,%1,%0\;subf %3,%2,%3
1739 and %4,%1,%0\;subf %3,%2,%4"
1740 [(set_attr "type" "fused_arith_logical")
1741 (set_attr "cost" "6")
1742 (set_attr "length" "8")])
1743
1744 ;; logical-add fusion pattern generated by gen_logical_addsubf
1745 ;; scalar nand -> subf
1746 (define_insn "*fuse_nand_subf"
1747 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1748 (minus:GPR (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1749 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1750 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1751 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1752 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1753 "@
1754 nand %3,%1,%0\;subf %3,%2,%3
1755 nand %3,%1,%0\;subf %3,%2,%3
1756 nand %3,%1,%0\;subf %3,%2,%3
1757 nand %4,%1,%0\;subf %3,%2,%4"
1758 [(set_attr "type" "fused_arith_logical")
1759 (set_attr "cost" "6")
1760 (set_attr "length" "8")])
1761
1762 ;; logical-add fusion pattern generated by gen_logical_addsubf
1763 ;; scalar nor -> subf
1764 (define_insn "*fuse_nor_subf"
1765 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1766 (minus:GPR (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1767 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))
1768 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1769 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1770 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1771 "@
1772 nor %3,%1,%0\;subf %3,%2,%3
1773 nor %3,%1,%0\;subf %3,%2,%3
1774 nor %3,%1,%0\;subf %3,%2,%3
1775 nor %4,%1,%0\;subf %3,%2,%4"
1776 [(set_attr "type" "fused_arith_logical")
1777 (set_attr "cost" "6")
1778 (set_attr "length" "8")])
1779
1780 ;; logical-add fusion pattern generated by gen_logical_addsubf
1781 ;; scalar or -> subf
1782 (define_insn "*fuse_or_subf"
1783 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1784 (minus:GPR (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1785 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))
1786 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
1787 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1788 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1789 "@
1790 or %3,%1,%0\;subf %3,%2,%3
1791 or %3,%1,%0\;subf %3,%2,%3
1792 or %3,%1,%0\;subf %3,%2,%3
1793 or %4,%1,%0\;subf %3,%2,%4"
1794 [(set_attr "type" "fused_arith_logical")
1795 (set_attr "cost" "6")
1796 (set_attr "length" "8")])
1797
1798 ;; logical-add fusion pattern generated by gen_logical_addsubf
1799 ;; scalar and -> rsubf
1800 (define_insn "*fuse_and_rsubf"
1801 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1802 (minus:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")
1803 (and:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1804 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
1805 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1806 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1807 "@
1808 and %3,%1,%0\;subf %3,%3,%2
1809 and %3,%1,%0\;subf %3,%3,%2
1810 and %3,%1,%0\;subf %3,%3,%2
1811 and %4,%1,%0\;subf %3,%4,%2"
1812 [(set_attr "type" "fused_arith_logical")
1813 (set_attr "cost" "6")
1814 (set_attr "length" "8")])
1815
1816 ;; logical-add fusion pattern generated by gen_logical_addsubf
1817 ;; scalar nand -> rsubf
1818 (define_insn "*fuse_nand_rsubf"
1819 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1820 (minus:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")
1821 (ior:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1822 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))))
1823 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1824 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1825 "@
1826 nand %3,%1,%0\;subf %3,%3,%2
1827 nand %3,%1,%0\;subf %3,%3,%2
1828 nand %3,%1,%0\;subf %3,%3,%2
1829 nand %4,%1,%0\;subf %3,%4,%2"
1830 [(set_attr "type" "fused_arith_logical")
1831 (set_attr "cost" "6")
1832 (set_attr "length" "8")])
1833
1834 ;; logical-add fusion pattern generated by gen_logical_addsubf
1835 ;; scalar nor -> rsubf
1836 (define_insn "*fuse_nor_rsubf"
1837 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1838 (minus:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")
1839 (and:GPR (not:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r"))
1840 (not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r")))))
1841 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1842 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1843 "@
1844 nor %3,%1,%0\;subf %3,%3,%2
1845 nor %3,%1,%0\;subf %3,%3,%2
1846 nor %3,%1,%0\;subf %3,%3,%2
1847 nor %4,%1,%0\;subf %3,%4,%2"
1848 [(set_attr "type" "fused_arith_logical")
1849 (set_attr "cost" "6")
1850 (set_attr "length" "8")])
1851
1852 ;; logical-add fusion pattern generated by gen_logical_addsubf
1853 ;; scalar or -> rsubf
1854 (define_insn "*fuse_or_rsubf"
1855 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
1856 (minus:GPR (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")
1857 (ior:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
1858 (match_operand:GPR 1 "gpc_reg_operand" "r,r,r,r"))))
1859 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
1860 "(TARGET_P10_FUSION && TARGET_P10_FUSION_LOGADD)"
1861 "@
1862 or %3,%1,%0\;subf %3,%3,%2
1863 or %3,%1,%0\;subf %3,%3,%2
1864 or %3,%1,%0\;subf %3,%3,%2
1865 or %4,%1,%0\;subf %3,%4,%2"
1866 [(set_attr "type" "fused_arith_logical")
1867 (set_attr "cost" "6")
1868 (set_attr "length" "8")])
1869
1870 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1871 ;; vector vand -> vand
1872 (define_insn "*fuse_vand_vand"
1873 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1874 (and:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
1875 (match_operand:VM 1 "altivec_register_operand" "%v,v,v,v"))
1876 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1877 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1878 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1879 "@
1880 vand %3,%1,%0\;vand %3,%3,%2
1881 vand %3,%1,%0\;vand %3,%3,%2
1882 vand %3,%1,%0\;vand %3,%3,%2
1883 vand %4,%1,%0\;vand %3,%4,%2"
1884 [(set_attr "type" "fused_vector")
1885 (set_attr "cost" "6")
1886 (set_attr "length" "8")])
1887
1888 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1889 ;; vector vandc -> vand
1890 (define_insn "*fuse_vandc_vand"
1891 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1892 (and:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
1893 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
1894 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1895 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1896 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1897 "@
1898 vandc %3,%1,%0\;vand %3,%3,%2
1899 vandc %3,%1,%0\;vand %3,%3,%2
1900 vandc %3,%1,%0\;vand %3,%3,%2
1901 vandc %4,%1,%0\;vand %3,%4,%2"
1902 [(set_attr "type" "fused_vector")
1903 (set_attr "cost" "6")
1904 (set_attr "length" "8")])
1905
1906 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1907 ;; vector veqv -> vand
1908 (define_insn "*fuse_veqv_vand"
1909 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1910 (and:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
1911 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
1912 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1913 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1914 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1915 "@
1916 veqv %3,%1,%0\;vand %3,%3,%2
1917 veqv %3,%1,%0\;vand %3,%3,%2
1918 veqv %3,%1,%0\;vand %3,%3,%2
1919 veqv %4,%1,%0\;vand %3,%4,%2"
1920 [(set_attr "type" "fused_vector")
1921 (set_attr "cost" "6")
1922 (set_attr "length" "8")])
1923
1924 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1925 ;; vector vnand -> vand
1926 (define_insn "*fuse_vnand_vand"
1927 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1928 (and:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
1929 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
1930 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1931 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1932 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1933 "@
1934 vnand %3,%1,%0\;vand %3,%3,%2
1935 vnand %3,%1,%0\;vand %3,%3,%2
1936 vnand %3,%1,%0\;vand %3,%3,%2
1937 vnand %4,%1,%0\;vand %3,%4,%2"
1938 [(set_attr "type" "fused_vector")
1939 (set_attr "cost" "6")
1940 (set_attr "length" "8")])
1941
1942 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1943 ;; vector vnor -> vand
1944 (define_insn "*fuse_vnor_vand"
1945 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1946 (and:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
1947 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
1948 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1949 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1950 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1951 "@
1952 vnor %3,%1,%0\;vand %3,%3,%2
1953 vnor %3,%1,%0\;vand %3,%3,%2
1954 vnor %3,%1,%0\;vand %3,%3,%2
1955 vnor %4,%1,%0\;vand %3,%4,%2"
1956 [(set_attr "type" "fused_vector")
1957 (set_attr "cost" "6")
1958 (set_attr "length" "8")])
1959
1960 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1961 ;; vector vor -> vand
1962 (define_insn "*fuse_vor_vand"
1963 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1964 (and:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
1965 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
1966 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1967 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1968 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1969 "@
1970 vor %3,%1,%0\;vand %3,%3,%2
1971 vor %3,%1,%0\;vand %3,%3,%2
1972 vor %3,%1,%0\;vand %3,%3,%2
1973 vor %4,%1,%0\;vand %3,%4,%2"
1974 [(set_attr "type" "fused_vector")
1975 (set_attr "cost" "6")
1976 (set_attr "length" "8")])
1977
1978 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1979 ;; vector vorc -> vand
1980 (define_insn "*fuse_vorc_vand"
1981 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
1982 (and:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
1983 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
1984 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
1985 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
1986 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
1987 "@
1988 vorc %3,%1,%0\;vand %3,%3,%2
1989 vorc %3,%1,%0\;vand %3,%3,%2
1990 vorc %3,%1,%0\;vand %3,%3,%2
1991 vorc %4,%1,%0\;vand %3,%4,%2"
1992 [(set_attr "type" "fused_vector")
1993 (set_attr "cost" "6")
1994 (set_attr "length" "8")])
1995
1996 ;; logical-logical fusion pattern generated by gen_logical_addsubf
1997 ;; vector vxor -> vand
1998 (define_insn "*fuse_vxor_vand"
1999 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2000 (and:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2001 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2002 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2003 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2004 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2005 "@
2006 vxor %3,%1,%0\;vand %3,%3,%2
2007 vxor %3,%1,%0\;vand %3,%3,%2
2008 vxor %3,%1,%0\;vand %3,%3,%2
2009 vxor %4,%1,%0\;vand %3,%4,%2"
2010 [(set_attr "type" "fused_vector")
2011 (set_attr "cost" "6")
2012 (set_attr "length" "8")])
2013
2014 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2015 ;; vector vand -> vandc
2016 (define_insn "*fuse_vand_vandc"
2017 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2018 (and:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2019 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2020 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2021 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2022 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2023 "@
2024 vand %3,%1,%0\;vandc %3,%3,%2
2025 vand %3,%1,%0\;vandc %3,%3,%2
2026 vand %3,%1,%0\;vandc %3,%3,%2
2027 vand %4,%1,%0\;vandc %3,%4,%2"
2028 [(set_attr "type" "fused_vector")
2029 (set_attr "cost" "6")
2030 (set_attr "length" "8")])
2031
2032 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2033 ;; vector vandc -> vandc
2034 (define_insn "*fuse_vandc_vandc"
2035 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2036 (and:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2037 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2038 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2039 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2040 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2041 "@
2042 vandc %3,%1,%0\;vandc %3,%3,%2
2043 vandc %3,%1,%0\;vandc %3,%3,%2
2044 vandc %3,%1,%0\;vandc %3,%3,%2
2045 vandc %4,%1,%0\;vandc %3,%4,%2"
2046 [(set_attr "type" "fused_vector")
2047 (set_attr "cost" "6")
2048 (set_attr "length" "8")])
2049
2050 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2051 ;; vector veqv -> vandc
2052 (define_insn "*fuse_veqv_vandc"
2053 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2054 (and:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2055 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2056 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2057 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2058 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2059 "@
2060 veqv %3,%1,%0\;vandc %3,%3,%2
2061 veqv %3,%1,%0\;vandc %3,%3,%2
2062 veqv %3,%1,%0\;vandc %3,%3,%2
2063 veqv %4,%1,%0\;vandc %3,%4,%2"
2064 [(set_attr "type" "fused_vector")
2065 (set_attr "cost" "6")
2066 (set_attr "length" "8")])
2067
2068 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2069 ;; vector vnand -> vandc
2070 (define_insn "*fuse_vnand_vandc"
2071 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2072 (and:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2073 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2074 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2075 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2076 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2077 "@
2078 vnand %3,%1,%0\;vandc %3,%3,%2
2079 vnand %3,%1,%0\;vandc %3,%3,%2
2080 vnand %3,%1,%0\;vandc %3,%3,%2
2081 vnand %4,%1,%0\;vandc %3,%4,%2"
2082 [(set_attr "type" "fused_vector")
2083 (set_attr "cost" "6")
2084 (set_attr "length" "8")])
2085
2086 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2087 ;; vector vnor -> vandc
2088 (define_insn "*fuse_vnor_vandc"
2089 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2090 (and:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2091 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2092 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2093 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2094 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2095 "@
2096 vnor %3,%1,%0\;vandc %3,%3,%2
2097 vnor %3,%1,%0\;vandc %3,%3,%2
2098 vnor %3,%1,%0\;vandc %3,%3,%2
2099 vnor %4,%1,%0\;vandc %3,%4,%2"
2100 [(set_attr "type" "fused_vector")
2101 (set_attr "cost" "6")
2102 (set_attr "length" "8")])
2103
2104 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2105 ;; vector vor -> vandc
2106 (define_insn "*fuse_vor_vandc"
2107 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2108 (and:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2109 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2110 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2111 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2112 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2113 "@
2114 vor %3,%1,%0\;vandc %3,%3,%2
2115 vor %3,%1,%0\;vandc %3,%3,%2
2116 vor %3,%1,%0\;vandc %3,%3,%2
2117 vor %4,%1,%0\;vandc %3,%4,%2"
2118 [(set_attr "type" "fused_vector")
2119 (set_attr "cost" "6")
2120 (set_attr "length" "8")])
2121
2122 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2123 ;; vector vorc -> vandc
2124 (define_insn "*fuse_vorc_vandc"
2125 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2126 (and:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2127 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2128 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2129 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2130 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2131 "@
2132 vorc %3,%1,%0\;vandc %3,%3,%2
2133 vorc %3,%1,%0\;vandc %3,%3,%2
2134 vorc %3,%1,%0\;vandc %3,%3,%2
2135 vorc %4,%1,%0\;vandc %3,%4,%2"
2136 [(set_attr "type" "fused_vector")
2137 (set_attr "cost" "6")
2138 (set_attr "length" "8")])
2139
2140 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2141 ;; vector vxor -> vandc
2142 (define_insn "*fuse_vxor_vandc"
2143 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2144 (and:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2145 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2146 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2147 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2148 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2149 "@
2150 vxor %3,%1,%0\;vandc %3,%3,%2
2151 vxor %3,%1,%0\;vandc %3,%3,%2
2152 vxor %3,%1,%0\;vandc %3,%3,%2
2153 vxor %4,%1,%0\;vandc %3,%4,%2"
2154 [(set_attr "type" "fused_vector")
2155 (set_attr "cost" "6")
2156 (set_attr "length" "8")])
2157
2158 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2159 ;; vector vand -> veqv
2160 (define_insn "*fuse_vand_veqv"
2161 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2162 (not:VM (xor:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2163 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2164 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2165 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2166 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2167 "@
2168 vand %3,%1,%0\;veqv %3,%3,%2
2169 vand %3,%1,%0\;veqv %3,%3,%2
2170 vand %3,%1,%0\;veqv %3,%3,%2
2171 vand %4,%1,%0\;veqv %3,%4,%2"
2172 [(set_attr "type" "fused_vector")
2173 (set_attr "cost" "6")
2174 (set_attr "length" "8")])
2175
2176 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2177 ;; vector vandc -> veqv
2178 (define_insn "*fuse_vandc_veqv"
2179 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2180 (not:VM (xor:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2181 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2182 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2183 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2184 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2185 "@
2186 vandc %3,%1,%0\;veqv %3,%3,%2
2187 vandc %3,%1,%0\;veqv %3,%3,%2
2188 vandc %3,%1,%0\;veqv %3,%3,%2
2189 vandc %4,%1,%0\;veqv %3,%4,%2"
2190 [(set_attr "type" "fused_vector")
2191 (set_attr "cost" "6")
2192 (set_attr "length" "8")])
2193
2194 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2195 ;; vector veqv -> veqv
2196 (define_insn "*fuse_veqv_veqv"
2197 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2198 (not:VM (xor:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2199 (match_operand:VM 1 "altivec_register_operand" "%v,v,v,v")))
2200 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2201 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2202 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2203 "@
2204 veqv %3,%1,%0\;veqv %3,%3,%2
2205 veqv %3,%1,%0\;veqv %3,%3,%2
2206 veqv %3,%1,%0\;veqv %3,%3,%2
2207 veqv %4,%1,%0\;veqv %3,%4,%2"
2208 [(set_attr "type" "fused_vector")
2209 (set_attr "cost" "6")
2210 (set_attr "length" "8")])
2211
2212 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2213 ;; vector vnand -> veqv
2214 (define_insn "*fuse_vnand_veqv"
2215 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2216 (not:VM (xor:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2217 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2218 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2219 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2220 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2221 "@
2222 vnand %3,%1,%0\;veqv %3,%3,%2
2223 vnand %3,%1,%0\;veqv %3,%3,%2
2224 vnand %3,%1,%0\;veqv %3,%3,%2
2225 vnand %4,%1,%0\;veqv %3,%4,%2"
2226 [(set_attr "type" "fused_vector")
2227 (set_attr "cost" "6")
2228 (set_attr "length" "8")])
2229
2230 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2231 ;; vector vnor -> veqv
2232 (define_insn "*fuse_vnor_veqv"
2233 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2234 (not:VM (xor:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2235 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2236 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2237 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2238 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2239 "@
2240 vnor %3,%1,%0\;veqv %3,%3,%2
2241 vnor %3,%1,%0\;veqv %3,%3,%2
2242 vnor %3,%1,%0\;veqv %3,%3,%2
2243 vnor %4,%1,%0\;veqv %3,%4,%2"
2244 [(set_attr "type" "fused_vector")
2245 (set_attr "cost" "6")
2246 (set_attr "length" "8")])
2247
2248 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2249 ;; vector vor -> veqv
2250 (define_insn "*fuse_vor_veqv"
2251 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2252 (not:VM (xor:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2253 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2254 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2255 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2256 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2257 "@
2258 vor %3,%1,%0\;veqv %3,%3,%2
2259 vor %3,%1,%0\;veqv %3,%3,%2
2260 vor %3,%1,%0\;veqv %3,%3,%2
2261 vor %4,%1,%0\;veqv %3,%4,%2"
2262 [(set_attr "type" "fused_vector")
2263 (set_attr "cost" "6")
2264 (set_attr "length" "8")])
2265
2266 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2267 ;; vector vorc -> veqv
2268 (define_insn "*fuse_vorc_veqv"
2269 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2270 (not:VM (xor:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2271 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2272 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2273 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2274 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2275 "@
2276 vorc %3,%1,%0\;veqv %3,%3,%2
2277 vorc %3,%1,%0\;veqv %3,%3,%2
2278 vorc %3,%1,%0\;veqv %3,%3,%2
2279 vorc %4,%1,%0\;veqv %3,%4,%2"
2280 [(set_attr "type" "fused_vector")
2281 (set_attr "cost" "6")
2282 (set_attr "length" "8")])
2283
2284 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2285 ;; vector vxor -> veqv
2286 (define_insn "*fuse_vxor_veqv"
2287 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2288 (not:VM (xor:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2289 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2290 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2291 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2292 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2293 "@
2294 vxor %3,%1,%0\;veqv %3,%3,%2
2295 vxor %3,%1,%0\;veqv %3,%3,%2
2296 vxor %3,%1,%0\;veqv %3,%3,%2
2297 vxor %4,%1,%0\;veqv %3,%4,%2"
2298 [(set_attr "type" "fused_vector")
2299 (set_attr "cost" "6")
2300 (set_attr "length" "8")])
2301
2302 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2303 ;; vector vand -> vnand
2304 (define_insn "*fuse_vand_vnand"
2305 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2306 (ior:VM (not:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2307 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2308 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2309 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2310 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2311 "@
2312 vand %3,%1,%0\;vnand %3,%3,%2
2313 vand %3,%1,%0\;vnand %3,%3,%2
2314 vand %3,%1,%0\;vnand %3,%3,%2
2315 vand %4,%1,%0\;vnand %3,%4,%2"
2316 [(set_attr "type" "fused_vector")
2317 (set_attr "cost" "6")
2318 (set_attr "length" "8")])
2319
2320 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2321 ;; vector vandc -> vnand
2322 (define_insn "*fuse_vandc_vnand"
2323 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2324 (ior:VM (not:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2325 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2326 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2327 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2328 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2329 "@
2330 vandc %3,%1,%0\;vnand %3,%3,%2
2331 vandc %3,%1,%0\;vnand %3,%3,%2
2332 vandc %3,%1,%0\;vnand %3,%3,%2
2333 vandc %4,%1,%0\;vnand %3,%4,%2"
2334 [(set_attr "type" "fused_vector")
2335 (set_attr "cost" "6")
2336 (set_attr "length" "8")])
2337
2338 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2339 ;; vector veqv -> vnand
2340 (define_insn "*fuse_veqv_vnand"
2341 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2342 (ior:VM (not:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2343 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))))
2344 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2345 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2346 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2347 "@
2348 veqv %3,%1,%0\;vnand %3,%3,%2
2349 veqv %3,%1,%0\;vnand %3,%3,%2
2350 veqv %3,%1,%0\;vnand %3,%3,%2
2351 veqv %4,%1,%0\;vnand %3,%4,%2"
2352 [(set_attr "type" "fused_vector")
2353 (set_attr "cost" "6")
2354 (set_attr "length" "8")])
2355
2356 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2357 ;; vector vnand -> vnand
2358 (define_insn "*fuse_vnand_vnand"
2359 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2360 (ior:VM (not:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2361 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))))
2362 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2363 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2364 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2365 "@
2366 vnand %3,%1,%0\;vnand %3,%3,%2
2367 vnand %3,%1,%0\;vnand %3,%3,%2
2368 vnand %3,%1,%0\;vnand %3,%3,%2
2369 vnand %4,%1,%0\;vnand %3,%4,%2"
2370 [(set_attr "type" "fused_vector")
2371 (set_attr "cost" "6")
2372 (set_attr "length" "8")])
2373
2374 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2375 ;; vector vnor -> vnand
2376 (define_insn "*fuse_vnor_vnand"
2377 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2378 (ior:VM (not:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2379 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))))
2380 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2381 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2382 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2383 "@
2384 vnor %3,%1,%0\;vnand %3,%3,%2
2385 vnor %3,%1,%0\;vnand %3,%3,%2
2386 vnor %3,%1,%0\;vnand %3,%3,%2
2387 vnor %4,%1,%0\;vnand %3,%4,%2"
2388 [(set_attr "type" "fused_vector")
2389 (set_attr "cost" "6")
2390 (set_attr "length" "8")])
2391
2392 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2393 ;; vector vor -> vnand
2394 (define_insn "*fuse_vor_vnand"
2395 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2396 (ior:VM (not:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2397 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2398 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2399 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2400 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2401 "@
2402 vor %3,%1,%0\;vnand %3,%3,%2
2403 vor %3,%1,%0\;vnand %3,%3,%2
2404 vor %3,%1,%0\;vnand %3,%3,%2
2405 vor %4,%1,%0\;vnand %3,%4,%2"
2406 [(set_attr "type" "fused_vector")
2407 (set_attr "cost" "6")
2408 (set_attr "length" "8")])
2409
2410 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2411 ;; vector vorc -> vnand
2412 (define_insn "*fuse_vorc_vnand"
2413 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2414 (ior:VM (not:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2415 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2416 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2417 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2418 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2419 "@
2420 vorc %3,%1,%0\;vnand %3,%3,%2
2421 vorc %3,%1,%0\;vnand %3,%3,%2
2422 vorc %3,%1,%0\;vnand %3,%3,%2
2423 vorc %4,%1,%0\;vnand %3,%4,%2"
2424 [(set_attr "type" "fused_vector")
2425 (set_attr "cost" "6")
2426 (set_attr "length" "8")])
2427
2428 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2429 ;; vector vxor -> vnand
2430 (define_insn "*fuse_vxor_vnand"
2431 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2432 (ior:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2433 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2434 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2435 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2436 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2437 "@
2438 vxor %3,%1,%0\;vnand %3,%3,%2
2439 vxor %3,%1,%0\;vnand %3,%3,%2
2440 vxor %3,%1,%0\;vnand %3,%3,%2
2441 vxor %4,%1,%0\;vnand %3,%4,%2"
2442 [(set_attr "type" "fused_vector")
2443 (set_attr "cost" "6")
2444 (set_attr "length" "8")])
2445
2446 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2447 ;; vector vand -> vnor
2448 (define_insn "*fuse_vand_vnor"
2449 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2450 (and:VM (not:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2451 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2452 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2453 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2454 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2455 "@
2456 vand %3,%1,%0\;vnor %3,%3,%2
2457 vand %3,%1,%0\;vnor %3,%3,%2
2458 vand %3,%1,%0\;vnor %3,%3,%2
2459 vand %4,%1,%0\;vnor %3,%4,%2"
2460 [(set_attr "type" "fused_vector")
2461 (set_attr "cost" "6")
2462 (set_attr "length" "8")])
2463
2464 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2465 ;; vector vandc -> vnor
2466 (define_insn "*fuse_vandc_vnor"
2467 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2468 (and:VM (not:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2469 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2470 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2471 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2472 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2473 "@
2474 vandc %3,%1,%0\;vnor %3,%3,%2
2475 vandc %3,%1,%0\;vnor %3,%3,%2
2476 vandc %3,%1,%0\;vnor %3,%3,%2
2477 vandc %4,%1,%0\;vnor %3,%4,%2"
2478 [(set_attr "type" "fused_vector")
2479 (set_attr "cost" "6")
2480 (set_attr "length" "8")])
2481
2482 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2483 ;; vector veqv -> vnor
2484 (define_insn "*fuse_veqv_vnor"
2485 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2486 (and:VM (not:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2487 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))))
2488 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2489 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2490 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2491 "@
2492 veqv %3,%1,%0\;vnor %3,%3,%2
2493 veqv %3,%1,%0\;vnor %3,%3,%2
2494 veqv %3,%1,%0\;vnor %3,%3,%2
2495 veqv %4,%1,%0\;vnor %3,%4,%2"
2496 [(set_attr "type" "fused_vector")
2497 (set_attr "cost" "6")
2498 (set_attr "length" "8")])
2499
2500 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2501 ;; vector vnand -> vnor
2502 (define_insn "*fuse_vnand_vnor"
2503 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2504 (and:VM (not:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2505 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))))
2506 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2507 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2508 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2509 "@
2510 vnand %3,%1,%0\;vnor %3,%3,%2
2511 vnand %3,%1,%0\;vnor %3,%3,%2
2512 vnand %3,%1,%0\;vnor %3,%3,%2
2513 vnand %4,%1,%0\;vnor %3,%4,%2"
2514 [(set_attr "type" "fused_vector")
2515 (set_attr "cost" "6")
2516 (set_attr "length" "8")])
2517
2518 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2519 ;; vector vnor -> vnor
2520 (define_insn "*fuse_vnor_vnor"
2521 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2522 (and:VM (not:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2523 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))))
2524 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2525 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2526 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2527 "@
2528 vnor %3,%1,%0\;vnor %3,%3,%2
2529 vnor %3,%1,%0\;vnor %3,%3,%2
2530 vnor %3,%1,%0\;vnor %3,%3,%2
2531 vnor %4,%1,%0\;vnor %3,%4,%2"
2532 [(set_attr "type" "fused_vector")
2533 (set_attr "cost" "6")
2534 (set_attr "length" "8")])
2535
2536 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2537 ;; vector vor -> vnor
2538 (define_insn "*fuse_vor_vnor"
2539 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2540 (and:VM (not:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2541 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2542 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2543 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2544 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2545 "@
2546 vor %3,%1,%0\;vnor %3,%3,%2
2547 vor %3,%1,%0\;vnor %3,%3,%2
2548 vor %3,%1,%0\;vnor %3,%3,%2
2549 vor %4,%1,%0\;vnor %3,%4,%2"
2550 [(set_attr "type" "fused_vector")
2551 (set_attr "cost" "6")
2552 (set_attr "length" "8")])
2553
2554 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2555 ;; vector vorc -> vnor
2556 (define_insn "*fuse_vorc_vnor"
2557 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2558 (and:VM (not:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2559 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2560 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2561 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2562 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2563 "@
2564 vorc %3,%1,%0\;vnor %3,%3,%2
2565 vorc %3,%1,%0\;vnor %3,%3,%2
2566 vorc %3,%1,%0\;vnor %3,%3,%2
2567 vorc %4,%1,%0\;vnor %3,%4,%2"
2568 [(set_attr "type" "fused_vector")
2569 (set_attr "cost" "6")
2570 (set_attr "length" "8")])
2571
2572 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2573 ;; vector vxor -> vnor
2574 (define_insn "*fuse_vxor_vnor"
2575 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2576 (and:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2577 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2578 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2579 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2580 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2581 "@
2582 vxor %3,%1,%0\;vnor %3,%3,%2
2583 vxor %3,%1,%0\;vnor %3,%3,%2
2584 vxor %3,%1,%0\;vnor %3,%3,%2
2585 vxor %4,%1,%0\;vnor %3,%4,%2"
2586 [(set_attr "type" "fused_vector")
2587 (set_attr "cost" "6")
2588 (set_attr "length" "8")])
2589
2590 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2591 ;; vector vand -> vor
2592 (define_insn "*fuse_vand_vor"
2593 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2594 (ior:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2595 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2596 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2597 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2598 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2599 "@
2600 vand %3,%1,%0\;vor %3,%3,%2
2601 vand %3,%1,%0\;vor %3,%3,%2
2602 vand %3,%1,%0\;vor %3,%3,%2
2603 vand %4,%1,%0\;vor %3,%4,%2"
2604 [(set_attr "type" "fused_vector")
2605 (set_attr "cost" "6")
2606 (set_attr "length" "8")])
2607
2608 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2609 ;; vector vandc -> vor
2610 (define_insn "*fuse_vandc_vor"
2611 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2612 (ior:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2613 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2614 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2615 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2616 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2617 "@
2618 vandc %3,%1,%0\;vor %3,%3,%2
2619 vandc %3,%1,%0\;vor %3,%3,%2
2620 vandc %3,%1,%0\;vor %3,%3,%2
2621 vandc %4,%1,%0\;vor %3,%4,%2"
2622 [(set_attr "type" "fused_vector")
2623 (set_attr "cost" "6")
2624 (set_attr "length" "8")])
2625
2626 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2627 ;; vector veqv -> vor
2628 (define_insn "*fuse_veqv_vor"
2629 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2630 (ior:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2631 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2632 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2633 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2634 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2635 "@
2636 veqv %3,%1,%0\;vor %3,%3,%2
2637 veqv %3,%1,%0\;vor %3,%3,%2
2638 veqv %3,%1,%0\;vor %3,%3,%2
2639 veqv %4,%1,%0\;vor %3,%4,%2"
2640 [(set_attr "type" "fused_vector")
2641 (set_attr "cost" "6")
2642 (set_attr "length" "8")])
2643
2644 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2645 ;; vector vnand -> vor
2646 (define_insn "*fuse_vnand_vor"
2647 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2648 (ior:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2649 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2650 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2651 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2652 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2653 "@
2654 vnand %3,%1,%0\;vor %3,%3,%2
2655 vnand %3,%1,%0\;vor %3,%3,%2
2656 vnand %3,%1,%0\;vor %3,%3,%2
2657 vnand %4,%1,%0\;vor %3,%4,%2"
2658 [(set_attr "type" "fused_vector")
2659 (set_attr "cost" "6")
2660 (set_attr "length" "8")])
2661
2662 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2663 ;; vector vnor -> vor
2664 (define_insn "*fuse_vnor_vor"
2665 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2666 (ior:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2667 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2668 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2669 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2670 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2671 "@
2672 vnor %3,%1,%0\;vor %3,%3,%2
2673 vnor %3,%1,%0\;vor %3,%3,%2
2674 vnor %3,%1,%0\;vor %3,%3,%2
2675 vnor %4,%1,%0\;vor %3,%4,%2"
2676 [(set_attr "type" "fused_vector")
2677 (set_attr "cost" "6")
2678 (set_attr "length" "8")])
2679
2680 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2681 ;; vector vor -> vor
2682 (define_insn "*fuse_vor_vor"
2683 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2684 (ior:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2685 (match_operand:VM 1 "altivec_register_operand" "%v,v,v,v"))
2686 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2687 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2688 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2689 "@
2690 vor %3,%1,%0\;vor %3,%3,%2
2691 vor %3,%1,%0\;vor %3,%3,%2
2692 vor %3,%1,%0\;vor %3,%3,%2
2693 vor %4,%1,%0\;vor %3,%4,%2"
2694 [(set_attr "type" "fused_vector")
2695 (set_attr "cost" "6")
2696 (set_attr "length" "8")])
2697
2698 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2699 ;; vector vorc -> vor
2700 (define_insn "*fuse_vorc_vor"
2701 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2702 (ior:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2703 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2704 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2705 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2706 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2707 "@
2708 vorc %3,%1,%0\;vor %3,%3,%2
2709 vorc %3,%1,%0\;vor %3,%3,%2
2710 vorc %3,%1,%0\;vor %3,%3,%2
2711 vorc %4,%1,%0\;vor %3,%4,%2"
2712 [(set_attr "type" "fused_vector")
2713 (set_attr "cost" "6")
2714 (set_attr "length" "8")])
2715
2716 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2717 ;; vector vxor -> vor
2718 (define_insn "*fuse_vxor_vor"
2719 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2720 (ior:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2721 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2722 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2723 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2724 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2725 "@
2726 vxor %3,%1,%0\;vor %3,%3,%2
2727 vxor %3,%1,%0\;vor %3,%3,%2
2728 vxor %3,%1,%0\;vor %3,%3,%2
2729 vxor %4,%1,%0\;vor %3,%4,%2"
2730 [(set_attr "type" "fused_vector")
2731 (set_attr "cost" "6")
2732 (set_attr "length" "8")])
2733
2734 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2735 ;; vector vand -> vorc
2736 (define_insn "*fuse_vand_vorc"
2737 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2738 (ior:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2739 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2740 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2741 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2742 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2743 "@
2744 vand %3,%1,%0\;vorc %3,%3,%2
2745 vand %3,%1,%0\;vorc %3,%3,%2
2746 vand %3,%1,%0\;vorc %3,%3,%2
2747 vand %4,%1,%0\;vorc %3,%4,%2"
2748 [(set_attr "type" "fused_vector")
2749 (set_attr "cost" "6")
2750 (set_attr "length" "8")])
2751
2752 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2753 ;; vector vandc -> vorc
2754 (define_insn "*fuse_vandc_vorc"
2755 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2756 (ior:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2757 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2758 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2759 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2760 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2761 "@
2762 vandc %3,%1,%0\;vorc %3,%3,%2
2763 vandc %3,%1,%0\;vorc %3,%3,%2
2764 vandc %3,%1,%0\;vorc %3,%3,%2
2765 vandc %4,%1,%0\;vorc %3,%4,%2"
2766 [(set_attr "type" "fused_vector")
2767 (set_attr "cost" "6")
2768 (set_attr "length" "8")])
2769
2770 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2771 ;; vector veqv -> vorc
2772 (define_insn "*fuse_veqv_vorc"
2773 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2774 (ior:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2775 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2776 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2777 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2778 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2779 "@
2780 veqv %3,%1,%0\;vorc %3,%3,%2
2781 veqv %3,%1,%0\;vorc %3,%3,%2
2782 veqv %3,%1,%0\;vorc %3,%3,%2
2783 veqv %4,%1,%0\;vorc %3,%4,%2"
2784 [(set_attr "type" "fused_vector")
2785 (set_attr "cost" "6")
2786 (set_attr "length" "8")])
2787
2788 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2789 ;; vector vnand -> vorc
2790 (define_insn "*fuse_vnand_vorc"
2791 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2792 (ior:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2793 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2794 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2795 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2796 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2797 "@
2798 vnand %3,%1,%0\;vorc %3,%3,%2
2799 vnand %3,%1,%0\;vorc %3,%3,%2
2800 vnand %3,%1,%0\;vorc %3,%3,%2
2801 vnand %4,%1,%0\;vorc %3,%4,%2"
2802 [(set_attr "type" "fused_vector")
2803 (set_attr "cost" "6")
2804 (set_attr "length" "8")])
2805
2806 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2807 ;; vector vnor -> vorc
2808 (define_insn "*fuse_vnor_vorc"
2809 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2810 (ior:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2811 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2812 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2813 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2814 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2815 "@
2816 vnor %3,%1,%0\;vorc %3,%3,%2
2817 vnor %3,%1,%0\;vorc %3,%3,%2
2818 vnor %3,%1,%0\;vorc %3,%3,%2
2819 vnor %4,%1,%0\;vorc %3,%4,%2"
2820 [(set_attr "type" "fused_vector")
2821 (set_attr "cost" "6")
2822 (set_attr "length" "8")])
2823
2824 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2825 ;; vector vor -> vorc
2826 (define_insn "*fuse_vor_vorc"
2827 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2828 (ior:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2829 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2830 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2831 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2832 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2833 "@
2834 vor %3,%1,%0\;vorc %3,%3,%2
2835 vor %3,%1,%0\;vorc %3,%3,%2
2836 vor %3,%1,%0\;vorc %3,%3,%2
2837 vor %4,%1,%0\;vorc %3,%4,%2"
2838 [(set_attr "type" "fused_vector")
2839 (set_attr "cost" "6")
2840 (set_attr "length" "8")])
2841
2842 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2843 ;; vector vorc -> vorc
2844 (define_insn "*fuse_vorc_vorc"
2845 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2846 (ior:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2847 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2848 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2849 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2850 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2851 "@
2852 vorc %3,%1,%0\;vorc %3,%3,%2
2853 vorc %3,%1,%0\;vorc %3,%3,%2
2854 vorc %3,%1,%0\;vorc %3,%3,%2
2855 vorc %4,%1,%0\;vorc %3,%4,%2"
2856 [(set_attr "type" "fused_vector")
2857 (set_attr "cost" "6")
2858 (set_attr "length" "8")])
2859
2860 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2861 ;; vector vxor -> vorc
2862 (define_insn "*fuse_vxor_vorc"
2863 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2864 (ior:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2865 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2866 (not:VM (match_operand:VM 2 "altivec_register_operand" "v,v,v,v"))))
2867 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2868 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2869 "@
2870 vxor %3,%1,%0\;vorc %3,%3,%2
2871 vxor %3,%1,%0\;vorc %3,%3,%2
2872 vxor %3,%1,%0\;vorc %3,%3,%2
2873 vxor %4,%1,%0\;vorc %3,%4,%2"
2874 [(set_attr "type" "fused_vector")
2875 (set_attr "cost" "6")
2876 (set_attr "length" "8")])
2877
2878 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2879 ;; vector vand -> vxor
2880 (define_insn "*fuse_vand_vxor"
2881 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2882 (xor:VM (and:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2883 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2884 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2885 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2886 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2887 "@
2888 vand %3,%1,%0\;vxor %3,%3,%2
2889 vand %3,%1,%0\;vxor %3,%3,%2
2890 vand %3,%1,%0\;vxor %3,%3,%2
2891 vand %4,%1,%0\;vxor %3,%4,%2"
2892 [(set_attr "type" "fused_vector")
2893 (set_attr "cost" "6")
2894 (set_attr "length" "8")])
2895
2896 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2897 ;; vector vandc -> vxor
2898 (define_insn "*fuse_vandc_vxor"
2899 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2900 (xor:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2901 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2902 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2903 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2904 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2905 "@
2906 vandc %3,%1,%0\;vxor %3,%3,%2
2907 vandc %3,%1,%0\;vxor %3,%3,%2
2908 vandc %3,%1,%0\;vxor %3,%3,%2
2909 vandc %4,%1,%0\;vxor %3,%4,%2"
2910 [(set_attr "type" "fused_vector")
2911 (set_attr "cost" "6")
2912 (set_attr "length" "8")])
2913
2914 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2915 ;; vector veqv -> vxor
2916 (define_insn "*fuse_veqv_vxor"
2917 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2918 (xor:VM (not:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2919 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2920 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2921 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2922 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2923 "@
2924 veqv %3,%1,%0\;vxor %3,%3,%2
2925 veqv %3,%1,%0\;vxor %3,%3,%2
2926 veqv %3,%1,%0\;vxor %3,%3,%2
2927 veqv %4,%1,%0\;vxor %3,%4,%2"
2928 [(set_attr "type" "fused_vector")
2929 (set_attr "cost" "6")
2930 (set_attr "length" "8")])
2931
2932 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2933 ;; vector vnand -> vxor
2934 (define_insn "*fuse_vnand_vxor"
2935 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2936 (xor:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2937 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2938 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2939 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2940 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2941 "@
2942 vnand %3,%1,%0\;vxor %3,%3,%2
2943 vnand %3,%1,%0\;vxor %3,%3,%2
2944 vnand %3,%1,%0\;vxor %3,%3,%2
2945 vnand %4,%1,%0\;vxor %3,%4,%2"
2946 [(set_attr "type" "fused_vector")
2947 (set_attr "cost" "6")
2948 (set_attr "length" "8")])
2949
2950 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2951 ;; vector vnor -> vxor
2952 (define_insn "*fuse_vnor_vxor"
2953 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2954 (xor:VM (and:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2955 (not:VM (match_operand:VM 1 "altivec_register_operand" "v,v,v,v")))
2956 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2957 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2958 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2959 "@
2960 vnor %3,%1,%0\;vxor %3,%3,%2
2961 vnor %3,%1,%0\;vxor %3,%3,%2
2962 vnor %3,%1,%0\;vxor %3,%3,%2
2963 vnor %4,%1,%0\;vxor %3,%4,%2"
2964 [(set_attr "type" "fused_vector")
2965 (set_attr "cost" "6")
2966 (set_attr "length" "8")])
2967
2968 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2969 ;; vector vor -> vxor
2970 (define_insn "*fuse_vor_vxor"
2971 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2972 (xor:VM (ior:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
2973 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2974 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2975 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2976 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2977 "@
2978 vor %3,%1,%0\;vxor %3,%3,%2
2979 vor %3,%1,%0\;vxor %3,%3,%2
2980 vor %3,%1,%0\;vxor %3,%3,%2
2981 vor %4,%1,%0\;vxor %3,%4,%2"
2982 [(set_attr "type" "fused_vector")
2983 (set_attr "cost" "6")
2984 (set_attr "length" "8")])
2985
2986 ;; logical-logical fusion pattern generated by gen_logical_addsubf
2987 ;; vector vorc -> vxor
2988 (define_insn "*fuse_vorc_vxor"
2989 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
2990 (xor:VM (ior:VM (not:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v"))
2991 (match_operand:VM 1 "altivec_register_operand" "v,v,v,v"))
2992 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
2993 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
2994 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
2995 "@
2996 vorc %3,%1,%0\;vxor %3,%3,%2
2997 vorc %3,%1,%0\;vxor %3,%3,%2
2998 vorc %3,%1,%0\;vxor %3,%3,%2
2999 vorc %4,%1,%0\;vxor %3,%4,%2"
3000 [(set_attr "type" "fused_vector")
3001 (set_attr "cost" "6")
3002 (set_attr "length" "8")])
3003
3004 ;; logical-logical fusion pattern generated by gen_logical_addsubf
3005 ;; vector vxor -> vxor
3006 (define_insn "*fuse_vxor_vxor"
3007 [(set (match_operand:VM 3 "altivec_register_operand" "=&0,&1,&v,v")
3008 (xor:VM (xor:VM (match_operand:VM 0 "altivec_register_operand" "v,v,v,v")
3009 (match_operand:VM 1 "altivec_register_operand" "%v,v,v,v"))
3010 (match_operand:VM 2 "altivec_register_operand" "v,v,v,v")))
3011 (clobber (match_scratch:VM 4 "=X,X,X,&v"))]
3012 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2LOGICAL)"
3013 "@
3014 vxor %3,%1,%0\;vxor %3,%3,%2
3015 vxor %3,%1,%0\;vxor %3,%3,%2
3016 vxor %3,%1,%0\;vxor %3,%3,%2
3017 vxor %4,%1,%0\;vxor %3,%4,%2"
3018 [(set_attr "type" "fused_vector")
3019 (set_attr "cost" "6")
3020 (set_attr "length" "8")])
3021
3022 ;; add-add fusion pattern generated by gen_addadd
3023 (define_insn "*fuse_add_add"
3024 [(set (match_operand:GPR 3 "gpc_reg_operand" "=&0,&1,&r,r")
3025 (plus:GPR
3026 (plus:GPR (match_operand:GPR 0 "gpc_reg_operand" "r,r,r,r")
3027 (match_operand:GPR 1 "gpc_reg_operand" "%r,r,r,r"))
3028 (match_operand:GPR 2 "gpc_reg_operand" "r,r,r,r")))
3029 (clobber (match_scratch:GPR 4 "=X,X,X,&r"))]
3030 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2ADD)"
3031 "@
3032 add %3,%1,%0\;add %3,%3,%2
3033 add %3,%1,%0\;add %3,%3,%2
3034 add %3,%1,%0\;add %3,%3,%2
3035 add %4,%1,%0\;add %3,%4,%2"
3036 [(set_attr "type" "fused_arith_logical")
3037 (set_attr "cost" "6")
3038 (set_attr "length" "8")])
3039
3040 ;; vaddudm-vaddudm fusion pattern generated by gen_addadd
3041 (define_insn "*fuse_vaddudm_vaddudm"
3042 [(set (match_operand:V2DI 3 "altivec_register_operand" "=&0,&1,&v,v")
3043 (plus:V2DI
3044 (plus:V2DI (match_operand:V2DI 0 "altivec_register_operand" "v,v,v,v")
3045 (match_operand:V2DI 1 "altivec_register_operand" "%v,v,v,v"))
3046 (match_operand:V2DI 2 "altivec_register_operand" "v,v,v,v")))
3047 (clobber (match_scratch:V2DI 4 "=X,X,X,&v"))]
3048 "(TARGET_P10_FUSION && TARGET_P10_FUSION_2ADD)"
3049 "@
3050 vaddudm %3,%1,%0\;vaddudm %3,%3,%2
3051 vaddudm %3,%1,%0\;vaddudm %3,%3,%2
3052 vaddudm %3,%1,%0\;vaddudm %3,%3,%2
3053 vaddudm %4,%1,%0\;vaddudm %3,%4,%2"
3054 [(set_attr "type" "fused_vector")
3055 (set_attr "cost" "6")
3056 (set_attr "length" "8")])