1 2018-01-03 Jan Beulich <jbeulich@suse.com>
3 * sse.md (mov<mode>_internal): Tighten condition for when to use
4 vmovdqu<ssescalarsize> for TI and OI modes.
6 2018-01-03 Jakub Jelinek <jakub@redhat.com>
8 Update copyright years.
10 2018-01-03 Martin Liska <mliska@suse.cz>
13 * ipa-visibility.c (function_and_variable_visibility): Skip
14 functions with noipa attribure.
16 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18 * gcc.c (process_command): Update copyright notice dates.
19 * gcov-dump.c (print_version): Ditto.
20 * gcov.c (print_version): Ditto.
21 * gcov-tool.c (print_version): Ditto.
22 * gengtype.c (create_file): Ditto.
23 * doc/cpp.texi: Bump @copying's copyright year.
24 * doc/cppinternals.texi: Ditto.
25 * doc/gcc.texi: Ditto.
26 * doc/gccint.texi: Ditto.
27 * doc/gcov.texi: Ditto.
28 * doc/install.texi: Ditto.
29 * doc/invoke.texi: Ditto.
31 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33 * vector-builder.h (vector_builder::m_full_nelts): Change from
34 unsigned int to poly_uint64.
35 (vector_builder::full_nelts): Update prototype accordingly.
36 (vector_builder::new_vector): Likewise.
37 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
38 (vector_builder::operator ==): Likewise.
39 (vector_builder::finalize): Likewise.
40 * int-vector-builder.h (int_vector_builder::int_vector_builder):
41 Take the number of elements as a poly_uint64 rather than an
43 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
44 from unsigned int to poly_uint64.
45 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
46 (vec_perm_indices::new_vector): Likewise.
47 (vec_perm_indices::length): Likewise.
48 (vec_perm_indices::nelts_per_input): Likewise.
49 (vec_perm_indices::input_nelts): Likewise.
50 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
51 number of elements per input as a poly_uint64 rather than an
52 unsigned int. Use the original encoding for variable-length
53 vectors, rather than clamping each individual element.
54 For the second and subsequent elements in each pattern,
55 clamp the step and base before clamping their sum.
56 (vec_perm_indices::series_p): Handle polynomial element counts.
57 (vec_perm_indices::all_in_range_p): Likewise.
58 (vec_perm_indices_to_tree): Likewise.
59 (vec_perm_indices_to_rtx): Likewise.
60 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
61 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
62 (tree_vector_builder::new_binary_operation): Handle polynomial
63 element counts. Return false if we need to know the number
64 of elements at compile time.
65 * fold-const.c (fold_vec_perm): Punt if the number of elements
66 isn't known at compile time.
68 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
70 * vec-perm-indices.h (vec_perm_builder): Change element type
71 from HOST_WIDE_INT to poly_int64.
72 (vec_perm_indices::element_type): Update accordingly.
73 (vec_perm_indices::clamp): Handle polynomial element_types.
74 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
75 (vec_perm_indices::all_in_range_p): Likewise.
76 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
78 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
79 polynomial vec_perm_indices element types.
80 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
81 * fold-const.c (fold_vec_perm): Likewise.
82 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
83 * tree-vect-generic.c (lower_vec_perm): Likewise.
84 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
85 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
86 element type to HOST_WIDE_INT.
88 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
89 Alan Hayward <alan.hayward@arm.com>
90 David Sherwood <david.sherwood@arm.com>
92 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
93 rather than an int. Use plus_constant.
94 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
95 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
97 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
98 Alan Hayward <alan.hayward@arm.com>
99 David Sherwood <david.sherwood@arm.com>
101 * calls.c (emit_call_1, expand_call): Change struct_value_size from
102 a HOST_WIDE_INT to a poly_int64.
104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
105 Alan Hayward <alan.hayward@arm.com>
106 David Sherwood <david.sherwood@arm.com>
108 * calls.c (load_register_parameters): Cope with polynomial
109 mode sizes. Require a constant size for BLKmode parameters
110 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
111 forces a parameter to be padded at the lsb end in order to
112 fill a complete number of words, require the parameter size
113 to be ordered wrt UNITS_PER_WORD.
115 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
116 Alan Hayward <alan.hayward@arm.com>
117 David Sherwood <david.sherwood@arm.com>
119 * reload1.c (spill_stack_slot_width): Change element type
120 from unsigned int to poly_uint64_pod.
121 (alter_reg): Treat mode sizes as polynomial.
123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
124 Alan Hayward <alan.hayward@arm.com>
125 David Sherwood <david.sherwood@arm.com>
127 * reload.c (complex_word_subreg_p): New function.
128 (reload_inner_reg_of_subreg, push_reload): Use it.
130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
131 Alan Hayward <alan.hayward@arm.com>
132 David Sherwood <david.sherwood@arm.com>
134 * lra-constraints.c (process_alt_operands): Reject matched
135 operands whose sizes aren't ordered.
136 (match_reload): Refer to this check here.
138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
139 Alan Hayward <alan.hayward@arm.com>
140 David Sherwood <david.sherwood@arm.com>
142 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
143 that the mode size is in the set {1, 2, 4, 8, 16}.
145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
146 Alan Hayward <alan.hayward@arm.com>
147 David Sherwood <david.sherwood@arm.com>
149 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
150 Use plus_constant instead of gen_rtx_PLUS.
152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
153 Alan Hayward <alan.hayward@arm.com>
154 David Sherwood <david.sherwood@arm.com>
156 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
157 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
158 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
159 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
160 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
161 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
162 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
163 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
164 * config/i386/i386.c (ix86_push_rounding): ...this new function.
165 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
167 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
168 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
169 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
170 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
171 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
172 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
173 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
174 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
175 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
176 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
178 * expr.c (emit_move_resolve_push): Treat the input and result
179 of PUSH_ROUNDING as a poly_int64.
180 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
181 (emit_push_insn): Likewise.
182 * lra-eliminations.c (mark_not_eliminable): Likewise.
183 * recog.c (push_operand): Likewise.
184 * reload1.c (elimination_effects): Likewise.
185 * rtlanal.c (nonzero_bits1): Likewise.
186 * calls.c (store_one_arg): Likewise. Require the padding to be
187 known at compile time.
189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
190 Alan Hayward <alan.hayward@arm.com>
191 David Sherwood <david.sherwood@arm.com>
193 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
194 Use plus_constant instead of gen_rtx_PLUS.
196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
197 Alan Hayward <alan.hayward@arm.com>
198 David Sherwood <david.sherwood@arm.com>
200 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
204 Alan Hayward <alan.hayward@arm.com>
205 David Sherwood <david.sherwood@arm.com>
207 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
208 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
209 via stack temporaries. Treat the mode size as polynomial too.
211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
212 Alan Hayward <alan.hayward@arm.com>
213 David Sherwood <david.sherwood@arm.com>
215 * expr.c (expand_expr_real_2): When handling conversions involving
216 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
217 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
218 as a poly_uint64 too.
220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
221 Alan Hayward <alan.hayward@arm.com>
222 David Sherwood <david.sherwood@arm.com>
224 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
227 Alan Hayward <alan.hayward@arm.com>
228 David Sherwood <david.sherwood@arm.com>
230 * combine.c (can_change_dest_mode): Handle polynomial
231 REGMODE_NATURAL_SIZE.
232 * expmed.c (store_bit_field_1): Likewise.
233 * expr.c (store_constructor): Likewise.
234 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
235 and polynomial REGMODE_NATURAL_SIZE.
236 (gen_lowpart_common): Likewise.
237 * reginfo.c (record_subregs_of_mode): Likewise.
238 * rtlanal.c (read_modify_subreg_p): Likewise.
240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
241 Alan Hayward <alan.hayward@arm.com>
242 David Sherwood <david.sherwood@arm.com>
244 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
247 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
248 Alan Hayward <alan.hayward@arm.com>
249 David Sherwood <david.sherwood@arm.com>
251 * match.pd: Cope with polynomial numbers of vector elements.
253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
254 Alan Hayward <alan.hayward@arm.com>
255 David Sherwood <david.sherwood@arm.com>
257 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
258 in a POINTER_PLUS_EXPR.
260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
261 Alan Hayward <alan.hayward@arm.com>
262 David Sherwood <david.sherwood@arm.com>
264 * omp-simd-clone.c (simd_clone_subparts): New function.
265 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
266 (ipa_simd_modify_function_body): Likewise.
268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
269 Alan Hayward <alan.hayward@arm.com>
270 David Sherwood <david.sherwood@arm.com>
272 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
273 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
274 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
275 (expand_vector_condition, vector_element): Likewise.
276 (subparts_gt): New function.
277 (get_compute_type): Use subparts_gt.
278 (count_type_subparts): Delete.
279 (expand_vector_operations_1): Use subparts_gt instead of
282 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
283 Alan Hayward <alan.hayward@arm.com>
284 David Sherwood <david.sherwood@arm.com>
286 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
287 (vect_compile_time_alias): ...this new function. Do the calculation
288 on poly_ints rather than trees.
289 (vect_prune_runtime_alias_test_list): Update call accordingly.
291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
292 Alan Hayward <alan.hayward@arm.com>
293 David Sherwood <david.sherwood@arm.com>
295 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
297 (vect_schedule_slp_instance): Likewise.
299 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
300 Alan Hayward <alan.hayward@arm.com>
301 David Sherwood <david.sherwood@arm.com>
303 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
304 constant and extern definitions for variable-length vectors.
305 (vect_get_constant_vectors): Note that the number of units
306 is known to be constant.
308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
309 Alan Hayward <alan.hayward@arm.com>
310 David Sherwood <david.sherwood@arm.com>
312 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
313 of units as polynomial. Choose between WIDE and NARROW based
316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
317 Alan Hayward <alan.hayward@arm.com>
318 David Sherwood <david.sherwood@arm.com>
320 * tree-vect-stmts.c (simd_clone_subparts): New function.
321 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
324 Alan Hayward <alan.hayward@arm.com>
325 David Sherwood <david.sherwood@arm.com>
327 * tree-vect-stmts.c (vectorizable_call): Treat the number of
328 vectors as polynomial. Use build_index_vector for
331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
332 Alan Hayward <alan.hayward@arm.com>
333 David Sherwood <david.sherwood@arm.com>
335 * tree-vect-stmts.c (get_load_store_type): Treat the number of
336 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
337 for variable-length vectors.
338 (vectorizable_mask_load_store): Treat the number of units as
339 polynomial, asserting that it is constant if the condition has
340 already been enforced.
341 (vectorizable_store, vectorizable_load): Likewise.
343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
344 Alan Hayward <alan.hayward@arm.com>
345 David Sherwood <david.sherwood@arm.com>
347 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
348 of units as polynomial. Punt if we can't tell at compile time
349 which vector contains the final result.
351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
352 Alan Hayward <alan.hayward@arm.com>
353 David Sherwood <david.sherwood@arm.com>
355 * tree-vect-loop.c (vectorizable_induction): Treat the number
356 of units as polynomial. Punt on SLP inductions. Use an integer
357 VEC_SERIES_EXPR for variable-length integer reductions. Use a
358 cast of such a series for variable-length floating-point
361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
362 Alan Hayward <alan.hayward@arm.com>
363 David Sherwood <david.sherwood@arm.com>
365 * tree.h (build_index_vector): Declare.
366 * tree.c (build_index_vector): New function.
367 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
368 of units as polynomial, forcibly converting it to a constant if
369 vectorizable_reduction has already enforced the condition.
370 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
371 to create a {1,2,3,...} vector.
372 (vectorizable_reduction): Treat the number of units as polynomial.
373 Choose vectype_in based on the largest scalar element size rather
374 than the smallest number of units. Enforce the restrictions
377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
378 Alan Hayward <alan.hayward@arm.com>
379 David Sherwood <david.sherwood@arm.com>
381 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
382 number of units as polynomial.
384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
385 Alan Hayward <alan.hayward@arm.com>
386 David Sherwood <david.sherwood@arm.com>
388 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
389 * target.def (autovectorize_vector_sizes): Return the vector sizes
390 by pointer, using vector_sizes rather than a bitmask.
391 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
392 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
393 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
395 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
396 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
397 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
398 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
399 * omp-general.c (omp_max_vf): Likewise.
400 * omp-low.c (omp_clause_aligned_alignment): Likewise.
401 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
402 * tree-vect-loop.c (vect_analyze_loop): Likewise.
403 * tree-vect-slp.c (vect_slp_bb): Likewise.
404 * doc/tm.texi: Regenerate.
405 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
407 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
408 the vector size as a poly_uint64 rather than an unsigned int.
409 (current_vector_size): Change from an unsigned int to a poly_uint64.
410 (get_vectype_for_scalar_type): Update accordingly.
411 * tree.h (build_truth_vector_type): Take the size and number of
412 units as a poly_uint64 rather than an unsigned int.
413 (build_vector_type): Add a temporary overload that takes
414 the number of units as a poly_uint64 rather than an unsigned int.
415 * tree.c (make_vector_type): Likewise.
416 (build_truth_vector_type): Take the number of units as a poly_uint64
417 rather than an unsigned int.
419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
420 Alan Hayward <alan.hayward@arm.com>
421 David Sherwood <david.sherwood@arm.com>
423 * target.def (get_mask_mode): Take the number of units and length
424 as poly_uint64s rather than unsigned ints.
425 * targhooks.h (default_get_mask_mode): Update accordingly.
426 * targhooks.c (default_get_mask_mode): Likewise.
427 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
428 * doc/tm.texi: Regenerate.
430 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
431 Alan Hayward <alan.hayward@arm.com>
432 David Sherwood <david.sherwood@arm.com>
434 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
435 * omp-general.c (omp_max_vf): Likewise.
436 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
437 (expand_omp_simd): Handle polynomial safelen.
438 * omp-low.c (omplow_simd_context): Add a default constructor.
439 (omplow_simd_context::max_vf): Change from int to poly_uint64.
440 (lower_rec_simd_input_clauses): Update accordingly.
441 (lower_rec_input_clauses): Likewise.
443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
444 Alan Hayward <alan.hayward@arm.com>
445 David Sherwood <david.sherwood@arm.com>
447 * tree-vectorizer.h (vect_nunits_for_cost): New function.
448 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
449 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
450 (vect_analyze_slp_cost): Likewise.
451 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
452 (vect_model_load_cost): Likewise.
454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
455 Alan Hayward <alan.hayward@arm.com>
456 David Sherwood <david.sherwood@arm.com>
458 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
459 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
460 from an unsigned int * to a poly_uint64_pod *.
461 (calculate_unrolling_factor): New function.
462 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
465 Alan Hayward <alan.hayward@arm.com>
466 David Sherwood <david.sherwood@arm.com>
468 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
469 from an unsigned int to a poly_uint64.
470 (_loop_vec_info::slp_unrolling_factor): Likewise.
471 (_loop_vec_info::vectorization_factor): Change from an int
473 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
474 (vect_get_num_vectors): New function.
475 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
476 (vect_get_num_copies): Use vect_get_num_vectors.
477 (vect_analyze_data_ref_dependences): Change max_vf from an int *
478 to an unsigned int *.
479 (vect_analyze_data_refs): Change min_vf from an int * to a
481 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
482 than an unsigned HOST_WIDE_INT.
483 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
484 (vect_analyze_data_ref_dependence): Change max_vf from an int *
485 to an unsigned int *.
486 (vect_analyze_data_ref_dependences): Likewise.
487 (vect_compute_data_ref_alignment): Handle polynomial vf.
488 (vect_enhance_data_refs_alignment): Likewise.
489 (vect_prune_runtime_alias_test_list): Likewise.
490 (vect_shift_permute_load_chain): Likewise.
491 (vect_supportable_dr_alignment): Likewise.
492 (dependence_distance_ge_vf): Take the vectorization factor as a
493 poly_uint64 rather than an unsigned HOST_WIDE_INT.
494 (vect_analyze_data_refs): Change min_vf from an int * to a
496 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
497 vfm1 as a poly_uint64 rather than an int. Make the same change
498 for the returned bound_scalar.
499 (vect_gen_vector_loop_niters): Handle polynomial vf.
500 (vect_do_peeling): Likewise. Update call to
501 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
502 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
504 * tree-vect-loop.c (vect_determine_vectorization_factor)
505 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
506 (vect_get_known_peeling_cost): Likewise.
507 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
508 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
509 (vect_transform_loop): Likewise. Use the lowest possible VF when
510 updating the upper bounds of the loop.
511 (vect_min_worthwhile_factor): Make static. Return an unsigned int
513 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
514 polynomial unroll factors.
515 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
516 (vect_make_slp_decision): Likewise.
517 (vect_supported_load_permutation_p): Likewise, and polynomial
519 (vect_analyze_slp_cost): Handle polynomial vf.
520 (vect_slp_analyze_node_operations): Likewise.
521 (vect_slp_analyze_bb_1): Likewise.
522 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
523 than an unsigned HOST_WIDE_INT.
524 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
525 (vectorizable_load): Handle polynomial vf.
526 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
528 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
531 Alan Hayward <alan.hayward@arm.com>
532 David Sherwood <david.sherwood@arm.com>
534 * match.pd: Handle bit operations involving three constants
535 and try to fold one pair.
537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
539 * tree-vect-loop-manip.c: Include gimple-fold.h.
540 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
541 niters_maybe_zero parameters. Handle other cases besides a step of 1.
542 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
543 Add a path that uses a step of VF instead of 1, but disable it
545 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
546 and niters_no_overflow parameters. Update calls to
547 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
548 Create a new SSA name if the latter choses to use a ste other
549 than zero, and return it via niters_vector_mult_vf_var.
550 * tree-vect-loop.c (vect_transform_loop): Update calls to
551 vect_do_peeling, vect_gen_vector_loop_niters and
552 slpeel_make_loop_iterate_ntimes.
553 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
554 (vect_gen_vector_loop_niters): Update declarations after above changes.
556 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
558 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
559 128-bit round to integer instructions.
560 (ceil<mode>2): Likewise.
561 (btrunc<mode>2): Likewise.
562 (round<mode>2): Likewise.
564 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
566 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
567 unaligned VSX load/store on P8/P9.
568 (expand_block_clear): Allow the use of unaligned VSX
571 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
573 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
575 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
576 swap associated with both a load and a store.
578 2018-01-02 Andrew Waterman <andrew@sifive.com>
580 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
581 * config/riscv/riscv.md (clear_cache): Use it.
583 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
585 * web.c: Remove out-of-date comment.
587 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
589 * expr.c (fixup_args_size_notes): Check that any existing
590 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
591 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
592 (emit_single_push_insn): ...here.
594 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
596 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
597 (const_vector_encoded_nelts): New function.
598 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
599 (const_vector_int_elt, const_vector_elt): Declare.
600 * emit-rtl.c (const_vector_int_elt_1): New function.
601 (const_vector_elt): Likewise.
602 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
605 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
607 * expr.c: Include rtx-vector-builder.h.
608 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
609 directly on the tree encoding.
610 (const_vector_from_tree): Likewise.
611 * optabs.c: Include rtx-vector-builder.h.
612 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
613 sequence of "u" values.
614 * vec-perm-indices.c: Include rtx-vector-builder.h.
615 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
616 directly on the vec_perm_indices encoding.
618 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
620 * doc/rtl.texi (const_vector): Describe new encoding scheme.
621 * Makefile.in (OBJS): Add rtx-vector-builder.o.
622 * rtx-vector-builder.h: New file.
623 * rtx-vector-builder.c: Likewise.
624 * rtl.h (rtx_def::u2): Add a const_vector field.
625 (CONST_VECTOR_NPATTERNS): New macro.
626 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
627 (CONST_VECTOR_DUPLICATE_P): Likewise.
628 (CONST_VECTOR_STEPPED_P): Likewise.
629 (CONST_VECTOR_ENCODED_ELT): Likewise.
630 (const_vec_duplicate_p): Check for a duplicated vector encoding.
631 (unwrap_const_vec_duplicate): Likewise.
632 (const_vec_series_p): Check for a non-duplicated vector encoding.
633 Say that the function only returns true for integer vectors.
634 * emit-rtl.c: Include rtx-vector-builder.h.
635 (gen_const_vec_duplicate_1): Delete.
636 (gen_const_vector): Call gen_const_vec_duplicate instead of
637 gen_const_vec_duplicate_1.
638 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
639 (gen_const_vec_duplicate): Use rtx_vector_builder.
640 (gen_const_vec_series): Likewise.
641 (gen_rtx_CONST_VECTOR): Likewise.
642 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
643 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
644 Build a new vector rather than modifying a CONST_VECTOR in-place.
645 (handle_special_swappables): Update call accordingly.
646 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
647 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
648 Build a new vector rather than modifying a CONST_VECTOR in-place.
649 (handle_special_swappables): Update call accordingly.
651 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
653 * simplify-rtx.c (simplify_const_binary_operation): Use
654 CONST_VECTOR_ELT instead of XVECEXP.
656 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
658 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
659 the selector elements to be different from the data elements
660 if the selector is a VECTOR_CST.
661 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
662 ssizetype for the selector.
664 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
666 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
667 before testing each element individually.
668 * tree-vect-generic.c (lower_vec_perm): Likewise.
670 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
672 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
673 * selftest-run-tests.c (selftest::run_tests): Call it.
674 * vector-builder.h (vector_builder::operator ==): New function.
675 (vector_builder::operator !=): Likewise.
676 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
677 (vec_perm_indices::all_from_input_p): New function.
678 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
679 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
680 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
681 instead of reading the VECTOR_CST directly. Detect whether both
682 vector inputs are the same before constructing the vec_perm_indices,
683 and update the number of inputs argument accordingly. Use the
684 utility functions added above. Only construct sel2 if we need to.
686 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
688 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
689 the broadcast of the low byte.
690 (expand_mult_highpart): Use an explicit encoding for the permutes.
691 * optabs-query.c (can_mult_highpart_p): Likewise.
692 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
693 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
694 (vectorizable_bswap): Likewise.
695 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
696 explicit encoding for the power-of-2 permutes.
697 (vect_permute_store_chain): Likewise.
698 (vect_grouped_load_supported): Likewise.
699 (vect_permute_load_chain): Likewise.
701 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
703 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
704 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
705 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
706 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
707 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
708 (vect_gen_perm_mask_any): Likewise.
710 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
712 * int-vector-builder.h: New file.
713 * vec-perm-indices.h: Include int-vector-builder.h.
714 (vec_perm_indices): Redefine as an int_vector_builder.
715 (auto_vec_perm_indices): Delete.
716 (vec_perm_builder): Redefine as a stand-alone class.
717 (vec_perm_indices::vec_perm_indices): New function.
718 (vec_perm_indices::clamp): Likewise.
719 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
720 (vec_perm_indices::new_vector): New function.
721 (vec_perm_indices::new_expanded_vector): Update for new
722 vec_perm_indices class.
723 (vec_perm_indices::rotate_inputs): New function.
724 (vec_perm_indices::all_in_range_p): Operate directly on the
725 encoded form, without computing elided elements.
726 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
727 encoding. Update for new vec_perm_indices class.
728 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
729 the given vec_perm_builder.
730 (expand_vec_perm_var): Update vec_perm_builder constructor.
731 (expand_mult_highpart): Use vec_perm_builder instead of
732 auto_vec_perm_indices.
733 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
734 vec_perm_indices instead of auto_vec_perm_indices. Use a single
735 or double series encoding as appropriate.
736 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
737 vec_perm_indices instead of auto_vec_perm_indices.
738 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
739 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
740 (vect_permute_store_chain): Likewise.
741 (vect_grouped_load_supported): Likewise.
742 (vect_permute_load_chain): Likewise.
743 (vect_shift_permute_load_chain): Likewise.
744 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
745 (vect_transform_slp_perm_load): Likewise.
746 (vect_schedule_slp_instance): Likewise.
747 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
748 (vectorizable_mask_load_store): Likewise.
749 (vectorizable_bswap): Likewise.
750 (vectorizable_store): Likewise.
751 (vectorizable_load): Likewise.
752 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
753 vec_perm_indices instead of auto_vec_perm_indices. Use
754 tree_to_vec_perm_builder to read the vector from a tree.
755 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
756 vec_perm_builder instead of a vec_perm_indices.
757 (have_whole_vector_shift): Use vec_perm_builder and
758 vec_perm_indices instead of auto_vec_perm_indices. Leave the
759 truncation to calc_vec_perm_mask_for_shift.
760 (vect_create_epilog_for_reduction): Likewise.
761 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
762 from auto_vec_perm_indices to vec_perm_indices.
763 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
764 instead of changing individual elements.
765 (aarch64_vectorize_vec_perm_const): Use new_vector to install
766 the vector in d.perm.
767 * config/arm/arm.c (expand_vec_perm_d::perm): Change
768 from auto_vec_perm_indices to vec_perm_indices.
769 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
770 instead of changing individual elements.
771 (arm_vectorize_vec_perm_const): Use new_vector to install
772 the vector in d.perm.
773 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
774 Update vec_perm_builder constructor.
775 (rs6000_expand_interleave): Likewise.
776 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
777 (rs6000_expand_interleave): Likewise.
779 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
781 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
782 to qimode could truncate the indices.
783 * optabs.c (expand_vec_perm_var): Likewise.
785 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
787 * Makefile.in (OBJS): Add vec-perm-indices.o.
788 * vec-perm-indices.h: New file.
789 * vec-perm-indices.c: Likewise.
790 * target.h (vec_perm_indices): Replace with a forward class
792 (auto_vec_perm_indices): Move to vec-perm-indices.h.
793 * optabs.h: Include vec-perm-indices.h.
794 (expand_vec_perm): Delete.
795 (selector_fits_mode_p, expand_vec_perm_var): Declare.
796 (expand_vec_perm_const): Declare.
797 * target.def (vec_perm_const_ok): Replace with...
798 (vec_perm_const): ...this new hook.
799 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
800 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
801 * doc/tm.texi: Regenerate.
802 * optabs.def (vec_perm_const): Delete.
803 * doc/md.texi (vec_perm_const): Likewise.
804 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
805 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
806 expand_vec_perm for constant permutation vectors. Assert that
807 the mode of variable permutation vectors is the integer equivalent
808 of the mode that is being permuted.
809 * optabs-query.h (selector_fits_mode_p): Declare.
810 * optabs-query.c: Include vec-perm-indices.h.
811 (selector_fits_mode_p): New function.
812 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
813 is defined, instead of checking whether the vec_perm_const_optab
814 exists. Use targetm.vectorize.vec_perm_const instead of
815 targetm.vectorize.vec_perm_const_ok. Check whether the indices
816 fit in the vector mode before using a variable permute.
817 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
818 vec_perm_indices instead of an rtx.
819 (expand_vec_perm): Replace with...
820 (expand_vec_perm_const): ...this new function. Take the selector
821 as a vec_perm_indices rather than an rtx. Also take the mode of
822 the selector. Update call to shift_amt_for_vec_perm_mask.
823 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
824 Use vec_perm_indices::new_expanded_vector to expand the original
825 selector into bytes. Check whether the indices fit in the vector
826 mode before using a variable permute.
827 (expand_vec_perm_var): Make global.
828 (expand_mult_highpart): Use expand_vec_perm_const.
829 * fold-const.c: Includes vec-perm-indices.h.
830 * tree-ssa-forwprop.c: Likewise.
831 * tree-vect-data-refs.c: Likewise.
832 * tree-vect-generic.c: Likewise.
833 * tree-vect-loop.c: Likewise.
834 * tree-vect-slp.c: Likewise.
835 * tree-vect-stmts.c: Likewise.
836 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
838 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
839 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
840 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
841 (aarch64_vectorize_vec_perm_const): ...this new function.
842 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
843 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
844 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
845 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
846 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
847 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
848 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
850 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
851 check for NEON modes.
852 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
853 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
854 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
855 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
857 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
858 the old VEC_PERM_CONST conditions.
859 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
860 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
861 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
862 (ia64_vectorize_vec_perm_const_ok): Merge into...
863 (ia64_vectorize_vec_perm_const): ...this new function.
864 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
865 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
866 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
867 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
868 * config/mips/mips.c (mips_expand_vec_perm_const)
869 (mips_vectorize_vec_perm_const_ok): Merge into...
870 (mips_vectorize_vec_perm_const): ...this new function.
871 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
872 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
873 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
874 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
875 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
876 (rs6000_expand_vec_perm_const): Delete.
877 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
879 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
880 (altivec_expand_vec_perm_const_le): Take each operand individually.
881 Operate on constant selectors rather than rtxes.
882 (altivec_expand_vec_perm_const): Likewise. Update call to
883 altivec_expand_vec_perm_const_le.
884 (rs6000_expand_vec_perm_const): Delete.
885 (rs6000_vectorize_vec_perm_const_ok): Delete.
886 (rs6000_vectorize_vec_perm_const): New function.
887 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
888 an element count and rtx array.
889 (rs6000_expand_extract_even): Update call accordingly.
890 (rs6000_expand_interleave): Likewise.
891 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
892 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
893 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
894 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
895 (rs6000_expand_vec_perm_const): Delete.
896 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
897 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
898 (altivec_expand_vec_perm_const_le): Take each operand individually.
899 Operate on constant selectors rather than rtxes.
900 (altivec_expand_vec_perm_const): Likewise. Update call to
901 altivec_expand_vec_perm_const_le.
902 (rs6000_expand_vec_perm_const): Delete.
903 (rs6000_vectorize_vec_perm_const_ok): Delete.
904 (rs6000_vectorize_vec_perm_const): New function. Remove stray
905 reference to the SPE evmerge intructions.
906 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
907 an element count and rtx array.
908 (rs6000_expand_extract_even): Update call accordingly.
909 (rs6000_expand_interleave): Likewise.
910 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
911 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
913 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
915 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
917 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
918 vector mode and that that mode matches the mode of the data
920 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
921 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
922 directly using expand_vec_perm_1 when forcing selectors into
924 (expand_vec_perm_var): New function, split out from expand_vec_perm.
926 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
928 * optabs-query.h (can_vec_perm_p): Delete.
929 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
930 * optabs-query.c (can_vec_perm_p): Split into...
931 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
932 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
933 particular selector is valid.
934 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
935 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
936 (vect_grouped_load_supported): Likewise.
937 (vect_shift_permute_load_chain): Likewise.
938 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
939 (vect_transform_slp_perm_load): Likewise.
940 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
941 (vectorizable_bswap): Likewise.
942 (vect_gen_perm_mask_checked): Likewise.
943 * fold-const.c (fold_ternary_loc): Likewise. Don't take
944 implementations of variable permutation vectors into account
945 when deciding which selector to use.
946 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
947 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
948 with a false third argument.
949 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
950 to test whether the constant selector is valid and can_vec_perm_var_p
951 to test whether a variable selector is valid.
953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
955 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
956 * optabs-query.c (can_vec_perm_p): Likewise.
957 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
958 instead of vec_perm_indices.
959 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
960 (vect_gen_perm_mask_checked): Likewise,
961 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
962 (vect_gen_perm_mask_checked): Likewise,
964 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
966 * optabs-query.h (qimode_for_vec_perm): Declare.
967 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
968 (qimode_for_vec_perm): ...this new function.
969 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
971 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
973 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
974 does not have a conditional at the top.
976 2018-01-02 Richard Biener <rguenther@suse.de>
978 * ipa-inline.c (big_speedup_p): Fix expression.
980 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
983 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
986 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
990 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
991 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
992 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
993 cond_taken_branch_cost 3->4.
995 2018-01-01 Jakub Jelinek <jakub@redhat.com>
997 PR tree-optimization/83581
998 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
999 TODO_cleanup_cfg if any changes have been made.
1002 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
1003 convert_modes if target mode has the right side, but different mode
1007 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
1008 last argument when extracting from CONCAT. If either from_real or
1009 from_imag is NULL, use expansion through memory. If result is not
1010 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
1011 the parts directly to inner mode, if even that fails, use expansion
1015 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
1016 check for bswap in mode rather than HImode and use that in expand_unop
1019 Copyright (C) 2018 Free Software Foundation, Inc.
1021 Copying and distribution of this file, with or without modification,
1022 are permitted in any medium without royalty provided the copyright
1023 notice and this notice are preserved.