1 2018-01-08 Richard Biener <rguenther@suse.de>
4 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
6 2018-01-08 Richard Biener <rguenther@suse.de>
9 * match.pd ((t * 2) / 2) -> t): Add missing :c.
11 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
14 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15 basic blocks with a small number of successors.
16 (convert_control_dep_chain_into_preds): Improve handling of
18 (dump_predicates): Split apart into...
19 (dump_pred_chain): ...here...
20 (dump_pred_info): ...and here.
21 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22 (can_chain_union_be_invalidated_p): Improve check for invalidation
24 (uninit_uses_cannot_happen): Avoid unnecessary if
25 convert_control_dep_chain_into_preds yielded nothing.
27 2018-01-06 Martin Sebor <msebor@redhat.com>
29 PR tree-optimization/83640
30 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
31 subtracting negative offset from size.
32 (builtin_access::overlap): Adjust offset bounds of the access to fall
33 within the size of the object if possible.
35 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
37 PR rtl-optimization/83699
38 * expmed.c (extract_bit_field_1): Restrict the vector usage of
39 extract_bit_field_as_subreg to cases in which the extracted
40 value is also a vector.
42 * lra-constraints.c (process_alt_operands): Test for the equivalence
43 substitutions when detecting a possible reload cycle.
45 2018-01-06 Jakub Jelinek <jakub@redhat.com>
48 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
49 by default if flag_selective_schedling{,2}. Formatting fixes.
51 PR rtl-optimization/83682
52 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
53 if it has non-VECTOR_MODE element mode.
54 (vec_duplicate_p): Likewise.
57 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
58 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
60 2018-01-05 Jakub Jelinek <jakub@redhat.com>
63 * config/i386/i386-builtin.def
64 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
65 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
66 Require also OPTION_MASK_ISA_AVX512F in addition to
68 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
69 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
70 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
71 to OPTION_MASK_ISA_GFNI.
72 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
73 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
74 OPTION_MASK_ISA_AVX512BW.
75 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
76 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
77 addition to OPTION_MASK_ISA_GFNI.
78 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
79 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
80 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
81 to OPTION_MASK_ISA_GFNI.
82 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
83 a requirement for all ISAs rather than any of them with a few
85 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
87 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
88 bitmasks to be enabled with 3 exceptions, instead of requiring any
89 enabled ISA with lots of exceptions.
90 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
91 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
92 Change avx512bw in isa attribute to avx512f.
93 * config/i386/sgxintrin.h: Add license boilerplate.
94 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
95 to __AVX512F__ and __AVX512VL to __AVX512VL__.
96 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
97 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
99 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
100 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
101 temporarily sse2 rather than sse if not enabled already.
104 * config/i386/sse.md (VI248_VLBW): Rename to ...
105 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
106 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
107 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
108 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
109 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
110 mode iterator instead of VI248_VLBW.
112 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
114 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
115 (record_modified): Skip clobbers; add debug output.
116 (param_change_prob): Use sreal frequencies.
118 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
120 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
121 punt for user-aligned variables.
123 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
125 * tree-chrec.c (chrec_contains_symbols): Return true for
128 2018-01-05 Sudakshina Das <sudi.das@arm.com>
131 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
132 of (x|y) == x for BICS pattern.
134 2018-01-05 Jakub Jelinek <jakub@redhat.com>
136 PR tree-optimization/83605
137 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
138 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
141 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
143 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
144 * config/epiphany/rtems.h: New file.
146 2018-01-04 Jakub Jelinek <jakub@redhat.com>
147 Uros Bizjak <ubizjak@gmail.com>
150 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
151 QIreg_operand instead of register_operand predicate.
152 * config/i386/i386.c (ix86_rop_should_change_byte_p,
153 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
154 comments instead of -fmitigate[-_]rop.
156 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
159 * cgraphunit.c (symbol_table::compile): Switch to text_section
160 before calling assembly_start debug hook.
161 * run-rtl-passes.c (run_rtl_passes): Likewise.
164 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
166 * tree-vrp.c (extract_range_from_binary_expr_1): Check
167 range_int_cst_p rather than !symbolic_range_p before calling
168 extract_range_from_multiplicative_op_1.
170 2017-01-04 Jeff Law <law@redhat.com>
172 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
173 redundant test in assertion.
175 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
177 * doc/rtl.texi: Document machine_mode wrapper classes.
179 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
181 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
184 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
186 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
187 the VEC_PERM_EXPR fold to fail.
189 2018-01-04 Jakub Jelinek <jakub@redhat.com>
192 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
193 to switched_sections.
195 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
198 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
201 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
204 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
205 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
207 2018-01-04 Jakub Jelinek <jakub@redhat.com>
210 * cfgexpand.c (expand_dbeug_expr) <case BIT_FIELD_REF>: Punt if mode
211 is BLKmode and bitpos not zero or mode change is needed.
213 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
216 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
219 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
222 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
223 instead of MULT rtx. Update all corresponding splitters.
225 (*ssub<modesuffix>): Ditto.
227 (*cmp_sadd_di): Update split patterns.
228 (*cmp_sadd_si): Ditto.
229 (*cmp_sadd_sidi): Ditto.
230 (*cmp_ssub_di): Ditto.
231 (*cmp_ssub_si): Ditto.
232 (*cmp_ssub_sidi): Ditto.
233 * config/alpha/predicates.md (const23_operand): New predicate.
234 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
235 Look for ASHIFT, not MULT inner operand.
236 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
238 2018-01-04 Martin Liska <mliska@suse.cz>
240 PR gcov-profile/83669
241 * gcov.c (output_intermediate_file): Add version to intermediate
243 * doc/gcov.texi: Document new field 'version' in intermediate
244 file format. Fix location of '-k' option of gcov command.
246 2018-01-04 Martin Liska <mliska@suse.cz>
249 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
251 2018-01-04 Jakub Jelinek <jakub@redhat.com>
253 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
255 2018-01-03 Martin Sebor <msebor@redhat.com>
257 PR tree-optimization/83655
258 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
259 checking calls with invalid arguments.
261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
263 * tree-vect-stmts.c (vect_get_store_rhs): New function.
264 (vectorizable_mask_load_store): Delete.
265 (vectorizable_call): Return false for masked loads and stores.
266 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
267 instead of gimple_assign_rhs1.
268 (vectorizable_load): Handle IFN_MASK_LOAD.
269 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
273 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
275 (vectorizable_mask_load_store): ...here.
276 (vectorizable_load): ...and here.
278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
280 * tree-vect-stmts.c (vect_build_all_ones_mask)
281 (vect_build_zero_merge_argument): New functions, split out from...
282 (vectorizable_load): ...here.
284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
286 * tree-vect-stmts.c (vect_check_store_rhs): New function,
288 (vectorizable_mask_load_store): ...here.
289 (vectorizable_store): ...and here.
291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
293 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
295 (vectorizable_mask_load_store): ...here.
297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
299 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
300 (vect_model_store_cost): Take a vec_load_store_type instead of a
302 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
303 (vect_model_store_cost): Take a vec_load_store_type instead of a
305 (vectorizable_mask_load_store): Update accordingly.
306 (vectorizable_store): Likewise.
307 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
309 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
311 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
312 IFN_MASK_LOAD calls here rather than...
313 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
315 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
316 Alan Hayward <alan.hayward@arm.com>
317 David Sherwood <david.sherwood@arm.com>
319 * expmed.c (extract_bit_field_1): For vector extracts,
320 fall back to extract_bit_field_as_subreg if vec_extract
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 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
328 they are variable or constant sized.
329 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
330 slots for constant-sized data.
332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
333 Alan Hayward <alan.hayward@arm.com>
334 David Sherwood <david.sherwood@arm.com>
336 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
337 handling COND_EXPRs with boolean comparisons, try to find a better
338 basis for the mask type than the boolean itself.
340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
342 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
343 is calculated and how it can be overridden.
344 * genmodes.c (max_bitsize_mode_any_mode): New variable.
345 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
347 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
351 Alan Hayward <alan.hayward@arm.com>
352 David Sherwood <david.sherwood@arm.com>
354 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
355 Remove the mode argument.
356 (aarch64_simd_valid_immediate): Remove the mode and inverse
358 * config/aarch64/iterators.md (bitsize): New iterator.
359 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
360 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
361 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
362 aarch64_simd_valid_immediate.
363 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
364 (aarch64_reg_or_bic_imm): Likewise.
365 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
366 with an insn_type enum and msl with a modifier_type enum.
367 Replace element_width with a scalar_mode. Change the shift
368 to unsigned int. Add constructors for scalar_float_mode and
369 scalar_int_mode elements.
370 (aarch64_vect_float_const_representable_p): Delete.
371 (aarch64_can_const_movi_rtx_p)
372 (aarch64_simd_scalar_immediate_valid_for_move)
373 (aarch64_simd_make_constant): Update call to
374 aarch64_simd_valid_immediate.
375 (aarch64_advsimd_valid_immediate_hs): New function.
376 (aarch64_advsimd_valid_immediate): Likewise.
377 (aarch64_simd_valid_immediate): Remove mode and inverse
378 arguments. Rewrite to use the above. Use const_vec_duplicate_p
379 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
380 and aarch64_float_const_representable_p on the result.
381 (aarch64_output_simd_mov_immediate): Remove mode argument.
382 Update call to aarch64_simd_valid_immediate and use of
384 (aarch64_output_scalar_simd_mov_immediate): Update call
387 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
388 Alan Hayward <alan.hayward@arm.com>
389 David Sherwood <david.sherwood@arm.com>
391 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
392 (mode_nunits): Likewise CONST_MODE_NUNITS.
393 * machmode.def (ADJUST_NUNITS): Document.
394 * genmodes.c (mode_data::need_nunits_adj): New field.
395 (blank_mode): Update accordingly.
396 (adj_nunits): New variable.
397 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
399 (emit_mode_size_inline): Set need_bytesize_adj for all modes
400 listed in adj_nunits.
401 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
402 listed in adj_nunits. Don't emit case statements for such modes.
403 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
404 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
405 nothing if adj_nunits is nonnull.
406 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
407 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
408 (emit_mode_fbit): Update use of print_maybe_const_decl.
409 (emit_move_size): Likewise. Treat the array as non-const
411 (emit_mode_adjustments): Handle adj_nunits.
413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
415 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
416 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
417 (VECTOR_MODES): Use it.
418 (make_vector_modes): Take the prefix as an argument.
420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
421 Alan Hayward <alan.hayward@arm.com>
422 David Sherwood <david.sherwood@arm.com>
424 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
425 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
426 for MODE_VECTOR_BOOL.
427 * machmode.def (VECTOR_BOOL_MODE): Document.
428 * genmodes.c (VECTOR_BOOL_MODE): New macro.
429 (make_vector_bool_mode): New function.
430 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
432 * lto-streamer-in.c (lto_input_mode_table): Likewise.
433 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
435 * stor-layout.c (int_mode_for_mode): Likewise.
436 * tree.c (build_vector_type_for_mode): Likewise.
437 * varasm.c (output_constant_pool_2): Likewise.
438 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
439 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
440 for MODE_VECTOR_BOOL.
441 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
442 of mode class checks.
443 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
444 instead of a list of mode class checks.
445 (expand_vector_scalar_condition): Likewise.
446 (type_for_widest_vector_mode): Handle BImode as an inner mode.
448 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
449 Alan Hayward <alan.hayward@arm.com>
450 David Sherwood <david.sherwood@arm.com>
452 * machmode.h (mode_size): Change from unsigned short to
454 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
455 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
456 or if measurement_type is not polynomial.
457 (fixed_size_mode::includes_p): Check for constant-sized modes.
458 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
459 return a poly_uint16 rather than an unsigned short.
460 (emit_mode_size): Change the type of mode_size from unsigned short
461 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
462 (emit_mode_adjustments): Cope with polynomial vector sizes.
463 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
465 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
467 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
468 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
469 * caller-save.c (setup_save_areas): Likewise.
470 (replace_reg_with_saved_mem): Likewise.
471 * calls.c (emit_library_call_value_1): Likewise.
472 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
473 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
474 (gen_lowpart_for_combine): Likewise.
475 * convert.c (convert_to_integer_1): Likewise.
476 * cse.c (equiv_constant, cse_insn): Likewise.
477 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
478 (cselib_subst_to_values): Likewise.
479 * dce.c (word_dce_process_block): Likewise.
480 * df-problems.c (df_word_lr_mark_ref): Likewise.
481 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
482 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
483 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
484 (rtl_for_decl_location): Likewise.
485 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
486 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
487 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
488 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
489 (expand_expr_real_1): Likewise.
490 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
491 (pad_below): Likewise.
492 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
493 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
494 * ira.c (get_subreg_tracking_sizes): Likewise.
495 * ira-build.c (ira_create_allocno_objects): Likewise.
496 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
497 (ira_sort_regnos_for_alter_reg): Likewise.
498 * ira-costs.c (record_operand_costs): Likewise.
499 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
500 (resolve_simple_move): Likewise.
501 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
502 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
503 (lra_constraints): Likewise.
504 (CONST_POOL_OK_P): Reject variable-sized modes.
505 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
506 (add_pseudo_to_slot, lra_spill): Likewise.
507 * omp-low.c (omp_clause_aligned_alignment): Likewise.
508 * optabs-query.c (get_best_extraction_insn): Likewise.
509 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
510 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
511 (expand_mult_highpart, valid_multiword_target_p): Likewise.
512 * recog.c (offsettable_address_addr_space_p): Likewise.
513 * regcprop.c (maybe_mode_change): Likewise.
514 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
515 * regrename.c (build_def_use): Likewise.
516 * regstat.c (dump_reg_info): Likewise.
517 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
518 (find_reloads, find_reloads_subreg_address): Likewise.
519 * reload1.c (eliminate_regs_1): Likewise.
520 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
521 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
522 (simplify_binary_operation_1, simplify_subreg): Likewise.
523 * targhooks.c (default_function_arg_padding): Likewise.
524 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
525 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
526 (verify_gimple_assign_ternary): Likewise.
527 * tree-inline.c (estimate_move_cost): Likewise.
528 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
529 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
530 (get_address_cost_ainc): Likewise.
531 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
532 (vect_supportable_dr_alignment): Likewise.
533 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
534 (vectorizable_reduction): Likewise.
535 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
536 (vectorizable_operation, vectorizable_load): Likewise.
537 * tree.c (build_same_sized_truth_vector_type): Likewise.
538 * valtrack.c (cleanup_auto_inc_dec): Likewise.
539 * var-tracking.c (emit_note_insn_var_location): Likewise.
540 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
541 (ADDR_VEC_ALIGN): Likewise.
543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
544 Alan Hayward <alan.hayward@arm.com>
545 David Sherwood <david.sherwood@arm.com>
547 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
549 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
550 or if measurement_type is polynomial.
551 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
552 * combine.c (make_extraction): Likewise.
553 * dse.c (find_shift_sequence): Likewise.
554 * dwarf2out.c (mem_loc_descriptor): Likewise.
555 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
556 (extract_bit_field, extract_low_bits): Likewise.
557 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
558 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
559 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
560 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
561 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
562 * reload.c (find_reloads): Likewise.
563 * reload1.c (alter_reg): Likewise.
564 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
565 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
566 * tree-if-conv.c (predicate_mem_writes): Likewise.
567 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
568 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
569 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
570 * valtrack.c (dead_debug_insert_temp): Likewise.
571 * varasm.c (mergeable_constant_section): Likewise.
572 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
575 Alan Hayward <alan.hayward@arm.com>
576 David Sherwood <david.sherwood@arm.com>
578 * expr.c (expand_assignment): Cope with polynomial mode sizes
579 when assigning to a CONCAT.
581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
582 Alan Hayward <alan.hayward@arm.com>
583 David Sherwood <david.sherwood@arm.com>
585 * machmode.h (mode_precision): Change from unsigned short to
587 (mode_to_precision): Return a poly_uint16 rather than an unsigned
589 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
590 or if measurement_type is not polynomial.
591 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
592 in which the mode is already known to be a scalar_int_mode.
593 * genmodes.c (emit_mode_precision): Change the type of mode_precision
594 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
596 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
597 for GET_MODE_PRECISION.
598 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
599 for GET_MODE_PRECISION.
600 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
602 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
603 (expand_field_assignment, make_extraction): Likewise.
604 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
605 (get_last_value): Likewise.
606 * convert.c (convert_to_integer_1): Likewise.
607 * cse.c (cse_insn): Likewise.
608 * expr.c (expand_expr_real_1): Likewise.
609 * lra-constraints.c (simplify_operand_subreg): Likewise.
610 * optabs-query.c (can_atomic_load_p): Likewise.
611 * optabs.c (expand_atomic_load): Likewise.
612 (expand_atomic_store): Likewise.
613 * ree.c (combine_reaching_defs): Likewise.
614 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
615 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
616 * tree.h (type_has_mode_precision_p): Likewise.
617 * ubsan.c (instrument_si_overflow): Likewise.
619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
620 Alan Hayward <alan.hayward@arm.com>
621 David Sherwood <david.sherwood@arm.com>
623 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
624 polynomial numbers of units.
625 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
626 (valid_vector_subparts_p): New function.
627 (build_vector_type): Remove temporary shim and take the number
628 of units as a poly_uint64 rather than an int.
629 (build_opaque_vector_type): Take the number of units as a
630 poly_uint64 rather than an int.
631 * tree.c (build_vector_from_ctor): Handle polynomial
632 TYPE_VECTOR_SUBPARTS.
633 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
634 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
635 (build_vector_from_val): If the number of units is variable,
636 use build_vec_duplicate_cst for constant operands and
637 VEC_DUPLICATE_EXPR otherwise.
638 (make_vector_type): Remove temporary is_constant ().
639 (build_vector_type, build_opaque_vector_type): Take the number of
640 units as a poly_uint64 rather than an int.
641 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
643 * cfgexpand.c (expand_debug_expr): Likewise.
644 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
645 (store_constructor, expand_expr_real_1): Likewise.
646 (const_scalar_mask_from_tree): Likewise.
647 * fold-const-call.c (fold_const_reduction): Likewise.
648 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
649 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
650 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
651 (fold_relational_const): Likewise.
652 (native_interpret_vector): Likewise. Change the size from an
653 int to an unsigned int.
654 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
655 TYPE_VECTOR_SUBPARTS.
656 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
657 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
658 duplicating a non-constant operand into a variable-length vector.
659 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
660 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
661 * ipa-icf.c (sem_variable::equals): Likewise.
662 * match.pd: Likewise.
663 * omp-simd-clone.c (simd_clone_subparts): Likewise.
664 * print-tree.c (print_node): Likewise.
665 * stor-layout.c (layout_type): Likewise.
666 * targhooks.c (default_builtin_vectorization_cost): Likewise.
667 * tree-cfg.c (verify_gimple_comparison): Likewise.
668 (verify_gimple_assign_binary): Likewise.
669 (verify_gimple_assign_ternary): Likewise.
670 (verify_gimple_assign_single): Likewise.
671 * tree-pretty-print.c (dump_generic_node): Likewise.
672 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
673 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
674 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
675 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
676 (vect_shift_permute_load_chain): Likewise.
677 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
678 (expand_vector_condition, optimize_vector_constructor): Likewise.
679 (lower_vec_perm, get_compute_type): Likewise.
680 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
681 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
682 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
683 (vect_recog_mask_conversion_pattern): Likewise.
684 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
685 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
686 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
687 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
688 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
689 (vectorizable_shift, vectorizable_operation, vectorizable_store)
690 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
691 (supportable_widening_operation): Likewise.
692 (supportable_narrowing_operation): Likewise.
693 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
695 * varasm.c (output_constant): Likewise.
697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
698 Alan Hayward <alan.hayward@arm.com>
699 David Sherwood <david.sherwood@arm.com>
701 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
702 so that both the length == 3 and length != 3 cases set up their
703 own permute vectors. Add comments explaining why we know the
704 number of elements is constant.
705 (vect_permute_load_chain): Likewise.
707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
708 Alan Hayward <alan.hayward@arm.com>
709 David Sherwood <david.sherwood@arm.com>
711 * machmode.h (mode_nunits): Change from unsigned char to
713 (ONLY_FIXED_SIZE_MODES): New macro.
714 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
715 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
716 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
718 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
719 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
720 or if measurement_type is not polynomial.
721 * genmodes.c (ZERO_COEFFS): New macro.
722 (emit_mode_nunits_inline): Make mode_nunits_inline return a
724 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
725 Use ZERO_COEFFS when emitting initializers.
726 * data-streamer.h (bp_pack_poly_value): New function.
727 (bp_unpack_poly_value): Likewise.
728 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
730 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
732 * tree.c (make_vector_type): Remove temporary shim and make
733 the real function take the number of units as a poly_uint64
735 (build_vector_type_for_mode): Handle polynomial nunits.
736 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
737 * emit-rtl.c (const_vec_series_p_1): Likewise.
738 (gen_rtx_CONST_VECTOR): Likewise.
739 * fold-const.c (test_vec_duplicate_folding): Likewise.
740 * genrecog.c (validate_pattern): Likewise.
741 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
742 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
743 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
744 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
745 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
746 * rtlanal.c (subreg_get_info): Likewise.
747 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
748 (vect_grouped_load_supported): Likewise.
749 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
750 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
751 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
752 (simplify_const_unary_operation, simplify_binary_operation_1)
753 (simplify_const_binary_operation, simplify_ternary_operation)
754 (test_vector_ops_duplicate, test_vector_ops): Likewise.
755 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
756 instead of CONST_VECTOR_NUNITS.
757 * varasm.c (output_constant_pool_2): Likewise.
758 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
759 explicit-encoded elements in the XVEC for variable-length vectors.
761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
763 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
765 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
766 Alan Hayward <alan.hayward@arm.com>
767 David Sherwood <david.sherwood@arm.com>
769 * coretypes.h (fixed_size_mode): Declare.
770 (fixed_size_mode_pod): New typedef.
771 * builtins.h (target_builtins::x_apply_args_mode)
772 (target_builtins::x_apply_result_mode): Change type to
774 * builtins.c (apply_args_size, apply_result_size, result_vector)
775 (expand_builtin_apply_args_1, expand_builtin_apply)
776 (expand_builtin_return): Update accordingly.
778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
780 * cse.c (hash_rtx_cb): Hash only the encoded elements.
781 * cselib.c (cselib_hash_rtx): Likewise.
782 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
783 CONST_VECTOR encoding.
785 2017-01-03 Jakub Jelinek <jakub@redhat.com>
786 Jeff Law <law@redhat.com>
789 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
790 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
791 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
792 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
795 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
796 explicitly probe *sp in a noreturn function if there were any callee
797 register saves or frame pointer is needed.
799 2018-01-03 Jakub Jelinek <jakub@redhat.com>
802 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
803 BLKmode for ternary, binary or unary expressions.
806 * var-tracking.c (delete_vta_debug_insn): New inline function.
807 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
808 insns from get_insns () to NULL instead of each bb separately.
809 Use delete_vta_debug_insn. No longer static.
810 (vt_debug_insns_local, variable_tracking_main_1): Adjust
811 delete_vta_debug_insns callers.
812 * rtl.h (delete_vta_debug_insns): Declare.
813 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
814 instead of variable_tracking_main.
816 2018-01-03 Martin Sebor <msebor@redhat.com>
818 PR tree-optimization/83603
819 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
820 arguments past the endof the argument list in functions declared
822 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
823 Avoid checking when arguments are null.
825 2018-01-03 Martin Sebor <msebor@redhat.com>
828 * doc/extend.texi (attribute const): Fix a typo.
829 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
830 issuing -Wsuggest-attribute for void functions.
832 2018-01-03 Martin Sebor <msebor@redhat.com>
834 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
835 offset_int::from instead of wide_int::to_shwi.
836 (maybe_diag_overlap): Remove assertion.
837 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
838 * gimple-ssa-sprintf.c (format_directive): Same.
839 (parse_directive): Same.
840 (sprintf_dom_walker::compute_format_length): Same.
841 (try_substitute_return_value): Same.
843 2017-01-03 Jeff Law <law@redhat.com>
846 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
847 non-constant residual for zero at runtime and avoid probing in
848 that case. Reorganize code for trailing problem to mirror handling
851 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
853 PR tree-optimization/83501
854 * tree-ssa-strlen.c (get_string_cst): New.
855 (handle_char_store): Call get_string_cst.
857 2018-01-03 Martin Liska <mliska@suse.cz>
859 PR tree-optimization/83593
860 * tree-ssa-strlen.c: Include tree-cfg.h.
861 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
862 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
863 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
865 (strlen_dom_walker::before_dom_children): Call
866 gimple_purge_dead_eh_edges. Dump tranformation with details
868 (strlen_dom_walker::before_dom_children): Update call by adding
869 new argument cleanup_eh.
870 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
872 2018-01-03 Martin Liska <mliska@suse.cz>
875 * cif-code.def (VARIADIC_THUNK): New enum value.
876 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
879 2018-01-03 Jan Beulich <jbeulich@suse.com>
881 * sse.md (mov<mode>_internal): Tighten condition for when to use
882 vmovdqu<ssescalarsize> for TI and OI modes.
884 2018-01-03 Jakub Jelinek <jakub@redhat.com>
886 Update copyright years.
888 2018-01-03 Martin Liska <mliska@suse.cz>
891 * ipa-visibility.c (function_and_variable_visibility): Skip
892 functions with noipa attribure.
894 2018-01-03 Jakub Jelinek <jakub@redhat.com>
896 * gcc.c (process_command): Update copyright notice dates.
897 * gcov-dump.c (print_version): Ditto.
898 * gcov.c (print_version): Ditto.
899 * gcov-tool.c (print_version): Ditto.
900 * gengtype.c (create_file): Ditto.
901 * doc/cpp.texi: Bump @copying's copyright year.
902 * doc/cppinternals.texi: Ditto.
903 * doc/gcc.texi: Ditto.
904 * doc/gccint.texi: Ditto.
905 * doc/gcov.texi: Ditto.
906 * doc/install.texi: Ditto.
907 * doc/invoke.texi: Ditto.
909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
911 * vector-builder.h (vector_builder::m_full_nelts): Change from
912 unsigned int to poly_uint64.
913 (vector_builder::full_nelts): Update prototype accordingly.
914 (vector_builder::new_vector): Likewise.
915 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
916 (vector_builder::operator ==): Likewise.
917 (vector_builder::finalize): Likewise.
918 * int-vector-builder.h (int_vector_builder::int_vector_builder):
919 Take the number of elements as a poly_uint64 rather than an
921 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
922 from unsigned int to poly_uint64.
923 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
924 (vec_perm_indices::new_vector): Likewise.
925 (vec_perm_indices::length): Likewise.
926 (vec_perm_indices::nelts_per_input): Likewise.
927 (vec_perm_indices::input_nelts): Likewise.
928 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
929 number of elements per input as a poly_uint64 rather than an
930 unsigned int. Use the original encoding for variable-length
931 vectors, rather than clamping each individual element.
932 For the second and subsequent elements in each pattern,
933 clamp the step and base before clamping their sum.
934 (vec_perm_indices::series_p): Handle polynomial element counts.
935 (vec_perm_indices::all_in_range_p): Likewise.
936 (vec_perm_indices_to_tree): Likewise.
937 (vec_perm_indices_to_rtx): Likewise.
938 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
939 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
940 (tree_vector_builder::new_binary_operation): Handle polynomial
941 element counts. Return false if we need to know the number
942 of elements at compile time.
943 * fold-const.c (fold_vec_perm): Punt if the number of elements
944 isn't known at compile time.
946 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
948 * vec-perm-indices.h (vec_perm_builder): Change element type
949 from HOST_WIDE_INT to poly_int64.
950 (vec_perm_indices::element_type): Update accordingly.
951 (vec_perm_indices::clamp): Handle polynomial element_types.
952 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
953 (vec_perm_indices::all_in_range_p): Likewise.
954 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
956 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
957 polynomial vec_perm_indices element types.
958 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
959 * fold-const.c (fold_vec_perm): Likewise.
960 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
961 * tree-vect-generic.c (lower_vec_perm): Likewise.
962 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
963 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
964 element type to HOST_WIDE_INT.
966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
967 Alan Hayward <alan.hayward@arm.com>
968 David Sherwood <david.sherwood@arm.com>
970 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
971 rather than an int. Use plus_constant.
972 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
973 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
976 Alan Hayward <alan.hayward@arm.com>
977 David Sherwood <david.sherwood@arm.com>
979 * calls.c (emit_call_1, expand_call): Change struct_value_size from
980 a HOST_WIDE_INT to a poly_int64.
982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
983 Alan Hayward <alan.hayward@arm.com>
984 David Sherwood <david.sherwood@arm.com>
986 * calls.c (load_register_parameters): Cope with polynomial
987 mode sizes. Require a constant size for BLKmode parameters
988 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
989 forces a parameter to be padded at the lsb end in order to
990 fill a complete number of words, require the parameter size
991 to be ordered wrt UNITS_PER_WORD.
993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
994 Alan Hayward <alan.hayward@arm.com>
995 David Sherwood <david.sherwood@arm.com>
997 * reload1.c (spill_stack_slot_width): Change element type
998 from unsigned int to poly_uint64_pod.
999 (alter_reg): Treat mode sizes as polynomial.
1001 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1002 Alan Hayward <alan.hayward@arm.com>
1003 David Sherwood <david.sherwood@arm.com>
1005 * reload.c (complex_word_subreg_p): New function.
1006 (reload_inner_reg_of_subreg, push_reload): Use it.
1008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1009 Alan Hayward <alan.hayward@arm.com>
1010 David Sherwood <david.sherwood@arm.com>
1012 * lra-constraints.c (process_alt_operands): Reject matched
1013 operands whose sizes aren't ordered.
1014 (match_reload): Refer to this check here.
1016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1017 Alan Hayward <alan.hayward@arm.com>
1018 David Sherwood <david.sherwood@arm.com>
1020 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
1021 that the mode size is in the set {1, 2, 4, 8, 16}.
1023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1024 Alan Hayward <alan.hayward@arm.com>
1025 David Sherwood <david.sherwood@arm.com>
1027 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
1028 Use plus_constant instead of gen_rtx_PLUS.
1030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1031 Alan Hayward <alan.hayward@arm.com>
1032 David Sherwood <david.sherwood@arm.com>
1034 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
1035 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
1036 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
1037 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
1038 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
1039 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
1040 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
1041 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
1042 * config/i386/i386.c (ix86_push_rounding): ...this new function.
1043 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
1045 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
1046 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
1047 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
1048 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
1049 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
1050 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
1051 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
1052 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
1053 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
1054 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
1056 * expr.c (emit_move_resolve_push): Treat the input and result
1057 of PUSH_ROUNDING as a poly_int64.
1058 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
1059 (emit_push_insn): Likewise.
1060 * lra-eliminations.c (mark_not_eliminable): Likewise.
1061 * recog.c (push_operand): Likewise.
1062 * reload1.c (elimination_effects): Likewise.
1063 * rtlanal.c (nonzero_bits1): Likewise.
1064 * calls.c (store_one_arg): Likewise. Require the padding to be
1065 known at compile time.
1067 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1068 Alan Hayward <alan.hayward@arm.com>
1069 David Sherwood <david.sherwood@arm.com>
1071 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
1072 Use plus_constant instead of gen_rtx_PLUS.
1074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1075 Alan Hayward <alan.hayward@arm.com>
1076 David Sherwood <david.sherwood@arm.com>
1078 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
1081 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1082 Alan Hayward <alan.hayward@arm.com>
1083 David Sherwood <david.sherwood@arm.com>
1085 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
1086 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
1087 via stack temporaries. Treat the mode size as polynomial too.
1089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1090 Alan Hayward <alan.hayward@arm.com>
1091 David Sherwood <david.sherwood@arm.com>
1093 * expr.c (expand_expr_real_2): When handling conversions involving
1094 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
1095 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
1096 as a poly_uint64 too.
1098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1099 Alan Hayward <alan.hayward@arm.com>
1100 David Sherwood <david.sherwood@arm.com>
1102 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
1104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1105 Alan Hayward <alan.hayward@arm.com>
1106 David Sherwood <david.sherwood@arm.com>
1108 * combine.c (can_change_dest_mode): Handle polynomial
1109 REGMODE_NATURAL_SIZE.
1110 * expmed.c (store_bit_field_1): Likewise.
1111 * expr.c (store_constructor): Likewise.
1112 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
1113 and polynomial REGMODE_NATURAL_SIZE.
1114 (gen_lowpart_common): Likewise.
1115 * reginfo.c (record_subregs_of_mode): Likewise.
1116 * rtlanal.c (read_modify_subreg_p): Likewise.
1118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1119 Alan Hayward <alan.hayward@arm.com>
1120 David Sherwood <david.sherwood@arm.com>
1122 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
1123 numbers of elements.
1125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1126 Alan Hayward <alan.hayward@arm.com>
1127 David Sherwood <david.sherwood@arm.com>
1129 * match.pd: Cope with polynomial numbers of vector elements.
1131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1132 Alan Hayward <alan.hayward@arm.com>
1133 David Sherwood <david.sherwood@arm.com>
1135 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
1136 in a POINTER_PLUS_EXPR.
1138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1139 Alan Hayward <alan.hayward@arm.com>
1140 David Sherwood <david.sherwood@arm.com>
1142 * omp-simd-clone.c (simd_clone_subparts): New function.
1143 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
1144 (ipa_simd_modify_function_body): Likewise.
1146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1147 Alan Hayward <alan.hayward@arm.com>
1148 David Sherwood <david.sherwood@arm.com>
1150 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
1151 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
1152 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
1153 (expand_vector_condition, vector_element): Likewise.
1154 (subparts_gt): New function.
1155 (get_compute_type): Use subparts_gt.
1156 (count_type_subparts): Delete.
1157 (expand_vector_operations_1): Use subparts_gt instead of
1158 count_type_subparts.
1160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1161 Alan Hayward <alan.hayward@arm.com>
1162 David Sherwood <david.sherwood@arm.com>
1164 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
1165 (vect_compile_time_alias): ...this new function. Do the calculation
1166 on poly_ints rather than trees.
1167 (vect_prune_runtime_alias_test_list): Update call accordingly.
1169 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1170 Alan Hayward <alan.hayward@arm.com>
1171 David Sherwood <david.sherwood@arm.com>
1173 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
1175 (vect_schedule_slp_instance): Likewise.
1177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1178 Alan Hayward <alan.hayward@arm.com>
1179 David Sherwood <david.sherwood@arm.com>
1181 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
1182 constant and extern definitions for variable-length vectors.
1183 (vect_get_constant_vectors): Note that the number of units
1184 is known to be constant.
1186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1187 Alan Hayward <alan.hayward@arm.com>
1188 David Sherwood <david.sherwood@arm.com>
1190 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
1191 of units as polynomial. Choose between WIDE and NARROW based
1194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1195 Alan Hayward <alan.hayward@arm.com>
1196 David Sherwood <david.sherwood@arm.com>
1198 * tree-vect-stmts.c (simd_clone_subparts): New function.
1199 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
1201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1202 Alan Hayward <alan.hayward@arm.com>
1203 David Sherwood <david.sherwood@arm.com>
1205 * tree-vect-stmts.c (vectorizable_call): Treat the number of
1206 vectors as polynomial. Use build_index_vector for
1209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1210 Alan Hayward <alan.hayward@arm.com>
1211 David Sherwood <david.sherwood@arm.com>
1213 * tree-vect-stmts.c (get_load_store_type): Treat the number of
1214 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
1215 for variable-length vectors.
1216 (vectorizable_mask_load_store): Treat the number of units as
1217 polynomial, asserting that it is constant if the condition has
1218 already been enforced.
1219 (vectorizable_store, vectorizable_load): Likewise.
1221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1222 Alan Hayward <alan.hayward@arm.com>
1223 David Sherwood <david.sherwood@arm.com>
1225 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
1226 of units as polynomial. Punt if we can't tell at compile time
1227 which vector contains the final result.
1229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1230 Alan Hayward <alan.hayward@arm.com>
1231 David Sherwood <david.sherwood@arm.com>
1233 * tree-vect-loop.c (vectorizable_induction): Treat the number
1234 of units as polynomial. Punt on SLP inductions. Use an integer
1235 VEC_SERIES_EXPR for variable-length integer reductions. Use a
1236 cast of such a series for variable-length floating-point
1239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1240 Alan Hayward <alan.hayward@arm.com>
1241 David Sherwood <david.sherwood@arm.com>
1243 * tree.h (build_index_vector): Declare.
1244 * tree.c (build_index_vector): New function.
1245 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
1246 of units as polynomial, forcibly converting it to a constant if
1247 vectorizable_reduction has already enforced the condition.
1248 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
1249 to create a {1,2,3,...} vector.
1250 (vectorizable_reduction): Treat the number of units as polynomial.
1251 Choose vectype_in based on the largest scalar element size rather
1252 than the smallest number of units. Enforce the restrictions
1255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1256 Alan Hayward <alan.hayward@arm.com>
1257 David Sherwood <david.sherwood@arm.com>
1259 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
1260 number of units as polynomial.
1262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1263 Alan Hayward <alan.hayward@arm.com>
1264 David Sherwood <david.sherwood@arm.com>
1266 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
1267 * target.def (autovectorize_vector_sizes): Return the vector sizes
1268 by pointer, using vector_sizes rather than a bitmask.
1269 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
1270 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
1271 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
1273 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
1274 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
1275 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
1276 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
1277 * omp-general.c (omp_max_vf): Likewise.
1278 * omp-low.c (omp_clause_aligned_alignment): Likewise.
1279 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
1280 * tree-vect-loop.c (vect_analyze_loop): Likewise.
1281 * tree-vect-slp.c (vect_slp_bb): Likewise.
1282 * doc/tm.texi: Regenerate.
1283 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
1285 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
1286 the vector size as a poly_uint64 rather than an unsigned int.
1287 (current_vector_size): Change from an unsigned int to a poly_uint64.
1288 (get_vectype_for_scalar_type): Update accordingly.
1289 * tree.h (build_truth_vector_type): Take the size and number of
1290 units as a poly_uint64 rather than an unsigned int.
1291 (build_vector_type): Add a temporary overload that takes
1292 the number of units as a poly_uint64 rather than an unsigned int.
1293 * tree.c (make_vector_type): Likewise.
1294 (build_truth_vector_type): Take the number of units as a poly_uint64
1295 rather than an unsigned int.
1297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1298 Alan Hayward <alan.hayward@arm.com>
1299 David Sherwood <david.sherwood@arm.com>
1301 * target.def (get_mask_mode): Take the number of units and length
1302 as poly_uint64s rather than unsigned ints.
1303 * targhooks.h (default_get_mask_mode): Update accordingly.
1304 * targhooks.c (default_get_mask_mode): Likewise.
1305 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
1306 * doc/tm.texi: Regenerate.
1308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1309 Alan Hayward <alan.hayward@arm.com>
1310 David Sherwood <david.sherwood@arm.com>
1312 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
1313 * omp-general.c (omp_max_vf): Likewise.
1314 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
1315 (expand_omp_simd): Handle polynomial safelen.
1316 * omp-low.c (omplow_simd_context): Add a default constructor.
1317 (omplow_simd_context::max_vf): Change from int to poly_uint64.
1318 (lower_rec_simd_input_clauses): Update accordingly.
1319 (lower_rec_input_clauses): Likewise.
1321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1322 Alan Hayward <alan.hayward@arm.com>
1323 David Sherwood <david.sherwood@arm.com>
1325 * tree-vectorizer.h (vect_nunits_for_cost): New function.
1326 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
1327 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
1328 (vect_analyze_slp_cost): Likewise.
1329 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
1330 (vect_model_load_cost): Likewise.
1332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1333 Alan Hayward <alan.hayward@arm.com>
1334 David Sherwood <david.sherwood@arm.com>
1336 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
1337 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
1338 from an unsigned int * to a poly_uint64_pod *.
1339 (calculate_unrolling_factor): New function.
1340 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
1342 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1343 Alan Hayward <alan.hayward@arm.com>
1344 David Sherwood <david.sherwood@arm.com>
1346 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
1347 from an unsigned int to a poly_uint64.
1348 (_loop_vec_info::slp_unrolling_factor): Likewise.
1349 (_loop_vec_info::vectorization_factor): Change from an int
1351 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
1352 (vect_get_num_vectors): New function.
1353 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
1354 (vect_get_num_copies): Use vect_get_num_vectors.
1355 (vect_analyze_data_ref_dependences): Change max_vf from an int *
1356 to an unsigned int *.
1357 (vect_analyze_data_refs): Change min_vf from an int * to a
1359 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
1360 than an unsigned HOST_WIDE_INT.
1361 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1362 (vect_analyze_data_ref_dependence): Change max_vf from an int *
1363 to an unsigned int *.
1364 (vect_analyze_data_ref_dependences): Likewise.
1365 (vect_compute_data_ref_alignment): Handle polynomial vf.
1366 (vect_enhance_data_refs_alignment): Likewise.
1367 (vect_prune_runtime_alias_test_list): Likewise.
1368 (vect_shift_permute_load_chain): Likewise.
1369 (vect_supportable_dr_alignment): Likewise.
1370 (dependence_distance_ge_vf): Take the vectorization factor as a
1371 poly_uint64 rather than an unsigned HOST_WIDE_INT.
1372 (vect_analyze_data_refs): Change min_vf from an int * to a
1374 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
1375 vfm1 as a poly_uint64 rather than an int. Make the same change
1376 for the returned bound_scalar.
1377 (vect_gen_vector_loop_niters): Handle polynomial vf.
1378 (vect_do_peeling): Likewise. Update call to
1379 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
1380 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
1382 * tree-vect-loop.c (vect_determine_vectorization_factor)
1383 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
1384 (vect_get_known_peeling_cost): Likewise.
1385 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
1386 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
1387 (vect_transform_loop): Likewise. Use the lowest possible VF when
1388 updating the upper bounds of the loop.
1389 (vect_min_worthwhile_factor): Make static. Return an unsigned int
1391 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
1392 polynomial unroll factors.
1393 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
1394 (vect_make_slp_decision): Likewise.
1395 (vect_supported_load_permutation_p): Likewise, and polynomial
1397 (vect_analyze_slp_cost): Handle polynomial vf.
1398 (vect_slp_analyze_node_operations): Likewise.
1399 (vect_slp_analyze_bb_1): Likewise.
1400 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
1401 than an unsigned HOST_WIDE_INT.
1402 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
1403 (vectorizable_load): Handle polynomial vf.
1404 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
1406 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
1408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1409 Alan Hayward <alan.hayward@arm.com>
1410 David Sherwood <david.sherwood@arm.com>
1412 * match.pd: Handle bit operations involving three constants
1413 and try to fold one pair.
1415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1417 * tree-vect-loop-manip.c: Include gimple-fold.h.
1418 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
1419 niters_maybe_zero parameters. Handle other cases besides a step of 1.
1420 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
1421 Add a path that uses a step of VF instead of 1, but disable it
1423 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
1424 and niters_no_overflow parameters. Update calls to
1425 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
1426 Create a new SSA name if the latter choses to use a ste other
1427 than zero, and return it via niters_vector_mult_vf_var.
1428 * tree-vect-loop.c (vect_transform_loop): Update calls to
1429 vect_do_peeling, vect_gen_vector_loop_niters and
1430 slpeel_make_loop_iterate_ntimes.
1431 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
1432 (vect_gen_vector_loop_niters): Update declarations after above changes.
1434 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
1436 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
1437 128-bit round to integer instructions.
1438 (ceil<mode>2): Likewise.
1439 (btrunc<mode>2): Likewise.
1440 (round<mode>2): Likewise.
1442 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
1444 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
1445 unaligned VSX load/store on P8/P9.
1446 (expand_block_clear): Allow the use of unaligned VSX
1447 load/store on P8/P9.
1449 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1451 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
1453 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
1454 swap associated with both a load and a store.
1456 2018-01-02 Andrew Waterman <andrew@sifive.com>
1458 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
1459 * config/riscv/riscv.md (clear_cache): Use it.
1461 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
1463 * web.c: Remove out-of-date comment.
1465 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1467 * expr.c (fixup_args_size_notes): Check that any existing
1468 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
1469 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
1470 (emit_single_push_insn): ...here.
1472 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1474 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
1475 (const_vector_encoded_nelts): New function.
1476 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
1477 (const_vector_int_elt, const_vector_elt): Declare.
1478 * emit-rtl.c (const_vector_int_elt_1): New function.
1479 (const_vector_elt): Likewise.
1480 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
1481 of CONST_VECTOR_ELT.
1483 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1485 * expr.c: Include rtx-vector-builder.h.
1486 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
1487 directly on the tree encoding.
1488 (const_vector_from_tree): Likewise.
1489 * optabs.c: Include rtx-vector-builder.h.
1490 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
1491 sequence of "u" values.
1492 * vec-perm-indices.c: Include rtx-vector-builder.h.
1493 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
1494 directly on the vec_perm_indices encoding.
1496 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1498 * doc/rtl.texi (const_vector): Describe new encoding scheme.
1499 * Makefile.in (OBJS): Add rtx-vector-builder.o.
1500 * rtx-vector-builder.h: New file.
1501 * rtx-vector-builder.c: Likewise.
1502 * rtl.h (rtx_def::u2): Add a const_vector field.
1503 (CONST_VECTOR_NPATTERNS): New macro.
1504 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
1505 (CONST_VECTOR_DUPLICATE_P): Likewise.
1506 (CONST_VECTOR_STEPPED_P): Likewise.
1507 (CONST_VECTOR_ENCODED_ELT): Likewise.
1508 (const_vec_duplicate_p): Check for a duplicated vector encoding.
1509 (unwrap_const_vec_duplicate): Likewise.
1510 (const_vec_series_p): Check for a non-duplicated vector encoding.
1511 Say that the function only returns true for integer vectors.
1512 * emit-rtl.c: Include rtx-vector-builder.h.
1513 (gen_const_vec_duplicate_1): Delete.
1514 (gen_const_vector): Call gen_const_vec_duplicate instead of
1515 gen_const_vec_duplicate_1.
1516 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
1517 (gen_const_vec_duplicate): Use rtx_vector_builder.
1518 (gen_const_vec_series): Likewise.
1519 (gen_rtx_CONST_VECTOR): Likewise.
1520 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
1521 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
1522 Build a new vector rather than modifying a CONST_VECTOR in-place.
1523 (handle_special_swappables): Update call accordingly.
1524 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
1525 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
1526 Build a new vector rather than modifying a CONST_VECTOR in-place.
1527 (handle_special_swappables): Update call accordingly.
1529 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1531 * simplify-rtx.c (simplify_const_binary_operation): Use
1532 CONST_VECTOR_ELT instead of XVECEXP.
1534 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1536 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
1537 the selector elements to be different from the data elements
1538 if the selector is a VECTOR_CST.
1539 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
1540 ssizetype for the selector.
1542 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1544 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
1545 before testing each element individually.
1546 * tree-vect-generic.c (lower_vec_perm): Likewise.
1548 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1550 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
1551 * selftest-run-tests.c (selftest::run_tests): Call it.
1552 * vector-builder.h (vector_builder::operator ==): New function.
1553 (vector_builder::operator !=): Likewise.
1554 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
1555 (vec_perm_indices::all_from_input_p): New function.
1556 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
1557 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
1558 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
1559 instead of reading the VECTOR_CST directly. Detect whether both
1560 vector inputs are the same before constructing the vec_perm_indices,
1561 and update the number of inputs argument accordingly. Use the
1562 utility functions added above. Only construct sel2 if we need to.
1564 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1566 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
1567 the broadcast of the low byte.
1568 (expand_mult_highpart): Use an explicit encoding for the permutes.
1569 * optabs-query.c (can_mult_highpart_p): Likewise.
1570 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
1571 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
1572 (vectorizable_bswap): Likewise.
1573 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
1574 explicit encoding for the power-of-2 permutes.
1575 (vect_permute_store_chain): Likewise.
1576 (vect_grouped_load_supported): Likewise.
1577 (vect_permute_load_chain): Likewise.
1579 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1581 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
1582 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
1583 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
1584 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
1585 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
1586 (vect_gen_perm_mask_any): Likewise.
1588 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1590 * int-vector-builder.h: New file.
1591 * vec-perm-indices.h: Include int-vector-builder.h.
1592 (vec_perm_indices): Redefine as an int_vector_builder.
1593 (auto_vec_perm_indices): Delete.
1594 (vec_perm_builder): Redefine as a stand-alone class.
1595 (vec_perm_indices::vec_perm_indices): New function.
1596 (vec_perm_indices::clamp): Likewise.
1597 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
1598 (vec_perm_indices::new_vector): New function.
1599 (vec_perm_indices::new_expanded_vector): Update for new
1600 vec_perm_indices class.
1601 (vec_perm_indices::rotate_inputs): New function.
1602 (vec_perm_indices::all_in_range_p): Operate directly on the
1603 encoded form, without computing elided elements.
1604 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
1605 encoding. Update for new vec_perm_indices class.
1606 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
1607 the given vec_perm_builder.
1608 (expand_vec_perm_var): Update vec_perm_builder constructor.
1609 (expand_mult_highpart): Use vec_perm_builder instead of
1610 auto_vec_perm_indices.
1611 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
1612 vec_perm_indices instead of auto_vec_perm_indices. Use a single
1613 or double series encoding as appropriate.
1614 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
1615 vec_perm_indices instead of auto_vec_perm_indices.
1616 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
1617 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
1618 (vect_permute_store_chain): Likewise.
1619 (vect_grouped_load_supported): Likewise.
1620 (vect_permute_load_chain): Likewise.
1621 (vect_shift_permute_load_chain): Likewise.
1622 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
1623 (vect_transform_slp_perm_load): Likewise.
1624 (vect_schedule_slp_instance): Likewise.
1625 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
1626 (vectorizable_mask_load_store): Likewise.
1627 (vectorizable_bswap): Likewise.
1628 (vectorizable_store): Likewise.
1629 (vectorizable_load): Likewise.
1630 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
1631 vec_perm_indices instead of auto_vec_perm_indices. Use
1632 tree_to_vec_perm_builder to read the vector from a tree.
1633 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
1634 vec_perm_builder instead of a vec_perm_indices.
1635 (have_whole_vector_shift): Use vec_perm_builder and
1636 vec_perm_indices instead of auto_vec_perm_indices. Leave the
1637 truncation to calc_vec_perm_mask_for_shift.
1638 (vect_create_epilog_for_reduction): Likewise.
1639 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
1640 from auto_vec_perm_indices to vec_perm_indices.
1641 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
1642 instead of changing individual elements.
1643 (aarch64_vectorize_vec_perm_const): Use new_vector to install
1644 the vector in d.perm.
1645 * config/arm/arm.c (expand_vec_perm_d::perm): Change
1646 from auto_vec_perm_indices to vec_perm_indices.
1647 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
1648 instead of changing individual elements.
1649 (arm_vectorize_vec_perm_const): Use new_vector to install
1650 the vector in d.perm.
1651 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
1652 Update vec_perm_builder constructor.
1653 (rs6000_expand_interleave): Likewise.
1654 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
1655 (rs6000_expand_interleave): Likewise.
1657 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1659 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
1660 to qimode could truncate the indices.
1661 * optabs.c (expand_vec_perm_var): Likewise.
1663 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1665 * Makefile.in (OBJS): Add vec-perm-indices.o.
1666 * vec-perm-indices.h: New file.
1667 * vec-perm-indices.c: Likewise.
1668 * target.h (vec_perm_indices): Replace with a forward class
1670 (auto_vec_perm_indices): Move to vec-perm-indices.h.
1671 * optabs.h: Include vec-perm-indices.h.
1672 (expand_vec_perm): Delete.
1673 (selector_fits_mode_p, expand_vec_perm_var): Declare.
1674 (expand_vec_perm_const): Declare.
1675 * target.def (vec_perm_const_ok): Replace with...
1676 (vec_perm_const): ...this new hook.
1677 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
1678 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
1679 * doc/tm.texi: Regenerate.
1680 * optabs.def (vec_perm_const): Delete.
1681 * doc/md.texi (vec_perm_const): Likewise.
1682 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
1683 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
1684 expand_vec_perm for constant permutation vectors. Assert that
1685 the mode of variable permutation vectors is the integer equivalent
1686 of the mode that is being permuted.
1687 * optabs-query.h (selector_fits_mode_p): Declare.
1688 * optabs-query.c: Include vec-perm-indices.h.
1689 (selector_fits_mode_p): New function.
1690 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
1691 is defined, instead of checking whether the vec_perm_const_optab
1692 exists. Use targetm.vectorize.vec_perm_const instead of
1693 targetm.vectorize.vec_perm_const_ok. Check whether the indices
1694 fit in the vector mode before using a variable permute.
1695 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
1696 vec_perm_indices instead of an rtx.
1697 (expand_vec_perm): Replace with...
1698 (expand_vec_perm_const): ...this new function. Take the selector
1699 as a vec_perm_indices rather than an rtx. Also take the mode of
1700 the selector. Update call to shift_amt_for_vec_perm_mask.
1701 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
1702 Use vec_perm_indices::new_expanded_vector to expand the original
1703 selector into bytes. Check whether the indices fit in the vector
1704 mode before using a variable permute.
1705 (expand_vec_perm_var): Make global.
1706 (expand_mult_highpart): Use expand_vec_perm_const.
1707 * fold-const.c: Includes vec-perm-indices.h.
1708 * tree-ssa-forwprop.c: Likewise.
1709 * tree-vect-data-refs.c: Likewise.
1710 * tree-vect-generic.c: Likewise.
1711 * tree-vect-loop.c: Likewise.
1712 * tree-vect-slp.c: Likewise.
1713 * tree-vect-stmts.c: Likewise.
1714 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
1716 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
1717 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
1718 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
1719 (aarch64_vectorize_vec_perm_const): ...this new function.
1720 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
1721 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
1722 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
1723 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
1724 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
1725 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
1726 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
1728 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
1729 check for NEON modes.
1730 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
1731 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
1732 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
1733 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
1735 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
1736 the old VEC_PERM_CONST conditions.
1737 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
1738 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
1739 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
1740 (ia64_vectorize_vec_perm_const_ok): Merge into...
1741 (ia64_vectorize_vec_perm_const): ...this new function.
1742 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
1743 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
1744 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
1745 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
1746 * config/mips/mips.c (mips_expand_vec_perm_const)
1747 (mips_vectorize_vec_perm_const_ok): Merge into...
1748 (mips_vectorize_vec_perm_const): ...this new function.
1749 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
1750 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
1751 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
1752 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
1753 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
1754 (rs6000_expand_vec_perm_const): Delete.
1755 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
1757 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
1758 (altivec_expand_vec_perm_const_le): Take each operand individually.
1759 Operate on constant selectors rather than rtxes.
1760 (altivec_expand_vec_perm_const): Likewise. Update call to
1761 altivec_expand_vec_perm_const_le.
1762 (rs6000_expand_vec_perm_const): Delete.
1763 (rs6000_vectorize_vec_perm_const_ok): Delete.
1764 (rs6000_vectorize_vec_perm_const): New function.
1765 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
1766 an element count and rtx array.
1767 (rs6000_expand_extract_even): Update call accordingly.
1768 (rs6000_expand_interleave): Likewise.
1769 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
1770 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
1771 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
1772 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
1773 (rs6000_expand_vec_perm_const): Delete.
1774 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
1775 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
1776 (altivec_expand_vec_perm_const_le): Take each operand individually.
1777 Operate on constant selectors rather than rtxes.
1778 (altivec_expand_vec_perm_const): Likewise. Update call to
1779 altivec_expand_vec_perm_const_le.
1780 (rs6000_expand_vec_perm_const): Delete.
1781 (rs6000_vectorize_vec_perm_const_ok): Delete.
1782 (rs6000_vectorize_vec_perm_const): New function. Remove stray
1783 reference to the SPE evmerge intructions.
1784 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
1785 an element count and rtx array.
1786 (rs6000_expand_extract_even): Update call accordingly.
1787 (rs6000_expand_interleave): Likewise.
1788 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
1789 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
1791 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
1793 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1795 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
1796 vector mode and that that mode matches the mode of the data
1798 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
1799 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
1800 directly using expand_vec_perm_1 when forcing selectors into
1802 (expand_vec_perm_var): New function, split out from expand_vec_perm.
1804 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1806 * optabs-query.h (can_vec_perm_p): Delete.
1807 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
1808 * optabs-query.c (can_vec_perm_p): Split into...
1809 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
1810 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
1811 particular selector is valid.
1812 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
1813 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
1814 (vect_grouped_load_supported): Likewise.
1815 (vect_shift_permute_load_chain): Likewise.
1816 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
1817 (vect_transform_slp_perm_load): Likewise.
1818 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
1819 (vectorizable_bswap): Likewise.
1820 (vect_gen_perm_mask_checked): Likewise.
1821 * fold-const.c (fold_ternary_loc): Likewise. Don't take
1822 implementations of variable permutation vectors into account
1823 when deciding which selector to use.
1824 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
1825 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
1826 with a false third argument.
1827 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
1828 to test whether the constant selector is valid and can_vec_perm_var_p
1829 to test whether a variable selector is valid.
1831 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1833 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
1834 * optabs-query.c (can_vec_perm_p): Likewise.
1835 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
1836 instead of vec_perm_indices.
1837 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
1838 (vect_gen_perm_mask_checked): Likewise,
1839 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
1840 (vect_gen_perm_mask_checked): Likewise,
1842 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
1844 * optabs-query.h (qimode_for_vec_perm): Declare.
1845 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
1846 (qimode_for_vec_perm): ...this new function.
1847 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
1849 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
1851 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
1852 does not have a conditional at the top.
1854 2018-01-02 Richard Biener <rguenther@suse.de>
1856 * ipa-inline.c (big_speedup_p): Fix expression.
1858 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
1861 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
1864 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
1868 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
1869 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
1870 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
1871 cond_taken_branch_cost 3->4.
1873 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1875 PR tree-optimization/83581
1876 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
1877 TODO_cleanup_cfg if any changes have been made.
1880 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
1881 convert_modes if target mode has the right side, but different mode
1885 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
1886 last argument when extracting from CONCAT. If either from_real or
1887 from_imag is NULL, use expansion through memory. If result is not
1888 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
1889 the parts directly to inner mode, if even that fails, use expansion
1893 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
1894 check for bswap in mode rather than HImode and use that in expand_unop
1897 Copyright (C) 2018 Free Software Foundation, Inc.
1899 Copying and distribution of this file, with or without modification,
1900 are permitted in any medium without royalty provided the copyright
1901 notice and this notice are preserved.