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