1 2018-01-12 Jakub Jelinek <jakub@redhat.com>
3 * regrename.c (regrename_do_replace): If replacing the same
4 reg multiple times, try to reuse last created gen_raw_REG.
7 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
8 main to workaround a bug in GDB.
10 2018-01-12 Tom de Vries <tom@codesourcery.com>
13 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17 PR rtl-optimization/80481
18 * ira-color.c (get_cap_member): New function.
19 (allocnos_conflict_by_live_ranges_p): Use it.
20 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
34 rather than wi::to_widest for DR_INITs.
35 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
36 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
37 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
39 (vect_analyze_group_access_1): Note that here.
41 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
43 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
44 polynomial type sizes.
46 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
48 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
49 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
50 (gimple_add_tmp_var): Likewise.
52 2018-01-12 Martin Liska <mliska@suse.cz>
54 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
55 (gimple_alloc_sizes): Likewise.
56 (dump_gimple_statistics): Use PRIu64 in printf format.
57 * gimple.h: Change uint64_t to int.
59 2018-01-12 Martin Liska <mliska@suse.cz>
61 * tree-core.h: Use uint64_t instead of int.
62 * tree.c (tree_node_counts): Likewise.
63 (tree_node_sizes): Likewise.
64 (dump_tree_statistics): Use PRIu64 in printf format.
66 2018-01-12 Martin Liska <mliska@suse.cz>
68 * Makefile.in: As qsort_chk is implemented in vec.c, add
69 vec.o to linkage of gencfn-macros.
70 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
71 passing the info to record_node_allocation_statistics.
72 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
74 * ggc-common.c (struct ggc_usage): Add operator== and use
75 it in operator< and compare function.
76 * mem-stats.h (struct mem_usage): Likewise.
77 * vec.c (struct vec_usage): Remove operator< and compare
78 function. Can be simply inherited.
80 2018-01-12 Martin Jambor <mjambor@suse.cz>
83 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
84 * tree-ssa-math-opts.c: Include domwalk.h.
85 (convert_mult_to_fma_1): New function.
86 (fma_transformation_info): New type.
87 (fma_deferring_state): Likewise.
88 (cancel_fma_deferring): New function.
89 (result_of_phi): Likewise.
90 (last_fma_candidate_feeds_initial_phi): Likewise.
91 (convert_mult_to_fma): Added deferring logic, split actual
92 transformation to convert_mult_to_fma_1.
93 (math_opts_dom_walker): New type.
94 (math_opts_dom_walker::after_dom_children): New method, body moved
95 here from pass_optimize_widening_mul::execute, added deferring logic
97 (pass_optimize_widening_mul::execute): Moved most of code to
98 math_opts_dom_walker::after_dom_children.
99 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
100 * config/i386/i386.c (ix86_option_override_internal): Added
101 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
103 2018-01-12 Richard Biener <rguenther@suse.de>
106 * dwarf2out.c (gen_variable_die): Do not reset old_die for
107 inline instance vars.
109 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
112 * config/rx/rx.c (rx_is_restricted_memory_address):
115 2018-01-12 Richard Biener <rguenther@suse.de>
117 PR tree-optimization/80846
118 * target.def (split_reduction): New target hook.
119 * targhooks.c (default_split_reduction): New function.
120 * targhooks.h (default_split_reduction): Declare.
121 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
122 target requests first reduce vectors by combining low and high
124 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
125 (get_vectype_for_scalar_type_and_size): Export.
126 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
127 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
128 * doc/tm.texi: Regenerate.
129 * config/i386/i386.c (ix86_split_reduction): Implement
130 TARGET_VECTORIZE_SPLIT_REDUCTION.
132 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
135 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
136 in PIC mode except for TARGET_VXWORKS_RTP.
137 * config/sparc/sparc.c: Include cfgrtl.h.
138 (TARGET_INIT_PIC_REG): Define.
139 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
140 (sparc_pic_register_p): New predicate.
141 (sparc_legitimate_address_p): Use it.
142 (sparc_legitimize_pic_address): Likewise.
143 (sparc_delegitimize_address): Likewise.
144 (sparc_mode_dependent_address_p): Likewise.
145 (gen_load_pcrel_sym): Remove 4th parameter.
146 (load_got_register): Adjust call to above. Remove obsolete stuff.
147 (sparc_expand_prologue): Do not call load_got_register here.
148 (sparc_flat_expand_prologue): Likewise.
149 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
150 (sparc_use_pseudo_pic_reg): New function.
151 (sparc_init_pic_reg): Likewise.
152 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
153 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
155 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
157 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
158 Add item for branch_cost.
160 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
162 PR rtl-optimization/83565
163 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
164 not extend the result to a larger mode for rotate operations.
165 (num_sign_bit_copies1): Likewise.
167 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
170 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
172 Use values-Xc.o for -pedantic.
173 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
175 2018-01-12 Martin Liska <mliska@suse.cz>
178 * ipa-devirt.c (final_warning_record::grow_type_warnings):
180 (possible_polymorphic_call_targets): Use it.
181 (ipa_devirt): Likewise.
183 2018-01-12 Martin Liska <mliska@suse.cz>
185 * profile-count.h (enum profile_quality): Use 0 as invalid
186 enum value of profile_quality.
188 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
190 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
191 -mext-string options.
193 2018-01-12 Richard Biener <rguenther@suse.de>
195 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
196 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
197 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
199 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
201 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
203 * configure.ac (--with-long-double-format): Add support for the
204 configuration option to change the default long double format on
206 * config.gcc (powerpc*-linux*-*): Likewise.
207 * configure: Regenerate.
208 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
209 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
210 used without modification.
212 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
214 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
215 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
216 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
217 MISC_BUILTIN_SPEC_BARRIER.
218 (rs6000_init_builtins): Likewise.
219 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
221 (speculation_barrier): New define_insn.
222 * doc/extend.texi: Document __builtin_speculation_barrier.
224 2018-01-11 Jakub Jelinek <jakub@redhat.com>
227 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
228 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
229 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
231 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
232 integral modes instead of "ss" and "sd".
233 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
234 vectors with 32-bit and 64-bit elements.
235 (vecdupssescalarmodesuffix): New mode attribute.
236 (vec_dup<mode>): Use it.
238 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
241 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
242 frame if argument is passed on stack.
244 2018-01-11 Jakub Jelinek <jakub@redhat.com>
247 * ree.c (combine_reaching_defs): Optimize also
248 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
249 reg2=any_extend(exp); reg1=reg2;, formatting fix.
251 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
254 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
256 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
259 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
260 after they are computed.
262 2018-01-11 Bin Cheng <bin.cheng@arm.com>
264 PR tree-optimization/83695
265 * gimple-loop-linterchange.cc
266 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
267 reset cached scev information after interchange.
268 (pass_linterchange::execute): Remove call to scev_reset_htab.
270 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
272 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
273 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
274 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
275 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
276 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
277 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
278 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
279 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
280 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
281 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
282 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
283 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
284 (V_lane_reg): Likewise.
285 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
287 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
288 (vfmal_lane_low<mode>_intrinsic,
289 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
290 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
291 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
292 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
293 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
294 vfmsl_lane_high<mode>_intrinsic): New define_insns.
296 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
298 * config/arm/arm-cpus.in (fp16fml): New feature.
299 (ALL_SIMD): Add fp16fml.
300 (armv8.2-a): Add fp16fml as an option.
301 (armv8.3-a): Likewise.
302 (armv8.4-a): Add fp16fml as part of fp16.
303 * config/arm/arm.h (TARGET_FP16FML): Define.
304 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
306 * config/arm/arm-modes.def (V2HF): Define.
307 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
308 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
309 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
310 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
311 vfmsl_low, vfmsl_high): New set of builtins.
312 * config/arm/iterators.md (PLUSMINUS): New code iterator.
313 (vfml_op): New code attribute.
314 (VFMLHALVES): New int iterator.
315 (VFML, VFMLSEL): New mode attributes.
316 (V_reg): Define mapping for V2HF.
317 (V_hi, V_lo): New mode attributes.
318 (VF_constraint): Likewise.
319 (vfml_half, vfml_half_selector): New int attributes.
320 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
322 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
323 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
325 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
326 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
327 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
328 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
330 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
331 Document new effective target and option set.
333 2017-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
335 * config/arm/arm-cpus.in (armv8_4): New feature.
336 (ARMv8_4a): New fgroup.
337 (armv8.4-a): New arch.
338 * config/arm/arm-tables.opt: Regenerate.
339 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
340 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
341 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
342 Add matching rules for -march=armv8.4-a and extensions.
343 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
345 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
348 * config/rx/rx.md (BW): New mode attribute.
349 (sync_lock_test_and_setsi): Add mode suffix to insn output.
351 2018-01-11 Richard Biener <rguenther@suse.de>
353 PR tree-optimization/83435
354 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
355 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
356 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
358 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
359 Alan Hayward <alan.hayward@arm.com>
360 David Sherwood <david.sherwood@arm.com>
362 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
364 (aarch64_classify_address): Initialize it. Track polynomial offsets.
365 (aarch64_print_address_internal): Use it to check for a zero offset.
367 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
368 Alan Hayward <alan.hayward@arm.com>
369 David Sherwood <david.sherwood@arm.com>
371 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
372 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
373 Return a poly_int64 rather than a HOST_WIDE_INT.
374 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
375 rather than a HOST_WIDE_INT.
376 * config/aarch64/aarch64.h (aarch64_frame): Protect with
377 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
378 hard_fp_offset, frame_size, initial_adjust, callee_offset and
379 final_offset from HOST_WIDE_INT to poly_int64.
380 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
381 to_constant when getting the number of units in an Advanced SIMD
383 (aarch64_builtin_vectorized_function): Check for a constant number
385 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
387 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
388 attribute instead of GET_MODE_NUNITS.
389 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
390 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
391 GET_MODE_SIZE for fixed-size registers.
392 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
393 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
394 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
395 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
396 (aarch64_print_operand, aarch64_print_address_internal)
397 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
398 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
399 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
400 Handle polynomial GET_MODE_SIZE.
401 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
402 wider than SImode without modification.
403 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
404 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
405 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
406 passing and returning SVE modes.
407 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
409 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
410 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
411 (aarch64_allocate_and_probe_stack_space): Likewise.
412 (aarch64_layout_frame): Cope with polynomial offsets.
413 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
414 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
416 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
417 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
418 poly_int64 rather than a HOST_WIDE_INT.
419 (aarch64_get_separate_components, aarch64_process_components)
420 (aarch64_expand_prologue, aarch64_expand_epilogue)
421 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
422 (aarch64_anchor_offset): New function, split out from...
423 (aarch64_legitimize_address): ...here.
424 (aarch64_builtin_vectorization_cost): Handle polynomial
425 TYPE_VECTOR_SUBPARTS.
426 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
428 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
429 number of elements from the PARALLEL rather than the mode.
430 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
431 rather than GET_MODE_BITSIZE.
432 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
433 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
434 (aarch64_expand_vec_perm_const_1): Handle polynomial
435 d->perm.length () and d->perm elements.
436 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
437 Apply to_constant to d->perm elements.
438 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
439 polynomial CONST_VECTOR_NUNITS.
440 (aarch64_move_pointer): Take amount as a poly_int64 rather
442 (aarch64_progress_pointer): Avoid temporary variable.
443 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
444 the mode attribute instead of GET_MODE.
446 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
447 Alan Hayward <alan.hayward@arm.com>
448 David Sherwood <david.sherwood@arm.com>
450 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
451 x exists before using it.
452 (aarch64_add_constant_internal): Rename to...
453 (aarch64_add_offset_1): ...this. Replace regnum with separate
454 src and dest rtxes. Handle the case in which they're different,
455 including when the offset is zero. Replace scratchreg with an rtx.
456 Use 2 additions if there is no spare register into which we can
457 move a 16-bit constant.
458 (aarch64_add_constant): Delete.
459 (aarch64_add_offset): Replace reg with separate src and dest
460 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
461 Use aarch64_add_offset_1.
462 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
463 an rtx rather than an int. Take the delta as a poly_int64
464 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
465 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
466 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
467 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
468 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
470 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
471 aarch64_add_constant.
473 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
475 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
476 Use scalar_float_mode.
478 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
480 * config/aarch64/aarch64-simd.md
481 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
482 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
483 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
484 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
485 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
486 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
487 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
488 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
489 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
490 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
492 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
495 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
496 targ_options->x_arm_arch_string is non NULL.
498 2018-01-11 Tamar Christina <tamar.christina@arm.com>
500 * config/aarch64/aarch64.h
501 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
503 2018-01-11 Sudakshina Das <sudi.das@arm.com>
506 * expmed.c (emit_store_flag_force): Swap if const op0
507 and change VOIDmode to mode of op0.
509 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
511 PR rtl-optimization/83761
512 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
513 than bytes to mode_for_size.
515 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
518 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
519 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
522 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
525 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
527 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
528 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
531 2018-01-10 Michael Collison <michael.collison@arm.com>
533 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
534 * config/aarch64/aarch64-option-extension.def: Add
535 AARCH64_OPT_EXTENSION of 'fp16fml'.
536 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
537 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
538 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
539 * config/aarch64/constraints.md (Ui7): New constraint.
540 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
541 (VFMLA_SEL_W): Ditto.
544 (VFMLA16_LOW): New int iterator.
545 (VFMLA16_HIGH): Ditto.
546 (UNSPEC_FMLAL): New unspec.
547 (UNSPEC_FMLSL): Ditto.
548 (UNSPEC_FMLAL2): Ditto.
549 (UNSPEC_FMLSL2): Ditto.
550 (f16mac): New code attribute.
551 * config/aarch64/aarch64-simd-builtins.def
552 (aarch64_fmlal_lowv2sf): Ditto.
553 (aarch64_fmlsl_lowv2sf): Ditto.
554 (aarch64_fmlalq_lowv4sf): Ditto.
555 (aarch64_fmlslq_lowv4sf): Ditto.
556 (aarch64_fmlal_highv2sf): Ditto.
557 (aarch64_fmlsl_highv2sf): Ditto.
558 (aarch64_fmlalq_highv4sf): Ditto.
559 (aarch64_fmlslq_highv4sf): Ditto.
560 (aarch64_fmlal_lane_lowv2sf): Ditto.
561 (aarch64_fmlsl_lane_lowv2sf): Ditto.
562 (aarch64_fmlal_laneq_lowv2sf): Ditto.
563 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
564 (aarch64_fmlalq_lane_lowv4sf): Ditto.
565 (aarch64_fmlsl_lane_lowv4sf): Ditto.
566 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
567 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
568 (aarch64_fmlal_lane_highv2sf): Ditto.
569 (aarch64_fmlsl_lane_highv2sf): Ditto.
570 (aarch64_fmlal_laneq_highv2sf): Ditto.
571 (aarch64_fmlsl_laneq_highv2sf): Ditto.
572 (aarch64_fmlalq_lane_highv4sf): Ditto.
573 (aarch64_fmlsl_lane_highv4sf): Ditto.
574 (aarch64_fmlalq_laneq_highv4sf): Ditto.
575 (aarch64_fmlsl_laneq_highv4sf): Ditto.
576 * config/aarch64/aarch64-simd.md:
577 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
578 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
579 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
580 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
581 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
582 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
583 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
584 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
585 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
586 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
587 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
588 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
589 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
590 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
591 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
592 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
593 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
594 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
595 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
596 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
597 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
598 (vfmlsl_low_u32): Ditto.
599 (vfmlalq_low_u32): Ditto.
600 (vfmlslq_low_u32): Ditto.
601 (vfmlal_high_u32): Ditto.
602 (vfmlsl_high_u32): Ditto.
603 (vfmlalq_high_u32): Ditto.
604 (vfmlslq_high_u32): Ditto.
605 (vfmlal_lane_low_u32): Ditto.
606 (vfmlsl_lane_low_u32): Ditto.
607 (vfmlal_laneq_low_u32): Ditto.
608 (vfmlsl_laneq_low_u32): Ditto.
609 (vfmlalq_lane_low_u32): Ditto.
610 (vfmlslq_lane_low_u32): Ditto.
611 (vfmlalq_laneq_low_u32): Ditto.
612 (vfmlslq_laneq_low_u32): Ditto.
613 (vfmlal_lane_high_u32): Ditto.
614 (vfmlsl_lane_high_u32): Ditto.
615 (vfmlal_laneq_high_u32): Ditto.
616 (vfmlsl_laneq_high_u32): Ditto.
617 (vfmlalq_lane_high_u32): Ditto.
618 (vfmlslq_lane_high_u32): Ditto.
619 (vfmlalq_laneq_high_u32): Ditto.
620 (vfmlslq_laneq_high_u32): Ditto.
621 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
622 (AARCH64_FL_FOR_ARCH8_4): New.
623 (AARCH64_ISA_F16FML): New ISA flag.
624 (TARGET_F16FML): New feature flag for fp16fml.
625 (doc/invoke.texi): Document new fp16fml option.
627 2018-01-10 Michael Collison <michael.collison@arm.com>
629 * config/aarch64/aarch64-builtins.c:
630 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
631 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
632 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
633 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
634 (AARCH64_ISA_SHA3): New ISA flag.
635 (TARGET_SHA3): New feature flag for sha3.
636 * config/aarch64/iterators.md (sha512_op): New int attribute.
637 (CRYPTO_SHA512): New int iterator.
638 (UNSPEC_SHA512H): New unspec.
639 (UNSPEC_SHA512H2): Ditto.
640 (UNSPEC_SHA512SU0): Ditto.
641 (UNSPEC_SHA512SU1): Ditto.
642 * config/aarch64/aarch64-simd-builtins.def
643 (aarch64_crypto_sha512hqv2di): New builtin.
644 (aarch64_crypto_sha512h2qv2di): Ditto.
645 (aarch64_crypto_sha512su0qv2di): Ditto.
646 (aarch64_crypto_sha512su1qv2di): Ditto.
647 (aarch64_eor3qv8hi): Ditto.
648 (aarch64_rax1qv2di): Ditto.
649 (aarch64_xarqv2di): Ditto.
650 (aarch64_bcaxqv8hi): Ditto.
651 * config/aarch64/aarch64-simd.md:
652 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
653 (aarch64_crypto_sha512su0qv2di): Ditto.
654 (aarch64_crypto_sha512su1qv2di): Ditto.
655 (aarch64_eor3qv8hi): Ditto.
656 (aarch64_rax1qv2di): Ditto.
657 (aarch64_xarqv2di): Ditto.
658 (aarch64_bcaxqv8hi): Ditto.
659 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
660 (vsha512h2q_u64): Ditto.
661 (vsha512su0q_u64): Ditto.
662 (vsha512su1q_u64): Ditto.
667 * config/arm/types.md (crypto_sha512): New type attribute.
668 (crypto_sha3): Ditto.
669 (doc/invoke.texi): Document new sha3 option.
671 2018-01-10 Michael Collison <michael.collison@arm.com>
673 * config/aarch64/aarch64-builtins.c:
674 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
675 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
676 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
677 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
678 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
679 (AARCH64_ISA_SM4): New ISA flag.
680 (TARGET_SM4): New feature flag for sm4.
681 * config/aarch64/aarch64-simd-builtins.def
682 (aarch64_sm3ss1qv4si): Ditto.
683 (aarch64_sm3tt1aq4si): Ditto.
684 (aarch64_sm3tt1bq4si): Ditto.
685 (aarch64_sm3tt2aq4si): Ditto.
686 (aarch64_sm3tt2bq4si): Ditto.
687 (aarch64_sm3partw1qv4si): Ditto.
688 (aarch64_sm3partw2qv4si): Ditto.
689 (aarch64_sm4eqv4si): Ditto.
690 (aarch64_sm4ekeyqv4si): Ditto.
691 * config/aarch64/aarch64-simd.md:
692 (aarch64_sm3ss1qv4si): Ditto.
693 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
694 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
695 (aarch64_sm4eqv4si): Ditto.
696 (aarch64_sm4ekeyqv4si): Ditto.
697 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
699 (CRYPTO_SM3TT): Ditto.
700 (CRYPTO_SM3PART): Ditto.
701 (UNSPEC_SM3SS1): New unspec.
702 (UNSPEC_SM3TT1A): Ditto.
703 (UNSPEC_SM3TT1B): Ditto.
704 (UNSPEC_SM3TT2A): Ditto.
705 (UNSPEC_SM3TT2B): Ditto.
706 (UNSPEC_SM3PARTW1): Ditto.
707 (UNSPEC_SM3PARTW2): Ditto.
708 (UNSPEC_SM4E): Ditto.
709 (UNSPEC_SM4EKEY): Ditto.
710 * config/aarch64/constraints.md (Ui2): New constraint.
711 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
712 * config/arm/types.md (crypto_sm3): New type attribute.
714 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
715 (vsm3tt1aq_u32): Ditto.
716 (vsm3tt1bq_u32): Ditto.
717 (vsm3tt2aq_u32): Ditto.
718 (vsm3tt2bq_u32): Ditto.
719 (vsm3partw1q_u32): Ditto.
720 (vsm3partw2q_u32): Ditto.
722 (vsm4ekeyq_u32): Ditto.
723 (doc/invoke.texi): Document new sm4 option.
725 2018-01-10 Michael Collison <michael.collison@arm.com>
727 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
728 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
729 (AARCH64_FL_FOR_ARCH8_4): New.
730 (AARCH64_FL_V8_4): New flag.
731 (doc/invoke.texi): Document new armv8.4-a option.
733 2018-01-10 Michael Collison <michael.collison@arm.com>
735 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
736 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
737 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
738 * config/aarch64/aarch64-option-extension.def: Add
739 AARCH64_OPT_EXTENSION of 'sha2'.
740 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
741 (crypto): Disable sha2 and aes if crypto disabled.
742 (crypto): Enable aes and sha2 if enabled.
743 (simd): Disable sha2 and aes if simd disabled.
744 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
746 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
747 (TARGET_SHA2): New feature flag for sha2.
748 (TARGET_AES): New feature flag for aes.
749 * config/aarch64/aarch64-simd.md:
750 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
751 conditional on TARGET_AES.
752 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
753 (aarch64_crypto_sha1hsi): Make pattern conditional
755 (aarch64_crypto_sha1hv4si): Ditto.
756 (aarch64_be_crypto_sha1hv4si): Ditto.
757 (aarch64_crypto_sha1su1v4si): Ditto.
758 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
759 (aarch64_crypto_sha1su0v4si): Ditto.
760 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
761 (aarch64_crypto_sha256su0v4si): Ditto.
762 (aarch64_crypto_sha256su1v4si): Ditto.
763 (doc/invoke.texi): Document new aes and sha2 options.
765 2018-01-10 Martin Sebor <msebor@redhat.com>
767 PR tree-optimization/83781
768 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
771 2018-01-11 Martin Sebor <msebor@gmail.com>
772 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
774 PR tree-optimization/83501
775 PR tree-optimization/81703
777 * tree-ssa-strlen.c (get_string_cst): Rename...
778 (get_string_len): ...to this. Handle global constants.
779 (handle_char_store): Adjust.
781 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
782 Jim Wilson <jimw@sifive.com>
784 * config/riscv/riscv-protos.h (riscv_output_return): New.
785 * config/riscv/riscv.c (struct machine_function): New naked_p field.
786 (riscv_attribute_table, riscv_output_return),
787 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
788 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
789 (riscv_compute_frame_info): Only compute frame->mask if not a naked
791 (riscv_expand_prologue): Add early return for naked function.
792 (riscv_expand_epilogue): Likewise.
793 (riscv_function_ok_for_sibcall): Return false for naked function.
794 (riscv_set_current_function): New.
795 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
796 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
797 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
798 * doc/extend.texi (RISC-V Function Attributes): New.
800 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
802 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
803 check for 128-bit long double before checking TCmode.
804 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
805 128-bit long doubles before checking TFmode or TCmode.
806 (FLOAT128_IBM_P): Likewise.
808 2018-01-10 Martin Sebor <msebor@redhat.com>
810 PR tree-optimization/83671
811 * builtins.c (c_strlen): Unconditionally return zero for the empty
813 Use -Warray-bounds for warnings.
814 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
815 for non-constant array indices with COMPONENT_REF, arrays of
816 arrays, and pointers to arrays.
817 (gimple_fold_builtin_strlen): Determine and set length range for
818 non-constant character arrays.
820 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
823 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
826 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
828 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
830 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
833 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
834 VECTOR_MEM_ALTIVEC_OR_VSX_P.
835 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
836 indexed_or_indirect_operand predicate.
837 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
838 (*vsx_le_perm_load_v8hi): Likewise.
839 (*vsx_le_perm_load_v16qi): Likewise.
840 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
841 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
842 (*vsx_le_perm_store_v8hi): Likewise.
843 (*vsx_le_perm_store_v16qi): Likewise.
844 (eight unnamed splitters): Likewise.
846 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
848 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
849 * config/rs6000/emmintrin.h: Likewise.
850 * config/rs6000/mmintrin.h: Likewise.
851 * config/rs6000/xmmintrin.h: Likewise.
853 2018-01-10 David Malcolm <dmalcolm@redhat.com>
856 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
858 * tree.c (tree_nop_conversion): Return true for location wrapper
860 (maybe_wrap_with_location): New function.
861 (selftest::check_strip_nops): New function.
862 (selftest::test_location_wrappers): New function.
863 (selftest::tree_c_tests): Call it.
864 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
865 (maybe_wrap_with_location): New decl.
866 (EXPR_LOCATION_WRAPPER_P): New macro.
867 (location_wrapper_p): New inline function.
868 (tree_strip_any_location_wrapper): New inline function.
870 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
873 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
874 stack_realign_offset for the largest alignment of stack slot
876 (ix86_find_max_used_stack_alignment): New function.
877 (ix86_finalize_stack_frame_flags): Use it. Set
878 max_used_stack_alignment if we don't realign stack.
879 * config/i386/i386.h (machine_function): Add
880 max_used_stack_alignment.
882 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
884 * config/arm/arm.opt (-mbranch-cost): New option.
885 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
888 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
891 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
892 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
894 2018-01-10 Richard Biener <rguenther@suse.de>
897 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
898 early out so it also covers the case where we have a non-NULL
901 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
903 PR tree-optimization/83753
904 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
905 for non-strided grouped accesses if the number of elements is 1.
907 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
910 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
911 * i386.h (TARGET_USE_GATHER): Define.
912 * x86-tune.def (X86_TUNE_USE_GATHER): New.
914 2018-01-10 Martin Liska <mliska@suse.cz>
917 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
918 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
920 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
921 CLEANUP_NO_PARTITIONING is not set.
923 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
925 * doc/rtl.texi: Remove documentation of (const ...) wrappers
926 for vectors, as a partial revert of r254296.
927 * rtl.h (const_vec_p): Delete.
928 (const_vec_duplicate_p): Don't test for vector CONSTs.
929 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
930 * expmed.c (make_tree): Likewise.
933 * common.md (E, F): Use CONSTANT_P instead of checking for
935 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
936 checking for CONST_VECTOR.
938 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
941 * predict.c (force_edge_cold): Handle in more sane way edges
944 2018-01-09 Carl Love <cel@us.ibm.com>
946 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
948 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
949 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
950 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
951 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
952 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
953 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
954 * config/rs6000/rs6000-protos.h: Add extern defition for
955 rs6000_generate_float2_double_code.
956 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
958 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
959 (float2_v2df): Add define_expand.
961 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
964 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
965 op_mode in the force_to_mode call.
967 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
969 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
970 instead of checking each element individually.
971 (aarch64_evpc_uzp): Likewise.
972 (aarch64_evpc_zip): Likewise.
973 (aarch64_evpc_ext): Likewise.
974 (aarch64_evpc_rev): Likewise.
975 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
976 instead of checking each element individually. Return true without
978 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
979 whether all selected elements come from the same input, instead of
980 checking each element individually. Remove calls to gen_rtx_REG,
981 start_sequence and end_sequence and instead assert that no rtl is
984 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
986 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
987 order of HIGH and CONST checks.
989 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
991 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
992 if the destination isn't an SSA_NAME.
994 2018-01-09 Richard Biener <rguenther@suse.de>
996 PR tree-optimization/83668
997 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
999 (canonicalize_loop_form): ... here, renamed from ...
1000 (canonicalize_loop_closed_ssa_form): ... this and amended to
1001 swap successor edges for loop exit blocks to make us use
1002 the RPO order we need for initial schedule generation.
1004 2018-01-09 Joseph Myers <joseph@codesourcery.com>
1006 PR tree-optimization/64811
1007 * match.pd: When optimizing comparisons with Inf, avoid
1008 introducing or losing exceptions from comparisons with NaN.
1010 2018-01-09 Martin Liska <mliska@suse.cz>
1013 * asan.c (shadow_mem_size): Add gcc_assert.
1015 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
1017 Don't save registers in main().
1020 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
1021 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
1022 * config/avr/avr.c (avr_set_current_function): Don't error if
1023 naked, OS_task or OS_main are specified at the same time.
1024 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
1026 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
1028 * common/config/avr/avr-common.c (avr_option_optimization_table):
1029 Switch on -mmain-is-OS_task for optimizing compilations.
1031 2018-01-09 Richard Biener <rguenther@suse.de>
1033 PR tree-optimization/83572
1034 * graphite.c: Include cfganal.h.
1035 (graphite_transform_loops): Connect infinite loops to exit
1036 and remove fake edges at the end.
1038 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
1040 * ipa-inline.c (edge_badness): Revert accidental checkin.
1042 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
1045 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
1046 symbols; not inline clones.
1048 2018-01-09 Jakub Jelinek <jakub@redhat.com>
1051 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
1052 hard registers. Formatting fixes.
1054 PR preprocessor/83722
1055 * gcc.c (try_generate_repro): Pass
1056 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
1057 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
1060 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
1061 Kito Cheng <kito.cheng@gmail.com>
1063 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
1064 (riscv_leaf_function_p): Delete.
1065 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
1067 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
1069 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
1071 (do_ifelse): New function.
1072 (do_isel): New function.
1073 (do_sub3): New function.
1074 (do_add3): New function.
1075 (do_load_mask_compare): New function.
1076 (do_overlap_load_compare): New function.
1077 (expand_compare_loop): New function.
1078 (expand_block_compare): Call expand_compare_loop() when appropriate.
1079 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
1081 (-mblock-compare-inline-loop-limit): New option.
1083 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1086 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
1087 Reverse order of second and third operands in first alternative.
1088 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
1089 of first and second elements in UNSPEC_VPERMR vector.
1090 (altivec_expand_vec_perm_le): Likewise.
1092 2017-01-08 Jeff Law <law@redhat.com>
1094 PR rtl-optimizatin/81308
1095 * tree-switch-conversion.c (cfg_altered): New file scoped static.
1096 (process_switch): If group_case_labels makes a change, then set
1098 (pass_convert_switch::execute): If a switch is converted, then
1099 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
1101 PR rtl-optimization/81308
1102 * recog.c (split_all_insns): Conditionally cleanup the CFG after
1105 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
1107 PR target/83663 - Revert r255946
1108 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
1109 generation for cases where splatting a value is not useful.
1110 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
1111 across a vec_duplicate and a paradoxical subreg forming a vector
1112 mode to a vec_concat.
1114 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1116 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
1117 -march=armv8.3-a variants.
1118 * config/arm/t-multilib: Likewise.
1119 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
1121 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
1123 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
1125 (cceq_ior_compare_complement): Give it a name so I can use it, and
1126 change boolean_or_operator predicate to boolean_operator so it can
1127 be used to generate a crand.
1128 (eqne): New code iterator.
1129 (bd/bd_neg): New code_attrs.
1130 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
1131 a single define_insn.
1132 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
1133 decrement (bdnzt/bdnzf/bdzt/bdzf).
1134 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
1135 with the new names of the branch decrement patterns, and added the
1136 names of the branch decrement conditional patterns.
1138 2018-01-08 Richard Biener <rguenther@suse.de>
1140 PR tree-optimization/83563
1141 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
1144 2018-01-08 Richard Biener <rguenther@suse.de>
1147 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
1149 2018-01-08 Richard Biener <rguenther@suse.de>
1151 PR tree-optimization/83685
1152 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
1153 references to abnormals.
1155 2018-01-08 Richard Biener <rguenther@suse.de>
1158 * dwarf2out.c (output_indirect_strings): Handle empty
1159 skeleton_debug_str_hash.
1160 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
1162 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
1164 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
1165 (emit_store_direct): Likewise.
1166 (arc_trampoline_adjust_address): Likewise.
1167 (arc_asm_trampoline_template): New function.
1168 (arc_initialize_trampoline): Use asm_trampoline_template.
1169 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
1170 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
1171 * config/arc/arc.md (flush_icache): Delete pattern.
1173 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
1175 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
1176 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
1179 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
1182 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
1183 by not USED_FOR_TARGET.
1184 (make_pass_resolve_sw_modes): Likewise.
1186 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
1188 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
1191 2018-01-08 Richard Biener <rguenther@suse.de>
1194 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
1196 2018-01-08 Richard Biener <rguenther@suse.de>
1199 * match.pd ((t * 2) / 2) -> t): Add missing :c.
1201 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
1204 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
1205 basic blocks with a small number of successors.
1206 (convert_control_dep_chain_into_preds): Improve handling of
1208 (dump_predicates): Split apart into...
1209 (dump_pred_chain): ...here...
1210 (dump_pred_info): ...and here.
1211 (can_one_predicate_be_invalidated_p): Add debugging printfs.
1212 (can_chain_union_be_invalidated_p): Improve check for invalidation
1214 (uninit_uses_cannot_happen): Avoid unnecessary if
1215 convert_control_dep_chain_into_preds yielded nothing.
1217 2018-01-06 Martin Sebor <msebor@redhat.com>
1219 PR tree-optimization/83640
1220 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
1221 subtracting negative offset from size.
1222 (builtin_access::overlap): Adjust offset bounds of the access to fall
1223 within the size of the object if possible.
1225 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
1227 PR rtl-optimization/83699
1228 * expmed.c (extract_bit_field_1): Restrict the vector usage of
1229 extract_bit_field_as_subreg to cases in which the extracted
1230 value is also a vector.
1232 * lra-constraints.c (process_alt_operands): Test for the equivalence
1233 substitutions when detecting a possible reload cycle.
1235 2018-01-06 Jakub Jelinek <jakub@redhat.com>
1238 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
1239 by default if flag_selective_schedling{,2}. Formatting fixes.
1241 PR rtl-optimization/83682
1242 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
1243 if it has non-VECTOR_MODE element mode.
1244 (vec_duplicate_p): Likewise.
1247 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
1248 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
1250 2018-01-05 Jakub Jelinek <jakub@redhat.com>
1253 * config/i386/i386-builtin.def
1254 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
1255 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
1256 Require also OPTION_MASK_ISA_AVX512F in addition to
1257 OPTION_MASK_ISA_GFNI.
1258 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
1259 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
1260 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
1261 to OPTION_MASK_ISA_GFNI.
1262 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
1263 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
1264 OPTION_MASK_ISA_AVX512BW.
1265 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
1266 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
1267 addition to OPTION_MASK_ISA_GFNI.
1268 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
1269 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
1270 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
1271 to OPTION_MASK_ISA_GFNI.
1272 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
1273 a requirement for all ISAs rather than any of them with a few
1275 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
1277 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
1278 bitmasks to be enabled with 3 exceptions, instead of requiring any
1279 enabled ISA with lots of exceptions.
1280 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
1281 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
1282 Change avx512bw in isa attribute to avx512f.
1283 * config/i386/sgxintrin.h: Add license boilerplate.
1284 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
1285 to __AVX512F__ and __AVX512VL to __AVX512VL__.
1286 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
1287 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
1289 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
1290 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
1291 temporarily sse2 rather than sse if not enabled already.
1294 * config/i386/sse.md (VI248_VLBW): Rename to ...
1295 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
1296 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
1297 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
1298 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
1299 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
1300 mode iterator instead of VI248_VLBW.
1302 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
1304 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
1305 (record_modified): Skip clobbers; add debug output.
1306 (param_change_prob): Use sreal frequencies.
1308 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
1310 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
1311 punt for user-aligned variables.
1313 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
1315 * tree-chrec.c (chrec_contains_symbols): Return true for
1318 2018-01-05 Sudakshina Das <sudi.das@arm.com>
1321 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
1322 of (x|y) == x for BICS pattern.
1324 2018-01-05 Jakub Jelinek <jakub@redhat.com>
1326 PR tree-optimization/83605
1327 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
1328 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
1331 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
1333 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
1334 * config/epiphany/rtems.h: New file.
1336 2018-01-04 Jakub Jelinek <jakub@redhat.com>
1337 Uros Bizjak <ubizjak@gmail.com>
1340 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
1341 QIreg_operand instead of register_operand predicate.
1342 * config/i386/i386.c (ix86_rop_should_change_byte_p,
1343 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
1344 comments instead of -fmitigate[-_]rop.
1346 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1349 * cgraphunit.c (symbol_table::compile): Switch to text_section
1350 before calling assembly_start debug hook.
1351 * run-rtl-passes.c (run_rtl_passes): Likewise.
1354 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
1356 * tree-vrp.c (extract_range_from_binary_expr_1): Check
1357 range_int_cst_p rather than !symbolic_range_p before calling
1358 extract_range_from_multiplicative_op_1.
1360 2017-01-04 Jeff Law <law@redhat.com>
1362 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
1363 redundant test in assertion.
1365 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
1367 * doc/rtl.texi: Document machine_mode wrapper classes.
1369 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
1371 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
1374 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
1376 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
1377 the VEC_PERM_EXPR fold to fail.
1379 2018-01-04 Jakub Jelinek <jakub@redhat.com>
1382 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
1383 to switched_sections.
1385 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
1388 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
1391 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
1394 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
1395 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
1397 2018-01-04 Jakub Jelinek <jakub@redhat.com>
1400 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
1401 is BLKmode and bitpos not zero or mode change is needed.
1403 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
1406 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
1409 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
1412 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
1413 instead of MULT rtx. Update all corresponding splitters.
1415 (*ssub<modesuffix>): Ditto.
1417 (*cmp_sadd_di): Update split patterns.
1418 (*cmp_sadd_si): Ditto.
1419 (*cmp_sadd_sidi): Ditto.
1420 (*cmp_ssub_di): Ditto.
1421 (*cmp_ssub_si): Ditto.
1422 (*cmp_ssub_sidi): Ditto.
1423 * config/alpha/predicates.md (const23_operand): New predicate.
1424 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
1425 Look for ASHIFT, not MULT inner operand.
1426 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
1428 2018-01-04 Martin Liska <mliska@suse.cz>
1430 PR gcov-profile/83669
1431 * gcov.c (output_intermediate_file): Add version to intermediate
1433 * doc/gcov.texi: Document new field 'version' in intermediate
1434 file format. Fix location of '-k' option of gcov command.
1436 2018-01-04 Martin Liska <mliska@suse.cz>
1439 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
1441 2018-01-04 Jakub Jelinek <jakub@redhat.com>
1443 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
1445 2018-01-03 Martin Sebor <msebor@redhat.com>
1447 PR tree-optimization/83655
1448 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
1449 checking calls with invalid arguments.
1451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1453 * tree-vect-stmts.c (vect_get_store_rhs): New function.
1454 (vectorizable_mask_load_store): Delete.
1455 (vectorizable_call): Return false for masked loads and stores.
1456 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
1457 instead of gimple_assign_rhs1.
1458 (vectorizable_load): Handle IFN_MASK_LOAD.
1459 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
1461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1463 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
1465 (vectorizable_mask_load_store): ...here.
1466 (vectorizable_load): ...and here.
1468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1470 * tree-vect-stmts.c (vect_build_all_ones_mask)
1471 (vect_build_zero_merge_argument): New functions, split out from...
1472 (vectorizable_load): ...here.
1474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1476 * tree-vect-stmts.c (vect_check_store_rhs): New function,
1478 (vectorizable_mask_load_store): ...here.
1479 (vectorizable_store): ...and here.
1481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1483 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
1485 (vectorizable_mask_load_store): ...here.
1487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1489 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
1490 (vect_model_store_cost): Take a vec_load_store_type instead of a
1492 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
1493 (vect_model_store_cost): Take a vec_load_store_type instead of a
1495 (vectorizable_mask_load_store): Update accordingly.
1496 (vectorizable_store): Likewise.
1497 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
1499 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1501 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
1502 IFN_MASK_LOAD calls here rather than...
1503 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
1505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1506 Alan Hayward <alan.hayward@arm.com>
1507 David Sherwood <david.sherwood@arm.com>
1509 * expmed.c (extract_bit_field_1): For vector extracts,
1510 fall back to extract_bit_field_as_subreg if vec_extract
1513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1514 Alan Hayward <alan.hayward@arm.com>
1515 David Sherwood <david.sherwood@arm.com>
1517 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
1518 they are variable or constant sized.
1519 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
1520 slots for constant-sized data.
1522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1523 Alan Hayward <alan.hayward@arm.com>
1524 David Sherwood <david.sherwood@arm.com>
1526 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
1527 handling COND_EXPRs with boolean comparisons, try to find a better
1528 basis for the mask type than the boolean itself.
1530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1532 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
1533 is calculated and how it can be overridden.
1534 * genmodes.c (max_bitsize_mode_any_mode): New variable.
1535 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
1537 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
1540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1541 Alan Hayward <alan.hayward@arm.com>
1542 David Sherwood <david.sherwood@arm.com>
1544 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
1545 Remove the mode argument.
1546 (aarch64_simd_valid_immediate): Remove the mode and inverse
1548 * config/aarch64/iterators.md (bitsize): New iterator.
1549 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
1550 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
1551 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
1552 aarch64_simd_valid_immediate.
1553 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
1554 (aarch64_reg_or_bic_imm): Likewise.
1555 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
1556 with an insn_type enum and msl with a modifier_type enum.
1557 Replace element_width with a scalar_mode. Change the shift
1558 to unsigned int. Add constructors for scalar_float_mode and
1559 scalar_int_mode elements.
1560 (aarch64_vect_float_const_representable_p): Delete.
1561 (aarch64_can_const_movi_rtx_p)
1562 (aarch64_simd_scalar_immediate_valid_for_move)
1563 (aarch64_simd_make_constant): Update call to
1564 aarch64_simd_valid_immediate.
1565 (aarch64_advsimd_valid_immediate_hs): New function.
1566 (aarch64_advsimd_valid_immediate): Likewise.
1567 (aarch64_simd_valid_immediate): Remove mode and inverse
1568 arguments. Rewrite to use the above. Use const_vec_duplicate_p
1569 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
1570 and aarch64_float_const_representable_p on the result.
1571 (aarch64_output_simd_mov_immediate): Remove mode argument.
1572 Update call to aarch64_simd_valid_immediate and use of
1573 simd_immediate_info.
1574 (aarch64_output_scalar_simd_mov_immediate): Update call
1577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1578 Alan Hayward <alan.hayward@arm.com>
1579 David Sherwood <david.sherwood@arm.com>
1581 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
1582 (mode_nunits): Likewise CONST_MODE_NUNITS.
1583 * machmode.def (ADJUST_NUNITS): Document.
1584 * genmodes.c (mode_data::need_nunits_adj): New field.
1585 (blank_mode): Update accordingly.
1586 (adj_nunits): New variable.
1587 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
1589 (emit_mode_size_inline): Set need_bytesize_adj for all modes
1590 listed in adj_nunits.
1591 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
1592 listed in adj_nunits. Don't emit case statements for such modes.
1593 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
1594 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
1595 nothing if adj_nunits is nonnull.
1596 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
1597 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
1598 (emit_mode_fbit): Update use of print_maybe_const_decl.
1599 (emit_move_size): Likewise. Treat the array as non-const
1601 (emit_mode_adjustments): Handle adj_nunits.
1603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1605 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
1606 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
1607 (VECTOR_MODES): Use it.
1608 (make_vector_modes): Take the prefix as an argument.
1610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1611 Alan Hayward <alan.hayward@arm.com>
1612 David Sherwood <david.sherwood@arm.com>
1614 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
1615 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
1616 for MODE_VECTOR_BOOL.
1617 * machmode.def (VECTOR_BOOL_MODE): Document.
1618 * genmodes.c (VECTOR_BOOL_MODE): New macro.
1619 (make_vector_bool_mode): New function.
1620 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
1622 * lto-streamer-in.c (lto_input_mode_table): Likewise.
1623 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
1625 * stor-layout.c (int_mode_for_mode): Likewise.
1626 * tree.c (build_vector_type_for_mode): Likewise.
1627 * varasm.c (output_constant_pool_2): Likewise.
1628 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
1629 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
1630 for MODE_VECTOR_BOOL.
1631 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
1632 of mode class checks.
1633 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
1634 instead of a list of mode class checks.
1635 (expand_vector_scalar_condition): Likewise.
1636 (type_for_widest_vector_mode): Handle BImode as an inner mode.
1638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1639 Alan Hayward <alan.hayward@arm.com>
1640 David Sherwood <david.sherwood@arm.com>
1642 * machmode.h (mode_size): Change from unsigned short to
1644 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
1645 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
1646 or if measurement_type is not polynomial.
1647 (fixed_size_mode::includes_p): Check for constant-sized modes.
1648 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
1649 return a poly_uint16 rather than an unsigned short.
1650 (emit_mode_size): Change the type of mode_size from unsigned short
1651 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
1652 (emit_mode_adjustments): Cope with polynomial vector sizes.
1653 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
1655 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
1657 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
1658 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
1659 * caller-save.c (setup_save_areas): Likewise.
1660 (replace_reg_with_saved_mem): Likewise.
1661 * calls.c (emit_library_call_value_1): Likewise.
1662 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
1663 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
1664 (gen_lowpart_for_combine): Likewise.
1665 * convert.c (convert_to_integer_1): Likewise.
1666 * cse.c (equiv_constant, cse_insn): Likewise.
1667 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
1668 (cselib_subst_to_values): Likewise.
1669 * dce.c (word_dce_process_block): Likewise.
1670 * df-problems.c (df_word_lr_mark_ref): Likewise.
1671 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
1672 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
1673 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
1674 (rtl_for_decl_location): Likewise.
1675 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
1676 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
1677 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
1678 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
1679 (expand_expr_real_1): Likewise.
1680 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
1681 (pad_below): Likewise.
1682 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
1683 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
1684 * ira.c (get_subreg_tracking_sizes): Likewise.
1685 * ira-build.c (ira_create_allocno_objects): Likewise.
1686 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
1687 (ira_sort_regnos_for_alter_reg): Likewise.
1688 * ira-costs.c (record_operand_costs): Likewise.
1689 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
1690 (resolve_simple_move): Likewise.
1691 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
1692 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
1693 (lra_constraints): Likewise.
1694 (CONST_POOL_OK_P): Reject variable-sized modes.
1695 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
1696 (add_pseudo_to_slot, lra_spill): Likewise.
1697 * omp-low.c (omp_clause_aligned_alignment): Likewise.
1698 * optabs-query.c (get_best_extraction_insn): Likewise.
1699 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
1700 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
1701 (expand_mult_highpart, valid_multiword_target_p): Likewise.
1702 * recog.c (offsettable_address_addr_space_p): Likewise.
1703 * regcprop.c (maybe_mode_change): Likewise.
1704 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
1705 * regrename.c (build_def_use): Likewise.
1706 * regstat.c (dump_reg_info): Likewise.
1707 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
1708 (find_reloads, find_reloads_subreg_address): Likewise.
1709 * reload1.c (eliminate_regs_1): Likewise.
1710 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
1711 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
1712 (simplify_binary_operation_1, simplify_subreg): Likewise.
1713 * targhooks.c (default_function_arg_padding): Likewise.
1714 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
1715 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
1716 (verify_gimple_assign_ternary): Likewise.
1717 * tree-inline.c (estimate_move_cost): Likewise.
1718 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
1719 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
1720 (get_address_cost_ainc): Likewise.
1721 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
1722 (vect_supportable_dr_alignment): Likewise.
1723 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1724 (vectorizable_reduction): Likewise.
1725 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
1726 (vectorizable_operation, vectorizable_load): Likewise.
1727 * tree.c (build_same_sized_truth_vector_type): Likewise.
1728 * valtrack.c (cleanup_auto_inc_dec): Likewise.
1729 * var-tracking.c (emit_note_insn_var_location): Likewise.
1730 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
1731 (ADDR_VEC_ALIGN): Likewise.
1733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1734 Alan Hayward <alan.hayward@arm.com>
1735 David Sherwood <david.sherwood@arm.com>
1737 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
1739 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
1740 or if measurement_type is polynomial.
1741 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
1742 * combine.c (make_extraction): Likewise.
1743 * dse.c (find_shift_sequence): Likewise.
1744 * dwarf2out.c (mem_loc_descriptor): Likewise.
1745 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
1746 (extract_bit_field, extract_low_bits): Likewise.
1747 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
1748 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
1749 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
1750 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
1751 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
1752 * reload.c (find_reloads): Likewise.
1753 * reload1.c (alter_reg): Likewise.
1754 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
1755 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
1756 * tree-if-conv.c (predicate_mem_writes): Likewise.
1757 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
1758 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
1759 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
1760 * valtrack.c (dead_debug_insert_temp): Likewise.
1761 * varasm.c (mergeable_constant_section): Likewise.
1762 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
1764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1765 Alan Hayward <alan.hayward@arm.com>
1766 David Sherwood <david.sherwood@arm.com>
1768 * expr.c (expand_assignment): Cope with polynomial mode sizes
1769 when assigning to a CONCAT.
1771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1772 Alan Hayward <alan.hayward@arm.com>
1773 David Sherwood <david.sherwood@arm.com>
1775 * machmode.h (mode_precision): Change from unsigned short to
1777 (mode_to_precision): Return a poly_uint16 rather than an unsigned
1779 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
1780 or if measurement_type is not polynomial.
1781 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
1782 in which the mode is already known to be a scalar_int_mode.
1783 * genmodes.c (emit_mode_precision): Change the type of mode_precision
1784 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
1786 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
1787 for GET_MODE_PRECISION.
1788 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
1789 for GET_MODE_PRECISION.
1790 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
1792 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
1793 (expand_field_assignment, make_extraction): Likewise.
1794 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
1795 (get_last_value): Likewise.
1796 * convert.c (convert_to_integer_1): Likewise.
1797 * cse.c (cse_insn): Likewise.
1798 * expr.c (expand_expr_real_1): Likewise.
1799 * lra-constraints.c (simplify_operand_subreg): Likewise.
1800 * optabs-query.c (can_atomic_load_p): Likewise.
1801 * optabs.c (expand_atomic_load): Likewise.
1802 (expand_atomic_store): Likewise.
1803 * ree.c (combine_reaching_defs): Likewise.
1804 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
1805 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
1806 * tree.h (type_has_mode_precision_p): Likewise.
1807 * ubsan.c (instrument_si_overflow): Likewise.
1809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1810 Alan Hayward <alan.hayward@arm.com>
1811 David Sherwood <david.sherwood@arm.com>
1813 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
1814 polynomial numbers of units.
1815 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
1816 (valid_vector_subparts_p): New function.
1817 (build_vector_type): Remove temporary shim and take the number
1818 of units as a poly_uint64 rather than an int.
1819 (build_opaque_vector_type): Take the number of units as a
1820 poly_uint64 rather than an int.
1821 * tree.c (build_vector_from_ctor): Handle polynomial
1822 TYPE_VECTOR_SUBPARTS.
1823 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
1824 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
1825 (build_vector_from_val): If the number of units is variable,
1826 use build_vec_duplicate_cst for constant operands and
1827 VEC_DUPLICATE_EXPR otherwise.
1828 (make_vector_type): Remove temporary is_constant ().
1829 (build_vector_type, build_opaque_vector_type): Take the number of
1830 units as a poly_uint64 rather than an int.
1831 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
1833 * cfgexpand.c (expand_debug_expr): Likewise.
1834 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
1835 (store_constructor, expand_expr_real_1): Likewise.
1836 (const_scalar_mask_from_tree): Likewise.
1837 * fold-const-call.c (fold_const_reduction): Likewise.
1838 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
1839 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
1840 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
1841 (fold_relational_const): Likewise.
1842 (native_interpret_vector): Likewise. Change the size from an
1843 int to an unsigned int.
1844 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
1845 TYPE_VECTOR_SUBPARTS.
1846 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
1847 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
1848 duplicating a non-constant operand into a variable-length vector.
1849 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
1850 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
1851 * ipa-icf.c (sem_variable::equals): Likewise.
1852 * match.pd: Likewise.
1853 * omp-simd-clone.c (simd_clone_subparts): Likewise.
1854 * print-tree.c (print_node): Likewise.
1855 * stor-layout.c (layout_type): Likewise.
1856 * targhooks.c (default_builtin_vectorization_cost): Likewise.
1857 * tree-cfg.c (verify_gimple_comparison): Likewise.
1858 (verify_gimple_assign_binary): Likewise.
1859 (verify_gimple_assign_ternary): Likewise.
1860 (verify_gimple_assign_single): Likewise.
1861 * tree-pretty-print.c (dump_generic_node): Likewise.
1862 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
1863 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
1864 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
1865 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
1866 (vect_shift_permute_load_chain): Likewise.
1867 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
1868 (expand_vector_condition, optimize_vector_constructor): Likewise.
1869 (lower_vec_perm, get_compute_type): Likewise.
1870 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1871 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
1872 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
1873 (vect_recog_mask_conversion_pattern): Likewise.
1874 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
1875 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
1876 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
1877 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
1878 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
1879 (vectorizable_shift, vectorizable_operation, vectorizable_store)
1880 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
1881 (supportable_widening_operation): Likewise.
1882 (supportable_narrowing_operation): Likewise.
1883 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
1885 * varasm.c (output_constant): Likewise.
1887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1888 Alan Hayward <alan.hayward@arm.com>
1889 David Sherwood <david.sherwood@arm.com>
1891 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
1892 so that both the length == 3 and length != 3 cases set up their
1893 own permute vectors. Add comments explaining why we know the
1894 number of elements is constant.
1895 (vect_permute_load_chain): Likewise.
1897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1898 Alan Hayward <alan.hayward@arm.com>
1899 David Sherwood <david.sherwood@arm.com>
1901 * machmode.h (mode_nunits): Change from unsigned char to
1903 (ONLY_FIXED_SIZE_MODES): New macro.
1904 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
1905 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
1906 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
1908 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
1909 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
1910 or if measurement_type is not polynomial.
1911 * genmodes.c (ZERO_COEFFS): New macro.
1912 (emit_mode_nunits_inline): Make mode_nunits_inline return a
1914 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
1915 Use ZERO_COEFFS when emitting initializers.
1916 * data-streamer.h (bp_pack_poly_value): New function.
1917 (bp_unpack_poly_value): Likewise.
1918 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
1919 for GET_MODE_NUNITS.
1920 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
1921 for GET_MODE_NUNITS.
1922 * tree.c (make_vector_type): Remove temporary shim and make
1923 the real function take the number of units as a poly_uint64
1925 (build_vector_type_for_mode): Handle polynomial nunits.
1926 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
1927 * emit-rtl.c (const_vec_series_p_1): Likewise.
1928 (gen_rtx_CONST_VECTOR): Likewise.
1929 * fold-const.c (test_vec_duplicate_folding): Likewise.
1930 * genrecog.c (validate_pattern): Likewise.
1931 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
1932 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
1933 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
1934 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
1935 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
1936 * rtlanal.c (subreg_get_info): Likewise.
1937 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
1938 (vect_grouped_load_supported): Likewise.
1939 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
1940 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
1941 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
1942 (simplify_const_unary_operation, simplify_binary_operation_1)
1943 (simplify_const_binary_operation, simplify_ternary_operation)
1944 (test_vector_ops_duplicate, test_vector_ops): Likewise.
1945 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
1946 instead of CONST_VECTOR_NUNITS.
1947 * varasm.c (output_constant_pool_2): Likewise.
1948 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
1949 explicit-encoded elements in the XVEC for variable-length vectors.
1951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1953 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
1955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1956 Alan Hayward <alan.hayward@arm.com>
1957 David Sherwood <david.sherwood@arm.com>
1959 * coretypes.h (fixed_size_mode): Declare.
1960 (fixed_size_mode_pod): New typedef.
1961 * builtins.h (target_builtins::x_apply_args_mode)
1962 (target_builtins::x_apply_result_mode): Change type to
1963 fixed_size_mode_pod.
1964 * builtins.c (apply_args_size, apply_result_size, result_vector)
1965 (expand_builtin_apply_args_1, expand_builtin_apply)
1966 (expand_builtin_return): Update accordingly.
1968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1970 * cse.c (hash_rtx_cb): Hash only the encoded elements.
1971 * cselib.c (cselib_hash_rtx): Likewise.
1972 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
1973 CONST_VECTOR encoding.
1975 2017-01-03 Jakub Jelinek <jakub@redhat.com>
1976 Jeff Law <law@redhat.com>
1979 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
1980 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
1981 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
1982 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
1985 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
1986 explicitly probe *sp in a noreturn function if there were any callee
1987 register saves or frame pointer is needed.
1989 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1992 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
1993 BLKmode for ternary, binary or unary expressions.
1996 * var-tracking.c (delete_vta_debug_insn): New inline function.
1997 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
1998 insns from get_insns () to NULL instead of each bb separately.
1999 Use delete_vta_debug_insn. No longer static.
2000 (vt_debug_insns_local, variable_tracking_main_1): Adjust
2001 delete_vta_debug_insns callers.
2002 * rtl.h (delete_vta_debug_insns): Declare.
2003 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
2004 instead of variable_tracking_main.
2006 2018-01-03 Martin Sebor <msebor@redhat.com>
2008 PR tree-optimization/83603
2009 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
2010 arguments past the endof the argument list in functions declared
2011 without a prototype.
2012 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2013 Avoid checking when arguments are null.
2015 2018-01-03 Martin Sebor <msebor@redhat.com>
2018 * doc/extend.texi (attribute const): Fix a typo.
2019 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
2020 issuing -Wsuggest-attribute for void functions.
2022 2018-01-03 Martin Sebor <msebor@redhat.com>
2024 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
2025 offset_int::from instead of wide_int::to_shwi.
2026 (maybe_diag_overlap): Remove assertion.
2027 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
2028 * gimple-ssa-sprintf.c (format_directive): Same.
2029 (parse_directive): Same.
2030 (sprintf_dom_walker::compute_format_length): Same.
2031 (try_substitute_return_value): Same.
2033 2017-01-03 Jeff Law <law@redhat.com>
2036 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
2037 non-constant residual for zero at runtime and avoid probing in
2038 that case. Reorganize code for trailing problem to mirror handling
2041 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2043 PR tree-optimization/83501
2044 * tree-ssa-strlen.c (get_string_cst): New.
2045 (handle_char_store): Call get_string_cst.
2047 2018-01-03 Martin Liska <mliska@suse.cz>
2049 PR tree-optimization/83593
2050 * tree-ssa-strlen.c: Include tree-cfg.h.
2051 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
2052 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
2053 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
2055 (strlen_dom_walker::before_dom_children): Call
2056 gimple_purge_dead_eh_edges. Dump tranformation with details
2058 (strlen_dom_walker::before_dom_children): Update call by adding
2059 new argument cleanup_eh.
2060 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
2062 2018-01-03 Martin Liska <mliska@suse.cz>
2065 * cif-code.def (VARIADIC_THUNK): New enum value.
2066 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
2069 2018-01-03 Jan Beulich <jbeulich@suse.com>
2071 * sse.md (mov<mode>_internal): Tighten condition for when to use
2072 vmovdqu<ssescalarsize> for TI and OI modes.
2074 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2076 Update copyright years.
2078 2018-01-03 Martin Liska <mliska@suse.cz>
2081 * ipa-visibility.c (function_and_variable_visibility): Skip
2082 functions with noipa attribure.
2084 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2086 * gcc.c (process_command): Update copyright notice dates.
2087 * gcov-dump.c (print_version): Ditto.
2088 * gcov.c (print_version): Ditto.
2089 * gcov-tool.c (print_version): Ditto.
2090 * gengtype.c (create_file): Ditto.
2091 * doc/cpp.texi: Bump @copying's copyright year.
2092 * doc/cppinternals.texi: Ditto.
2093 * doc/gcc.texi: Ditto.
2094 * doc/gccint.texi: Ditto.
2095 * doc/gcov.texi: Ditto.
2096 * doc/install.texi: Ditto.
2097 * doc/invoke.texi: Ditto.
2099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2101 * vector-builder.h (vector_builder::m_full_nelts): Change from
2102 unsigned int to poly_uint64.
2103 (vector_builder::full_nelts): Update prototype accordingly.
2104 (vector_builder::new_vector): Likewise.
2105 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
2106 (vector_builder::operator ==): Likewise.
2107 (vector_builder::finalize): Likewise.
2108 * int-vector-builder.h (int_vector_builder::int_vector_builder):
2109 Take the number of elements as a poly_uint64 rather than an
2111 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
2112 from unsigned int to poly_uint64.
2113 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
2114 (vec_perm_indices::new_vector): Likewise.
2115 (vec_perm_indices::length): Likewise.
2116 (vec_perm_indices::nelts_per_input): Likewise.
2117 (vec_perm_indices::input_nelts): Likewise.
2118 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
2119 number of elements per input as a poly_uint64 rather than an
2120 unsigned int. Use the original encoding for variable-length
2121 vectors, rather than clamping each individual element.
2122 For the second and subsequent elements in each pattern,
2123 clamp the step and base before clamping their sum.
2124 (vec_perm_indices::series_p): Handle polynomial element counts.
2125 (vec_perm_indices::all_in_range_p): Likewise.
2126 (vec_perm_indices_to_tree): Likewise.
2127 (vec_perm_indices_to_rtx): Likewise.
2128 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
2129 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
2130 (tree_vector_builder::new_binary_operation): Handle polynomial
2131 element counts. Return false if we need to know the number
2132 of elements at compile time.
2133 * fold-const.c (fold_vec_perm): Punt if the number of elements
2134 isn't known at compile time.
2136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2138 * vec-perm-indices.h (vec_perm_builder): Change element type
2139 from HOST_WIDE_INT to poly_int64.
2140 (vec_perm_indices::element_type): Update accordingly.
2141 (vec_perm_indices::clamp): Handle polynomial element_types.
2142 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
2143 (vec_perm_indices::all_in_range_p): Likewise.
2144 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
2146 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
2147 polynomial vec_perm_indices element types.
2148 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
2149 * fold-const.c (fold_vec_perm): Likewise.
2150 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
2151 * tree-vect-generic.c (lower_vec_perm): Likewise.
2152 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
2153 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
2154 element type to HOST_WIDE_INT.
2156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2157 Alan Hayward <alan.hayward@arm.com>
2158 David Sherwood <david.sherwood@arm.com>
2160 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
2161 rather than an int. Use plus_constant.
2162 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
2163 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
2165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2166 Alan Hayward <alan.hayward@arm.com>
2167 David Sherwood <david.sherwood@arm.com>
2169 * calls.c (emit_call_1, expand_call): Change struct_value_size from
2170 a HOST_WIDE_INT to a poly_int64.
2172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2173 Alan Hayward <alan.hayward@arm.com>
2174 David Sherwood <david.sherwood@arm.com>
2176 * calls.c (load_register_parameters): Cope with polynomial
2177 mode sizes. Require a constant size for BLKmode parameters
2178 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
2179 forces a parameter to be padded at the lsb end in order to
2180 fill a complete number of words, require the parameter size
2181 to be ordered wrt UNITS_PER_WORD.
2183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2184 Alan Hayward <alan.hayward@arm.com>
2185 David Sherwood <david.sherwood@arm.com>
2187 * reload1.c (spill_stack_slot_width): Change element type
2188 from unsigned int to poly_uint64_pod.
2189 (alter_reg): Treat mode sizes as polynomial.
2191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2192 Alan Hayward <alan.hayward@arm.com>
2193 David Sherwood <david.sherwood@arm.com>
2195 * reload.c (complex_word_subreg_p): New function.
2196 (reload_inner_reg_of_subreg, push_reload): Use it.
2198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2199 Alan Hayward <alan.hayward@arm.com>
2200 David Sherwood <david.sherwood@arm.com>
2202 * lra-constraints.c (process_alt_operands): Reject matched
2203 operands whose sizes aren't ordered.
2204 (match_reload): Refer to this check here.
2206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2207 Alan Hayward <alan.hayward@arm.com>
2208 David Sherwood <david.sherwood@arm.com>
2210 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
2211 that the mode size is in the set {1, 2, 4, 8, 16}.
2213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2214 Alan Hayward <alan.hayward@arm.com>
2215 David Sherwood <david.sherwood@arm.com>
2217 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
2218 Use plus_constant instead of gen_rtx_PLUS.
2220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2221 Alan Hayward <alan.hayward@arm.com>
2222 David Sherwood <david.sherwood@arm.com>
2224 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
2225 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
2226 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
2227 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
2228 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
2229 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
2230 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
2231 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
2232 * config/i386/i386.c (ix86_push_rounding): ...this new function.
2233 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
2235 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
2236 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
2237 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
2238 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
2239 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
2240 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
2241 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
2242 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
2243 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
2244 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
2246 * expr.c (emit_move_resolve_push): Treat the input and result
2247 of PUSH_ROUNDING as a poly_int64.
2248 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
2249 (emit_push_insn): Likewise.
2250 * lra-eliminations.c (mark_not_eliminable): Likewise.
2251 * recog.c (push_operand): Likewise.
2252 * reload1.c (elimination_effects): Likewise.
2253 * rtlanal.c (nonzero_bits1): Likewise.
2254 * calls.c (store_one_arg): Likewise. Require the padding to be
2255 known at compile time.
2257 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2258 Alan Hayward <alan.hayward@arm.com>
2259 David Sherwood <david.sherwood@arm.com>
2261 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
2262 Use plus_constant instead of gen_rtx_PLUS.
2264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2265 Alan Hayward <alan.hayward@arm.com>
2266 David Sherwood <david.sherwood@arm.com>
2268 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
2271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2272 Alan Hayward <alan.hayward@arm.com>
2273 David Sherwood <david.sherwood@arm.com>
2275 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
2276 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
2277 via stack temporaries. Treat the mode size as polynomial too.
2279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2280 Alan Hayward <alan.hayward@arm.com>
2281 David Sherwood <david.sherwood@arm.com>
2283 * expr.c (expand_expr_real_2): When handling conversions involving
2284 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
2285 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
2286 as a poly_uint64 too.
2288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2289 Alan Hayward <alan.hayward@arm.com>
2290 David Sherwood <david.sherwood@arm.com>
2292 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
2294 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2295 Alan Hayward <alan.hayward@arm.com>
2296 David Sherwood <david.sherwood@arm.com>
2298 * combine.c (can_change_dest_mode): Handle polynomial
2299 REGMODE_NATURAL_SIZE.
2300 * expmed.c (store_bit_field_1): Likewise.
2301 * expr.c (store_constructor): Likewise.
2302 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
2303 and polynomial REGMODE_NATURAL_SIZE.
2304 (gen_lowpart_common): Likewise.
2305 * reginfo.c (record_subregs_of_mode): Likewise.
2306 * rtlanal.c (read_modify_subreg_p): Likewise.
2308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2309 Alan Hayward <alan.hayward@arm.com>
2310 David Sherwood <david.sherwood@arm.com>
2312 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
2313 numbers of elements.
2315 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2316 Alan Hayward <alan.hayward@arm.com>
2317 David Sherwood <david.sherwood@arm.com>
2319 * match.pd: Cope with polynomial numbers of vector elements.
2321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2322 Alan Hayward <alan.hayward@arm.com>
2323 David Sherwood <david.sherwood@arm.com>
2325 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
2326 in a POINTER_PLUS_EXPR.
2328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2329 Alan Hayward <alan.hayward@arm.com>
2330 David Sherwood <david.sherwood@arm.com>
2332 * omp-simd-clone.c (simd_clone_subparts): New function.
2333 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
2334 (ipa_simd_modify_function_body): Likewise.
2336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2337 Alan Hayward <alan.hayward@arm.com>
2338 David Sherwood <david.sherwood@arm.com>
2340 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
2341 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
2342 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
2343 (expand_vector_condition, vector_element): Likewise.
2344 (subparts_gt): New function.
2345 (get_compute_type): Use subparts_gt.
2346 (count_type_subparts): Delete.
2347 (expand_vector_operations_1): Use subparts_gt instead of
2348 count_type_subparts.
2350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2351 Alan Hayward <alan.hayward@arm.com>
2352 David Sherwood <david.sherwood@arm.com>
2354 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
2355 (vect_compile_time_alias): ...this new function. Do the calculation
2356 on poly_ints rather than trees.
2357 (vect_prune_runtime_alias_test_list): Update call accordingly.
2359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2360 Alan Hayward <alan.hayward@arm.com>
2361 David Sherwood <david.sherwood@arm.com>
2363 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
2365 (vect_schedule_slp_instance): Likewise.
2367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2368 Alan Hayward <alan.hayward@arm.com>
2369 David Sherwood <david.sherwood@arm.com>
2371 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
2372 constant and extern definitions for variable-length vectors.
2373 (vect_get_constant_vectors): Note that the number of units
2374 is known to be constant.
2376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2377 Alan Hayward <alan.hayward@arm.com>
2378 David Sherwood <david.sherwood@arm.com>
2380 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
2381 of units as polynomial. Choose between WIDE and NARROW based
2384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2385 Alan Hayward <alan.hayward@arm.com>
2386 David Sherwood <david.sherwood@arm.com>
2388 * tree-vect-stmts.c (simd_clone_subparts): New function.
2389 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
2391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2392 Alan Hayward <alan.hayward@arm.com>
2393 David Sherwood <david.sherwood@arm.com>
2395 * tree-vect-stmts.c (vectorizable_call): Treat the number of
2396 vectors as polynomial. Use build_index_vector for
2399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2400 Alan Hayward <alan.hayward@arm.com>
2401 David Sherwood <david.sherwood@arm.com>
2403 * tree-vect-stmts.c (get_load_store_type): Treat the number of
2404 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
2405 for variable-length vectors.
2406 (vectorizable_mask_load_store): Treat the number of units as
2407 polynomial, asserting that it is constant if the condition has
2408 already been enforced.
2409 (vectorizable_store, vectorizable_load): Likewise.
2411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2412 Alan Hayward <alan.hayward@arm.com>
2413 David Sherwood <david.sherwood@arm.com>
2415 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
2416 of units as polynomial. Punt if we can't tell at compile time
2417 which vector contains the final result.
2419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2420 Alan Hayward <alan.hayward@arm.com>
2421 David Sherwood <david.sherwood@arm.com>
2423 * tree-vect-loop.c (vectorizable_induction): Treat the number
2424 of units as polynomial. Punt on SLP inductions. Use an integer
2425 VEC_SERIES_EXPR for variable-length integer reductions. Use a
2426 cast of such a series for variable-length floating-point
2429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2430 Alan Hayward <alan.hayward@arm.com>
2431 David Sherwood <david.sherwood@arm.com>
2433 * tree.h (build_index_vector): Declare.
2434 * tree.c (build_index_vector): New function.
2435 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
2436 of units as polynomial, forcibly converting it to a constant if
2437 vectorizable_reduction has already enforced the condition.
2438 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
2439 to create a {1,2,3,...} vector.
2440 (vectorizable_reduction): Treat the number of units as polynomial.
2441 Choose vectype_in based on the largest scalar element size rather
2442 than the smallest number of units. Enforce the restrictions
2445 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2446 Alan Hayward <alan.hayward@arm.com>
2447 David Sherwood <david.sherwood@arm.com>
2449 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
2450 number of units as polynomial.
2452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2453 Alan Hayward <alan.hayward@arm.com>
2454 David Sherwood <david.sherwood@arm.com>
2456 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
2457 * target.def (autovectorize_vector_sizes): Return the vector sizes
2458 by pointer, using vector_sizes rather than a bitmask.
2459 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
2460 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
2461 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
2463 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
2464 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
2465 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
2466 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
2467 * omp-general.c (omp_max_vf): Likewise.
2468 * omp-low.c (omp_clause_aligned_alignment): Likewise.
2469 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
2470 * tree-vect-loop.c (vect_analyze_loop): Likewise.
2471 * tree-vect-slp.c (vect_slp_bb): Likewise.
2472 * doc/tm.texi: Regenerate.
2473 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
2475 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
2476 the vector size as a poly_uint64 rather than an unsigned int.
2477 (current_vector_size): Change from an unsigned int to a poly_uint64.
2478 (get_vectype_for_scalar_type): Update accordingly.
2479 * tree.h (build_truth_vector_type): Take the size and number of
2480 units as a poly_uint64 rather than an unsigned int.
2481 (build_vector_type): Add a temporary overload that takes
2482 the number of units as a poly_uint64 rather than an unsigned int.
2483 * tree.c (make_vector_type): Likewise.
2484 (build_truth_vector_type): Take the number of units as a poly_uint64
2485 rather than an unsigned int.
2487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2488 Alan Hayward <alan.hayward@arm.com>
2489 David Sherwood <david.sherwood@arm.com>
2491 * target.def (get_mask_mode): Take the number of units and length
2492 as poly_uint64s rather than unsigned ints.
2493 * targhooks.h (default_get_mask_mode): Update accordingly.
2494 * targhooks.c (default_get_mask_mode): Likewise.
2495 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
2496 * doc/tm.texi: Regenerate.
2498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2499 Alan Hayward <alan.hayward@arm.com>
2500 David Sherwood <david.sherwood@arm.com>
2502 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
2503 * omp-general.c (omp_max_vf): Likewise.
2504 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
2505 (expand_omp_simd): Handle polynomial safelen.
2506 * omp-low.c (omplow_simd_context): Add a default constructor.
2507 (omplow_simd_context::max_vf): Change from int to poly_uint64.
2508 (lower_rec_simd_input_clauses): Update accordingly.
2509 (lower_rec_input_clauses): Likewise.
2511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2512 Alan Hayward <alan.hayward@arm.com>
2513 David Sherwood <david.sherwood@arm.com>
2515 * tree-vectorizer.h (vect_nunits_for_cost): New function.
2516 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
2517 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
2518 (vect_analyze_slp_cost): Likewise.
2519 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
2520 (vect_model_load_cost): Likewise.
2522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2523 Alan Hayward <alan.hayward@arm.com>
2524 David Sherwood <david.sherwood@arm.com>
2526 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
2527 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
2528 from an unsigned int * to a poly_uint64_pod *.
2529 (calculate_unrolling_factor): New function.
2530 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
2532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2533 Alan Hayward <alan.hayward@arm.com>
2534 David Sherwood <david.sherwood@arm.com>
2536 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
2537 from an unsigned int to a poly_uint64.
2538 (_loop_vec_info::slp_unrolling_factor): Likewise.
2539 (_loop_vec_info::vectorization_factor): Change from an int
2541 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
2542 (vect_get_num_vectors): New function.
2543 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
2544 (vect_get_num_copies): Use vect_get_num_vectors.
2545 (vect_analyze_data_ref_dependences): Change max_vf from an int *
2546 to an unsigned int *.
2547 (vect_analyze_data_refs): Change min_vf from an int * to a
2549 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
2550 than an unsigned HOST_WIDE_INT.
2551 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2552 (vect_analyze_data_ref_dependence): Change max_vf from an int *
2553 to an unsigned int *.
2554 (vect_analyze_data_ref_dependences): Likewise.
2555 (vect_compute_data_ref_alignment): Handle polynomial vf.
2556 (vect_enhance_data_refs_alignment): Likewise.
2557 (vect_prune_runtime_alias_test_list): Likewise.
2558 (vect_shift_permute_load_chain): Likewise.
2559 (vect_supportable_dr_alignment): Likewise.
2560 (dependence_distance_ge_vf): Take the vectorization factor as a
2561 poly_uint64 rather than an unsigned HOST_WIDE_INT.
2562 (vect_analyze_data_refs): Change min_vf from an int * to a
2564 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
2565 vfm1 as a poly_uint64 rather than an int. Make the same change
2566 for the returned bound_scalar.
2567 (vect_gen_vector_loop_niters): Handle polynomial vf.
2568 (vect_do_peeling): Likewise. Update call to
2569 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
2570 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
2572 * tree-vect-loop.c (vect_determine_vectorization_factor)
2573 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
2574 (vect_get_known_peeling_cost): Likewise.
2575 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
2576 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
2577 (vect_transform_loop): Likewise. Use the lowest possible VF when
2578 updating the upper bounds of the loop.
2579 (vect_min_worthwhile_factor): Make static. Return an unsigned int
2581 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
2582 polynomial unroll factors.
2583 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
2584 (vect_make_slp_decision): Likewise.
2585 (vect_supported_load_permutation_p): Likewise, and polynomial
2587 (vect_analyze_slp_cost): Handle polynomial vf.
2588 (vect_slp_analyze_node_operations): Likewise.
2589 (vect_slp_analyze_bb_1): Likewise.
2590 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
2591 than an unsigned HOST_WIDE_INT.
2592 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
2593 (vectorizable_load): Handle polynomial vf.
2594 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
2596 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
2598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2599 Alan Hayward <alan.hayward@arm.com>
2600 David Sherwood <david.sherwood@arm.com>
2602 * match.pd: Handle bit operations involving three constants
2603 and try to fold one pair.
2605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2607 * tree-vect-loop-manip.c: Include gimple-fold.h.
2608 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
2609 niters_maybe_zero parameters. Handle other cases besides a step of 1.
2610 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
2611 Add a path that uses a step of VF instead of 1, but disable it
2613 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
2614 and niters_no_overflow parameters. Update calls to
2615 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
2616 Create a new SSA name if the latter choses to use a ste other
2617 than zero, and return it via niters_vector_mult_vf_var.
2618 * tree-vect-loop.c (vect_transform_loop): Update calls to
2619 vect_do_peeling, vect_gen_vector_loop_niters and
2620 slpeel_make_loop_iterate_ntimes.
2621 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
2622 (vect_gen_vector_loop_niters): Update declarations after above changes.
2624 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
2626 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
2627 128-bit round to integer instructions.
2628 (ceil<mode>2): Likewise.
2629 (btrunc<mode>2): Likewise.
2630 (round<mode>2): Likewise.
2632 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
2634 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
2635 unaligned VSX load/store on P8/P9.
2636 (expand_block_clear): Allow the use of unaligned VSX
2637 load/store on P8/P9.
2639 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2641 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
2643 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
2644 swap associated with both a load and a store.
2646 2018-01-02 Andrew Waterman <andrew@sifive.com>
2648 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
2649 * config/riscv/riscv.md (clear_cache): Use it.
2651 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
2653 * web.c: Remove out-of-date comment.
2655 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2657 * expr.c (fixup_args_size_notes): Check that any existing
2658 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
2659 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
2660 (emit_single_push_insn): ...here.
2662 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2664 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
2665 (const_vector_encoded_nelts): New function.
2666 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
2667 (const_vector_int_elt, const_vector_elt): Declare.
2668 * emit-rtl.c (const_vector_int_elt_1): New function.
2669 (const_vector_elt): Likewise.
2670 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
2671 of CONST_VECTOR_ELT.
2673 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2675 * expr.c: Include rtx-vector-builder.h.
2676 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
2677 directly on the tree encoding.
2678 (const_vector_from_tree): Likewise.
2679 * optabs.c: Include rtx-vector-builder.h.
2680 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
2681 sequence of "u" values.
2682 * vec-perm-indices.c: Include rtx-vector-builder.h.
2683 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
2684 directly on the vec_perm_indices encoding.
2686 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2688 * doc/rtl.texi (const_vector): Describe new encoding scheme.
2689 * Makefile.in (OBJS): Add rtx-vector-builder.o.
2690 * rtx-vector-builder.h: New file.
2691 * rtx-vector-builder.c: Likewise.
2692 * rtl.h (rtx_def::u2): Add a const_vector field.
2693 (CONST_VECTOR_NPATTERNS): New macro.
2694 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
2695 (CONST_VECTOR_DUPLICATE_P): Likewise.
2696 (CONST_VECTOR_STEPPED_P): Likewise.
2697 (CONST_VECTOR_ENCODED_ELT): Likewise.
2698 (const_vec_duplicate_p): Check for a duplicated vector encoding.
2699 (unwrap_const_vec_duplicate): Likewise.
2700 (const_vec_series_p): Check for a non-duplicated vector encoding.
2701 Say that the function only returns true for integer vectors.
2702 * emit-rtl.c: Include rtx-vector-builder.h.
2703 (gen_const_vec_duplicate_1): Delete.
2704 (gen_const_vector): Call gen_const_vec_duplicate instead of
2705 gen_const_vec_duplicate_1.
2706 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
2707 (gen_const_vec_duplicate): Use rtx_vector_builder.
2708 (gen_const_vec_series): Likewise.
2709 (gen_rtx_CONST_VECTOR): Likewise.
2710 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
2711 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
2712 Build a new vector rather than modifying a CONST_VECTOR in-place.
2713 (handle_special_swappables): Update call accordingly.
2714 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
2715 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
2716 Build a new vector rather than modifying a CONST_VECTOR in-place.
2717 (handle_special_swappables): Update call accordingly.
2719 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2721 * simplify-rtx.c (simplify_const_binary_operation): Use
2722 CONST_VECTOR_ELT instead of XVECEXP.
2724 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2726 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
2727 the selector elements to be different from the data elements
2728 if the selector is a VECTOR_CST.
2729 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
2730 ssizetype for the selector.
2732 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2734 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
2735 before testing each element individually.
2736 * tree-vect-generic.c (lower_vec_perm): Likewise.
2738 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2740 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
2741 * selftest-run-tests.c (selftest::run_tests): Call it.
2742 * vector-builder.h (vector_builder::operator ==): New function.
2743 (vector_builder::operator !=): Likewise.
2744 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
2745 (vec_perm_indices::all_from_input_p): New function.
2746 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
2747 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
2748 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
2749 instead of reading the VECTOR_CST directly. Detect whether both
2750 vector inputs are the same before constructing the vec_perm_indices,
2751 and update the number of inputs argument accordingly. Use the
2752 utility functions added above. Only construct sel2 if we need to.
2754 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2756 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
2757 the broadcast of the low byte.
2758 (expand_mult_highpart): Use an explicit encoding for the permutes.
2759 * optabs-query.c (can_mult_highpart_p): Likewise.
2760 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
2761 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
2762 (vectorizable_bswap): Likewise.
2763 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
2764 explicit encoding for the power-of-2 permutes.
2765 (vect_permute_store_chain): Likewise.
2766 (vect_grouped_load_supported): Likewise.
2767 (vect_permute_load_chain): Likewise.
2769 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2771 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
2772 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
2773 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
2774 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
2775 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
2776 (vect_gen_perm_mask_any): Likewise.
2778 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2780 * int-vector-builder.h: New file.
2781 * vec-perm-indices.h: Include int-vector-builder.h.
2782 (vec_perm_indices): Redefine as an int_vector_builder.
2783 (auto_vec_perm_indices): Delete.
2784 (vec_perm_builder): Redefine as a stand-alone class.
2785 (vec_perm_indices::vec_perm_indices): New function.
2786 (vec_perm_indices::clamp): Likewise.
2787 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
2788 (vec_perm_indices::new_vector): New function.
2789 (vec_perm_indices::new_expanded_vector): Update for new
2790 vec_perm_indices class.
2791 (vec_perm_indices::rotate_inputs): New function.
2792 (vec_perm_indices::all_in_range_p): Operate directly on the
2793 encoded form, without computing elided elements.
2794 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
2795 encoding. Update for new vec_perm_indices class.
2796 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
2797 the given vec_perm_builder.
2798 (expand_vec_perm_var): Update vec_perm_builder constructor.
2799 (expand_mult_highpart): Use vec_perm_builder instead of
2800 auto_vec_perm_indices.
2801 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
2802 vec_perm_indices instead of auto_vec_perm_indices. Use a single
2803 or double series encoding as appropriate.
2804 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
2805 vec_perm_indices instead of auto_vec_perm_indices.
2806 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
2807 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
2808 (vect_permute_store_chain): Likewise.
2809 (vect_grouped_load_supported): Likewise.
2810 (vect_permute_load_chain): Likewise.
2811 (vect_shift_permute_load_chain): Likewise.
2812 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
2813 (vect_transform_slp_perm_load): Likewise.
2814 (vect_schedule_slp_instance): Likewise.
2815 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
2816 (vectorizable_mask_load_store): Likewise.
2817 (vectorizable_bswap): Likewise.
2818 (vectorizable_store): Likewise.
2819 (vectorizable_load): Likewise.
2820 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
2821 vec_perm_indices instead of auto_vec_perm_indices. Use
2822 tree_to_vec_perm_builder to read the vector from a tree.
2823 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
2824 vec_perm_builder instead of a vec_perm_indices.
2825 (have_whole_vector_shift): Use vec_perm_builder and
2826 vec_perm_indices instead of auto_vec_perm_indices. Leave the
2827 truncation to calc_vec_perm_mask_for_shift.
2828 (vect_create_epilog_for_reduction): Likewise.
2829 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
2830 from auto_vec_perm_indices to vec_perm_indices.
2831 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
2832 instead of changing individual elements.
2833 (aarch64_vectorize_vec_perm_const): Use new_vector to install
2834 the vector in d.perm.
2835 * config/arm/arm.c (expand_vec_perm_d::perm): Change
2836 from auto_vec_perm_indices to vec_perm_indices.
2837 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
2838 instead of changing individual elements.
2839 (arm_vectorize_vec_perm_const): Use new_vector to install
2840 the vector in d.perm.
2841 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
2842 Update vec_perm_builder constructor.
2843 (rs6000_expand_interleave): Likewise.
2844 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
2845 (rs6000_expand_interleave): Likewise.
2847 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2849 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
2850 to qimode could truncate the indices.
2851 * optabs.c (expand_vec_perm_var): Likewise.
2853 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2855 * Makefile.in (OBJS): Add vec-perm-indices.o.
2856 * vec-perm-indices.h: New file.
2857 * vec-perm-indices.c: Likewise.
2858 * target.h (vec_perm_indices): Replace with a forward class
2860 (auto_vec_perm_indices): Move to vec-perm-indices.h.
2861 * optabs.h: Include vec-perm-indices.h.
2862 (expand_vec_perm): Delete.
2863 (selector_fits_mode_p, expand_vec_perm_var): Declare.
2864 (expand_vec_perm_const): Declare.
2865 * target.def (vec_perm_const_ok): Replace with...
2866 (vec_perm_const): ...this new hook.
2867 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
2868 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
2869 * doc/tm.texi: Regenerate.
2870 * optabs.def (vec_perm_const): Delete.
2871 * doc/md.texi (vec_perm_const): Likewise.
2872 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
2873 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
2874 expand_vec_perm for constant permutation vectors. Assert that
2875 the mode of variable permutation vectors is the integer equivalent
2876 of the mode that is being permuted.
2877 * optabs-query.h (selector_fits_mode_p): Declare.
2878 * optabs-query.c: Include vec-perm-indices.h.
2879 (selector_fits_mode_p): New function.
2880 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
2881 is defined, instead of checking whether the vec_perm_const_optab
2882 exists. Use targetm.vectorize.vec_perm_const instead of
2883 targetm.vectorize.vec_perm_const_ok. Check whether the indices
2884 fit in the vector mode before using a variable permute.
2885 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
2886 vec_perm_indices instead of an rtx.
2887 (expand_vec_perm): Replace with...
2888 (expand_vec_perm_const): ...this new function. Take the selector
2889 as a vec_perm_indices rather than an rtx. Also take the mode of
2890 the selector. Update call to shift_amt_for_vec_perm_mask.
2891 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
2892 Use vec_perm_indices::new_expanded_vector to expand the original
2893 selector into bytes. Check whether the indices fit in the vector
2894 mode before using a variable permute.
2895 (expand_vec_perm_var): Make global.
2896 (expand_mult_highpart): Use expand_vec_perm_const.
2897 * fold-const.c: Includes vec-perm-indices.h.
2898 * tree-ssa-forwprop.c: Likewise.
2899 * tree-vect-data-refs.c: Likewise.
2900 * tree-vect-generic.c: Likewise.
2901 * tree-vect-loop.c: Likewise.
2902 * tree-vect-slp.c: Likewise.
2903 * tree-vect-stmts.c: Likewise.
2904 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
2906 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
2907 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
2908 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
2909 (aarch64_vectorize_vec_perm_const): ...this new function.
2910 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
2911 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2912 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
2913 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
2914 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
2915 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2916 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
2918 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
2919 check for NEON modes.
2920 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
2921 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
2922 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
2923 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
2925 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
2926 the old VEC_PERM_CONST conditions.
2927 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
2928 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
2929 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
2930 (ia64_vectorize_vec_perm_const_ok): Merge into...
2931 (ia64_vectorize_vec_perm_const): ...this new function.
2932 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
2933 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
2934 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
2935 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
2936 * config/mips/mips.c (mips_expand_vec_perm_const)
2937 (mips_vectorize_vec_perm_const_ok): Merge into...
2938 (mips_vectorize_vec_perm_const): ...this new function.
2939 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
2940 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
2941 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
2942 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
2943 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
2944 (rs6000_expand_vec_perm_const): Delete.
2945 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
2947 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2948 (altivec_expand_vec_perm_const_le): Take each operand individually.
2949 Operate on constant selectors rather than rtxes.
2950 (altivec_expand_vec_perm_const): Likewise. Update call to
2951 altivec_expand_vec_perm_const_le.
2952 (rs6000_expand_vec_perm_const): Delete.
2953 (rs6000_vectorize_vec_perm_const_ok): Delete.
2954 (rs6000_vectorize_vec_perm_const): New function.
2955 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
2956 an element count and rtx array.
2957 (rs6000_expand_extract_even): Update call accordingly.
2958 (rs6000_expand_interleave): Likewise.
2959 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
2960 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
2961 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
2962 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
2963 (rs6000_expand_vec_perm_const): Delete.
2964 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
2965 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2966 (altivec_expand_vec_perm_const_le): Take each operand individually.
2967 Operate on constant selectors rather than rtxes.
2968 (altivec_expand_vec_perm_const): Likewise. Update call to
2969 altivec_expand_vec_perm_const_le.
2970 (rs6000_expand_vec_perm_const): Delete.
2971 (rs6000_vectorize_vec_perm_const_ok): Delete.
2972 (rs6000_vectorize_vec_perm_const): New function. Remove stray
2973 reference to the SPE evmerge intructions.
2974 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
2975 an element count and rtx array.
2976 (rs6000_expand_extract_even): Update call accordingly.
2977 (rs6000_expand_interleave): Likewise.
2978 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
2979 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
2981 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2983 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2985 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
2986 vector mode and that that mode matches the mode of the data
2988 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
2989 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
2990 directly using expand_vec_perm_1 when forcing selectors into
2992 (expand_vec_perm_var): New function, split out from expand_vec_perm.
2994 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
2996 * optabs-query.h (can_vec_perm_p): Delete.
2997 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
2998 * optabs-query.c (can_vec_perm_p): Split into...
2999 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
3000 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
3001 particular selector is valid.
3002 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
3003 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
3004 (vect_grouped_load_supported): Likewise.
3005 (vect_shift_permute_load_chain): Likewise.
3006 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
3007 (vect_transform_slp_perm_load): Likewise.
3008 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
3009 (vectorizable_bswap): Likewise.
3010 (vect_gen_perm_mask_checked): Likewise.
3011 * fold-const.c (fold_ternary_loc): Likewise. Don't take
3012 implementations of variable permutation vectors into account
3013 when deciding which selector to use.
3014 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
3015 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
3016 with a false third argument.
3017 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
3018 to test whether the constant selector is valid and can_vec_perm_var_p
3019 to test whether a variable selector is valid.
3021 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
3023 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
3024 * optabs-query.c (can_vec_perm_p): Likewise.
3025 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
3026 instead of vec_perm_indices.
3027 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
3028 (vect_gen_perm_mask_checked): Likewise,
3029 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
3030 (vect_gen_perm_mask_checked): Likewise,
3032 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
3034 * optabs-query.h (qimode_for_vec_perm): Declare.
3035 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
3036 (qimode_for_vec_perm): ...this new function.
3037 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
3039 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
3041 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
3042 does not have a conditional at the top.
3044 2018-01-02 Richard Biener <rguenther@suse.de>
3046 * ipa-inline.c (big_speedup_p): Fix expression.
3048 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
3051 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
3054 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
3058 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
3059 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
3060 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
3061 cond_taken_branch_cost 3->4.
3063 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3065 PR tree-optimization/83581
3066 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
3067 TODO_cleanup_cfg if any changes have been made.
3070 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
3071 convert_modes if target mode has the right side, but different mode
3075 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
3076 last argument when extracting from CONCAT. If either from_real or
3077 from_imag is NULL, use expansion through memory. If result is not
3078 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
3079 the parts directly to inner mode, if even that fails, use expansion
3083 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
3084 check for bswap in mode rather than HImode and use that in expand_unop
3087 Copyright (C) 2018 Free Software Foundation, Inc.
3089 Copying and distribution of this file, with or without modification,
3090 are permitted in any medium without royalty provided the copyright
3091 notice and this notice are preserved.