1 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3 * config/i386/i386.md (FPCR_REG): Remove.
4 (UNSPEC_FLDCW): Remove.
5 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
6 (x86_fldcw_1): Remove insn pattern.
7 (fnstenv): Do not clobber FPCR_REG.
9 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
10 (CALL_USED_REGISTERS): Ditto.
11 (REG_ALLOC_ORDER): Ditto.
12 (REG_CLASS_CONTENTS): Ditto.
13 (HI_REGISTER_NAMES): Ditto.
14 (ADDITIONAL_REGISTER_NAMES): Use defines instead
15 of numerical constants.
16 * config/i386/i386.c (regclass_map): Remove fpsr register.
17 (dbx_register_map): Ditto.
18 (dbx64_register_map): Ditto.
19 (svr4_dbx_register_map): Ditto.
20 (print_reg): Do not handle FPCR_REG.
22 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
25 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
26 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
27 Delete, always treat as true.
28 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
29 Ditto. Simplify remaining code.
30 * config/powerpcspe/powerpcspe.h: Ditto.
31 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
32 Simplify remaining code.
33 (rs6000_expand_builtin): Ditto.
34 * config/rs6000/rs6000.h: Ditto.
35 * configure.ac: Ditto.
36 * configure: Regenerate.
38 2018-09-27 Martin Liska <mliska@suse.cz>
40 * coverage.c (get_coverage_counts): Revert the formatting
41 of missing profile opt info.
43 2018-09-27 Richard Biener <rguenther@suse.de>
47 * dwarf2out.c (set_block_origin_self): Do not mark outermost
48 block as we do not output that.
49 (gen_inlined_subroutine_die): Elide the originally outermost
50 block, matching what we do for concrete instances.
51 (decls_for_scope): Add parameter specifying whether to recurse
54 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
55 Tom de Vries <tom@codesourcery.com>
59 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
60 STORE_FLAG_VALUE == 1.
62 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
64 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
66 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
67 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
68 ("speculation_barrier"): New expander definition.
70 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
73 * common.opt: New warning option -Wmissing-profile.
74 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
75 * doc/invoke.texi: Document -Wmissing-profile.
77 2018-09-26 Jim Wilson <jimw@sifive.com>
79 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
80 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
82 2018-09-26 Martin Sebor <msebor@redhat.com>
84 * tree.c (zerop): Change return type to bool.
85 (integer_zerop, integer_onep, integer_each_onep): Same.
86 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
87 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
88 (real_onep, real_minus_onep, chain_index): Same.
89 (print_type_hash_statistics, type_list_equal): Same.
90 * tree.h (zerop): Same.
91 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
92 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
93 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
94 (real_onep, real_minus_onep, chain_index): Same.
95 (print_type_hash_statistics, type_list_equal): Same.
97 2018-09-26 Jim Wilson <jimw@sifive.com>
99 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
101 2018-09-26 Jakub Jelinek <jakub@redhat.com>
104 * config/i386/i386.c: Include debug.h and dwarf2out.h.
105 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
108 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
110 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
112 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
114 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
115 and FP_SECOND_SSE_REGS.
116 (REG_CLASS_NAMES): Ditto.
117 (REG_CLASS_CONTENTS): Ditto.
118 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
119 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
120 (ix86_preferred_output_reload_class): Ditto.
121 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
122 clobber constraint to "=&f".
123 (fix_truncdi_i387): Ditto.
125 (fistdi2_<rounding>): Ditto.
126 (fpremxf4_i387): Change "=u" constraint to "=f".
127 (fprem1xf4_i387): Ditto.
129 (fptanxf4_i387): Ditto.
130 (fxtractxf3_i387): Ditto.
131 (fscalexf4_i387): Ditto.
132 (atan2xf3): Change "u" constraint to "f".
133 (fyl2xxf3_i387): Ditto.
134 (fyl2xp1xf3_i387): Ditto.
136 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
139 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
140 for removed I387_MASK_PM entity.
142 2018-09-26 Jeff Law <law@redhat.com>
145 2018-09-26 Alexey Neyman <stilor@att.net>
147 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
148 headers are no longer pulled in by <isl/val.h>.
150 2018-09-26 Richard Biener <rguenther@suse.de>
153 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
154 or concrete instance DIE to the tree. Create abstract origin
155 attributes also for concrete instances.
157 2018-09-26 Alexey Neyman <stilor@att.net>
159 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
160 headers are no longer pulled in by <isl/val.h>.
162 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
164 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
165 Use new helper functions.
166 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
167 Use new helper functions.
168 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
169 aarch_mm_needs_release): New declarations.
170 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
171 aarch_mm_needs_release): New.
173 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
175 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
176 (arm32_output_mi_thunk): Deal with long calls.
178 2018-09-26 Richard Biener <rguenther@suse.de>
182 * tree-inline.c (expand_call_inline): When the location
183 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
184 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
185 the inserted BLOCK to make inlined_function_outer_scope_p
187 * dwarf2out.c (add_call_src_coords_attributes): Do not add
188 coords for reserved locations.
190 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
192 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
193 (*call_indirect_nonlocal_sysv<mode>): Ditto.
194 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
195 (*sibcall_nonlocal_sysv<mode>): Ditto.
196 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
197 (<bd>_<mode>): Ditto.
198 (<bd>tf_<mode>): Ditto.
200 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
202 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
203 control string as a list of templates instead of as C code.
204 (*altivec_movti): Ditto.
205 * config/rs6000/darwin.md (movdf_low_di): Ditto.
207 2018-09-25 Jim Wilson <jimw@sifive.com>
209 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
210 when target symbol is weak.
212 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
215 * builtins.c (unterminated_array): Simplify.
216 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
217 where pointer arithmetic is safe.
219 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
222 * config/rs6000/altivec.md (altivec_vspltb): Use
223 const_0_to_15_operand instead of u5bit_cint_operand.
224 (*altivec_vspltb_internal): Ditto.
225 (altivec_vspltb_direct): Ditto.
226 (altivec_vsplth): Use const_0_to_7_operand instead of
228 (*altivec_vsplth_internal): Ditto.
229 (altivec_vsplth_direct): Ditto.
230 (altivec_vspltw): Use const_0_to_3_operand instead of
232 (*altivec_vspltw_internal): Ditto.
233 (altivec_vspltw_direct): Ditto.
234 (altivec_vspltsf): Ditto.
235 (*altivec_vspltsf_internal): Ditto.
236 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
237 various splats with the proper size immediate. Reorder the various
238 cases by ascending size of immediate, and put all such together.
240 2018-09-25 Richard Biener <rguenther@suse.de>
243 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
245 (maybe_create_die_with_external_ref): Do not create
246 DW_TAG_imported_unit here.
247 (add_abstract_origin_attribute): Handle external BLOCK refs.
248 (dwarf2out_abstract_function): Simplify LTO case.
249 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
250 rather than using maybe_create_die_with_external_ref.
252 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
255 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
256 (frndintxf2_mask_pm_i387): Ditto.
257 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
258 Enable for !flag_trapping_math.
259 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
260 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
261 Change operand 1 predicate to nonimmediate_operand.
262 (attr "i387_cw"): Remove mask_pm.
263 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
264 (enum ix86_entity): Remove I387_MASK_PM.
265 * config/i386/i386.c (ix86_i387_mode_needed): Do not
267 (ix86_mode_needed): Ditto.
268 (ix86_mode_after): Ditto.
269 (ix86_mode_entry): Ditto.
270 (ix86_mode_exit): Ditto.
271 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
273 2018-09-25 Jakub Jelinek <jakub@redhat.com>
275 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
276 to_update_switch_stmts to vNULL instead of calling create on them
279 2018-09-25 Richard Biener <rguenther@suse.de>
281 PR tree-optimization/87402
282 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
283 (visit_phi): Re-instantiate handling of supposed to be VARYING
284 but non-VARYING backedge value.
286 2018-09-25 Richard Biener <rguenther@suse.de>
289 * dwarf2out.c (struct sym_off_pair): New.
290 (external_die_map): New global.
291 (lookup_decl_die): When in LTO create DIEs lazily from the
293 (lookup_block_die): New function, create DIEs lazily in LTO.
294 (equate_block_to_die): New function.
295 (dwarf2out_die_ref_for_decl): During WPA get the association
296 from the external DIE map.
297 (dwarf2out_register_external_die): Record mapping into the
299 (maybe_create_die_with_external_ref): New function split out from
300 DIE generation part of old dwarf2out_register_external_die.
301 (add_abstract_origin_attribute): Do not return the DIE. When
302 in LTO reference externals directly.
303 (dwarf2out_abstract_function): When in LTO ignore calls for
304 decls with external DIEs (already present abstract instances).
305 (gen_call_site_die): Adjust.
306 (add_high_low_attributes): Likewise.
307 (gen_lexical_block_die): Likewise.
308 (gen_inlined_subroutine_die): Likewie.
309 (gen_block_die): Likewise.
310 (dwarf2out_inline_entry): Likewise.
311 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
314 2018-09-25 Martin Liska <mliska@suse.cz>
316 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
317 integers and not by a float value.
319 2018-09-25 Martin Liska <mliska@suse.cz>
322 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
324 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
325 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
326 * godump.c (go_format_type): Remove extra parenthesis.
328 2018-09-25 Martin Liska <mliska@suse.cz>
330 * alias.c (set_dest_equal_p): Remove unused function.
331 * config/i386/i386.c (def_builtin_pure2): Likewise.
332 * diagnostic-show-locus.c (class layout): Remove
334 (layout::layout): Likewise here.
335 * dump-context.h (class temp_dump_context): Likewise.
336 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
337 (add_AT_loclistsptr): Likewise.
338 (add_AT_offset): Likewise.
339 (get_AT_hi_pc): Likewise.
340 (is_comdat_die): Likewise.
341 (type_is_enum): Likewise.
343 (add_AT_vms_delta): Likewise.
344 (is_class_die): Likewise.
345 * edit-context.c (class line_event): Remove unused field.
346 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
348 * ipa-cp.c (ipa_get_vr_lat): Likewise.
349 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
350 (ok_for_base_p_nonstrict): Likewise.
351 * tree-chrec.c (is_not_constant_evolution): Likewise.
352 (chrec_fold_poly_cst): Likewise.
353 * tree-if-conv.c (has_pred_critical_p): Likewise.
354 * tree-ssa-coalesce.c (print_exprs): Likewise.
355 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
356 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
357 * tree-vrp.c (value_ranges_intersect_p): Likewise.
358 (value_range_nonnegative_p): Likewise.
360 2018-09-25 Martin Liska <mliska@suse.cz>
362 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
363 Do not handle "GNU Pascal".
364 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
366 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
367 from documentation. Likewise.
368 * dbxout.c (dbxout_range_type): Likewise.
369 * doc/cpp.texi: Likewise.
370 * doc/extend.texi: Likewise.
371 * doc/frontends.texi: Likewise.
372 * doc/invoke.texi: Remove Pascal entry.
373 * tree.def (CLEANUP_POINT_EXPR): Likewise.
374 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
376 2018-09-25 Martin Liska <mliska@suse.cz>
379 * doc/invoke.texi: Document all parameters and remove default
382 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
385 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
386 contains HOST_WIDE_INTs when computing its size.
388 2018-09-24 Jim Wilson <jimw@sifive.com>
391 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
393 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
395 2018-09-24 Andrew Pinski <apinski@marvell.com>
397 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
398 access prev before checking it for NULLness in the
399 AARCH64_FUSE_CMP_BRANCH case.
401 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
404 * config/i386/i386.c (rest_of_insert_endbranch): Set
405 endbr_queued_at_entrance to true and don't insert ENDBR if
406 x86_function_profiler will be called.
407 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
409 * config/i386/i386.h (machine_function): Add
410 endbr_queued_at_entrance.
412 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
414 * genattrtab.c (mk_attr_alt): Use alternative_mask.
415 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
417 (check_attr_test): Use alternative_mask.
418 (get_attr_value): Likewise.
419 (compute_alternative_mask): Use alternative_mask and XWINT.
420 (make_alternative_compare): Use alternative_mask.
421 (attr_alt_subset_p): Use XWINT.
422 (attr_alt_subset_of_compl_p): Likewise.
423 (attr_alt_intersection): Use alternative_mask and XWINT.
424 (attr_alt_union): Likewise.
425 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
426 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
427 (simplify_test_exp): Use alternative_mask and XWINT.
428 (write_test_expr): Use alternative_mask and XWINT, adjust bit
429 number calculation to support 64 bits. Generate code that
431 (main): Use alternative_mask.
432 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
434 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
437 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
438 RETURN+USE when returning via %r14.
440 2018-09-24 Martin Liska <mliska@suse.cz>
442 * gcov.c (output_lines): Print colorization legend
443 for both flag_use_colors and flag_use_hotness_colors.
446 2018-09-24 Martin Liska <mliska@suse.cz>
448 * coverage.c (get_coverage_counts): Use warning_at
449 with current_function_decl location. Use %qD in warning
452 2018-09-24 Martin Liska <mliska@suse.cz>
454 * memory-block.h (memory_block_pool::release): Annotate with
455 valgrind that the memory is not accessible.
457 2018-09-24 Martin Liska <mliska@suse.cz>
460 * asan.c: Make asan_handled_variables extern.
462 * cfgexpand.c (expand_stack_vars): Make sure
463 a representative is unpoison if another
464 variable in the partition is handled by
465 use-after-scope sanitization.
467 2018-09-24 Richard Biener <rguenther@suse.de>
469 PR tree-optimization/63155
470 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
471 the worklist when the edge of the respective argument isn't
474 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
476 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
477 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
478 (MASK_CLASS_P): Update for rename.
479 (MAYBE_MASK_CLASS_P): Ditto.
480 (REG_CLASS_NAMES): Update.
481 (REG_CLASS_CONTENT): Update.
482 * config/i386/i386.c (regclass_map): Update for MASK_REG
483 and ALL_MASK_REGS rename.
484 * config/i386/constraints.md (Yk): Update for rename.
487 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
489 * config/i386/i386.h (enum reg_class): Remove
490 EVEX_SSE_REGS and MOD4_SSE_REGS.
491 (REG_CLASS_NAMES): Update.
492 (REG_CLASS_CONTENT): Update.
493 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
494 registers as ALL_SSE_REGS.
495 (ix86_additional_allocno_class_p): Remove.
496 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
497 (ix86_register_priority): Lower priority of EVEX SSE registers.
498 Use IN_RANGE macro where appropriate.
499 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
500 AVX-5124VNNIW checks.
501 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
502 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
503 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
504 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
505 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
506 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
507 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
508 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
509 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
510 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
511 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
512 * config/i386/constraints.md (Yh): Remove.
514 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
516 * config/i386/i386.c (regclass_map): Declare integer REX registers
519 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
521 * doc/service.texi (Service): Switch the fsf.org link to https.
523 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
526 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
527 Define to speculation_safe_value_not_needed.
529 2018-09-21 Florian Weimer <fweimer@redhat.com>
532 * doc/extend.texi (Common Function Attributes): Mention that
533 noreturn suppresses tail call optimization.
535 2018-09-21 Jeff Law <law@redhat.com>
537 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
538 vr_values::cleanup_edges_and_switches.
539 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
541 (identify_jump_threads): Remove EDGE_IGNORE handling.
542 (execute_vrp): Move handling of to_remove_edges and
543 to_update_switch_stmts into vr_values class member functions.
544 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
545 (to_update_switch_stmts): Likewise.
546 * vr-values.c: Include cfghooks.h.
547 (vr_values::vr_values): Initialize to_remove_edges and
548 to_update_switch_stmts.
549 (vr_values::~vr_values): Verify to_remove_edges and
550 to_update_switch_stmts are empty.
551 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
552 (vr_values::cleanup_edges_and_switches): New member function.
553 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
554 function. Add new data members.
556 2018-09-21 David Malcolm <dmalcolm@redhat.com>
558 PR tree-optimization/87309
559 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
560 calls with pflags and alt_flags.
561 (selftest::test_capture_of_dump_calls): Add test of interaction of
562 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
564 2018-09-21 Olivier Hainque <hainque@adacore.com>
566 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
568 2018-09-21 Olivier Hainque <hainque@adacore.com>
570 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
572 2018-09-21 Olivier Hainque <hainque@adacore.com>
574 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
575 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
576 (VXWORKS_LIBS_RTP): Minor reordering.
578 2018-09-21 Olivier Hainque <hainque@adacore.com>
580 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
581 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
583 2018-09-21 Olivier Hainque <hainque@adacore.com>
585 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
586 (PTRDIFF_TYPE): Likewise.
588 2018-09-21 Olivier Hainque <hainque@adacore.com>
590 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
591 triplet, similar to support for VxWorks7.
592 * config/vxworks-dummy.h: Provide a default definition
593 of TARGET_VXWORKS64 to 0.
595 2018-09-21 Olivier Hainque <hainque@adacore.com>
597 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
598 * config/vxworks-dummy.h: here.
600 2018-09-21 Olivier Hainque <hainque@adacore.com>
602 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
604 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
605 Bo Zhou <zbo.zhou@hisilicon.com>
607 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
608 * config/aarch64/aarch64-tune.md: Regenerated.
609 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
610 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
611 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
613 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
614 Julian Brown <julian@codesourcery.com>
616 * builtins.c (get_builtin_sync_mem): Handle address spaces.
618 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
620 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
621 if the call takes a static chain.
623 2018-09-21 Martin Liska <mliska@suse.cz>
625 * auto-profile.c (autofdo_source_profile::read): Do not
627 (read_profile): Do not add working sets.
628 (read_autofdo_file): Remove sum_all.
629 (afdo_callsite_hot_enough_for_early_inline): Remove const
631 * coverage.c (struct counts_entry): Remove gcov_summary.
632 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
633 do not support GCOV_TAG_PROGRAM_SUMMARY.
634 (get_coverage_counts): Remove summary and expected
636 * coverage.h (get_coverage_counts): Likewise.
637 * doc/gcov-dump.texi: Remove -w option.
638 * gcov-dump.c (dump_working_sets): Remove.
639 (main): Do not support '-w' option.
640 (print_usage): Likewise.
641 (tag_summary): Likewise.
642 * gcov-io.c (gcov_write_summary): Do not dump
644 (gcov_read_summary): Likewise.
645 (gcov_histo_index): Remove.
646 (gcov_histogram_merge): Likewise.
647 (compute_working_sets): Likewise.
648 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
650 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
651 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
652 (GCOV_HISTOGRAM_SIZE): Remove.
653 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
654 (struct gcov_summary): Simplify rapidly just
655 to runs and sum_max fields.
656 (gcov_histo_index): Remove.
657 (NUM_GCOV_WORKING_SETS): Likewise.
658 (compute_working_sets): Likewise.
659 * gcov-tool.c (print_overlap_usage_message): Remove
661 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
662 (output_lines): Remove program related line.
663 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
664 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
666 (input_profile_summary): Do not read it.
667 (merge_profile_summaries): And do not merge it.
668 (input_symtab): Do not call removed function.
669 * modulo-sched.c (sms_schedule): Do not print sum_max.
670 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
671 removed when histogram method was invented.
672 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
674 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
676 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
677 and dump selected value.
678 * profile.c (add_working_set): Remove.
679 (get_working_sets): Likewise.
680 (find_working_set): Likewise.
681 (get_exec_counts): Do not work with working sets.
682 (read_profile_edge_counts): Do not inform as sum_max is removed.
683 (compute_branch_probabilities): Likewise.
684 (compute_value_histograms): Remove argument for call of
686 * profile.h: Do not make gcov_summary const.
688 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
690 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
692 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
694 PR tree-optimization/86990
695 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
696 Check that the entire merged store group is made of constants only for
699 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
701 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
702 (VTABLE_VERIFICATION_SPEC): Likewise.
703 (SANITIZER_EARLY_SPEC): Likewise.
704 (SANITIZER_SPEC): Likewise.
705 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
706 * doc/invoke.texi (Link Options): Document -r.
708 2018-09-20 Richard Biener <rguenther@suse.de>
711 * gimplify.c (gimplify_expr): Retain alignment of
712 addressable lvalue in dereference.
714 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
717 * configure.ac: Check for .loc is_stmt support.
718 * configure, config.in: Rebuilt.
719 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
722 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
724 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
725 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
728 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
730 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
732 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
735 2018-09-20 Marek Polacek <polacek@redhat.com>
737 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
739 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
741 PR tree-optimization/87288
742 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
743 into account when determining PEELING_FOR_NITERS.
745 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
747 PR tree-optimization/86877
748 * tree-vect-loop.c (vect_analyze_loop_2): Call
749 vect_verify_datarefs_alignment.
751 2018-09-19 Marek Polacek <polacek@redhat.com>
753 * doc/invoke.texi: Document -Wclass-conversion.
755 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
757 * config/pa/pa.c (pa_adjust_priority): Delete.
758 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
760 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
761 (atomic_storehi): Likewise.
762 (atomic_storesi): Likewise.
763 (atomic_loaddi): Restore compare and swap exchange loop code.
765 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
767 PR rtl-optimization/86902
768 * combine.c (try_combine): When changing the CC mode used, don't change
769 an unrelated mode in other_insn to that new CC mode.
771 2018-09-19 David Malcolm <dmalcolm@redhat.com>
773 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
774 with %T in place of calls to dump_generic_expr.
775 (prune_runtime_alias_test_list): Likewise.
776 (create_runtime_alias_checks): Likewise.
777 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
778 (vect_analyze_data_ref_dependence): Likewise.
779 (vect_slp_analyze_data_ref_dependence): Likewise.
780 (vect_record_base_alignment): Likewise. Use %G in place of call
782 (vect_compute_data_ref_alignment): Likewise.
783 (verify_data_ref_alignment): Likewise.
784 (vect_find_same_alignment_drs): Likewise.
785 (vect_analyze_group_access_1): Likewise.
786 (vect_analyze_data_ref_accesses): Likewise.
787 (dependence_distance_ge_vf): Likewise.
788 (dump_lower_bound): Likewise.
789 (vect_prune_runtime_alias_test_list): Likewise.
790 (vect_find_stmt_data_reference): Likewise.
791 (vect_analyze_data_refs): Likewise.
792 (vect_create_addr_base_for_vector_ref): Likewise.
793 (vect_create_data_ref_ptr): Likewise.
794 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
795 (vect_can_advance_ivs_p): Likewise.
796 (vect_update_ivs_after_vectorizer): Likewise.
797 (vect_gen_prolog_loop_niters): Likewise.
798 (vect_prepare_for_masked_peels): Likewise.
799 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
800 (vect_determine_vectorization_factor): Likewise.
801 (vect_is_simple_iv_evolution): Likewise.
802 (vect_analyze_scalar_cycles_1): Likewise.
803 (vect_analyze_loop_operations): Likewise.
804 (report_vect_op): Likewise.
805 (vect_is_slp_reduction): Likewise.
806 (check_reduction_path): Likewise.
807 (vect_is_simple_reduction): Likewise.
808 (vect_create_epilog_for_reduction): Likewise.
809 (vect_finalize_reduction:): Likewise.
810 (vectorizable_induction): Likewise.
811 (vect_transform_loop_stmt): Likewise.
812 (vect_transform_loop): Likewise.
813 (optimize_mask_stores): Likewise.
814 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
815 (vect_split_statement): Likewise.
816 (vect_recog_over_widening_pattern): Likewise.
817 (vect_recog_average_pattern): Likewise.
818 (vect_determine_min_output_precision_1): Likewise.
819 (vect_determine_precisions_from_range): Likewise.
820 (vect_determine_precisions_from_users): Likewise.
821 (vect_mark_pattern_stmts): Likewise.
822 (vect_pattern_recog_1): Likewise.
823 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
824 (vect_record_max_nunits): Likewise.
825 (vect_build_slp_tree_1): Likewise.
826 (vect_build_slp_tree_2): Likewise.
827 (vect_print_slp_tree): Likewise.
828 (vect_analyze_slp_instance): Likewise.
829 (vect_detect_hybrid_slp_stmts): Likewise.
830 (vect_detect_hybrid_slp_1): Likewise.
831 (vect_slp_analyze_operations): Likewise.
832 (vect_slp_analyze_bb_1): Likewise.
833 (vect_transform_slp_perm_load): Likewise.
834 (vect_schedule_slp_instance): Likewise.
835 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
836 (vect_mark_stmts_to_be_vectorized): Likewise.
837 (vect_init_vector_1): Likewise.
838 (vect_get_vec_def_for_operand): Likewise.
839 (vect_finish_stmt_generation_1): Likewise.
840 (vect_check_load_store_mask): Likewise.
841 (vectorizable_call): Likewise.
842 (vectorizable_conversion): Likewise.
843 (vectorizable_operation): Likewise.
844 (vectorizable_load): Likewise.
845 (vect_analyze_stmt): Likewise.
846 (vect_is_simple_use): Likewise.
847 (vect_get_vector_types_for_stmt): Likewise.
848 (vect_get_mask_type_for_stmt): Likewise.
849 * tree-vectorizer.c (increase_alignment): Likewise.
851 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
853 * doc/rtl.texi: Adjust vec_select description.
854 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
855 non-constant selectors.
857 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
859 * config/aarch64/aarch64-protos.h
860 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
861 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
862 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
863 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
864 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
865 (AARCH64_FL_PROFILE): Move index so flags are ordered.
866 (AARCH64_ISA_RCPC8_4): New flag.
867 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
868 to aarch64_offset_9bit_signed_unscaled_p.
869 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
871 * config/aarch64/constraints.md (Ust): New constraint.
872 * config/aarch64/predicates.md.
873 (aarch64_9bit_offset_memory_operand): New predicate.
874 (aarch64_rcpc_memory_operand): New predicate.
876 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
878 PR rtl-optimization/87361
879 * rtlanal.c (nonzero_bits1): Revert accidental change.
881 2018-09-19 Richard Biener <rguenther@suse.de>
883 PR tree-optimization/87349
884 PR tree-optimization/87342
885 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
887 2018-09-18 Marek Polacek <polacek@redhat.com>
889 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
890 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
892 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
894 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
896 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
898 PR rtl-optimization/86882
899 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
901 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
903 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
904 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
906 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
909 * doc/invoke.texi (Link Options): Fix formatting and grammar.
911 2018-09-18 Richard Biener <rguenther@suse.de>
914 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
915 (compute_samebase_partition_bases): Likewise.
916 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
917 (gimple_can_coalesce_p): Simplify.
919 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
921 Handle a library implementation of ffs calling __builtin_ffs.
922 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
923 (mmix_init_libfuncs): New function: make __builtin_ffs expand
926 2018-09-17 David Malcolm <dmalcolm@redhat.com>
928 * diagnostic-show-locus.c (class layout_range): Add field
930 (layout_range::layout_range): Add "original_idx" param and use it
931 to initialize new field.
932 (make_range): Use 0 for original_idx.
933 (layout::layout): Pass in index to calls to
934 maybe_add_location_range.
935 (layout::maybe_add_location_range): Add param "original_idx" and
936 pass it on to layout_range.
937 (layout::print_any_labels): Pass on range->m_original_idx to
939 (gcc_rich_location::add_location_if_nearby): Use 0 for
941 * gcc-rich-location.h (text_range_label::get_text): Update for new
943 (range_label_for_type_mismatch::get_text): Likewise.
945 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
947 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
949 2018-09-17 David Malcolm <dmalcolm@redhat.com>
951 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
952 format_string_diagnostic_t.
953 (fmtwarn_n): Likewise.
954 * substring-locations.c
955 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
956 (format_warning_n_va): Convert to...
957 (format_string_diagnostic_t::emit_warning_n_va): ...this.
958 (format_warning_va): Convert to...
959 (format_string_diagnostic_t::emit_warning_va): ...this.
960 (format_warning_at_substring): Convert to...
961 (format_string_diagnostic_t::emit_warning): ...this.
962 (format_warning_at_substring_n): Convert to...
963 (format_string_diagnostic_t::emit_warning_n): ...this.
964 * substring-locations.h (class format_string_diagnostic_t): New
966 (format_warning_va): Convert to
967 format_string_diagnostic_t::emit_warning_va.
968 (format_warning_n_va): Convert to
969 format_string_diagnostic_t::emit_warning_n_va.
970 (format_warning_at_substring): Convert to
971 format_string_diagnostic_t::emit_warning.
972 (format_warning_at_substring_n): Convert to
973 format_string_diagnostic_t::emit_warning_n.
975 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
976 Bernd Schmidt <bernds_cb1@t-online.de>
978 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
981 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
983 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
984 operand 0 predicate to nonimmediate operand.
985 (rint<mode>2_frndint): Remove insn pattern.
986 (rint<mode>2): Change operand 1 predicate to general_operand.
987 Extend operand 1 to XFmode and generate rintxf2 insn.
988 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
989 Do not use X87MODEF mode macro.
990 (frndintxf2_<rounding>_i387): Rename from
991 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
992 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
993 to XFmode and generate significandxf3 insn.
995 2018-09-17 Richard Biener <rguenther@suse.de>
997 PR tree-optimization/87328
998 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
999 visiting unexecutable backedges when not iterating.
1000 (do_rpo_vn): Mark all edges not executable even when not
1003 2018-09-17 Martin Jambor <mjambor@suse.cz>
1006 * doc/invoke.texi (Warning Options): Likewise.
1008 2018-09-17 Richard Biener <rguenther@suse.de>
1010 PR tree-optimization/87301
1011 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
1012 clean EH info from leftover copy assignments.
1014 2018-09-17 Martin Liska <mliska@suse.cz>
1016 PR gcov-profile/85871
1017 * gcov.c (output_intermediate_file): Fix out of bounds
1020 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
1022 * config/arc/arc.c: Object attributes for core4 not reflected
1024 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
1027 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
1029 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
1031 2018-09-17 Martin Liska <mliska@suse.cz>
1033 * doc/gcov.texi: Document new option --use-hotness-colors.
1034 * gcov.c (struct source_info): Declare new field.
1035 (source_info::source_info): Set default for maximum_count.
1036 (print_usage): Add new -q option.
1037 (process_args): Process it.
1038 (accumulate_line_info): Save src->maximum_count.
1039 (output_line_beginning): Make color line number if
1040 flag_use_hotness_colors is set.
1041 (output_line_details): Pass default argument value.
1042 (output_lines): Pass src->maximum_count.
1044 2018-09-17 Martin Liska <mliska@suse.cz>
1046 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
1047 Use processor_names table.
1048 * config/i386/i386.c (ix86_default_align): Use
1049 processor_cost_table for alignment values.
1050 (ix86_option_override_internal): Use processor_names.
1051 (ix86_function_specific_print): Likewise.
1052 * config/i386/i386.h (struct processor_costs):
1053 Add alignment values.
1054 (struct ptt): Remove and replace with const char *.
1055 * config/i386/x86-tune-costs.h (struct processor_costs):
1056 Declare default alignments for all costs.
1058 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
1060 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
1061 symbolics or VR_VARYING ranges for ABS_EXPR.
1062 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
1063 when range will wrap.
1065 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
1068 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
1069 before and after a JUMP_TABLE_DATA.
1071 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
1074 * dojump.c (do_compare_and_jump): Canonicalize function pointers
1075 when one operand is a function pointer. Use POINTER_TYPE_P and
1076 FUNC_OR_METHOD_TYPE_P.
1077 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
1078 * fold-const.c (build_range_check): Likewise.
1079 * match.pd (simple_comparison): Likewise.
1081 2018-09-14 David Malcolm <dmalcolm@redhat.com>
1084 * spellcheck.c (get_edit_distance_cutoff): New function.
1085 (selftest::test_edit_distance_unit_test_oneway): Rename to...
1086 (selftest::test_get_edit_distance_one_way): ...this.
1087 (selftest::test_get_edit_distance_unit): Rename to...
1088 (selftest::test_get_edit_distance_both_ways): ...this.
1089 (selftest::test_edit_distances): Move tests to this new function,
1090 and test some more pairs of strings. Update for above renaming.
1091 (selftest::get_old_cutoff): New function.
1092 (selftest::test_get_edit_distance_cutoff): New function.
1093 (selftest::assert_suggested_for): New function.
1094 (ASSERT_SUGGESTED_FOR): New macro.
1095 (selftest::assert_not_suggested_for): New function.
1096 (ASSERT_NOT_SUGGESTED_FOR): New macro.
1097 (selftest::test_suggestions): New function.
1098 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
1099 tests to selftest::test_edit_distances and call it. Add calls to
1100 selftest::test_get_edit_distance_cutoff and
1101 selftest::test_suggestions.
1102 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
1103 (best_match::consider): Replace hard-coded cutoff calculation with
1105 (best_match::get_cutoff): New declaration.
1106 (best_match::get_best_meaningful_candidate): Likewise.
1108 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1110 * builtins.c (fold_builtin_strlen): Remove TODO comment.
1112 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1115 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1117 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1118 terminated string literal.
1120 2018-09-14 Martin Sebor <msebor@redhat.com>
1122 * builtins.c (unterminated_array): Handle ARRAY_REF.
1123 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
1124 * builtins.h (unterminated_array): Declare extern.
1125 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
1127 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
1130 2018-09-14 Martin Sebor <msebor@redhat.com>
1131 Jeff Law <law@redhat.com>
1133 * builtins.c (unterminated_array): New.
1134 (expand_builtin_strcpy): Adjust.
1135 (expand_builtin_strcpy_args): Detect unterminated arrays.
1136 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
1137 unterminated arrays.
1138 * gimple-fold.h (get_maxval_strlen): Add argument.
1139 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
1141 * gimple-fold.c (get_range_strlen): Add argument.
1142 (get_maxval_strlen): Adjust.
1143 * gimple-fold.h (get_range_strlen): Add argument.
1145 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
1147 * config/i386/movdirintrin.h: Fix copyright year.
1149 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
1151 * reg-stack.c: Include regs.h.
1152 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
1153 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
1154 FIRST_STACK_REG, not DFmode.
1155 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
1156 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
1157 (change stack): Default register mode to the reg_raw_mode of
1158 FIRST_STACK_REG, not DFmode.
1159 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
1160 (*swapxf): Rename from swapxf.
1162 2018-09-14 Carl Love <cel@us.ibm.com>
1164 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
1165 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
1167 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
1170 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
1173 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
1176 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
1178 2018-09-14 Jason Merrill <jason@redhat.com>
1180 Fix --enable-gather-detailed-mem-stats.
1181 * hash-table.c (hash_table_usage): Change from variable to function.
1182 * hash-table.h: Adjust.
1183 * Makefile.in: Add missing dependencies on hash-table.h.
1185 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1187 PR tree-optimization/87259
1189 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
1190 execute_cse_reciprocals_1 has tried transforming.
1192 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
1194 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
1195 VR_VARYING for PLUS/MINUS_EXPR.
1197 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
1199 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
1202 2018-09-14 Richard Biener <rguenther@suse.de>
1205 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
1206 bits for the merged partition.
1208 2018-09-13 Martin Sebor <msebor@redhat.com>
1209 Bernd Edlinger <bernd.edlinger@hotmail.de>
1211 * builtins.h (c_srlen): Add argument.
1212 * builtins.c (warn_string_no_nul): New function.
1213 (c_strlen): Add argument and use it. Update recursive calls.
1214 Pass DECL argument to string_constant to get info on non
1215 terminated strings. Update *NONSTR as needed.
1216 (fold_builtin_strlen): Add argument to calls to c_strlen.
1217 Warn for unterminated arrays.
1218 (warn_string_no_null): Add prototype.
1219 * expr.c (string_constant): Update arguments. Update recursive
1220 calls appropriately. Detect missing NUL terminator and outermost
1221 declaration its missing in.
1222 Improve checks for arrays with nonzero lower bound or elements
1223 that are not a single byte. Simplify offset computation.
1224 Simplify checks for non-NUL terminated strings.
1225 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
1226 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
1228 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1230 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
1232 * fold-const.c (c_getstr): Fix function comment. Remove unused third
1233 argument. Fix range checks.
1234 * fold-const.h (c_getstr): Adjust protoype.
1235 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
1236 string is constant but contains no NUL byte.
1238 * expr.c (string_constant): Adjust function comment.
1239 Remove bogus check for zero termination.
1241 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
1243 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
1244 (get_constant_size): Don't make STRING_CSTs larger than they are.
1245 (check_string_literal): New check function for STRING_CSTs.
1246 (output_constant): Use it.
1248 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
1251 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
1253 2018-09-13 Richard Biener <rguenther@suse.de>
1255 PR tree-optimization/87263
1256 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
1257 (struct unwind_state): Add max_rpo field.
1258 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
1259 Compute max_rpo, the max RPO number a block can be backwards reached
1260 from. Re-write non-iterating mode to a RPO ordered worklist approach,
1261 separating it from the iterating mode.
1263 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
1265 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
1266 (rfs_decision): New scheduling decision.
1268 2018-09-13 Richard Biener <rguenther@suse.de>
1271 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
1272 (vn_nary_op_insert_pieces_predicated): Do not write useless
1273 valid_dominated_by_p entry outside of the allocated storage.
1275 2018-09-13 Omar Sandoval <osandov@osandov.com>
1276 Tom de Vries <tdevries@suse.de>
1279 * dwarf2out.c (is_c): New function.
1280 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
1282 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
1285 * config/aarch64/aarch64.md (*aarch64_bfxil):
1287 * config/aarch64/constraints.md (Ulc): Define.
1288 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
1290 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
1293 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
1295 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
1296 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
1297 aarch64_layout_frame call.
1298 (aarch64_expand_epilogue): Likewise.
1299 (aarch64_initial_elimination_offset): Likewise.
1300 (aarch64_get_separate_components): Likewise.
1301 (aarch64_use_return_insn_p): Likewise.
1302 (aarch64_layout_frame): Remove unneeded check.
1304 2018-09-13 Jakub Jelinek <jakub@redhat.com>
1306 * configure.ac: Only append
1307 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
1308 gcc_config_arguments if it was never reconfigured or last reconfigure
1309 was with different arguments.
1310 * configure: Regenerated.
1312 2018-09-13 Jakub Jelinek <jakub@redhat.com>
1313 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1316 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
1317 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
1319 2018-09-13 Jakub Jelinek <jakub@redhat.com>
1321 PR tree-optimization/87287
1322 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
1323 X % C == 0 to X % (unsigned) C == 0 optimization to ...
1324 * match.pd (X % C == 0): ... here. New optimization.
1326 2018-09-12 Jakub Jelinek <jakub@redhat.com>
1329 * expr.h (maybe_optimize_mod_cmp): Declare.
1330 * expr.c (mod_inv): New function.
1331 (maybe_optimize_mod_cmp): New function.
1332 (do_store_flag): Use it.
1333 * cfgexpand.c (expand_gimple_cond): Likewise.
1335 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
1336 Julian Brown <julian@codesourcery.com>
1339 * gimplify.c (gimplify_scan_omp_clauses): Set
1340 target_firstprivatize_array_bases in OpenACC parallel and kernels
1341 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
1342 OpenACC data regions.
1344 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
1346 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
1347 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
1349 2018-09-12 Richard Biener <rguenther@suse.de>
1351 PR tree-optimization/87280
1352 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
1353 edge but unreachable target.
1354 (do_rpo_vn): For conservatively handling a PHI only mark
1355 the backedge executable but not the block reachable.
1357 2018-09-12 Richard Biener <rguenther@suse.de>
1359 PR tree-optimization/87266
1360 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
1363 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
1365 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
1367 ("trunc<BFP:mode><DFP_ALL:mode>2")
1368 ("trunc<DFP_ALL:mode><BFP:mode>2")
1369 ("extend<BFP:mode><DFP_ALL:mode>2")
1370 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
1371 according to the target operand type.
1373 2018-09-12 Jakub Jelinek <jakub@redhat.com>
1374 Andreas Krebbel <krebbel@linux.ibm.com>
1376 PR tree-optimization/86844
1377 * gimple-ssa-store-merging.c
1378 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
1379 there are any overlapping stores in between them, make sure they are
1380 also coalesced or we give up completely.
1382 2018-09-12 Jakub Jelinek <jakub@redhat.com>
1385 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
1386 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
1388 2018-09-12 Tom de Vries <tdevries@suse.de>
1390 * common.opt (gdescribe-dies): Add option.
1391 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
1392 attribute for artifical and nameless decls.
1393 (dwarf2out_register_external_die): Add description attribute to
1394 external reference die.
1395 (add_desc_attribute): New functions.
1396 (gen_subprogram_die): Add description attribute to
1397 DW_TAG_call_site_parameter.
1398 * tree-pretty-print.c (print_generic_expr_to_str): New function.
1399 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
1400 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
1402 (@item -gdescribe-dies): Add.
1404 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
1406 * tree-vrp.c (vrp_shift_undefined_p): Remove.
1407 (extract_range_from_binary_expr_1: Call
1408 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
1409 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
1412 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
1414 * gimple-ssa-warn-alloca.c
1415 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
1416 field for ALLOCA_BOUND_*_LARGE.
1418 2018-09-11 Nathan Sidwell <nathan@acm.org>
1420 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
1422 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1424 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
1425 for clobbers. Remove obsolete comment.
1427 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1429 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
1430 mpxchk, mpxld and mpxst types.
1431 (define_attr length_immediate): Remove all processing of mpx types.
1432 (define_attr prefix_0f): Ditto.
1433 (define_attr memory): Ditto.
1435 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1437 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
1438 (log<mode>2): Change operand 1 predicate to general_operand.
1439 Extend operand 1 to XFmode and generate logxf3 insn.
1440 (log10<mode>2): Change operand 1 predicate to general_operand.
1441 Extend operand 1 to XFmode and generate log10xf3 insn.
1442 (log2<mode>2): Change operand 1 predicate to general_operand.
1443 Extend operand 1 to XFmode and generate log2xf3 insn.
1444 (fyl2xp1_extend<mode>xf3_i387): Remove.
1445 (log1p<mode>2): Change operand 1 predicate to general_operand.
1446 Extend operand 1 to XFmode and generate log1pxf3 insn.
1447 (fxtract_extend<mode>xf3_i387): Remove.
1448 (logb<mode>2): Change operand 1 predicate to general_operand.
1449 Extend operand 1 to XFmode and generate logbxf3 insn.
1450 (ilogb<mode>2): Change operand 1 predicate to general_operand.
1451 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
1452 (significand<mode>2): Change operand 1 predicate to general_operand.
1453 Extend operand 1 to XFmode and generate significandxf3 insn.
1455 2018-09-11 Nathan Sidwell <nathan@acm.org>
1457 * gcc.c (perror_with_name, pfatal_with_name): Delete.
1458 (load_specs): Use fatal_error.
1459 (DELETE_IF_ORDINARY, process_command): Use error.
1460 (execute, run_attempt): Use fatal_error.
1462 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
1464 * diagnostic-core.h (sorry_at): New prototype.
1465 * diagnostic.c (sorry_at): New function.
1467 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
1469 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
1470 by zero as VR_UNDEFINED.
1472 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1474 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
1475 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
1476 (<sincos>mode2): New expander.
1477 (sincos_extend<mode>xf3_i387): Remove insn pattern.
1478 (sincos -> sin, cos splitters): Remove splitter patterns.
1479 (sincos<mode>3): Change operand 2 predicate to general_operand.
1480 Extend operand 2 to XFmode and generate sincosxf3 insn.
1481 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
1482 Change operand 3 predicate to const1_operand.
1483 (fptan_extend<mode>xf4_i387): Remove insn pattern.
1484 (tanxf2): Update operands in the call to fptanxf4_i387.
1485 (tan<mode>2): Change operand 1 predicate to general_operand.
1486 Extend operand 1 to XFmode and generate tanxf3 insn.
1487 (atan2xf3): Rename from *fpatanxf3_i387.
1488 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
1489 (atan2xf3): Remove expander.
1490 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
1491 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
1492 (atan<mode>2): Change operand 1 predicate to general_operand.
1493 Extend operand 1 to XFmode and generate atanxf3 insn.
1495 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1497 * config/i386/i386.md (x87/SSE constant load splitter): Use
1498 memory_operand instead of nonimmediate_operand for input operand
1501 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
1503 * config/i386/i386.md (float partial SSE register stall splitter): Move
1504 splitter near its instruction pattern.
1505 (float_extend partial SSE register stall splitter): Ditto.
1506 (float_truncate partial SSE register stall splitter): Ditto.
1508 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
1511 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1512 to speculation_safe_value_not_needed.
1515 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
1516 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
1517 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
1518 leaf_function_p, instead use has_hard_reg_initial_val.
1520 2018-09-09 Nathan Sidwell <nathan@acm.org>
1522 * gcc.h (pfatal_with_name): Don't declare here.
1523 * gcc.c (pfatal_with_name): Make static.
1525 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
1527 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
1530 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
1532 PR rtl-optimization/85458
1533 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
1534 priority hook to reduce the priority of EXPR.
1536 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
1538 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
1539 DImode for x87 on 32bit targets. Conditionally disable x87 modes
1540 with X87_ENABLE_FLOAT. Remove preparation code.
1541 (*float<SWI48:mode><MODEF:mode>2): Rename from
1542 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
1543 math using "enabled" attribute.
1544 (*floatdi<MODEF:mode>2_i387): Rename from
1545 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
1546 enable for 32bit targets only.
1547 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
1549 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
1550 as operand 1 predicate. Rewrite as define_insn_and_split.
1551 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
1553 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1555 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
1556 to fallthru to FLOAT case.
1558 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1561 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
1562 around folding of vec_sl to handle out of range shift values.
1564 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1566 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
1567 Update callers to gen_fix_trunc<mode>_i387_fisttp
1568 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
1569 nonimmediate_operand.
1570 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
1571 and corresponding splitters.
1572 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
1573 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
1574 (fix_truncdi_i387_with_temp): Remove insn pattern
1575 and corresponding splitters.
1576 (fix_trunc<mode>_i387): Change operand 0 predicate to
1577 nonimmediate_operand.
1578 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
1579 and corresponding splitters.
1580 (*fistdi2_1): Remove.
1582 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
1583 (lrintxfdi2): Remove expander. Reimplement as define_insn.
1584 (*fist<mode>2_1): Remove.
1585 (fist<mode>2): Ditto.
1586 (fist<mode>2_with_temp): Remove insn pattern and corresponding
1588 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
1589 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
1590 (fistdi2_<rounding>): Change operand 0 predicate to
1591 nonimmediate_operand.
1592 (fistdi2_<rounding>_with_temp): Remove insn pattern
1593 and corresponding splitters.
1594 (fist<mode>2_<rounding>): Change operand 0 predicate to
1595 nonimmediate_operand.
1596 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
1597 and corresponding splitters.
1599 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
1601 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1603 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1606 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1608 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1609 early gimple folding of vec_splat().
1610 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1611 * gimple-fold.h: Add an extern define for tree_vec_extract().
1613 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1615 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1616 wrappers around TREE_TYPE comparisons.
1618 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1621 * config/s390/predicates.md: Add nonsym_memory_operand.
1622 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1623 contains a SYMBOL_REF, load it into an intermediate pseudo.
1624 (s390_emit_compare_and_swap): Legitimize operand.
1625 * config/s390/s390.md: Use the new nonsym_memory_operand
1626 with UNSPECV_CAS patterns.
1628 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1631 * config/s390/s390-passes.def: New file.
1632 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1634 (make_pass_s390_early_mach): Add declaration.
1635 * config/s390/s390.c (make_pass_s390_early_mach):
1636 (s390_option_override): Remove dynamic registration.
1637 * config/s390/t-s390: Add s390-passes.def.
1639 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1641 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1642 Remove UNSPEC_LTREL_BASE check.
1643 (annotate_constant_pool_refs): Likewise.
1644 (find_constant_pool_ref): Likewise.
1645 (find_ltrel_base): Removed.
1646 (replace_ltrel_base): Removed.
1647 (s390_mainpool_finish): Remove replace_ltrel_base call.
1648 (s390_chunkify_start): Remove pending LTREL_BASE logic.
1649 (s390_chunkify_finish): Remove replace_ltrel_base call.
1650 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1652 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
1655 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1656 to speculation_safe_value_not_needed.
1658 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
1659 Bernd Schmidt <bernds_cb1@t-online.de>
1661 * config/nvptx/nvptx-opts.h: New file.
1662 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1663 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1665 (TARGET_SM35): New macro.
1666 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1668 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1670 (misa=): New option.
1671 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1673 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
1675 * config/i386/i386.md (truncdfsf2): Remove expander.
1676 (truncdfsf2_with_temp): Ditto.
1677 (truncxf<mode>2): Ditto.
1678 (*truncdfsf_fast_mixed): Remove insn pattern.
1679 (*truncdfsf_fast_i387): Ditto.
1680 (*truncdfsf_mixed): Ditto.
1681 (*truncdfsf_i387): Ditto.
1682 (*truncdfsf2_i387_1): Ditto.
1683 (*truncxfsf2_mixed): Ditto.
1684 (*truncxfdf2_mixed): Ditto.
1685 (*truncxf<mode>2_i387_noop): Ditto. Update callers
1686 to call gen_truncxf<mode>2 instead.
1687 (*truncxf<mode>2_i387): Remove.
1688 (reg->reg splitters): Remove splitter pattern.
1689 (reg->mem splitters): Ditto.
1691 (truncdfsf2): New insn pattern.
1692 (truncxf<mode>2): Ditto.
1694 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1696 * tree-ssa-math-opts.c (is_mult_by): New function.
1697 (is_square_of): Use the above.
1698 (optimize_recip_sqrt): New function.
1699 (pass_cse_reciprocals::execute): Use the above.
1701 2018-09-05 Richard Biener <rguenther@suse.de>
1704 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1705 to zero-init the emplaced vec.
1707 2018-09-05 Martin Liska <mliska@suse.cz>
1709 PR tree-optimization/87205
1710 * tree-switch-conversion.c (pass_lower_switch::execute):
1711 Group cases for switch statements.
1713 2018-09-05 Richard Biener <rguenther@suse.de>
1715 PR tree-optimization/87217
1716 * tree-ssa-sccvn.c (vuse_valueize): New.
1717 (vn_reference_lookup_pieces): Use it.
1718 (vn_reference_lookup): Likewise.
1720 2018-09-05 Nathan Sidwell <nathan@acm.org>
1723 * stor-layout.c (place_field): Scan forwards to check last
1724 bitfield when ms_bitfield_placement is in effect.
1726 2018-09-05 Richard Biener <rguenther@suse.de>
1729 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1732 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
1733 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1735 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1736 * config.gcc (extra_objs): Build it.
1737 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1739 * config/aarch64/aarch64-passes.def
1740 (pass_tag_collision_avoidance): New pass.
1741 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1742 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1743 (aarch64_classify_address): Remove static qualifier.
1744 (aarch64_address_info, aarch64_address_type): Move to...
1745 * config/aarch64/aarch64-protos.h: ... here.
1746 (make_pass_tag_collision_avoidance): New function.
1747 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1750 2018-09-05 Martin Liska <mliska@suse.cz>
1752 * doc/gcov.texi: Update documentation of humar
1754 * gcov.c (format_count): Print one decimal place, it provides
1755 more fine number of situations like '1G' vs. '1.4G'.
1757 2018-09-05 Martin Liska <mliska@suse.cz>
1760 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1761 * optc-gen.awk: Allow 'Var' for Deprecated options in order
1762 to generate a MASK value.
1764 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
1767 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1768 if frame pointer isn't used.
1769 (compute_frame_pointer_to_fb_displacement): Likewise.
1771 2018-09-04 Jakub Jelinek <jakub@redhat.com>
1774 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1775 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1776 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1777 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1778 and OPTION_MASK_ISA_XSAVEC_UNSET.
1780 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
1782 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1783 XOR operations in NAND case.
1785 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1787 * wide-int-range.cc (wide_int_range_convert): New.
1788 * wide-int-range.h (wide_int_range_convert): New.
1789 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1790 code into wide_int_range_convert.
1791 (extract_range_into_wide_ints): Do not munge anti range constants
1792 into the entire domain. Just return the range back.
1794 2018-09-04 Martin Liska <mliska@suse.cz>
1796 * genmatch.c (output_line_directive): Add new argument
1798 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1800 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1802 * doc/invoke.texi (Option Summary): Add whitespace.
1804 * doc/invoke.texi (Option Summary): Add -Waligned-new.
1806 2018-09-04 Richard Biener <rguenther@suse.de>
1808 PR tree-optimization/87211
1809 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1810 backedge value we're supposed to treat as VARYING also number
1811 the PHI to VARYING in case it got a different value-number already.
1813 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1815 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1816 (extract_range_from_binary_expr_1): Do not call
1817 vrp_can_optimize_bit_op.
1818 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1820 (wide_int_range_get_mask_and_bounds): New.
1821 (wide_int_range_optimize_bit_op): New.
1822 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1823 (wide_int_range_bit_and): Same.
1824 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1825 (wide_int_range_optimize_bit_op): New.
1826 (wide_int_range_get_mask_and_bounds): New.
1828 2018-09-04 Richard Biener <rguenther@suse.de>
1830 PR tree-optimization/87176
1831 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1832 variable. When value-numbering a virtual PHI node make sure
1833 to not value-number to the backedge value.
1835 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1837 * doc/extend.texi (Long Long, Hex Floats): Document support for
1838 long long and hex floats in more recent versions of ISO C++.
1840 2018-09-03 Richard Biener <rguenther@suse.de>
1842 PR tree-optimization/87177
1843 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1846 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1848 * bb-reorder.c (edge_order): Convert to C-qsort-style
1849 tri-state comparator.
1850 (reorder_basic_blocks_simple): Change std::stable_sort to
1853 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1855 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1856 tri-state comparator.
1857 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1859 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1861 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
1862 (mergesort): ... here as maximum count for using netsort.
1863 (gcc_qsort): Set nlim to 3 if stable sort is requested.
1864 (gcc_stablesort): New.
1865 * system.h (gcc_stablesort): Declare.
1867 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1869 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1870 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
1871 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
1873 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
1875 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1876 lxsdx and stxsdx alternatives.
1877 (*mov<mode>_hardfloat64): Ditto.
1878 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1880 2018-09-03 Richard Biener <rguenther@suse.de>
1882 PR tree-optimization/87200
1883 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1886 2018-09-03 Martin Liska <mliska@suse.cz>
1888 PR tree-optimization/87201
1889 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1890 Fix parenthesis in an expression.
1892 2018-09-03 Richard Biener <rguenther@suse.de>
1894 PR tree-optimization/87197
1895 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1896 visited. CSE the VN_INFO hashtable lookup.
1898 PR tree-optimization/87169
1899 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1900 iterating make sure there's no extra backedges from irreducible
1901 regions feeding the header. Mark the destination block
1904 2018-09-03 Martin Liska <mliska@suse.cz>
1907 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1908 * common/common-targhooks.c (default_get_valid_option_values):
1910 * common/common-targhooks.h (default_get_valid_option_values):
1912 * common/config/i386/i386-common.c: Move processor_target_table
1914 (ix86_get_valid_option_values): New function.
1915 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1916 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1917 (PTA_*): Move all defined masks into i386-common.c.
1918 (ix86_function_specific_restore): Use new processor_cost_table.
1919 * config/i386/i386.h (struct ptt): Moved from i386.c.
1920 (struct pta): Likewise.
1921 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1922 * doc/tm.texi.in: Likewise.
1923 * opt-suggestions.c (option_proposer::suggest_option):
1924 Pass prefix to build_option_suggestions.
1925 (option_proposer::get_completions): Likewise.
1926 (option_proposer::build_option_suggestions): Use the new target
1928 * opts.c (struct option_help_tuple): New struct.
1929 (print_filtered_help): Use the new target hook.
1931 2018-09-03 Martin Liska <mliska@suse.cz>
1934 * predict.c (set_even_probabilities): Add likely_edges
1935 argument and handle cases where we have precisely one
1937 (combine_predictions_for_bb): Catch also likely_edges.
1938 (tree_predict_by_opcode): Handle gswitch statements.
1939 * tree-cfg.h (find_case_label_for_value): New declaration.
1940 (find_taken_edge_switch_expr): Likewise.
1941 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1942 Find pivot in decision tree based on probabily, not by number of
1945 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1947 * doc/standards.texi (Standards): Update Objective-C reference.
1949 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1951 * doc/install.texi (Prerequisites): Update link for MPC.
1953 2018-09-01 Michael Matz <matz@suse.de>
1955 PR tree-optimization/87074
1956 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1957 PHIs for outer-loop uses.
1959 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1961 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1962 * doc/invoke.texi (C Dialect Options): Ditto.
1964 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1966 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1968 2018-08-31 Richard Biener <rguenther@suse.de>
1970 PR tree-optimization/87168
1971 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1972 (rpo_elim::eliminate_avail): When OP was not visited it must
1975 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1977 * tree-vrp.c (copy_value_range): Convert param "from" from
1978 "value_range *" to "const value_range *".
1979 (range_is_null): Likewise for param "vr".
1980 (range_int_cst_p): Likewise.
1981 (range_int_cst_singleton_p): Likewise.
1982 (symbolic_range_p): Likewise.
1983 (value_ranges_intersect_p): Likewise for both params.
1984 (value_range_nonnegative_p): Likewise for param "vr".
1985 (value_range_constant_singleton): Likewise.
1986 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1987 (extract_range_into_wide_ints): Likewise for param "vr".
1988 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1990 (vrp_can_optimize_bit_op): Likewise.
1991 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1993 (extract_range_from_unary_expr): Likewise.
1994 (debug_value_range): Likewise for param "vr".
1995 (value_range::dump): Add "const" qualifier.
1996 (vrp_prop::check_array_ref): Convert local "vr" from
1997 "value_range *" to "const value_range *".
1998 (vrp_prop::check_mem_ref): Likewise.
1999 (vrp_prop::visit_stmt): Likewise for local "old_vr".
2000 (vrp_intersect_ranges_1): Likewise for param "vr_1".
2001 (vrp_intersect_ranges): Likewise.
2002 (simplify_stmt_for_jump_threading): Likewise for local "vr".
2003 (vrp_prop::vrp_finalize): Likewise.
2004 * tree-vrp.h (value_range::dump): Add "const" qualifier.
2005 (vrp_intersect_ranges): Add "const" qualifier to params as above.
2006 (extract_range_from_unary_expr): Likewise.
2007 (value_range_constant_singleton): Likewise.
2008 (symbolic_range_p): Likewise.
2009 (copy_value_range): Likewise.
2010 (extract_range_from_binary_expr_1): Likewise.
2011 (range_int_cst_p): Likewise.
2012 (vrp_set_zero_nonzero_bits): Likewise.
2013 (range_int_cst_singleton_p): Likewise.
2015 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
2017 * config/aarch64/arm_neon.h (vabsd_s64): New.
2018 (vnegd_s64): Likewise.
2020 2018-08-31 Martin Jambor <mjambor@suse.cz>
2022 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
2024 2018-08-31 Martin Liska <mliska@suse.cz>
2026 * ipa-icf.c (sem_item::add_type): Use
2027 sem_item::m_type_hash_cache.
2028 * ipa-icf.h: Move the cache from sem_item_optimizer
2031 2018-08-31 Nathan Sidwell <nathan@acm.org>
2033 * doc/extend.texi (Backwards Compatibility): Remove implicit
2034 extern C leeway of () being (...).
2036 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2038 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
2040 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
2044 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
2046 2018-08-31 Jakub Jelinek <jakub@redhat.com>
2049 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
2050 gen_int_mode. Formatting fixes.
2052 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
2054 * target.def (custom_function_descriptors): Improve documentation.
2055 * doc/tm.texi.in (Trampolines): Expand discussion of function
2056 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
2057 beginning of the section.
2058 * doc/tm.texi: Regenerated.
2060 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
2062 * cfg.h (class auto_edge_flag): Spell out the template-id of the
2063 base class in the initializer list. This is a workaround for
2064 building with older GCC.
2065 (class auto_bb_flag): Likewise.
2067 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2069 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
2070 (altivec_vcmpequ<VI_char>_p): Remove star.
2071 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
2073 (expand_strncmp_vec_sequence): New function.
2074 (emit_final_str_compare_vec): New function.
2075 (expand_strn_compare): Add support for vector strncmp.
2076 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
2077 length specification to bytes.
2078 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
2079 (vcmpnezb_p): New pattern.
2080 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
2081 for option -mstring-compare-inline-limit.
2083 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
2085 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
2086 (PTA_SKYLAKE): Add PTA_AES.
2087 (PTA_GOLDMONT): Likewise.
2089 2018-08-29 Jan Hubicka <jh@suse.cz>
2092 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
2093 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
2095 2018-08-29 Jan Hubicka <jh@suse.cz>
2097 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
2099 (hash_tree): Do not visit TYPE_STUB_DECL.
2100 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
2101 stream TYPE_STUB_DECL.
2102 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
2103 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
2104 after free_lang_data.
2105 (type_in_anonymous_namespace_p): Likewise.
2107 2018-08-29 Jan Hubicka <jh@suse.cz>
2109 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
2110 comment that it has to be even number.
2111 (class sreal): Change m_sig type to int32_t.
2112 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
2113 int64_t for temporary calculations.
2114 (sreal_verify_basics): Drop one bit from minimum and maximum.
2116 2018-08-30 Richard Biener <rguenther@suse.de>
2118 PR tree-optimization/87147
2119 * tree-ssa-sccvn.c (SSA_VISITED): New function.
2120 (visit_phi): When the degenerate result is from the backedge and
2121 we didn't visit its definition yet drop to VARYING.
2122 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
2124 2018-08-29 Jan Hubicka <jh@suse.cz>
2126 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
2128 (hash_tree): Likewise.
2130 2018-08-29 Jan Hubicka <jh@suse.cz>
2132 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
2133 and TYPE_NEXT_REF_TO.
2135 2018-08-29 Jan Hubicka <jh@suse.cz>
2137 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
2138 comment that it has to be even number.
2139 (class sreal): Change m_sig type to int32_t.
2140 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
2141 int64_t for temporary calculations.
2142 (sreal_verify_basics): Drop one bit from minimum and maximum.
2144 2018-08-30 Tamar Christina <tamar.christina@arm.com>
2146 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
2148 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
2151 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
2152 if to_add is negative.
2154 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
2157 * builtins.c (c_strlen): Improve range checks.
2159 2018-08-29 Martin Sebor <msebor@redhat.com>
2160 Jeff Law <law@redhat.com>
2162 PR tree-optimization/86714
2163 PR tree-optimization/86711
2164 * builtins.c (c_strlen): Add arguments to call to string_constant.
2165 * expr.c (string_constant): Add argument. Detect missing nul
2166 terminator and outermost declaration it's missing in.
2167 * expr.h (string_constant): Add argument.
2168 * fold-const.c (read_from_constant_string): Add arguments to call to
2170 (c_getstr): Likewise.
2171 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2173 * tree-ssa-strlen.c (get_stridx): Likewise.
2175 2018-08-29 Jan Hubicka <jh@suse.cz>
2177 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
2178 Do not stream DECL_VINDEX.
2179 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
2180 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
2181 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
2183 2018-08-29 Richard Biener <rguenther@suse.de>
2185 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
2186 virtual operands that are not default defs to honor region
2188 (rpo_vn_valueize): Remove ineffective code here.
2190 2018-08-29 Richard Biener <rguenther@suse.de>
2192 PR tree-optimization/87132
2193 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
2194 when skipping defs reachable over backedges.
2196 2018-08-29 Richard Biener <rguenther@suse.de>
2198 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
2199 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
2200 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
2201 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
2202 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
2203 (vn_reference_lookup_3): Remove use of const_parms.
2204 (free_rpo_vn): Do not free const_parms.
2205 (do_rpo_vn): Do not call init_const_parms.
2206 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
2207 SSA_NAME_POINTS_TO_READONLY_MEMORY.
2208 (call_may_clobber_ref_p_1): Likewise.
2210 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
2213 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
2215 (-ftree-scev-cprop): Document.
2217 2018-08-29 Jan Hubicka <jh@suse.cz>
2219 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
2221 (sreal constructor): Update.
2222 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
2223 sreal:operator/): Update.
2225 2018-08-29 Martin Liska <mliska@suse.cz>
2227 * tree-switch-conversion.c (switch_conversion::expand):
2228 Strenghten assumption about gswitch statements.
2230 2018-08-29 Richard Biener <rguenther@suse.de>
2232 PR tree-optimization/87117
2233 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
2234 re-value-number released SSA VDEFs.
2236 2018-08-29 Richard Biener <rguenther@suse.de>
2238 PR tree-optimization/87126
2239 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
2241 2018-08-28 Jim Wilson <jimw@sifive.com>
2243 * config/riscv/pic.md: Rewrite.
2244 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
2246 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
2247 (SOFTF, default_load, softload, softstore): New.
2249 2018-08-28 Jeff Law <law@redhat.com>
2251 * fold-const.c (fold_binary_loc): Remove recently added assert.
2253 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
2255 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
2256 to OP parmeter of generated function.
2258 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
2260 PR tree-optimization/87009
2261 * match.pd: Add boolean optimizations.
2263 2018-08-28 Martin Sebor <msebor@redhat.com>
2266 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
2267 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
2268 (pass_walloca::gate): Use it.
2269 (alloca_call_type): Same.
2270 (pass_walloca::execute): Same.
2271 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
2273 2018-08-28 David Malcolm <dmalcolm@redhat.com>
2275 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
2276 GCC_VERSION for usage of "__gcc_dump_printf__" format from
2279 2018-08-28 Richard Biener <rguenther@suse.de>
2281 PR tree-optimization/87124
2282 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
2283 constants before looking up avail.
2285 2018-08-28 Jakub Jelinek <jakub@redhat.com>
2288 * calls.c (maybe_warn_nonstring_arg): Punt early if
2289 warn_stringop_overflow is zero. Don't call get_range_strlen
2290 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
2291 Swap comparison operands to have constants on rhs. Only use
2292 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
2293 increment lenrng[0].
2295 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
2297 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
2298 use of tree_to_shwi. Remove duplicated test for the size being
2299 a whole number of bytes.
2301 2018-08-28 Richard Biener <rguenther@suse.de>
2303 PR tree-optimization/87117
2304 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
2305 Handle removed stmt without LHS (GIMPLE_NOP).
2307 2018-08-28 Richard Biener <rguenther@suse.de>
2309 PR tree-optimization/87117
2310 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
2311 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
2313 2018-08-28 Richard Biener <rguenther@suse.de>
2315 PR tree-optimization/87117
2316 * tree-ssa-pre.c (compute_avail): Do not make expressions
2317 with predicated values available.
2318 (get_expr_value_id): Assert we do not run into predicated value
2321 2018-08-28 Richard Biener <rguenther@suse.de>
2323 PR tree-optimization/87117
2324 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
2325 get virtual operands.
2326 (get_expr_operands): Handle STRING_CST like other decls.
2328 2018-08-28 Martin Liska <mliska@suse.cz>
2330 * tree.h: Update documentation of fndecl_built_in_p
2334 2018-08-27 Jeff Law <law@redhat.com>
2335 PR tree-optimization/87110
2336 * tree-ssa-dse.c (compute_trims): Handle non-constant
2339 2018-08-27 Martin Sebor <msebor@redhat.com>
2341 PR tree-optimization/86914
2342 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
2344 2018-08-27 Martin Sebor <msebor@redhat.com>
2346 PR tree-optimization/87112
2347 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
2348 the type of the bound argument.
2350 2018-08-27 Jeff Law <law@redhat.com>
2352 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
2353 type does not have a TYPE_SIZE_UNIT.
2355 2018-08-27 Steve Ellcey <sellcey@cavium.com>
2357 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
2358 with include of backend.h.
2360 2018-08-27 Richard Biener <rguenther@suse.de>
2362 PR tree-optimization/86927
2363 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
2364 use const cond reduction code.
2366 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
2368 PR tree-optimization/85758
2369 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
2371 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2374 * diagnostic-show-locus.c (class layout_range): Update for
2375 conversion of show_caret_p to a tri-state.
2376 (layout_range::layout_range): Likewise.
2377 (make_range): Likewise.
2378 (layout::maybe_add_location_range): Likewise.
2379 (layout::should_print_annotation_line_p): Don't show annotation
2380 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
2381 (layout::get_state_at_point): Update for conversion of
2382 show_caret_p to a tri-state. Bail out early for
2383 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
2384 underlining or source colorization.
2385 (gcc_rich_location::add_location_if_nearby): Update for conversion
2386 of show_caret_p to a tri-state.
2387 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
2388 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
2390 (selftest::test_one_liner_labels): Likewise.
2391 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
2392 conversion of show_caret_p to a tri-state.
2393 * pretty-print.c (text_info::set_location): Likewise.
2394 * pretty-print.h (text_info::set_location): Likewise.
2395 * substring-locations.c (format_warning_n_va): Likewise.
2396 * tree-diagnostic.c (default_tree_printer): Likewise.
2397 * tree-pretty-print.c (newline_and_indent): Likewise.
2399 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2402 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
2403 line above for line-insertion fix-it hints.
2404 (selftest::test_fixit_insert_containing_newline): Update the
2405 expected results, and add a test with line-numbering enabled.
2407 2018-08-27 Martin Liska <mliska@suse.cz>
2410 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
2411 params with DECL_HAS_VALUE_EXPR_P.
2413 2018-08-27 Martin Liska <mliska@suse.cz>
2415 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
2416 selected expansion strategy.
2418 2018-08-27 Martin Liska <mliska@suse.cz>
2420 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
2421 * builtins.c (is_builtin_fn): Likewise.
2422 * attribs.c (diag_attr_exclusions): Use new function
2423 fndecl_built_in_p and remove check for FUNCTION_DECL if
2425 (builtin_mathfn_code): Likewise.
2426 (fold_builtin_expect): Likewise.
2427 (fold_call_expr): Likewise.
2428 (fold_builtin_call_array): Likewise.
2429 (fold_call_stmt): Likewise.
2430 (set_builtin_user_assembler_name): Likewise.
2431 (is_simple_builtin): Likewise.
2432 * calls.c (gimple_alloca_call_p): Likewise.
2433 (maybe_warn_nonstring_arg): Likewise.
2434 * cfgexpand.c (expand_call_stmt): Likewise.
2435 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
2436 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
2437 (cgraph_node::verify_node): Likewise.
2438 * cgraphclones.c (build_function_decl_skip_args): Likewise.
2439 (cgraph_node::create_clone): Likewise.
2440 * config/arm/arm.c (arm_insert_attributes): Likewise.
2441 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
2442 * dse.c (scan_insn): Likewise.
2443 * expr.c (expand_expr_real_1): Likewise.
2444 * fold-const.c (operand_equal_p): Likewise.
2445 (fold_binary_loc): Likewise.
2446 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
2447 * gimple-low.c (lower_stmt): Likewise.
2448 * gimple-pretty-print.c (dump_gimple_call): Likewise.
2449 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2451 * gimple.c (gimple_build_call_from_tree): Likewise.
2452 (gimple_call_builtin_p): Likewise.
2453 (gimple_call_combined_fn): Likewise.
2454 * gimplify.c (gimplify_call_expr): Likewise.
2455 (gimple_boolify): Likewise.
2456 (gimplify_modify_expr): Likewise.
2457 (gimplify_addr_expr): Likewise.
2458 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
2459 * ipa-cp.c (determine_versionability): Likewise.
2460 * ipa-fnsummary.c (compute_fn_summary): Likewise.
2461 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
2462 * ipa-split.c (visit_bb): Likewise.
2463 (split_function): Likewise.
2464 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2465 * lto-cgraph.c (input_node): Likewise.
2466 * lto-streamer-out.c (write_symbol): Likewise.
2467 * omp-low.c (setjmp_or_longjmp_p): Likewise.
2468 (lower_omp_1): Likewise.
2469 * predict.c (strip_predict_hints): Likewise.
2470 * print-tree.c (print_node): Likewise.
2471 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
2472 * trans-mem.c (is_tm_irrevocable): Likewise.
2473 (is_tm_load): Likewise.
2474 (is_tm_simple_load): Likewise.
2475 (is_tm_store): Likewise.
2476 (is_tm_simple_store): Likewise.
2477 (is_tm_abort): Likewise.
2478 (tm_region_init_1): Likewise.
2479 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
2480 * tree-cfg.c (verify_gimple_call): Likewise.
2481 (move_stmt_r): Likewise.
2482 (stmt_can_terminate_bb_p): Likewise.
2483 * tree-eh.c (lower_eh_constructs_2): Likewise.
2484 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
2485 * tree-inline.c (remap_gimple_stmt): Likewise.
2486 (copy_bb): Likewise.
2487 (estimate_num_insns): Likewise.
2488 (fold_marked_statements): Likewise.
2489 * tree-sra.c (scan_function): Likewise.
2490 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
2491 (optimize_stack_restore): Likewise.
2492 (pass_fold_builtins::execute): Likewise.
2493 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2494 (mark_all_reaching_defs_necessary_1): Likewise.
2495 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
2496 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2497 (pass_forwprop::execute): Likewise.
2498 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2499 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2500 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
2501 * tree-ssa-strlen.c (get_string_length): Likewise.
2502 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
2503 (find_func_aliases_for_call): Likewise.
2504 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
2505 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
2506 * tree-tailcall.c (find_tail_calls): Likewise.
2507 * tree.c (need_assembler_name_p): Likewise.
2508 (free_lang_data_in_decl): Likewise.
2509 (get_call_combined_fn): Likewise.
2510 * ubsan.c (is_ubsan_builtin_p): Likewise.
2511 * varasm.c (incorporeal_function_p): Likewise.
2512 * tree.h (DECL_BUILT_IN): Remove and replace with
2514 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
2515 (fndecl_built_in_p): New.
2517 2018-08-27 Martin Liska <mliska@suse.cz>
2519 PR tree-optimization/86847
2520 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
2521 Dump also subtree probability.
2522 (switch_decision_tree::do_jump_if_equal): New function.
2523 (switch_decision_tree::emit_case_nodes): Handle special
2524 situations in balanced tree that can be emitted much simpler.
2525 Fix calculation of probabilities that happen in tree expansion.
2526 * tree-switch-conversion.h (struct cluster): Add
2528 (struct simple_cluster): Likewise.
2529 (struct case_tree_node): Add new function has_child.
2530 (do_jump_if_equal): New.
2532 2018-08-27 Martin Liska <mliska@suse.cz>
2534 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
2535 Add new argument to bit_test_cluster constructor.
2536 (bit_test_cluster::emit): Set bits really number of values
2538 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
2539 probability argument.
2540 * tree-switch-conversion.h (struct bit_test_cluster):
2541 Add m_handles_entire_switch.
2543 2018-08-27 Martin Liska <mliska@suse.cz>
2545 PR tree-optimization/86702
2546 * tree-switch-conversion.c (jump_table_cluster::emit):
2547 Make probabilities even for values in jump table
2548 according to number of cases handled.
2549 (switch_decision_tree::compute_cases_per_edge): Pass
2550 argument to reset_out_edges_aux function.
2551 (switch_decision_tree::analyze_switch_statement): Likewise.
2552 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
2555 2018-08-27 Martin Liska <mliska@suse.cz>
2557 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
2558 cfun argument explicitly.
2559 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
2560 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
2561 function gimple_switch_default_bb.
2562 (convert_switch_statements):
2564 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
2565 * stmt.c (label_to_block_fn): Use label_to_block and pass
2566 cfun argument explicitly and use gimple_switch_label_bb.
2567 (expand_case): Likewise.
2568 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
2569 cfun argument explicitly. Likewise.
2570 (make_edges_bb): Likewise.
2571 (make_cond_expr_edges): Likewise.
2572 (get_cases_for_edge): Likewise.
2573 (make_gimple_switch_edges): Likewise.
2574 (label_to_block_fn): Likewise.
2575 (label_to_block): Likewise.
2576 (make_goto_expr_edges): Likewise.
2577 (make_gimple_asm_edges): Likewise.
2578 (main_block_label): Likewise.
2579 (group_case_labels_stmt): Likewise.
2580 (find_taken_edge_computed_goto): Likewise.
2581 (find_taken_edge_switch_expr): Likewise.
2582 (gimple_verify_flow_info): Likewise.
2583 (gimple_redirect_edge_and_branch): Likewise.
2584 (gimple_switch_label_bb): New function.
2585 (gimple_switch_default_bb): Likewise.
2586 (gimple_switch_edge): Likewise.
2587 (gimple_switch_default_edge): Likewise.
2588 * tree-cfg.h (label_to_block_fn): Remove and replace ...
2589 (label_to_block): ... with this.
2590 (gimple_switch_label_bb): New.
2591 (gimple_switch_default_bb): Likewise.
2592 (gimple_switch_edge): Likewise.
2593 (gimple_switch_default_edge): Likewise.
2594 * tree-cfgcleanup.c (convert_single_case_switch): Use
2595 new gimple functions and pass new argument to label_to_block.
2596 (cleanup_control_flow_bb):
2597 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
2598 cfun argument explicitly.
2599 (make_eh_edges): Likewise.
2600 (redirect_eh_dispatch_edge): Likewise.
2601 (lower_resx): Likewise.
2602 (lower_eh_dispatch): Likewise.
2603 (maybe_remove_unreachable_handlers): Likewise.
2604 (unsplit_eh): Likewise.
2605 (cleanup_empty_eh): Likewise.
2606 (verify_eh_edges): Likewise.
2607 (verify_eh_dispatch_edge): Likewise.
2608 * tree-ssa-dom.c (record_edge_info): Likewise.
2609 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2610 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2611 (thread_through_normal_block): Likewise.
2612 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2613 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2614 * tree-switch-conversion.c (switch_conversion::collect): Use new
2616 (switch_conversion::check_final_bb): Likewise.
2617 (switch_conversion::gather_default_values): Pass new argument
2619 (switch_conversion::build_constructors): Likewise.
2620 (switch_decision_tree::compute_cases_per_edge): Use new
2621 gimple_switch_edge function.
2622 (switch_decision_tree::analyze_switch_statement): Pass new argument
2624 (switch_decision_tree::try_switch_expansion): Use
2625 gimple_switch_default_edge.
2626 * tree-vrp.c (find_switch_asserts): Pass new argument
2628 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2629 (vr_values::simplify_switch_using_ranges): Likewise.
2631 2018-08-27 Richard Biener <rguenther@suse.de>
2633 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2634 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2636 * tree-ssa-sccvn.h (struct vn_pval): New structure.
2637 (struct vn_nary_op_s): Add unwind_to member. Add
2638 predicated_values flag and put result into a union together
2639 with a linked list of vn_pval.
2640 (struct vn_ssa_aux): Add name member to make maintaining
2641 a map of SSA name to vn_ssa_aux possible. Remove no longer
2642 needed info, dfsnum, low, visited, on_sccstack, use_processed
2643 and range_info_anti_range_p members.
2644 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2645 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2647 (vn_valueize): New global.
2648 (vn_context_bb): Likewise.
2649 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2650 VN_INFO_PTR_INFO): Remove.
2651 * tree-ssa-sccvn.c: ... (rewrite)
2652 (pass_fre::execute): For -O2+ initialize loops and run
2653 RPO VN in optimistic mode (iterating). For -O1 and -Og
2654 run RPO VN in non-optimistic mode.
2655 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2656 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2657 * doc/invoke.texi (sccvn-max-scc-size): Remove.
2658 (rpo-vn-max-loop-depth): Document.
2659 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2660 when valuezing the VUSE signals we walked out of the region.
2661 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2662 (phi_translate): Set VN context block to use for availability
2664 (compute_avail): Likewise.
2665 (pre_valueize): New function.
2666 (pass_pre::execute): Adjust to the RPO VN API.
2668 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2669 (propagate_constants_for_unrolling): Remove.
2670 (tree_unroll_loops_completely): Perform value-numbering
2671 on the unrolled bodies loop parent.
2673 2018-08-27 Richard Biener <rguenther@suse.de>
2675 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2676 for partial antic compute.
2678 2018-08-27 Jakub Jelinek <jakub@redhat.com>
2680 PR rtl-optimization/87065
2681 * combine.c (simplify_if_then_else): Formatting fix.
2682 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2684 (known_cond): Don't return const_true_rtx for vector modes. Use
2685 CONST0_RTX instead of const0_rtx. Formatting fixes.
2687 2018-08-27 Martin Liska <mliska@suse.cz>
2689 PR gcov-profile/87069
2690 * gcov.c (process_file): Record files already processed
2691 and warn about a file being processed multiple times.
2693 2018-08-27 Martin Liska <mliska@suse.cz>
2696 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2697 Set default values for x_aarch64_*_string strings.
2698 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2699 prefix. For -mabi do not print '=ABI' in help and use
2700 <option_value> format for -msve-vector-bits and -moverride
2703 2018-08-26 Jeff Law <law@redhat.com>
2705 * config/mips/frame-header-opt.c: Include "backend.h" rather than
2708 2018-08-26 Marek Polacek <polacek@redhat.com>
2710 PR c++/87029, Implement -Wredundant-move.
2711 * doc/invoke.texi: Document -Wredundant-move.
2713 2018-08-25 Martin Sebor <msebor@redhat.com>
2715 PR tree-optimization/87059
2716 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2717 to the same type as the other.
2718 * fold-const.c (fold_binary_loc): Assert expectation.
2720 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
2722 * config/darwin.c (machopic_legitimize_pic_address): Clean up
2723 extraneous parentheses, dead code section and formatting.
2725 2018-08-24 David Malcolm <dmalcolm@redhat.com>
2728 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2729 wide enough for jumps in the line-numbering to be visible.
2730 (layout::print_gap_in_line_numbering): New member function.
2731 (layout::calculate_line_spans): When using line numbering, merge
2732 line spans that are only 1 line apart.
2733 (diagnostic_show_locus): When printing line numbers, show gaps in
2734 line numbering directly, rather than printing headers.
2735 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2736 line-numbering with multiple line spans.
2737 (selftest::test_fixit_insert_containing_newline_2): Add test of
2738 line-numbering, in which the spans are close enough to be merged.
2740 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2742 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2743 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
2744 * tree-vrp.c (range_is_nonnull): Remove.
2745 (range_includes_zero_p): Accept value_range instead of min/max.
2746 (extract_range_from_binary_expr_1): Do not early bail on
2748 Use range_includes_zero_p instead of range_is_nonnull.
2749 (extract_range_from_unary_expr): Use range_includes_zero_p instead
2750 of range_is_nonnull.
2751 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
2752 special case VR_ANTI_RANGE.
2753 (vrp_finalize): Same.
2754 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2756 (range_is_nonnull): Remove.
2757 * vr-values.c (vrp_stmt_computes_nonzero): Use
2758 range_includes_zero_p instead of range_is_nonnull.
2759 (extract_range_basic): Pass value_range to range_includes_zero_p
2760 instead of range_is_nonnull.
2762 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
2764 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2765 * emit-rtl.h (rtl_data): Remove return_bnd.
2766 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2767 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2768 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2769 (POINTER_BOUNDS_MODE): Remove definition.
2770 (make_pointer_bounds_mode): Remove.
2771 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2772 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2773 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2774 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2775 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2776 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2777 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2779 * config/i386/i386-modes.def (BND32, BND64): Remove.
2780 * config/i386/i386.c (dbx_register_map): Remove bound registers.
2781 (dbx64_register_map): Ditto.
2782 (svr4_dbx_register_map): Ditto.
2783 (indirect_thunk_bnd_needed): Remove.
2784 (indirect_thunks_bnd_used): Ditto.
2785 (indirect_return_bnd_needed): Ditto.
2786 (indirect_return_via_cx_bnd): Ditto.
2787 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2788 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2789 (output_indirect_thunk): Ditto. Remove need_prefix argument.
2790 (output_indirect_thunk_function): Remove handling of
2791 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2792 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2793 (ix86_save_reg): Remove handling of crtl->return_bnd.
2794 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2795 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2796 and UNSPEC_BNDLX_ADDR.
2797 (ix86_output_indirect_branch_via_reg): Remove handling of
2798 indirect_thunk_prefix_bnd.
2799 (ix86_output_indirect_branch_via_push): Ditto.
2800 (ix86_output_function_return): Ditto.
2801 (ix86_output_indirect_function_return): Ditto.
2802 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2803 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2804 (CALL_USED_REGISTERS): Ditto.
2805 (REG_ALLOC_ORDER): Update for removal of bound registers.
2806 (HI_REGISTER_NAMES): Ditto.
2807 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2808 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2809 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2810 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2811 (FIRST_PSEUDO_REG): Update.
2812 (BND): Remove mode iterator.
2813 * config/i386/predicates.md (bnd_mem_operator): Remove.
2815 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2817 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2820 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2822 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2823 the case in which the permute needs only a single element and
2824 repeats for every vector of the result. Extend that case to
2825 handle variable-length vectors.
2826 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2828 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
2831 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2832 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2834 2018-08-24 Richard Biener <rguenther@suse.de>
2836 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2837 bb_flags_allocated members.
2838 (auto_flag): New RAII class for allocating flags.
2839 (auto_edge_flag): New RAII class for allocating edge flags.
2840 (auto_bb_flag): New RAII class for allocating bb flags.
2841 * cfgloop.c (verify_loop_structure): Allocate temporary edge
2843 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2844 in favor of temporarily allocated BB flag.
2845 * hsa-brig.c: Re-order includes.
2846 * hsa-dump.c: Likewise.
2847 * hsa-regalloc.c: Likewise.
2848 * print-rtl.c: Likewise.
2849 * profile-count.c: Likewise.
2851 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2854 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2857 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2860 * wide-int-range.cc (wide_int_range_div): Do not ignore result
2861 from wide_int_range_multiplicative_op.
2863 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2865 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2868 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
2870 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2873 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
2875 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2876 full GENERIC expression used for replacement.
2878 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
2880 * tree-vrp.c (abs_extent_range): Remove.
2881 (extract_range_into_wide_ints): Pass wide ints by reference.
2882 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2883 Pass wide ints by reference in all calls to
2884 extract_range_into_wide_ints.
2885 * wide-int-range.cc (wide_int_range_div): New.
2886 * wide-int-range.h (wide_int_range_div): New.
2887 (wide_int_range_includes_zero_p): New.
2888 (wide_int_range_zero_p): New.
2890 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
2892 * config/aarch64/aarch64.md (arches): New enum.
2893 (arch): New enum attr.
2894 (arch_enabled): New attr.
2895 (enabled): Now uses arch_enabled only.
2896 (simd, sve, fp16): Removed attribute.
2897 (fp): Attr now defined in terms of 'arch'.
2898 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2899 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2900 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2901 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2902 attributes into 'arch'.
2903 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2904 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2905 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2906 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2907 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2908 'simd' attribute into 'arch'.
2909 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2910 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2911 Convert use of 'fp' attribute to 'arch'.
2912 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2913 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2915 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2916 (different modes) Merge 'fp' and 'simd' into 'arch'.
2917 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2920 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2922 PR rtl-optimization/87026
2923 * expmed.c (canonicalize_comparison): If we can no longer create
2924 pseudoregisters, don't.
2926 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2929 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2931 * config/arm/arm.c (speculation_barrier_libfunc): New static
2933 (arm_init_libfuncs): Initialize it.
2934 (arm_emit_speculation_barrier): New function.
2935 * config/arm/arm.md (speculation_barrier): Call
2936 arm_emit_speculation_barrier for architectures that do not have
2938 (speculation_barrier_insn): Only match on Armv7 or later.
2940 2018-08-23 Richard Biener <rguenther@suse.de>
2943 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2946 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2948 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2949 of single-vector TBLs.
2950 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2953 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2956 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2957 aarch64_evpc_tbl guard.
2959 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2961 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2964 2018-08-22 Martin Sebor <msebor@redhat.com>
2967 * tree-pretty-print.c (pretty_print_string): Add argument.
2968 (dump_generic_node): Call to pretty_print_string with string size.
2970 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2972 PR rtl-optimization/86771
2973 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2974 of two SETs into those two SETs, one to be placed at i2, if that SETs
2975 destination is modified between i2 and i3.
2977 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2979 PR tree-optimization/86725
2980 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2982 (vect_analyze_scalar_cycles_1): Check it.
2984 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2986 PR tree-optimization/86725
2987 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2988 an outer loop phi as a double reduction, make sure that the
2989 single user of the phi result is an inner loop phi.
2991 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2993 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2994 grouped stores with gaps to a strided group.
2996 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2998 * tree-vect-stmts.c (get_group_load_store_type)
2999 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
3000 first statement in a group.
3002 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
3004 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
3005 the sequence used in gcc/gcc.c.
3007 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
3010 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
3013 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
3015 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
3016 Darwin10-specific unwinder-shim.
3017 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
3018 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
3019 New to cater for Darwin10 Rosetta.
3021 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
3023 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
3024 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
3026 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
3031 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
3032 (dwarf2out_switch_text_section): Generate a local label for the
3033 second function sub-section and apply it as the second FDE start
3035 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
3036 second sub-section start.
3038 2018-08-22 Richard Biener <rguenther@suse.de>
3040 PR tree-optimization/86988
3041 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
3043 2018-08-22 Richard Biener <rguenther@suse.de>
3045 PR tree-optimization/86945
3046 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
3048 2018-08-22 Alexandre Oliva <oliva@adacore.com>
3050 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
3051 a comment about how uses of r2 for .sdata2 come about.
3053 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
3055 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
3057 2018-08-21 Marek Polacek <polacek@redhat.com>
3059 PR c++/86981, Implement -Wpessimizing-move.
3060 * doc/invoke.texi: Document -Wpessimizing-move.
3062 2018-08-21 Jan Hubicka <jh@suse.cz>
3064 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
3065 * tree.h (is_redundant_typedef): Remove.
3066 * dwarf2out.c (is_redundant_typedef): Turn into static function.
3068 2018-08-21 Jan Hubicka <jh@suse.cz>
3070 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
3073 2018-08-21 Tamar Christina <tamar.christina@arm.com>
3075 * expmed.c (extract_low_bits): Reject invalid subregs early.
3077 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3080 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
3083 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3085 * config/vxworks.h: Guard vxworks_asm_out_constructor and
3086 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
3087 * config/vxworks.c: Likewise.
3089 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3091 * config/vxworks.c: Set targetm.have_ctors_dtors
3092 if HAVE_INITFINI_ARRAY_SUPPORT.
3093 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
3094 if HAVE_INITFINI_ARRAY_SUPPORT.
3096 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3098 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
3099 default search path for VxWorks < 7.
3101 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3103 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
3104 (get_format_string): Refer to c_getstr.
3106 2018-08-21 Tom de Vries <tdevries@suse.de>
3108 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
3109 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
3110 (debuginfo_early_stop): Declare.
3111 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
3112 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
3113 (debuginfo_early_stop): New function.
3114 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
3115 and debuginfo_early_stop.
3116 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
3117 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
3118 (general_init): Call debuginfo_early_init.
3119 (finalize): Call debuginfo_fini.
3120 (do_compile): Call debuginfo_init.
3121 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
3123 (@item -fdump-debug, @item -fdump-earlydebug): Add.
3125 2018-08-21 Tom de Vries <tdevries@suse.de>
3127 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
3128 flag_dump_noaddr and flag_dump_unnumbered.
3130 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
3132 * wide-int-range.cc (wide_int_range_abs): New.
3133 (wide_int_range_order_set): Rename from wide_int_range_min_max.
3134 * wide-int-range.h (wide_int_range_abs): New.
3135 (wide_int_range_min_max): New.
3136 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
3137 case to call wide_int_range_abs.
3138 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
3139 (extract_range_from_abs_expr): Delete.
3141 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
3144 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
3145 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
3148 2018-08-20 Nathan Sidwell <nathan@acm.org>
3149 Jeff Law <law@redhat.com>
3151 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
3152 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
3154 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3157 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
3158 (decl_attributes): Likewise.
3159 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
3161 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3162 * diagnostic-core.h (class auto_diagnostic_group): New class.
3163 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
3164 (diagnostic_report_diagnostic): Handle the first diagnostics within
3166 (emit_diagnostic): Add auto_diagnostic_group instance.
3168 (inform_n): Likewise.
3169 (warning): Likewise.
3170 (warning_at): Likewise.
3171 (warning_n): Likewise.
3172 (pedwarn): Likewise.
3173 (permerror): Likewise.
3175 (error_n): Likewise.
3176 (error_at): Likewise.
3178 (fatal_error): Likewise.
3179 (internal_error): Likewise.
3180 (internal_error_no_backtrace): Likewise.
3181 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
3182 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
3183 * diagnostic.h (struct diagnostic_context): Add fields
3184 "diagnostic_group_nesting_depth",
3185 "diagnostic_group_emission_count", "begin_group_cb",
3187 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
3188 Add auto_diagnostic_group instance(s).
3189 (find_explicit_erroneous_behavior): Likewise.
3190 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
3191 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
3192 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
3193 (gimplify_va_arg_expr): Likewise.
3194 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
3195 (HSA_SORRY_AT): Likewise.
3196 * ipa-devirt.c (compare_virtual_tables): Likewise.
3197 (warn_odr): Likewise.
3198 * multiple_target.c (expand_target_clones): Likewise.
3199 * opts-common.c (cmdline_handle_error): Likewise.
3200 * reginfo.c (globalize_reg): Likewise.
3201 * substring-locations.c (format_warning_n_va): Likewise.
3202 * tree-inline.c (expand_call_inline): Likewise.
3203 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
3204 * tree-ssa-loop-niter.c
3205 (do_warn_aggressive_loop_optimizations): Likewise.
3206 * tree-ssa-uninit.c (warn_uninit): Likewise.
3207 * tree.c (warn_deprecated_use): Likewise.
3209 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
3212 * config/i386/i386.md (eh_return): Always update EH return
3213 address in word_mode.
3215 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
3217 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
3218 TARGET_SPLIT_COMPLEX_ARG is defined.
3220 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3222 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
3224 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3227 * expr.c (expand_assignment): Assert that bitpos is positive.
3228 (store_field): Likewise
3229 (expand_expr_real_1): Make sure that bitpos is positive.
3230 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
3233 2018-08-20 Nathan Sidwell <nathan@acm.org>
3235 * Makefile.in (CPP_ID_DATA_H): Delete.
3236 (CPP_INTERNAL_H): Don't add it.
3237 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
3238 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
3240 2018-08-20 Richard Biener <rguenther@suse.de>
3242 PR tree-optimization/78655
3243 * tree-vrp.c (extract_range_from_binary_expr_1): Make
3244 pointer + offset nonnull if either operand is nonnull work.
3246 2018-08-20 Tom de Vries <tdevries@suse.de>
3248 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
3249 unless the referenced die describes the added property using
3250 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
3251 Otherwise, add a DW_AT_location to the referenced die.
3253 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
3256 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
3257 register_operand when calling ix86_set_reg_reg_cost.
3258 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
3259 Set *total to 0 for operands that satisfy x86_64_immediate_operand
3260 predicate and to 1 otherwise.
3262 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
3264 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
3265 emit a diagnostic that it is not supported and reset the option.
3266 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
3267 supported and consume the option. (ASM_FINAL_SPEC): New.
3269 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
3271 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
3274 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
3276 C-SKY port: Documentation
3278 * doc/extend.texi (C-SKY Function Attributes): New section.
3279 * doc/invoke.texi (Option Summary): Add C-SKY options.
3280 (C-SKY Options): New section.
3281 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
3283 2018-08-17 Jojo <jijie_rong@c-sky.com>
3284 Huibin Wang <huibin_wang@c-sky.com>
3285 Sandra Loosemore <sandra@codesourcery.com>
3286 Chung-Lin Tang <cltang@codesourcery.com>
3288 C-SKY port: Backend implementation
3290 * config/csky/*: New.
3291 * common/config/csky/*: New.
3293 2018-08-17 Jojo <jijie_rong@c-sky.com>
3294 Huibin Wang <huibin_wang@c-sky.com>
3295 Sandra Loosemore <sandra@codesourcery.com>
3296 Chung-Lin Tang <cltang@codesourcery.com>
3297 Andrew Jenner <andrew@codesourcery.com>
3299 C-SKY port: Configury
3301 * config.gcc (csky-*-*): New.
3302 * configure.ac: Add csky to targets for dwarf2 debug_line support.
3303 * configure: Regenerated.
3305 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3307 * dump-context.h: Include "dumpfile.h".
3308 (dump_context::dump_printf_va): Convert final param from va_list
3309 to va_list *. Convert from ATTRIBUTE_PRINTF to
3310 ATTRIBUTE_GCC_DUMP_PRINTF.
3311 (dump_context::dump_printf_loc_va): Likewise.
3312 * dumpfile.c: Include "stringpool.h".
3313 (make_item_for_dump_printf_va): Delete.
3314 (make_item_for_dump_printf): Delete.
3315 (class dump_pretty_printer): New class.
3316 (dump_pretty_printer::dump_pretty_printer): New ctor.
3317 (dump_pretty_printer::emit_items): New member function.
3318 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
3320 (dump_pretty_printer::emit_item): New member function.
3321 (dump_pretty_printer::stash_item): New member function.
3322 (dump_pretty_printer::format_decoder_cb): New member function.
3323 (dump_pretty_printer::decode_format): New member function.
3324 (dump_context::dump_printf_va): Reimplement in terms of
3325 dump_pretty_printer.
3326 (dump_context::dump_printf_loc_va): Convert final param from va_list
3328 (dump_context::begin_scope): Reimplement call to
3329 make_item_for_dump_printf.
3330 (dump_printf): Update for change to dump_printf_va.
3331 (dump_printf_loc): Likewise.
3332 (selftest::test_capture_of_dump_calls): Convert "stmt" from
3333 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
3334 with %T, %E, and %G.
3335 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
3336 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
3337 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
3338 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
3339 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
3340 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
3341 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
3342 within a dump_printf_loc call to "%wu".
3343 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
3344 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
3345 missing space after "=".
3346 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
3347 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
3348 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
3349 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
3350 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
3351 duplicate "vectorized" from message.
3353 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
3355 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
3356 polyNxK_t element's TYPE_STRING_FLAG.
3358 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
3360 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
3361 (they were unnamed before). Fix comments.
3363 2018-08-17 Nathan Sidwell <nathan@acm.org>
3365 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
3367 2018-08-17 Richard Biener <rguenther@suse.de>
3369 PR tree-optimization/86841
3370 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
3372 2018-08-17 Martin Liska <mliska@suse.cz>
3374 * common.opt: Remove Warn, Init and Report for options with
3375 Ignore/Deprecated flag. Warning is done automatically for
3377 * config/i386/i386.opt: Likewise.
3378 * config/ia64/ia64.opt: Likewise.
3379 * config/rs6000/rs6000.opt: Likewise.
3380 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
3381 Remove usage of flag_check_pointer_bounds.
3382 * lto-wrapper.c (merge_and_complain): Do not handle
3383 OPT_fcheck_pointer_bounds.
3384 (append_compiler_options): Likewise.
3385 * opt-functions.awk: Do not handle Deprecated.
3386 * optc-gen.awk: Check that Var, Report and Init are not
3387 used for an option with Ignore/Deprecated flag.
3388 * opts-common.c (decode_cmdline_option): Do not report
3390 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
3392 * opts.h (struct cl_option): Remove cl_deprecated flag.
3393 (CL_ERR_DEPRECATED): Remove error enum value.
3395 2018-08-17 Richard Biener <rguenther@suse.de>
3398 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
3399 across a va-arg-pack using call adjust its return value accordingly.
3401 2018-08-16 Martin Sebor <msebor@redhat.com>
3403 PR tree-optimization/86853
3404 * gimple-ssa-sprintf.c (struct format_result): Rename member.
3405 (struct fmtresult): Add member and initialize it in ctors.
3406 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
3407 (format_string): Handle %S the same as %ls. Set MAYFAIL.
3408 (format_directive): Set POSUNDER4K when MAYFAIL is set.
3409 (parse_directive): Handle %C same as %c.
3410 (sprintf_dom_walker::compute_format_length): Adjust.
3411 (is_call_safe): Adjust.
3413 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3415 * builtins.c (c_strlen): Add new parameter eltsize. Use it
3416 for determining how to count the elements.
3417 * builtins.h (c_strlen): Adjust prototype.
3418 * expr.c (string_constant): Add new parameter mem_size.
3419 Set *mem_size appropriately.
3420 * expr.h (string_constant): Adjust protoype.
3421 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
3422 * gimple-fold.h (get_range_strlen): Adjust prototype.
3423 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
3424 (format_string): Call get_string_length with eltsize.
3426 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3428 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
3429 to emit the span, rather than setting it as the prefix.
3431 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3433 * diagnostic-show-locus.c (layout::start_annotation_line): Add
3434 "margin_char" parameter, defaulting to space. Use it in place
3435 of pp_space for the initial part of the margin.
3436 (layout::print_leading_fixits): Use '+' when filling the margin
3437 of line-insertion fix-it hints.
3439 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3441 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
3444 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3446 * config/rs6000/altivec.md: Don't set length attribute to the default
3448 * config/rs6000/darwin.md: Ditto.
3449 * config/rs6000/dfp.md: Ditto.
3450 * config/rs6000/htm.md: Ditto.
3451 * config/rs6000/rs6000.md: Ditto.
3452 * config/rs6000/sync.md: Ditto.
3453 * config/rs6000/vsx.md: Ditto.
3455 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3457 * config/rs6000/altivec.md: Don't set length attribute to the default
3458 value, for branch instructions.
3459 * config/rs6000/darwin.md: Ditto.
3460 * config/rs6000/rs6000.md: Ditto.
3462 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3464 * config/rs6000/rs6000.md (length): Always define as const_int 4.
3465 (unnamed conditional branch define_insn): Set length to 4 or 8
3466 depending on offset.
3467 (<bd>_<mode>): Similar, for alternative 0.
3468 (<bd>tf_<mode>): Ditto.
3470 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3472 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
3474 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
3476 * doc/rtl.texi: Replace old RTX class names with new names.
3479 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
3481 * expmed.h (canonicalize_comparison): New declaration.
3482 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
3483 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
3484 * optabs.c (prepare_cmp_insn): Likewise.
3485 * rtl.h (unsigned_condition_p): New function which checks if a
3486 comparison operator is unsigned.
3488 2018-08-16 Nathan Sidwell <nathan@acm.org>
3490 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
3491 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
3493 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3496 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
3497 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
3498 (mov<mov>): ..this and enable unconditionally.
3500 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3502 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
3504 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
3506 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
3507 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
3508 "Common" with "Target".
3510 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3512 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
3513 * doc/invoke.texi (mmitigate-rop): Remove.
3514 * config/i386/i386.c: Do not include "regrename.h".
3515 (ix86_rop_should_change_byte_p, reg_encoded_number)
3516 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
3518 (ix86_reorg): Remove call to ix86_mitigate_rop.
3519 * config/i386/i386.md (attr "modrm_class"): Remove.
3520 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
3521 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
3522 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
3524 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
3526 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
3527 allow folding of mergeh() and mergel() for the float and double types.
3528 (fold_mergehl_helper): Rework to handle building a permute tree
3531 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3533 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
3536 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3538 * common.opt (fdiagnostics-show-labels): New option.
3539 * diagnostic-show-locus.c (class layout_range): Add field
3541 (class layout): Add field "m_show_labels_p".
3542 (layout_range::layout_range): Add param "label" and use it to
3544 (make_range): Pass in NULL for new "label" param of layout_range's
3546 (layout::layout): Initialize m_show_labels_p.
3547 (layout::maybe_add_location_range): Pass in loc_range->m_label
3548 when constructing layout_range instances.
3549 (struct line_label): New struct.
3550 (layout::print_any_labels): New member function.
3551 (layout::print_line): Call it if label-printing is enabled.
3552 (selftest::test_one_liner_labels): New test.
3553 (selftest::test_diagnostic_show_locus_one_liner): Call it.
3554 * diagnostic.c (diagnostic_initialize): Initialize
3555 context->show_labels_p.
3556 * diagnostic.h (struct diagnostic_context): Add field
3558 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3559 -fno-diagnostics-show-labels.
3560 * dwarf2out.c (gen_producer_string): Add
3561 OPT_fdiagnostics_show_labels to the ignored options.
3562 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
3564 (gcc_rich_location::maybe_add_expr): Likewise.
3565 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
3566 label" param, defaulting to NULL.
3567 (gcc_rich_location::add_expr): Add "label" param.
3568 (gcc_rich_location::maybe_add_expr): Likewise.
3569 (class text_range_label): New class.
3570 (class range_label_for_type_mismatch): New class.
3571 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
3572 of format_warning_va.
3573 (fmtwarn_n): Likewise for new params of format_warning_n_va.
3574 * lto-wrapper.c (merge_and_complain): Add
3575 OPT_fdiagnostics_show_labels to the "pick one setting" options.
3576 (append_compiler_options): Likewise to the dropped options.
3577 (append_diag_options): Likewise to the passed-on options.
3578 * opts.c (common_handle_option): Handle the new option.
3579 * selftest-diagnostic.c
3580 (test_diagnostic_context::test_diagnostic_context): Enable
3582 * substring-locations.c: Include "gcc-rich-location.h".
3583 (format_warning_n_va): Add "fmt_label" and "param_label" params
3584 and use them as appropriate.
3585 (format_warning_va): Add "fmt_label" and "param_label" params,
3586 passing them on to format_warning_n_va.
3587 (format_warning_at_substring): Likewise.
3588 (format_warning_at_substring_n): Likewise.
3589 * substring-locations.h (format_warning_va): Add "fmt_label" and
3590 "param_label" params.
3591 (format_warning_n_va): Likewise.
3592 (format_warning_at_substring): Likewise.
3593 (format_warning_at_substring_n): Likewise.
3594 * toplev.c (general_init): Initialize global_dc->show_labels_p.
3596 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
3599 * builtins.c (expand_builtin_memcmp): Do not expand the call
3600 when overflow is detected.
3602 2018-08-15 Martin Sebor <msebor@redhat.com>
3604 PR tree-optimization/71625
3605 * config/aarch64/aarch64-builtins.c
3606 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3608 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
3610 * config/s390/s390.c (s390_reorg): Remove loop.
3612 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3615 (darwin_function_switched_text_sections): Delete.
3616 * gcc/config/darwin.h
3617 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3619 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3622 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3623 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
3624 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3626 2018-08-15 Martin Liska <mliska@suse.cz>
3628 PR tree-optimization/86925
3629 * predict.c (expr_expected_value_1): When taking
3630 later predictor, assign also probability.
3631 Use fold_build2_initializer_loc in order to fold
3632 the expression in -frounding-math.
3634 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
3636 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3638 (expand_vec_perm_1): Try the new method.
3640 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
3643 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3644 Check whether lra_live_max_point is 0 before dividing.
3646 2018-08-14 Martin Sebor <msebor@redhat.com>
3648 PR tree-optimization/86650
3649 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3650 (vrp_prop::check_mem_ref): Same.
3652 2018-08-13 Liu Hao <lh_mouse@126.com>
3654 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3655 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3656 and clear it thereafter, as it only works for DBCS.
3658 2018-08-13 Liu Hao <lh_mouse@126.com>
3660 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3661 handle returned by _get_osf_handle().
3663 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3665 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3666 for folding vec_perm.
3668 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3670 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3671 Add support for gimple-folding of vec_pack() and vec_unpack()
3674 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3676 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3677 vec_xst variants to the list.
3678 (rs6000_gimple_fold_builtin): Add support for folding unaligned
3679 vector loads and stores.
3681 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
3683 * config.gcc (rs6000-ibm-aix4.x): Delete.
3684 (rs6000-ibm-aix5.1): Delete.
3685 (rs6000-ibm-aix5.2): Delete.
3686 (rs6000-ibm-aix5.3): Delete.
3687 * config/rs6000/aix43.h: Delete.
3688 * config/rs6000/aix51.h: Delete.
3689 * config/rs6000/aix52.h: Delete.
3690 * config/rs6000/t-aix43: Delete.
3692 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
3694 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3696 (s390_decompose_address): Factor out constant pool ref
3699 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3701 * config/nds32/nds32-predicates.c
3702 (nds32_can_use_bclr_p): Change return type as bool.
3703 (nds32_can_use_bset_p): Ditto.
3704 (nds32_can_use_btgl_p): Ditto.
3705 (nds32_can_use_bitci_p): Ditto.
3706 * config/nds32/nds32-protos.h
3707 (nds32_can_use_bclr_p): Change declaration.
3708 (nds32_can_use_bset_p): Ditto.
3709 (nds32_can_use_btgl_p): Ditto.
3710 (nds32_can_use_bitci_p): Ditto.
3712 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3714 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3715 Support -msched-prolog-epilog option.
3716 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3718 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3720 * common/config/nds32/nds32-common.c
3721 (nds32_option_optimization_table): Enalbe -malways-align.
3723 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3725 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3727 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3728 OPT_misr_secure_ case.
3729 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3730 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3731 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3733 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3734 (nds32_isr_info): New field security_level.
3735 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3736 * config/nds32/nds32.md (return_internal): Consider critical attribute.
3737 * config/nds32/nds32.opt (misr-secure): New option.
3738 * config/nds32/nds32_init.inc: New file.
3739 * config/nds32/nds32_isr.h: New file.
3741 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3743 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3744 Update comment for atomic instructions.
3745 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3746 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3748 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3749 load for __ATOMIC_SEQ_CST model.
3750 (atomic_loaddi_1): Remove float register target.
3751 (atomic_storedi): Handle CONST_INT values.
3752 (atomic_storedi_1): Remove float register source. Add special case
3754 (memory_barrier): New expander and insn.
3756 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3758 PR tree-optimization/86835
3759 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3760 new_stmt after def_gsi, make sure to insert new_square_stmt after
3761 that stmt, not 2 stmts before it.
3763 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
3766 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3769 2018-08-10 Martin Liska <mliska@suse.cz>
3772 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3774 * builtins.c (expand_builtin_expect_with_probability):
3776 (expand_builtin_expect_with_probability): New function.
3777 (build_builtin_expect_predicate): Add new argumnet probability
3778 for BUILT_IN_EXPECT_WITH_PROBABILITY.
3779 (fold_builtin_expect):
3782 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3783 * builtins.h (fold_builtin_expect): Set new argument.
3784 * doc/extend.texi: Document __builtin_expect_with_probability.
3785 * doc/invoke.texi: Likewise.
3786 * gimple-fold.c (gimple_fold_call): Pass new argument.
3787 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3788 also BUILT_IN_EXPECT_WITH_PROBABILITY.
3789 * predict.c (get_predictor_value): New function.
3790 (expr_expected_value): Add new argument probability. Assume
3791 that predictor and probability are always non-null.
3792 (expr_expected_value_1): Likewise. For __builtin_expect and
3793 __builtin_expect_with_probability set probability. Handle
3794 combination in binary expressions.
3795 (tree_predict_by_opcode): Simplify code by simply calling
3796 get_predictor_value.
3797 (pass_strip_predict_hints::execute): Add handling of
3798 BUILT_IN_EXPECT_WITH_PROBABILITY.
3799 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3801 * tree.h (DECL_BUILT_IN_P): New function.
3803 2018-08-10 Martin Liska <mliska@suse.cz>
3805 PR tree-optimization/85799
3806 * passes.def: Add argument for pass_strip_predict_hints.
3807 * predict.c (class pass_strip_predict_hints): Add new argument
3809 (strip_predictor_early): New function.
3810 (pass_strip_predict_hints::execute): Call the function to
3812 (strip_predict_hints): New function.
3813 * predict.def: Fix comment.
3815 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3817 * Makefile.in: Clarify which tm.texi to copy over to assert the
3818 right to grant a GFDL license for all.
3820 2018-08-09 Jeff Law <law@redhat.com>
3822 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3825 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
3827 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3830 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3832 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3833 reductions for variable-length vectors.
3835 2018-08-09 David Malcolm <dmalcolm@redhat.com>
3838 * common.opt (fdiagnostics-show-line-numbers): New option.
3839 * diagnostic-show-locus.c (class layout): Add fields
3840 "m_show_line_numbers_p" and "m_linenum_width";
3841 (num_digits): New function.
3842 (test_num_digits): New function.
3843 (layout::layout): Initialize new fields. Update m_x_offset
3844 logic to handle any left margin.
3845 (layout::print_source_line): Print line number when requested.
3846 (layout::start_annotation_line): New member function.
3847 (layout::print_annotation_line): Call it.
3848 (layout::print_leading_fixits): Likewise.
3849 (layout::print_trailing_fixits): Likewise. Update calls to
3850 move_to_column for new parameter.
3851 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3852 it to potentially call start_annotation_line.
3853 (layout::show_ruler): Call start_annotation_line.
3854 (selftest::test_line_numbers_multiline_range): New selftest.
3855 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3856 and selftest::test_line_numbers_multiline_range.
3857 * diagnostic.c (diagnostic_initialize): Initialize
3858 show_line_numbers_p.
3859 * diagnostic.h (struct diagnostic_context): Add field
3860 "show_line_numbers_p".
3861 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3862 -fno-diagnostics-show-line-numbers.
3863 * dwarf2out.c (gen_producer_string): Add
3864 OPT_fdiagnostics_show_line_numbers to the ignored options.
3865 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3866 one setting" options.
3867 (append_compiler_options): Likewise to the dropped options.
3868 (append_diag_options): Likewise to the passed-on options.
3869 * opts.c (common_handle_option): Handle the new option.
3870 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3872 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
3874 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3875 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
3876 third argument of type "const signed char" to descriptions of
3877 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3878 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3879 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3880 __builtin_bcdsub_ov functions.
3882 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3884 PR tree-optimization/86858
3885 * tree-vect-loop.c (vect_is_simple_reduction): Restore
3886 flow_bb_inside_loop_p calls.
3888 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3890 PR tree-optimization/86871
3891 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3892 instead of gimple_assign_lhs.
3894 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
3897 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3898 register constraint to operand 0.
3899 (add<mode>3_carryinC): Likewise.
3900 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3902 2018-08-09 Martin Liska <mliska@suse.cz>
3905 * common.opt: Remove extra line.
3907 2018-08-09 Martin Liska <mliska@suse.cz>
3909 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3910 at the end of a line, make first letter capital and end up
3911 a sentence with a dot.
3912 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3913 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3914 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3915 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3916 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3917 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3918 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3919 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3920 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3921 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3922 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3923 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3924 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3925 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3926 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3927 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3928 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3929 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3931 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3934 * config/s390/s390.c (s390_option_override_internal): Reduce the
3935 stack-clash-protection-probe-interval param if it would be too big
3938 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3941 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3942 * config/m68k/m68k.c (handle_move_double): Don't call
3943 m68k_final_prescan_insn.
3944 (m68k_adjust_decorated_operand): Renamed from
3945 m68k_final_prescan_insn, remove first and third operand and
3947 (print_operand): Call it.
3948 (print_operand_address): Call it.
3950 2018-08-08 Nathan Sidwell <nathan@acm.org>
3952 * diagnostic.c (diagnostic_report_current_module): Use
3953 linemap_included_from & linemap_included_from_linemap.
3955 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3957 * config/aarch64/aarch64-cores.def: Add phecda core.
3958 * config/aarch64/aarch64-tune.md: Regenerate.
3959 * doc/invoke.texi: Add phecda core.
3961 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3964 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3966 * config/s390/s390.md ("movti"): Add more alternatives for
3967 constant to GPR copies.
3969 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3971 * config/s390/s390.c: Fix whitespace damage throughout the file.
3972 * config/s390/s390.h: Likewise.
3973 * config/s390/tpf.h: Likewise.
3975 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3977 * config/s390/s390.c (s390_loadrelative_operand_p):
3978 Remove TARGET_CPU_ZARCH usages.
3979 (s390_rtx_costs): Likewise.
3980 (s390_legitimate_constant_p): Likewise.
3981 (s390_cannot_force_const_mem): Likewise.
3982 (legitimate_reload_constant_p): Likewise.
3983 (s390_preferred_reload_class): Likewise.
3984 (legitimize_pic_address): Likewise.
3985 (legitimize_tls_address): Likewise.
3986 (s390_split_branches): Removed.
3987 (s390_add_execute): Removed.
3988 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3989 (s390_mainpool_start): Likewise.
3990 (s390_mainpool_finish): Likewise.
3991 (s390_mainpool_cancel): Removed.
3992 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3993 (s390_chunkify_cancel): Likewise.
3994 (s390_return_addr_rtx): Likewise.
3995 (s390_register_info): Remove split_branches_pending_p uages.
3996 (s390_optimize_register_info): Likewise.
3997 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3998 split_branches_pending_p usages.
3999 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
4000 (s390_load_got): Likewise.
4001 (s390_expand_split_stack_prologue): Likewise.
4002 (output_asm_nops): Likewise.
4003 (s390_function_profiler): Likewise.
4004 (s390_emit_call): Likewise.
4005 (s390_conditional_register_usage): Likewise.
4006 (s390_optimize_prologue): Likewise.
4007 (s390_reorg): Remove TARGET_CPU_ZARCH and
4008 split_branches_pending_p usages.
4009 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
4011 (s390_output_indirect_thunk_function): Likewise.
4012 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
4013 (TARGET_CPU_ZARCH_P): Removed.
4014 (struct machine_function): Remove split_branches_pending_p.
4015 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
4017 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
4019 * common/config/s390/s390-common.c (processor_flags_table):
4021 * config.gcc: Remove with_arch/with_tune support.
4022 * config/s390/2064.md: Remove cpu attribute comparisons.
4023 * config/s390/driver-native.c (s390_host_detect_local_cpu):
4025 * config/s390/linux.h (ASM_SPEC):
4026 Remove -march support.
4027 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
4028 Use a table to get an arch level.
4029 * config/s390/s390-opts.h (enum processor_type):
4031 * config/s390/s390.c
4032 (processor_table): Remove entries, add arch_level values.
4033 (s390_issue_rate): Remove cases.
4034 (s390_option_override): Adjust
4035 s390_option_override_internal() call.
4036 (s390_option_override_internal): Remove deprecation warning.
4037 (s390_valid_target_attribute_tree): Adjust
4038 s390_option_override_internal() call.
4039 * config/s390/s390.h (struct s390_processor):
4040 Share with s390-c.c, add arch_level field.
4041 * config/s390/s390.md:
4042 Remove occurrences in cpu attribute.
4043 * config/s390/s390.opt: Remove -march/-mtune support.
4044 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
4045 * doc/invoke.texi: Remove deprecation warning.
4047 2018-08-08 Luis Machado <luis.machado@linaro.org>
4049 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
4051 (qdf24xx_tunings): Set vector cost structure to
4052 qdf24xx_vector_cost.
4054 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
4055 <register_sextend>: Set to 3.
4057 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
4060 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
4061 * config/aarch64/aarch64-simd.md
4062 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
4063 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
4064 (aarch64_frecpx<mode>): ...this new pattern.
4065 * config/aarch64/aarch64-simd-builtins.def: Remove comment
4066 about aarch64_frecp<FRECP:frecp_suffix><mode>.
4068 2018-08-07 Martin Liska <mliska@suse.cz>
4071 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
4072 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
4073 * predict.def (PRED_MALLOC_NONNULL): New predictor.
4074 * doc/extend.texi: Document that malloc attribute adds
4077 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
4080 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4081 Define to speculation_safe_value_not_needed.
4083 2018-08-06 Jeff Law <law@redhat.com>
4085 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
4086 the vr_values instance to cprop_into_stmt.
4087 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
4088 (cprop_operand): Also query EVRP to determine if OP is a constant.
4090 2018-08-06 Nathan Sidwell <nathan@acm.org>
4092 * diagnostic.c (diagnostic_report_current_module): Reroll
4093 included-at loop. Translate text.
4095 2018-08-06 David Malcolm <dmalcolm@redhat.com>
4097 * function-tests.c (selftest::test_expansion_to_rtl): Call
4098 free_after_compilation.
4100 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4102 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
4104 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
4106 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
4107 loops with memory block operations from getting unrolled.
4109 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
4112 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4113 Define to speculation_safe_value_not_needed.
4115 2018-08-06 Jeff Law <law@redhat.com>
4117 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
4120 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4123 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
4124 with all enabled __intN types.
4126 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
4128 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4130 * alias.c (record_set): Check for clobber high.
4131 * cfgexpand.c (expand_gimple_stmt): Likewise.
4132 * combine-stack-adj.c (single_set_for_csa): Likewise.
4133 * combine.c (find_single_use_1): Likewise.
4134 (set_nonzero_bits_and_sign_copies): Likewise.
4135 (get_combine_src_dest): Likewise.
4136 (is_parallel_of_n_reg_sets): Likewise.
4137 (try_combine): Likewise.
4138 (record_dead_and_set_regs_1): Likewise.
4139 (reg_dead_at_p_1): Likewise.
4140 (reg_dead_at_p): Likewise.
4141 * dce.c (deletable_insn_p): Likewise.
4142 (mark_nonreg_stores_1): Likewise.
4143 (mark_nonreg_stores_2): Likewise.
4144 * df-scan.c (df_find_hard_reg_defs): Likewise.
4145 (df_uses_record): Likewise.
4146 (df_get_call_refs): Likewise.
4147 * dwarf2out.c (mem_loc_descriptor): Likewise.
4148 * haifa-sched.c (haifa_classify_rtx): Likewise.
4149 * ira-build.c (create_insn_allocnos): Likewise.
4150 * ira-costs.c (scan_one_insn): Likewise.
4151 * ira.c (equiv_init_movable_p): Likewise.
4152 (rtx_moveable_p): Likewise.
4153 (interesting_dest_for_shprep): Likewise.
4154 * jump.c (mark_jump_label_1): Likewise.
4155 * postreload-gcse.c (record_opr_changes): Likewise.
4156 * postreload.c (reload_cse_simplify): Likewise.
4157 (struct reg_use): Add source expr.
4158 (reload_combine): Check for clobber high.
4159 (reload_combine_note_use): Likewise.
4160 (reload_cse_move2add): Likewise.
4161 (move2add_note_store): Likewise.
4162 * print-rtl.c (print_pattern): Likewise.
4163 * recog.c (decode_asm_operands): Likewise.
4164 (store_data_bypass_p): Likewise.
4165 (if_test_bypass_p): Likewise.
4166 * regcprop.c (kill_clobbered_value): Likewise.
4167 (kill_set_value): Likewise.
4168 * reginfo.c (reg_scan_mark_refs): Likewise.
4169 * reload1.c (maybe_fix_stack_asms): Likewise.
4170 (eliminate_regs_1): Likewise.
4171 (elimination_effects): Likewise.
4172 (mark_not_eliminable): Likewise.
4173 (scan_paradoxical_subregs): Likewise.
4174 (forget_old_reloads_1): Likewise.
4175 * reorg.c (find_end_label): Likewise.
4176 (try_merge_delay_insns): Likewise.
4177 (redundant_insn): Likewise.
4178 (own_thread_p): Likewise.
4179 (fill_simple_delay_slots): Likewise.
4180 (fill_slots_from_thread): Likewise.
4181 (dbr_schedule): Likewise.
4182 * resource.c (update_live_status): Likewise.
4183 (mark_referenced_resources): Likewise.
4184 (mark_set_resources): Likewise.
4185 * rtl.c (copy_rtx): Likewise.
4186 * rtlanal.c (reg_referenced_p): Likewise.
4187 (single_set_2): Likewise.
4188 (noop_move_p): Likewise.
4189 (note_stores): Likewise.
4190 * sched-deps.c (sched_analyze_reg): Likewise.
4191 (sched_analyze_insn): Likewise.
4193 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4195 * cse.c (invalidate_reg): New function extracted from...
4196 (invalidate): ...here.
4197 (canonicalize_insn): Check for clobber high.
4198 (invalidate_from_clobbers): invalidate clobber highs.
4199 (invalidate_from_sets_and_clobbers): Likewise.
4200 (count_reg_usage): Check for clobber high.
4201 (insn_live_p): Likewise.
4202 * cselib.c (cselib_expand_value_rtx_1):Likewise.
4203 (cselib_invalidate_regno): Check for clobber in setter.
4204 (cselib_invalidate_rtx): Pass through setter.
4205 (cselib_invalidate_rtx_note_stores):
4206 (cselib_process_insn): Check for clobber high.
4207 * cselib.h (cselib_invalidate_rtx): Add operand.
4209 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4211 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
4212 (mark_not_eliminable): Likewise.
4213 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
4214 * lra-lives.c (process_bb_lives): Check for clobber high.
4215 * lra.c (new_insn_reg): Remember clobber highs.
4216 (collect_non_operand_hard_regs): Check for clobber high.
4217 (lra_set_insn_recog_data): Likewise.
4218 (add_regs_to_insn_regno_info): Likewise.
4219 (lra_update_insn_regno_info): Likewise.
4221 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4223 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
4224 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
4226 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4228 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
4229 (copy_insn_1): Likewise.
4230 (gen_hard_reg_clobber_high): New gen function.
4231 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
4232 * genemit.c (gen_exp): Likewise.
4233 (gen_emit_seq): Pass through info.
4234 (gen_insn): Check for CLOBBER_HIGH.
4235 (gen_expand): Pass through info.
4236 (gen_split): Likewise.
4237 (output_add_clobbers): Likewise.
4238 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
4239 (remove_clobbers): Likewise.
4240 * rtl.h (gen_hard_reg_clobber_high): New declaration.
4242 2018-08-06 Alan Hayward <alan.hayward@arm.com>
4244 * doc/rtl.texi (clobber_high): Add.
4245 (parallel): Add in clobber high
4246 * rtl.c (rtl_check_failed_code3): Add function.
4247 * rtl.def (CLOBBER_HIGH): Add expression.
4248 * rtl.h (RTL_CHECKC3): Add macro.
4249 (rtl_check_failed_code3): Add declaration.
4250 (XC3EXP): Add macro.
4252 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
4255 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
4256 cfun->machine->max_used_stack_alignment if needed.
4258 2018-08-04 Martin Sebor <msebor@redhat.com>
4260 PR tree-optimization/86571
4261 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
4264 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
4267 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4270 2018-08-03 Jeff Law <law@redhat.com>
4273 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4274 Define to speculation_safe_value_not_needed.
4276 2018-08-03 David Malcolm <dmalcolm@redhat.com>
4278 * doc/gcov.texi (-x): Remove duplicate "to".
4279 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
4280 (-Wif-not-aligned): Remove duplicate "is".
4281 (-flto): Remove duplicate "the".
4282 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
4283 duplicate "v5.00.b".
4284 (MSP430 Options): Remove duplicate "and" from the description
4285 of "-mgprel-sec=regexp".
4286 (x86 Options): Remove duplicate copies of "vmldLog102" and
4287 vmlsLog104 from description of "-mveclibabi=type".
4289 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
4291 * internal-fn.h (first_commutative_argument): Declare.
4292 * internal-fn.c (first_commutative_argument): New function.
4293 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
4294 restrictions for pattern statements. Use first_commutative_argument
4295 to look for commutative operands in calls to internal functions.
4297 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
4299 * Makefile.in (wide-int-range.o): New.
4300 * tree-vrp.c: Move all the wide_int_* functions to...
4301 * wide-int-range.cc: ...here.
4302 * tree-vrp.h: Move all the wide_int_* prototypes to...
4303 * wide-int-range.h: ...here.
4305 2018-08-03 Tom de Vries <tdevries@suse.de>
4307 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
4309 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
4310 * except.c (output_function_exception_table): Do early exit if
4311 targetm_common.except_unwind_info (&global_options) == UI_NONE.
4313 2018-08-03 Martin Liska <mliska@suse.cz>
4315 * predict.c (dump_prediction): Change to 2 digits
4318 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
4320 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
4322 (falkor_am_1_gtov_gtov): ... a new insn reservation.
4324 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
4326 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
4327 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
4328 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
4329 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
4330 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
4332 2018-08-02 David Malcolm <dmalcolm@redhat.com>
4334 * diagnostic-show-locus.c (diagnostic_show_locus): Use
4335 pp_take_prefix when saving the existing prefix.
4336 * diagnostic.c (diagnostic_append_note): Likewise.
4337 * langhooks.c (lhd_print_error_function): Likewise.
4338 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
4339 param's type. Free the existing prefix.
4340 (pp_take_prefix): New function.
4341 (pretty_printer::pretty_printer): Drop the prefix parameter.
4342 Rename the length parameter to match the comment.
4343 (pretty_printer::~pretty_printer): Free the prefix.
4344 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
4346 (struct pretty_printer): Drop the "const" from "prefix" field's
4347 type and clarify memory management.
4348 (pp_set_prefix): Drop the "const" from the 2nd param.
4349 (pp_take_prefix): New decl.
4351 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4353 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
4354 for word_mode_ok here instead of passing as argument.
4355 (expand_block_compare): Change select_block_compare_mode() call.
4356 (expand_strncmp_gpr_sequence): New function.
4357 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
4359 2018-08-02 Jeff Law <law@redhat.com>
4362 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4363 Define to speculation_safe_value_not_needed.
4366 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4367 Define to speculation_safe_value_not_needed.
4369 2018-08-02 Tom de Vries <tdevries@suse.de>
4372 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
4373 function. Return UI_TARGET unconditionally.
4374 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
4375 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
4377 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4379 * genemit.c (print_overload_test): Fix typo.
4381 2018-08-02 Richard Biener <rguenther@suse.de>
4383 PR tree-optimization/86816
4384 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
4385 which checks for value availability before querying it.
4386 (gvn_uses_equal): Use it.
4387 (same_succ_hash): Likewise.
4388 (gimple_equal_p): Likewise.
4390 2018-08-02 Nick Clifton <nickc@redhat.com>
4393 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4394 Define to speculation_safe_value_not_needed.
4397 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4398 Define to speculation_safe_value_not_needed.
4401 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4402 Define to speculation_safe_value_not_needed.
4405 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4406 Define to speculation_safe_value_not_needed.
4409 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4410 Define to speculation_safe_value_not_needed.
4413 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4414 Define to speculation_safe_value_not_needed.
4417 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4418 Define to speculation_safe_value_not_needed.
4421 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4422 Define to speculation_safe_value_not_needed.
4425 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4426 speculation_safe_value_not_needed.
4429 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
4430 to speculation_safe_value_not_needed.
4432 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4434 * doc/md.texi: Expand the documentation of instruction names
4435 to mention port-local uses. Document '@' in pattern names.
4436 * read-md.h (overloaded_instance, overloaded_name): New structs.
4438 (md_reader::handle_overloaded_name): New member function.
4439 (md_reader::get_overloads): Likewise.
4440 (md_reader::m_first_overload): New member variable.
4441 (md_reader::m_next_overload_ptr): Likewise.
4442 (md_reader::m_overloads_htab): Likewise.
4443 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
4444 m_next_overload_ptr and m_overloads_htab.
4445 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
4446 (get_mode_token, get_code_token, get_int_token): New functions.
4447 (map_attr_string): Add an optional argument that passes back
4448 the associated iterator.
4449 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
4450 (md_reader::handle_overloaded_name, add_overload_instance): New
4452 (apply_iterators): Handle '@' names. Report an error if '@'
4453 is used without iterators.
4454 (initialize_iterators): Initialize the new iterator_group fields.
4455 * genopinit.c (handle_overloaded_code_for)
4456 (handle_overloaded_gen): New functions.
4457 (main): Use them to print declarations of maybe_code_for_* and
4458 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
4459 * genemit.c (print_overload_arguments, print_overload_test)
4460 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
4461 (main): Use it to print definitions of maybe_code_for_* and
4462 maybe_gen_* functions.
4463 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
4464 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
4465 instead of explicit mode checks.
4466 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
4467 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
4468 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
4469 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
4470 (aarch64_expand_compare_and_swap): Likewise
4471 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
4472 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
4473 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
4474 (aarch64_constant_pool_reload_icode): Delete.
4475 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
4476 instead of aarch64_constant_pool_reload_icode. Use
4477 code_for_aarch64_reload_mov instead of explicit mode checks.
4478 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
4479 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
4480 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
4481 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
4482 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
4483 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
4484 (aarch64_atomic_load_op_code): Delete.
4485 (aarch64_emit_atomic_load_op): Likewise.
4486 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
4487 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
4488 instead of aarch64_emit_atomic_load_op.
4489 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
4490 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
4491 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
4492 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
4493 character before the pattern name.
4494 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4495 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
4496 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
4497 (aarch64_frecps<mode>): Likewise.
4498 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
4499 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
4500 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
4501 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
4502 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
4504 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4506 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4507 Allow HFmode constants if TARGET_FP_F16INST.
4509 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
4512 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
4513 No longer check last store for clobber of address register.
4515 2018-08-02 Martin Liska <mliska@suse.cz>
4517 PR gcov-profile/86817
4518 * gcov.c (process_all_functions): New function.
4520 (process_file): Move functions processing to
4521 process_all_functions.
4523 2018-08-02 David Malcolm <dmalcolm@redhat.com>
4525 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
4526 "const" to the "gimple *" and "rtx_insn *" parameters.
4527 * dumpfile.h (dump_user_location_t::dump_user_location_t):
4529 (dump_location_t::dump_location_t): Likewise.
4531 2018-08-01 Martin Sebor <msebor@redhat.com>
4533 PR tree-optimization/86650
4534 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
4535 rather than a "gcall *". Directly pass the data of interest
4536 to percent_K_format, rather than building a temporary CALL_EXPR
4538 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
4539 (gimple_fold_builtin_strncat): Adjust.
4540 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
4541 gcall* argument with gimple*.
4542 * gimple-ssa-warn-restrict.c (check_call): Same.
4543 (wrestrict_dom_walker::before_dom_children): Same.
4544 (builtin_access::builtin_access): Same.
4545 (check_bounds_or_overlap): Same
4546 (maybe_diag_overlap): Same.
4547 (maybe_diag_offset_bounds): Same.
4548 * tree-diagnostic.c (default_tree_printer): Move usage of
4549 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
4551 * tree-pretty-print.c (percent_K_format): Add argument.
4552 * tree-pretty-print.h: Add argument.
4553 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
4554 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
4555 (maybe_diag_stxncpy_trunc): Same.
4556 (handle_builtin_stxncpy): Same.
4557 (handle_builtin_strcat): Same.
4559 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4561 * match.pd: Optimise pointer range checks.
4563 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4565 PR tree-optimization/86758
4566 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
4567 to remove pattern statements.
4569 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4571 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
4572 result of dfs_enumerate_from when constructing stmt_vec_infos,
4573 instead of additionally calling get_loop_body.
4575 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4577 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
4579 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
4580 When creating an iv, assert that the step is not known to be zero.
4581 (vect_setup_realignment): Update call accordingly.
4582 * tree-vect-stmts.c (vectorizable_store): Likewise.
4583 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
4585 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4587 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
4588 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
4589 (vectorizable_reduction): Likewise.
4590 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4591 (vect_detect_hybrid_slp_stmts): Likewise.
4592 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4594 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
4596 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
4597 (wide_int_set_zero_nonzero_bits): ...this.
4598 (zero_nonzero_bits_from_vr): Rename to...
4599 (vrp_set_zero_nonzero_bits): ...this.
4600 (extract_range_from_multiplicative_op_1): Abstract wide int
4602 (wide_int_range_multiplicative_op): ...here.
4603 (extract_range_from_binary_expr_1): Extract wide int binary
4604 operations into their own functions.
4605 (wide_int_range_lshift): New.
4606 (wide_int_range_can_optimize_bit_op): New.
4607 (wide_int_range_shift_undefined_p): New.
4608 (wide_int_range_bit_xor): New.
4609 (wide_int_range_bit_ior): New.
4610 (wide_int_range_bit_and): New.
4611 (wide_int_range_trunc_mod): New.
4612 (extract_range_into_wide_ints): New.
4613 (vrp_shift_undefined_p): New.
4614 (extract_range_from_multiplicative_op): New.
4615 (vrp_can_optimize_bit_op): New.
4616 * tree-vrp.h (value_range::dump): New.
4617 (wide_int_range_multiplicative_op): New.
4618 (wide_int_range_lshift):New.
4619 (wide_int_range_shift_undefined_p): New.
4620 (wide_int_range_bit_xor): New.
4621 (wide_int_range_bit_ior): New.
4622 (wide_int_range_bit_and): New.
4623 (wide_int_range_trunc_mod): New.
4624 (zero_nonzero_bits_from_bounds): Rename to...
4625 (wide_int_set_zero_nonzero_bits): ...this.
4626 (zero_nonzero_bits_from_vr): Rename to...
4627 (vrp_set_zero_nonzero_bits): ...this.
4628 (range_easy_mask_min_max): Rename to...
4629 (wide_int_range_can_optimize_bit_op): this.
4630 * vr-values.c (simplify_bit_ops_using_ranges): Rename
4631 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4633 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4635 * tree-vectorizer.h (vect_orig_stmt): New function.
4636 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4637 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4638 (vect_create_epilog_for_reduction): Likewise.
4639 (vectorizable_live_operation): Likewise.
4640 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4641 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4642 * tree-vect-stmts.c (vectorizable_call): Likewise.
4643 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4645 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4647 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4649 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4650 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4651 (vect_transform_loop): Likewise.
4652 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4654 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4656 * tree-vectorizer.h (vect_schedule_slp): Return void.
4657 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4658 (vect_schedule_slp): Likewise.
4660 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4662 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4664 (vect_transform_loop): Update calls accordingly. Schedule SLP
4665 instances before the main loop, if any exist.
4667 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4669 PR tree-optimization/86749
4670 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4671 If the lhs is used in a COND_EXPR, check that it is being used
4672 as the "then" or "else" value.
4674 2018-08-01 Tom de Vries <tdevries@suse.de>
4677 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4678 speculation_safe_value_not_needed.
4680 2018-08-01 Richard Biener <rguenther@suse.de>
4682 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4685 2018-08-01 Martin Liska <mliska@suse.cz>
4687 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4688 format how successful transformation is dumped.
4689 (gimple_mod_pow2_value_transform): Likewise.
4690 (gimple_mod_subtract_transform): Likewise.
4691 (gimple_stringops_transform): Likewise.
4693 2018-08-01 Martin Liska <mliska@suse.cz>
4696 * value-prof.c (interesting_stringop_to_profile_p):
4697 Simplify the code and add BUILT_IN_MEMMOVE.
4698 (gimple_stringops_transform): Likewise.
4700 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
4702 * config/aarch64/aarch64-simd.md
4703 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4704 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4705 use GPI iterator instead of SI mode.
4707 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4709 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4710 rs6000_speculation_barrier.
4711 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4712 new barrier pattern name.
4714 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4716 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4717 (speculation_barrier): New insn.
4719 2018-08-01 Richard Biener <rguenther@suse.de>
4722 * graphite.h: Include isl/id.h and isl/space.h to allow build
4725 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
4728 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4729 mode for COFF targets.
4730 * defaults.h (TARGET_COFF): Define.
4731 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4732 TARGET_COFF): Define.
4733 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4734 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4735 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4737 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4739 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4740 * gimple-streamer-out.c (output_bb): Save it.
4741 * lto-streamer-in.c (input_struct_function_base): Restore
4742 instance discriminator if available. Create map on demand.
4743 * lto-streamer-out.c (output_struct_function_base): Save it if
4745 * final.c (decl_to_instance_map): Document LTO strategy.
4747 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4748 Olivier Hainque <hainque@adacore.com>
4750 * debug.h (decl_to_instance_map_t): New type.
4751 (decl_to_instance_map): Declare.
4752 (maybe_create_decl_to_instance_map): New inline function.
4753 * final.c (bb_discriminator, last_bb_discriminator): New statics,
4754 to track basic block discriminators.
4755 (final_start_function_1): Initialize them.
4756 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4758 (decl_to_instance_map): New variable.
4759 (map_decl_to_instance, maybe_set_discriminator): New functions.
4760 (notice_source_line): Set discriminator.
4762 2018-07-31 Ian Lance Taylor <iant@golang.org>
4764 * targhooks.c (default_have_speculation_safe_value): Add
4767 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4769 * dump-context.h: Include "pretty-print.h".
4770 (dump_context::refresh_dumps_are_enabled): New decl.
4771 (dump_context::emit_item): New decl.
4772 (class dump_context): Add fields "m_test_pp" and
4774 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4775 (temp_dump_context::get_dumped_text): New decl.
4776 (class temp_dump_context): Add field "m_pp".
4777 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4778 (dump_context::refresh_dumps_are_enabled): ...and add a test for
4780 (set_dump_file): Update for above change.
4781 (set_alt_dump_file): Likewise.
4782 (dump_loc): New overload, taking a pretty_printer *.
4783 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
4784 to any test pretty-printer.
4785 (make_item_for_dump_gimple_stmt): New function, adapted from
4786 optinfo::add_gimple_stmt.
4787 (dump_context::dump_gimple_stmt): Call it, and use the result,
4788 eliminating the direct usage of dump_file and alt_dump_file in
4789 favor of indirectly using them via emit_item.
4790 (make_item_for_dump_gimple_expr): New function, adapted from
4791 optinfo::add_gimple_expr.
4792 (dump_context::dump_gimple_expr): Call it, and use the result,
4793 eliminating the direct usage of dump_file and alt_dump_file in
4794 favor of indirectly using them via emit_item.
4795 (make_item_for_dump_generic_expr): New function, adapted from
4797 (dump_context::dump_generic_expr): Call it, and use the result,
4798 eliminating the direct usage of dump_file and alt_dump_file in
4799 favor of indirectly using them via emit_item.
4800 (make_item_for_dump_printf_va): New function, adapted from
4801 optinfo::add_printf_va.
4802 (make_item_for_dump_printf): New function.
4803 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4804 and use the result, eliminating the direct usage of dump_file and
4805 alt_dump_file in favor of indirectly using them via emit_item.
4806 (make_item_for_dump_dec): New function.
4807 (dump_context::dump_dec): Call it, and use the result,
4808 eliminating the direct usage of dump_file and alt_dump_file in
4809 favor of indirectly using them via emit_item.
4810 (make_item_for_dump_symtab_node): New function, adapted from
4811 optinfo::add_symtab_node.
4812 (dump_context::dump_symtab_node): Call it, and use the result,
4813 eliminating the direct usage of dump_file and alt_dump_file in
4814 favor of indirectly using them via emit_item.
4815 (dump_context::begin_scope): Reimplement, avoiding direct usage
4816 of dump_file and alt_dump_file in favor of indirectly using them
4818 (dump_context::emit_item): New member function.
4819 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4820 Set up test pretty-printer on the underlying context. Call
4821 refresh_dumps_are_enabled.
4822 (temp_dump_context::~temp_dump_context): Call
4823 refresh_dumps_are_enabled.
4824 (temp_dump_context::get_dumped_text): New member function.
4825 (selftest::verify_dumped_text): New function.
4826 (ASSERT_DUMPED_TEXT_EQ): New macro.
4827 (selftest::test_capture_of_dump_calls): Run all tests twice, with
4828 and then without optinfo enabled. Add uses of
4829 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
4830 * dumpfile.h: Update comment for the dump_* API.
4831 * optinfo-emit-json.cc
4832 (selftest::test_building_json_from_dump_calls): Update for new
4833 param for temp_dump_context ctor.
4834 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4835 and "m_owned" field.
4836 (optinfo_item::~optinfo_item): Likewise.
4837 (optinfo::add_item): New member function.
4838 (optinfo::emit): Update comment.
4839 (optinfo::add_string): Delete.
4840 (optinfo::add_printf): Delete.
4841 (optinfo::add_printf_va): Delete.
4842 (optinfo::add_gimple_stmt): Delete.
4843 (optinfo::add_gimple_expr): Delete.
4844 (optinfo::add_tree): Delete.
4845 (optinfo::add_symtab_node): Delete.
4846 (optinfo::add_dec): Delete.
4847 * optinfo.h (class dump_context): New forward decl.
4848 (optinfo::add_item): New decl.
4849 (optinfo::add_string): Delete.
4850 (optinfo::add_printf): Delete.
4851 (optinfo::add_printf_va): Delete.
4852 (optinfo::add_gimple_stmt): Delete.
4853 (optinfo::add_gimple_expr): Delete.
4854 (optinfo::add_tree): Delete.
4855 (optinfo::add_symtab_node): Delete.
4856 (optinfo::add_dec): Delete.
4857 (optinfo::add_poly_int): Delete.
4858 (optinfo_item::optinfo_item): Remove "owned" param.
4859 (class optinfo_item): Remove field "m_owned".
4861 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4864 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4865 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4866 requested variable alignment.
4867 (expand_one_ssa_partition): Likewise.
4868 (expand_one_var): Likewise.
4870 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4872 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4873 to speculation_safe_value_not_needed.
4875 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4877 * targhooks.h (speculation_safe_value_not_needed): New prototype.
4878 * targhooks.c (speculation_safe_value_not_needed): New function.
4879 * target.def (have_speculation_safe_value): Update documentation.
4880 * doc/tm.texi: Regenerated.
4882 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4884 * config/aarch64/iterators.md (ALLI_TI): New iterator.
4885 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4887 (despeculate_copy<ALLI:mode>_insn): New insn.
4888 (despeculate_copyti_insn): New insn.
4889 (despeculate_simple<ALLI:mode>): New insn
4890 (despeculate_simpleti): New insn.
4891 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4893 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4894 aarch64_speculation_safe_value.
4895 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4897 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4899 * config/aarch64/aarch64-speculation.cc: New file.
4900 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4901 before pass_reorder_blocks.
4902 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4904 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4905 X14 and X15 when tracking speculation.
4906 * config/aarch64/aarch64.md (register name constants): Add
4907 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4908 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4909 (speculation_barrier): New insn attribute.
4910 (cmp<mode>): Allow SP in comparisons.
4911 (speculation_tracker): New insn.
4912 (speculation_barrier): Add speculation_barrier attribute.
4913 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4914 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4915 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4917 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4919 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4920 aarch64_track_speculation is true.
4921 (tb<optab><mode>1): Likewise.
4922 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4923 generate CB[N]Z when tracking speculation.
4924 (aarch64_split_compare_and_swap): Likewise.
4925 (aarch64_split_atomic_op): Likewise.
4927 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4929 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4931 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4933 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4934 (speculation_barrier): New insn.
4936 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4938 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4939 * config/arm/arm.md (speculation_barrier): New expand.
4940 (speculation_barrier_insn): New pattern.
4942 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4944 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4945 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4946 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4947 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4949 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4950 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4951 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4952 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4953 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4954 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4955 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4956 * builtins.c (expand_speculation_safe_value): New function.
4957 (expand_builtin): Call it.
4958 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4959 * doc/extend.texi: Document __builtin_speculation_safe_value.
4960 * doc/md.texi: Document "speculation_barrier" pattern.
4961 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4962 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4963 * doc/tm.texi: Regenerated.
4964 * target.def (have_speculation_safe_value, speculation_safe_value): New
4966 * targhooks.c (default_have_speculation_safe_value): New function.
4967 (default_speculation_safe_value): New function.
4968 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4969 (default_speculation_safe_value): Add prototype.
4971 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4973 * dump-context.h (dump_context::dump_loc): New decl.
4974 * dumpfile.c (dump_context::dump_loc): New member function.
4975 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4976 and dump_gimple_stmt.
4977 (dump_context::dump_gimple_expr_loc): Likewise, using
4979 (dump_context::dump_generic_expr_loc): Likewise, using
4981 (dump_context::dump_printf_loc_va): Likewise, using
4983 (dump_context::begin_scope): Explicitly using the global function
4984 "dump_loc", rather than the member function.
4986 2018-07-31 Martin Sebor <msebor@redhat.com>
4988 PR tree-optimization/86741
4989 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4991 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4993 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4994 depend on whether prefetch instructions will be emitted or not.
4995 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4996 will be emitted or not.
4997 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4998 (TARGET_SETMEM_PFD): New macros.
5000 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5002 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
5003 (NULL_STMT_VEC_INFO): Delete.
5004 (stmt_vec_info::operator*): Likewise.
5005 (stmt_vec_info::operator gimple *): Likewise.
5006 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
5007 of NULL_STMT_VEC_INFO.
5008 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5009 (vect_reassociating_reduction_p): Likewise.
5010 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5011 (vectorizable_store): Likewise.
5012 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
5013 (vec_info::free_stmt_vec_infos): Likewise.
5015 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5017 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
5018 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
5020 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5022 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
5023 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5024 (vec_info::free_stmt_vec_info): New private member functions.
5025 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
5026 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
5027 * tree-parloops.c (gather_scalar_reductions): Remove calls to
5028 set_stmt_vec_info_vec and free_stmt_vec_infos.
5029 * tree-vect-loop.c (_loop_vec_info): Remove call to
5030 set_stmt_vec_info_vec.
5031 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
5032 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
5033 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
5034 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5035 (vec_info::free_stmt_vec_info): ...these new functions. Remove
5036 assignments in {vec_info::,}new_stmt_vec_info that are redundant
5037 with the clearing in the xcalloc.
5038 (stmt_vec_info_vec): Delete.
5039 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
5040 (vectorize_loops): Likewise.
5041 (vec_info::~vec_info): Remove argument from call to
5042 free_stmt_vec_infos.
5043 (vec_info::add_stmt): Remove vinfo argument from call to
5046 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5048 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
5049 rather than a gimple stmt.
5050 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
5051 information for pattern statements when passed the original
5052 statement; instead wait to be passed the pattern statement itself.
5053 Don't call set_vinfo_for_stmt here.
5054 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
5055 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
5056 stmt_vec_infos here.
5057 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
5058 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
5059 stmt_vec_infos entry.
5061 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5063 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
5064 * tree-vectorizer.c (vec_info::replace_stmt): New function.
5065 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
5066 * tree-vect-stmts.c (vectorizable_call): Likewise.
5067 (vectorizable_simd_clone_call): Likewise.
5069 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5071 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
5072 * tree-vectorizer.c (vec_info::remove_stmt): New function.
5073 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
5074 * tree-vect-loop.c (vect_transform_loop): Likewise.
5075 * tree-vect-slp.c (vect_schedule_slp): Likewise.
5076 * tree-vect-stmts.c (vect_remove_stores): Likewise.
5078 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5080 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
5081 (vect_dr_stmt): Delete.
5082 * tree-vectorizer.c (vec_info::lookup_dr): New function.
5083 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
5085 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
5086 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
5087 (vect_verify_datarefs_alignment, vect_peeling_supportable)
5088 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
5089 (vect_analyze_data_refs): Likewise.
5090 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
5092 (vect_find_same_alignment_drs): Likewise.
5093 (vect_slp_analyze_node_dependences): Update calls accordingly.
5094 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
5095 instead of DR_VECT_AUX.
5096 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
5097 of a vector data references. Use vec_info::lookup_dr instead of
5099 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
5100 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
5101 instead of DR_VECT_AUX.
5103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5105 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
5107 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5109 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5110 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5111 (vect_gen_prolog_loop_niters): Likewise.
5113 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5115 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
5116 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
5117 (vect_known_alignment_in_bytes, vect_dr_behavior)
5118 (vect_get_scalar_dr_size): Take references as dr_vec_infos
5119 instead of data_references. Update calls to other routines for
5120 which the same change has been made.
5121 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
5122 dr_vec_infos instead of stmt_vec_infos.
5123 (vect_analyze_data_ref_dependence): Update call accordingly.
5124 (vect_slp_analyze_data_ref_dependence)
5125 (vect_record_base_alignments): Use DR_VECT_AUX.
5126 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
5127 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
5128 (vector_alignment_reachable_p, vect_get_data_access_cost)
5129 (vect_peeling_supportable, vect_analyze_group_access_1)
5130 (vect_analyze_group_access, vect_analyze_data_ref_access)
5131 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
5132 (vect_compile_time_alias, vect_small_gap_p)
5133 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
5134 (vect_supportable_dr_alignment): Take references as dr_vec_infos
5135 instead of data_references. Update calls to other routines for
5136 which the same change has been made.
5137 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
5138 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5139 (vect_slp_analyze_and_verify_node_alignment)
5140 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
5141 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5142 (vect_setup_realignment): Use dr_vec_infos. Update calls after
5144 (_vect_peel_info::dr): Replace with...
5145 (_vect_peel_info::dr_info): ...this new field.
5146 (vect_peeling_hash_get_most_frequent)
5147 (vect_peeling_hash_choose_best_peeling): Update accordingly.
5148 (vect_peeling_hash_get_lowest_cost):
5149 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
5150 routines for which the same change has been made.
5151 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
5153 * tree-vect-loop-manip.c (get_misalign_in_elems)
5154 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
5156 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5157 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
5158 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
5159 (get_group_load_store_type, get_negative_load_store_type)
5160 (vect_get_data_ptr_increment, vectorizable_store)
5161 (vectorizable_load): Likewise.
5162 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
5163 Update calls to other routines for which the same change has been made.
5165 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5167 * tree-vectorizer.h (vec_info::move_dr): New member function.
5168 (dataref_aux): Rename to...
5169 (dr_vec_info): ...this and add "dr" and "stmt" fields.
5170 (_stmt_vec_info::dr_aux): Update accordingly.
5171 (_stmt_vec_info::data_ref_info): Delete.
5172 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
5173 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
5174 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
5175 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
5177 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
5178 (STMT_VINFO_DR_INFO): New macro.
5179 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
5180 (set_dr_misalignment): Update after rename of dataref_aux.
5181 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
5182 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
5183 initialization of STMT_VINFO_DATA_REF.
5184 * tree-vectorizer.c (vec_info::move_dr): New function.
5185 * tree-vect-patterns.c (vect_recog_bool_pattern)
5186 (vect_recog_mask_conversion_pattern)
5187 (vect_recog_gather_scatter_pattern): Use it.
5188 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
5189 the "dr" and "stmt" fields of dr_vec_info instead of
5190 STMT_VINFO_DATA_REF.
5192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5194 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
5195 (is_pattern_stmt_p): Use it.
5196 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
5197 on pattern statements.
5199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5201 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
5202 original stmt as a stmt_vec_info rather than a gimple stmt.
5203 (vect_pattern_recog_1): Take the statement directly as a
5204 stmt_vec_info, rather than via a gimple_stmt_iterator.
5205 Update call to vect_mark_pattern_stmts.
5206 (vect_pattern_recog): Update calls accordingly.
5208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5210 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
5211 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
5212 a vect_def_type for the first argument.
5213 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
5214 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
5215 operand if it isn't defined by a vectorized statement.
5216 (vect_build_gather_load_calls): Remove the mask_dt argument and
5217 update calls to vect_get_vec_def_for_stmt_copy.
5218 (vectorizable_bswap): Likewise the dt argument.
5219 (vectorizable_call): Update calls to vectorizable_bswap and
5220 vect_get_vec_def_for_stmt_copy.
5221 (vectorizable_simd_clone_call, vectorizable_assignment)
5222 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
5223 (vectorizable_comparison): Update calls to
5224 vect_get_vec_def_for_stmt_copy.
5225 (vectorizable_store): Likewise. Remove now-unnecessary calls to
5227 (vect_get_loop_based_defs): Remove dt argument and update call
5228 to vect_get_vec_def_for_stmt_copy.
5229 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
5230 and vect_get_vec_def_for_stmt_copy.
5231 (vectorizable_load): Update calls to vect_build_gather_load_calls
5232 and vect_get_vec_def_for_stmt_copy.
5233 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5234 (vectorizable_reduction, vectorizable_live_operation): Update calls
5235 to vect_get_vec_def_for_stmt_copy.
5237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5239 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
5240 and gimple stmt arguments with a stmt_vec_info.
5241 (vect_record_base_alignments): Update calls accordingly.
5242 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
5243 and gimple stmt arguments with a stmt_vec_info.
5244 (vect_build_slp_tree_1): Remove vinfo argument and update call
5245 to vect_record_max_nunits.
5246 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
5247 and vect_record_max_nunits.
5249 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5251 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
5252 file and take a stmt_vec_info instead of a gimple stmt.
5253 (supportable_widening_operation, vect_finish_replace_stmt)
5254 (vect_finish_stmt_generation, vect_get_store_rhs)
5255 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
5256 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
5257 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
5258 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
5259 (vect_create_data_ref_ptr, bump_vector_ptr)
5260 (vect_permute_store_chain, vect_setup_realignment)
5261 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
5262 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
5263 (vectorizable_reduction, vectorizable_induction)
5264 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
5265 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
5266 than gimple stmts as arguments.
5267 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
5268 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
5269 (can_group_stmts_p, vect_check_gather_scatter)
5270 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5271 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
5272 (vect_permute_load_chain, vect_shift_permute_load_chain)
5273 (vect_transform_grouped_load)
5274 (vect_record_grouped_load_vectors): Likewise.
5275 * tree-vect-loop.c (vect_fixup_reduc_chain)
5276 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
5277 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
5278 (vectorizable_reduction, vectorizable_induction)
5279 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
5280 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
5281 (vect_get_load_store_mask): Likewise.
5282 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
5283 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
5284 * tree-vect-stmts.c (vect_mark_relevant)
5285 (is_simple_and_all_uses_invariant)
5286 (exist_non_indexing_operands_for_use_p, process_use)
5287 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
5288 (vect_get_vec_def_for_operand, vect_get_vec_defs)
5289 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
5290 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
5291 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
5292 (get_negative_load_store_type, get_load_store_type)
5293 (vect_check_load_store_mask, vect_check_store_rhs)
5294 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
5295 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5296 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5297 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5298 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
5299 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
5300 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
5301 (supportable_widening_operation): Likewise.
5303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5305 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
5306 a stmt_vec_info instead of a gcall.
5307 (vect_check_gather_scatter): Update call accordingly.
5308 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
5310 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
5311 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
5312 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
5313 instead of a gimple stmt.
5314 (vect_transform_loop): Update calls accordingly.
5315 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
5316 stmt_vec_infos instead of gimple stmts.
5317 (vect_analyze_slp_instance): Update use accordingly.
5318 * tree-vect-stmts.c (read_vector_array, write_vector_array)
5319 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
5320 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
5321 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
5322 (vect_gen_widened_results_half, vect_get_loop_based_defs)
5323 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
5324 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
5325 down to subroutines.
5327 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5329 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
5330 of the worklist from a vector of gimple stmts to a vector of
5332 * tree-vect-stmts.c (vect_mark_relevant, process_use)
5333 (vect_mark_stmts_to_be_vectorized): Likewise
5335 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5337 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
5338 statement before passing it to vect_analyze_stmt.
5339 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
5340 the chain of phi vector definitions. Track the exit phi via its
5342 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
5343 STMT_VINFO_REDUC_DEF.
5344 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
5345 stmt_vec_infos to handle the statement chains.
5346 (vect_get_slp_defs): Record the first statement in the node
5347 using a stmt_vec_info.
5348 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
5349 statements here and pass their stmt_vec_info down to subroutines.
5350 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
5351 down to vect_finish_stmt_generation.
5352 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
5353 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
5354 stmt_vec_infos to subroutines.
5355 (vect_remove_stores): Use stmt_vec_infos to handle the statement
5358 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5360 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
5361 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
5362 (vect_permute_store_chain, vect_setup_realignment)
5363 (vect_permute_load_chain, vect_shift_permute_load_chain)
5364 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
5365 stmts internally, and when passing values to other vectorizer routines.
5366 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5367 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
5368 (vect_analyze_loop_operations, get_initial_def_for_reduction)
5369 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
5370 (vectorizable_reduction, vectorizable_induction)
5371 (vectorizable_live_operation, vect_transform_loop_stmt)
5372 (vect_transform_loop): Likewise.
5373 * tree-vect-patterns.c (vect_reassociating_reduction_p)
5374 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
5375 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
5376 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5377 (vect_slp_analyze_node_operations_1): Likewise.
5378 * tree-vect-stmts.c (vect_mark_relevant, process_use)
5379 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
5380 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
5381 (vect_finish_stmt_generation_1, get_group_load_store_type)
5382 (get_load_store_type, vect_build_gather_load_calls)
5383 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5384 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5385 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5386 (vectorizable_store, vectorizable_load, vectorizable_condition)
5387 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
5388 (supportable_widening_operation): Likewise.
5389 (vect_get_vector_types_for_stmt): Likewise.
5390 * tree-vectorizer.h (vect_dr_behavior): Likewise.
5392 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5394 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5395 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
5396 (vect_permute_store_chain, vect_permute_load_chain)
5397 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
5398 repeated stmt_vec_info lookups.
5399 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5400 (vect_update_ivs_after_vectorizer): Likewise.
5401 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
5402 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5403 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
5404 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5405 (vect_bb_slp_scalar_cost): Likewise.
5406 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
5408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5410 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
5411 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5412 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
5413 to get gassigns and gcalls, rather than operating on generc gimple
5415 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
5416 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
5417 (vectorizable_load, vect_analyze_stmt): Likewise.
5418 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
5420 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5422 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
5423 return stmt_vec_infos rather than gimple stmts. Do not accept
5425 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
5427 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5428 Update use of get_later_stmt.
5429 (vect_get_constant_vectors): Update call accordingly.
5430 (vect_schedule_slp_instance): Likewise
5431 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
5432 (vect_slp_analyze_instance_dependence): Likewise.
5433 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
5435 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5437 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
5438 (stmt_info_for_cost::stmt_info): ...this new field.
5439 (add_stmt_costs): Update accordingly.
5440 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5441 (vect_get_known_peeling_cost): Likewise.
5442 (vect_estimate_min_profitable_iters): Likewise.
5443 * tree-vect-stmts.c (record_stmt_cost): Likewise.
5445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5447 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
5448 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5449 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5451 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
5453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5455 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
5456 a gimple stmt to a stmt_vec_info.
5457 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5459 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5461 * tree-vectorizer.h (vec_info::grouped_stores): Change from
5462 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5463 (_loop_vec_info::reduction_chains): Likewise.
5464 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
5466 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5468 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5470 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
5471 a gimple stmt to a stmt_vec_info.
5472 (_stmt_vec_info::next_element): Likewise.
5473 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
5474 (vect_slp_analyze_and_verify_node_alignment)
5475 (vect_analyze_group_access_1, vect_analyze_group_access)
5476 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
5477 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
5478 (vect_supportable_dr_alignment): Update accordingly.
5479 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
5480 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
5481 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
5482 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5483 * tree-vect-slp.c (vect_build_slp_tree_1)
5484 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
5485 (vect_split_slp_store_group, vect_analyze_slp_instance)
5486 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
5487 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
5488 (get_group_load_store_type, get_load_store_type)
5489 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
5490 (vect_transform_stmt, vect_remove_stores): Likewise.
5492 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5494 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
5496 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5497 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
5498 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
5499 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
5500 (vector_alignment_reachable_p, vect_get_data_access_cost)
5501 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
5502 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
5503 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5504 (vect_analyze_group_access_1, vect_analyze_group_access)
5505 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
5506 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
5507 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
5508 result of vect_dr_stmt and use the stmt_vec_info instead of
5509 the associated gimple stmt.
5510 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5511 (vect_gen_prolog_loop_niters): Likewise.
5512 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5514 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5516 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
5517 to a vec<stmt_vec_info>.
5518 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
5519 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
5521 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
5522 to a vec<stmt_vec_info>.
5523 (bst_traits::value_type, bst_traits::value_type): Likewise.
5524 (bst_traits::hash): Update accordingly.
5525 (vect_get_and_check_slp_defs): Change the stmts parameter from
5526 a vec<gimple *> to a vec<stmt_vec_info>.
5527 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
5528 (vect_build_slp_tree): Likewise.
5529 (vect_build_slp_tree_2): Likewise. Update uses of
5530 SLP_TREE_SCALAR_STMTS.
5531 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
5532 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
5533 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
5534 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
5535 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
5536 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
5537 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
5538 (vect_get_constant_vectors, vect_get_slp_defs)
5539 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
5540 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
5541 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
5542 instead of gimple stmts.
5543 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
5544 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
5545 (vect_slp_analyze_instance_dependence): Update uses of
5546 SLP_TREE_SCALAR_STMTS.
5547 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5548 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
5549 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
5550 (get_initial_defs_for_reduction): Likewise.
5551 (vect_create_epilog_for_reduction): Likewise.
5552 (vectorize_fold_left_reduction): Likewise.
5553 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
5554 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
5555 (can_vectorize_live_stmts): Likewise.
5557 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5559 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
5560 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5561 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
5563 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
5565 (gather_scalar_reductions): Update after above interface changes.
5566 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
5567 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
5569 (vect_force_simple_reduction): Likewise.
5570 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
5571 LOOP_VINFO_REDUCTIONS.
5572 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5574 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5576 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
5577 a gimple stmt to a stmt_vec_info.
5578 * tree-vect-loop.c (vect_active_double_reduction_p)
5579 (vect_force_simple_reduction, vectorizable_reduction): Update
5582 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5584 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
5585 vec<gimple *> to a vec<stmt_vec_info>.
5586 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
5587 the reduction_phis argument from a vec<gimple *> to a
5589 (vectorizable_reduction): Likewise the phis local variable that
5590 is passed to vect_create_epilog_for_reduction. Update for new type
5591 of SLP_TREE_VEC_STMTS.
5592 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
5593 (vectorizable_live_operation): Likewise.
5594 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
5595 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
5597 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5599 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
5600 a gimple stmt to a stmt_vec_info.
5601 (vectorizable_condition, vectorizable_live_operation)
5602 (vectorizable_reduction, vectorizable_induction): Pass back the
5603 vectorized statement as a stmt_vec_info.
5604 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5605 use of STMT_VINFO_VEC_STMT.
5606 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5607 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5608 as stmt_vec_infos rather than gimple stmts.
5609 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5611 (vectorizable_live_operation): Likewise.
5612 (vectorizable_reduction, vectorizable_induction): Likewise,
5613 updating use of STMT_VINFO_VEC_STMT.
5614 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5615 of STMT_VINFO_VEC_STMT.
5616 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5617 (vectorizable_simd_clone_call, vectorizable_conversion)
5618 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5619 (vectorizable_store, vectorizable_load, vectorizable_condition)
5620 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5621 from a gimple stmt to a stmt_vec_info.
5622 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
5623 pointer to a stmt_vec_info to the vectorizable_* routines.
5625 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5627 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5628 a gimple stmt to a stmt_vec_info.
5629 (is_pattern_stmt_p): Update accordingly.
5630 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5631 (vect_record_grouped_load_vectors): Likewise.
5632 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5633 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5634 (vect_model_reduction_cost): Likewise.
5635 (vect_create_epilog_for_reduction): Likewise.
5636 (vectorizable_reduction, vectorizable_induction): Likewise.
5637 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5638 Return the stmt_vec_info for the pattern statement.
5639 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5640 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5641 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5642 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5643 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5644 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5645 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5646 (free_stmt_vec_info, vect_is_simple_use): Likewise.
5648 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5650 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5651 (vect_finish_stmt_generation): Likewise.
5652 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5653 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5654 (vect_build_gather_load_calls): Use the return value of the above
5655 functions instead of a separate call to vinfo_for_stmt. Use narrow
5656 scopes for the input gimple stmt and wider scopes for the associated
5657 stmt_vec_info. Use vec_info::lookup_def when setting these
5658 stmt_vec_infos from an SSA_NAME definition.
5659 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5660 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5661 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5662 (vectorizable_store, vectorizable_load, vectorizable_condition)
5663 (vectorizable_comparison): Likewise.
5664 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5665 (vectorizable_reduction): Likewise.
5667 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5669 * tree-vectorizer.h (vect_is_simple_use): Add an optional
5670 stmt_vec_info * parameter before the optional gimple **.
5671 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5672 (process_use, vect_get_vec_def_for_operand_1): Update callers.
5673 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5674 * tree-vect-loop.c (vectorizable_reduction): Likewise.
5675 (vectorizable_live_operation): Likewise.
5676 * tree-vect-patterns.c (type_conversion_p): Likewise.
5677 (vect_look_through_possible_promotion): Likewise.
5678 (vect_recog_rotate_pattern): Likewise.
5679 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5683 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5684 a typedef to a wrapper class.
5685 (NULL_STMT_VEC_INFO): New macro.
5686 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5687 (stmt_vec_info::operator*): New function.
5688 (stmt_vec_info::operator gimple *): Likewise.
5689 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5690 (add_stmt_costs): Likewise.
5691 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5692 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5693 (vect_get_known_peeling_cost): Likewise.
5694 (vect_estimate_min_profitable_iters): Likewise.
5695 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5696 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5697 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5698 (vectorizable_store, free_stmt_vec_infos): Likewise.
5699 (new_stmt_vec_info): Change return type of xcalloc to
5702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5704 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5705 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5706 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5707 a single_imm_use-based sequence.
5708 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5710 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5712 * tree-vectorizer.h (vec_info::lookup_def): Declare.
5713 * tree-vectorizer.c (vec_info::lookup_def): New function.
5714 * tree-vect-patterns.c (vect_get_internal_def): Use it.
5715 (vect_widened_op_tree): Likewise.
5716 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5717 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5718 (vectorizable_reduction): Likewise.
5719 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5721 (vect_is_slp_reduction): Update calls accordingly. Use
5722 vec_info::lookup_def.
5723 (vect_is_simple_reduction): Likewise
5724 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5728 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5729 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5730 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5732 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5733 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5734 (vect_update_vf_for_slp, vect_analyze_loop_operations)
5735 (vect_is_slp_reduction, vectorizable_induction)
5736 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5737 * tree-vect-patterns.c (vect_init_pattern_stmt):
5738 (vect_determine_min_output_precision_1, vect_determine_precisions)
5739 (vect_pattern_recog): Likewise.
5740 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5741 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5742 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5743 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5744 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5745 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
5746 info field from a loop to a loop_vec_info.
5748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5750 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5751 (vec_info::add_stmt): Declare.
5752 * tree-vectorizer.c (vec_info::add_stmt): New function.
5753 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5754 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5755 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5756 (vectorizable_induction): Likewise.
5757 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5758 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5759 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5760 (vectorizable_load): Likewise.
5761 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5762 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5763 (vect_recog_gather_scatter_pattern): Likewise.
5764 (append_pattern_def_seq): Likewise. Remove a check that is
5765 performed by add_stmt itself.
5767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5769 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5770 which make_ssa_name was called with new_stmt before new_stmt
5773 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5775 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5777 (vect_is_slp_reduction): ...here...
5778 (vect_is_simple_reduction): ...and here. Remove repetition of tests
5779 that are already known to be false.
5781 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5783 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5784 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
5785 STMT_VINFO_NUM_SLP_USES when it's true.
5786 (vect_free_slp_instance): Add a final_p parameter and pass it to
5788 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5789 (vect_analyze_slp_instance): Likewise.
5790 (vect_slp_analyze_operations): Likewise.
5791 (vect_slp_analyze_bb_1): Likewise.
5792 * tree-vectorizer.c (vec_info): Likewise.
5793 * tree-vect-loop.c (vect_transform_loop): Likewise.
5795 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5797 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5798 function is not called for second and subsequent members of
5801 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5803 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5804 cases for nested loops from here to ...
5805 (vect_create_epilog_for_reduction): ...here. Only call
5806 vect_is_simple_use for inner-loop reductions.
5808 2018-07-31 Martin Liska <mliska@suse.cz>
5810 PR gcov-profile/85338
5811 PR gcov-profile/85350
5812 PR gcov-profile/85372
5813 * profile.c (struct location_triplet): New.
5814 (struct location_triplet_hash): Likewise.
5815 (output_location): Do not output a BB that
5816 is already recorded for a line.
5817 (branch_prob): Use streamed_locations.
5819 2018-07-31 Martin Liska <mliska@suse.cz>
5821 PR gcov-profile/85370
5822 * coverage.c (coverage_begin_function): Do not mark target
5823 clones as artificial functions.
5825 2018-07-31 Martin Liska <mliska@suse.cz>
5827 PR gcov-profile/83813
5828 PR gcov-profile/84758
5829 PR gcov-profile/85217
5830 PR gcov-profile/85332
5831 * profile.c (branch_prob): Do not record GOTO expressions
5832 for GIMPLE statements which locations are already streamed.
5834 2018-07-31 Olivier Hainque <hainque@adacore.com>
5836 * gcc.c (handle_spec_function): Accept a soft_matched_part
5837 argument, as do_spec_1. Pass it down to ...
5838 (eval_spec_function): Accept a soft_matched_part argument,
5839 and pass it down to ...
5840 (do_spec_2): Accept a soft_matched_part argument, and pass
5841 it down to do_spec_1.
5842 (do_spec_1): Pass soft_matched_part to handle_spec_function.
5843 (handle_braces): Update call to handle_spec_function.
5844 (driver::set_up_specs): Update calls to do_spec_2.
5845 (compare_debug_dump_opt_spec_function): Likewise.
5846 (compare_debug_self_opt_spec_function): Likewise.
5848 2018-07-31 Olivier Hainque <hainque@adacore.com>
5850 * common.opt (nolibc): New option.
5851 * doc/invoke.texi (Link Options): Document it.
5852 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5853 * config/alpha/linux.h: Likewise.
5854 * config/arc/elf.h: Likewise.
5855 * config/arm/uclinux-elf.h: Likewise.
5856 * config/arm/unknown-elf.h: Likewise.
5857 * config/avr/avrlibc.h: Likewise.
5858 * config/bfin/bfin.h: Likewise.
5859 * config/bfin/linux.h: Likewise.
5860 * config/bfin/uclinux.h: Likewise.
5861 * config/darwin.h: Likewise.
5862 * config/darwin10.h: Likewise.
5863 * config/darwin12.h: Likewise.
5864 * config/gnu-user.h: Likewise.
5865 * config/lm32/uclinux-elf.h: Likewise.
5866 * config/pa/pa-hpux11.h: Likewise.
5867 * config/pa/pa64-hpux.h: Likewise.
5868 * config/sparc/sparc.h: Likewise.
5870 2018-07-31 Olivier Hainque <hainque@adacore.com>
5872 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5873 undefined variables.
5875 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5878 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5881 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5883 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5884 terminated string literal.
5886 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5888 PR rtl-optimization/85160
5889 * combine.c (is_just_move): New function.
5890 (try_combine): Allow combining two instructions into two if neither of
5891 the original instructions was a move.
5893 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
5896 * doc/extend.texi (Global Register Variables): Discourage use of type
5898 (Local Register Variables): Likewise.
5900 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5902 PR tree-optimization/86506
5903 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5905 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5908 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5909 hard_regno, make sure no insn between `from` and `to` clobbers it.
5911 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5912 Tom de Vries <tdevries@suse.de>
5914 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5915 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5916 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5917 PTX_DEFAULT_RUNTIME_DIM.
5918 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5920 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5922 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5923 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5924 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5926 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5928 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5930 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5931 predicate to reflect toc fusion has been deleted.
5932 (toc_fusion_mem_raw): Delete, no longer used.
5933 (toc_fusion_mem_wrapped): Likewise.
5934 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5936 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5937 Delete, no longer used.
5938 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5939 meant to be used for toc fusion.
5940 (rs6000_debug_print_mode): Delete toc fusion debugging.
5941 (rs6000_debug_reg_global): Likewise.
5942 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5943 fusion and secondary reload support that were never used.
5944 (rs6000_option_override_internal): Delete TOC fusion, that was only
5945 partially defined, and it did not work unless you also used the
5947 (rs6000_legitimate_address_p): Delete TOC fusion support.
5948 (rs6000_opt_masks): Likewise.
5949 (fusion_wrap_memory_address): Delete function, no longer used.
5950 (fusion_split_address); Delete TOC fusion support.
5951 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5952 longer used with toc fusion being deleted.
5953 (TARGET_TOC_FUSION_FP): Likewise.
5954 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5956 (toc fusion spliter): Delete TOC fusion support.
5957 (toc_fusionload_<mode>): Likewise.
5958 (toc_fusionload_di): Likewise.
5959 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5960 longer needs to be named. Rename predicate to delete TOC fusion.
5961 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5962 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5963 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5964 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5965 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5967 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5969 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5970 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5971 __int128 in built-in function prototypes.
5972 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5973 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5975 2018-07-27 Martin Sebor <msebor@redhat.com>
5977 PR tree-optimization/86696
5978 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5979 types, including enums.
5980 (handle_char_store): Be prepared for the above function to fail.
5982 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5984 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5985 when optimization level is lower than 2 or optimize for size.
5987 2018-07-26 Martin Sebor <msebor@redhat.com>
5989 PR tree-optimization/86043
5990 PR tree-optimization/86042
5991 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5992 (get_string_cst_length): Rename...
5993 (get_min_string_length): ...to this. Add argument.
5994 (handle_char_store): Extend to handle multi-character stores by
5996 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5997 * tree.h (initializer_zerop): Add argument.
5999 2018-07-26 Jakub Jelinek <jakub@redhat.com>
6002 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
6003 declare target to variables if they have always,{to,from,tofrom} map
6006 2018-07-26 Martin Liska <mliska@suse.cz>
6009 * lto-wrapper.c: Add linker_output as prefix
6010 for ltrans_output_file.
6012 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
6014 PR rtl-optimization/85805
6015 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
6016 value for hard registers if that was written in the same mode.
6018 2018-07-26 Martin Liska <mliska@suse.cz>
6020 PR gcov-profile/86536
6021 * gcov.c (format_gcov): Use printf format %.*f directly
6022 and do not handle special values.
6024 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
6026 * common/config/arc/arc-common.c (arc_option_optimization_table):
6027 Update default optimizations for size.
6029 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
6031 * config/arc/arc.md (movsf_insn): Add short instruction selection.
6032 * config/arc/constraints.md (CfZ): New constraint.
6033 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
6034 (subsf3_fpu): Likewise.
6035 (cmpsf_fpu): Likewise.
6036 (cmpsf_fpu_uneq): Likewise.
6038 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
6040 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
6042 (arc_is_uncached_mem_p): uncached applies to both the variable and
6045 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
6047 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
6050 2018-07-25 David Malcolm <dmalcolm@redhat.com>
6052 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
6053 field "m_scopes" from vec to auto_vec.
6055 2018-07-25 Martin Liska <mliska@suse.cz>
6057 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
6060 2018-07-25 Richard Biener <rguenther@suse.de>
6063 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
6064 special wrt context_die late.
6065 (gen_subprogram_die): Re-use DIEs in local scope.
6067 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
6069 PR tree-optimization/86644
6070 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
6072 2018-07-25 Martin Liska <mliska@suse.cz>
6075 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
6076 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
6078 2018-07-25 Martin Liska <mliska@suse.cz>
6081 * params.def: Explain ASan abbreviation and provide
6082 a documentation link.
6084 2018-07-24 Martin Sebor <msebor@redhat.com>
6086 PR tree-optimization/86622
6087 PR tree-optimization/86532
6088 * builtins.h (string_length): Declare.
6089 * builtins.c (c_strlen): Correct handling of non-constant offsets.
6090 (check_access): Be prepared for non-constant length ranges.
6091 (string_length): Make extern.
6092 * expr.c (string_constant): Only handle the minor non-constant
6093 array index. Use string_constant to compute the length of
6094 a generic string constant.
6096 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
6098 PR tree-optimization/86618
6099 * tree-vect-stmts.c (vectorizable_call): Don't take the address
6100 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
6102 2018-07-24 David Malcolm <dmalcolm@redhat.com>
6104 PR tree-optimization/86636
6105 * json.cc (json::object::set): Fix comment. Add assertions.
6106 (json::array::append): Move here from json.h. Add comment and an
6108 (json::string::string): Likewise.
6109 * json.h (json::array::append): Move to json.cc.
6110 (json::string::string): Likewise.
6111 * optinfo-emit-json.cc
6112 (optrecord_json_writer::impl_location_to_json): Assert that we
6113 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
6114 wrapper around it. Expand the location once, rather than three
6116 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
6117 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
6119 (optrecord_json_writer::optinfo_to_json): Likewise, in four
6120 places. Fix some overlong lines.
6122 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
6124 * config/aarch64/aarch64-simd.md
6125 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
6126 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
6127 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
6128 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
6129 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
6130 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
6131 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
6132 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
6133 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
6135 2018-07-24 Jakub Jelinek <jakub@redhat.com>
6138 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
6139 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
6140 and abs_d == d, do the power of two handling if profitable.
6142 2018-07-24 Richard Biener <rguenther@suse.de>
6144 * match.pd: Add BIT_FIELD_REF canonicalizations.
6146 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
6149 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
6151 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
6153 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
6154 terminated STRING_CST object.
6156 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
6158 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
6160 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
6162 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
6163 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
6164 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
6165 the elements into a register.
6166 (rs6000_split_v4si_init_di_reg): Delete.
6167 (rs6000_split_v4si_init): Delete.
6168 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
6169 (vsx_init_v4si): Rewrite as a define_expand.
6171 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
6173 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
6174 zero_extend argument from memory): New.
6176 2018-07-22 Martin Sebor <msebor@redhat.com>
6179 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
6180 diagnosing calls with unknown arguments unless -Walloca-larger-than
6181 is restricted to less than PTRDIFF_MAX bytes.
6183 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
6185 * doc/gcov.texi (Invoking Gcov): Editorial changes.
6187 2018-07-20 David Malcolm <dmalcolm@redhat.com>
6189 * pretty-print.c (text_info::set_location): Remove redundant
6190 "line_table" parameter from call to rich_location::set_range.
6192 2018-07-20 Martin Sebor <msebor@redhat.com>
6195 * builtins.c (expand_builtin_alloca): Adjust.
6196 * calls.c (alloc_max_size): Simplify.
6197 * cgraphunit.c (cgraph_node::expand): Adjust.
6198 * common.opt (larger_than_size, warn_frame_larger_than): Remove
6200 (frame_larger_than_size): Same.
6201 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
6202 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
6204 * doc/invoke.texi (GCC Command Options): Document option arguments.
6205 Explain byte-size arguments and suffixes.
6206 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
6207 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
6208 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
6209 * doc/options.texi (UInteger): Expand.
6210 (Host_Wide_Int, ByteSize): Document new properties.
6211 * final.c (final_start_function_1): Include sizes in an error message.
6212 * function.c (frame_offset_overflow): Same.
6213 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
6214 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
6215 Diagnose unbounded alloca calls only for limits of less than
6217 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
6218 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
6220 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
6221 only for limits of less than PTRDIFF_MAX.
6222 * langhooks-def.h (lhd_handle_option): Change function argument
6224 * langhooks.c (lhd_handle_option): Same.
6225 * langhooks.h (handle_option): Same.
6226 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
6228 (var_type, var_type_struct): Same.
6229 (var_set): Handle ByteSize flag.
6230 * optc-gen.awk: Add comments to output to ease debugging. Make
6231 use of HOST_WIDE_INT where appropriate.
6232 * opts-gen-save.awk: Use %lx to format unsigned long.
6233 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
6234 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
6235 arguments. Parse bytes-size suffixes.
6236 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
6237 (enum_value_to_arg): Same.
6238 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
6239 (handle_option): Adjust.
6240 (generate_option): Change function argument to HOST_WIDE_INT.
6241 (cmdline_handle_error): Adjust.
6242 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
6243 (set_option): Change function argument to HOST_WIDE_INT.
6244 (option_enabled): Handle cl_host_wide_int.
6245 (get_option_state): Handle CLVC_SIZE.
6246 (control_warning_option): Same.
6247 * opts.c (common_handle_option): Change function argument to
6248 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
6249 OPT_Wvla_larger_than_.
6250 * opts.h (enum cl_var_type): Add an enumerator.
6251 * stor-layout.c (layout_decl): Print a more meaningful warning.
6252 * toplev.c (output_stack_usage): Adjust.
6254 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
6256 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
6257 call to inline_expand_builtin_string_cmp.
6258 (expand_builtin_strcmp): Likewise.
6259 (expand_builtin_strncmp): Likewise.
6260 (inline_string_cmp): Delete the last parameter, change char_type_node
6261 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
6263 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
6264 the inlining expansion on target where the type of the call has same or
6265 narrower precision than unsigned char.
6267 2018-07-20 David Malcolm <dmalcolm@redhat.com>
6269 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
6270 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
6271 * common.opt (fsave-optimization-record): New option.
6272 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
6273 * doc/invoke.texi (-fsave-optimization-record): New option.
6274 * dumpfile.c: Include "optinfo-emit-json.h".
6275 (struct kv_pair): Move to coretypes.h.
6276 (optgroup_options): Make non-static.
6277 (dump_context::end_scope): Call
6278 optimization_records_maybe_pop_dump_scope.
6279 * dumpfile.h (optgroup_options): New decl.
6280 * json.cc: New file.
6282 * optinfo-emit-json.cc: New file.
6283 * optinfo-emit-json.h: New file.
6284 * optinfo.cc: Include "optinfo-emit-json.h".
6285 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
6286 (optinfo_enabled_p): Check optimization_records_enabled_p.
6287 (optinfo_wants_inlining_info_p): Likewise.
6288 * optinfo.h: Update comment.
6289 * profile-count.c (profile_quality_as_string): New function.
6290 * profile-count.h (profile_quality_as_string): New decl.
6291 (profile_count::quality): New accessor.
6292 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
6293 and optinfo_emit_json_cc_tests.
6294 * selftest.h (selftest::json_cc_tests): New decl.
6295 (selftest::optinfo_emit_json_cc_tests): New decl.
6296 * toplev.c: Include "optinfo-emit-json.h".
6297 (compile_file): Call optimization_records_finish.
6298 (do_compile): Call optimization_records_start.
6299 * tree-ssa-live.c: Include optinfo.h.
6300 (remove_unused_scope_block_p): Retain inlining information if
6301 optinfo_wants_inlining_info_p returns true.
6303 2018-07-20 Richard Biener <rguenther@suse.de>
6306 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
6307 to cover -flto-partition=none.
6309 2018-07-20 Martin Liska <mliska@suse.cz>
6311 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
6312 (get_decl_source_range): Remove unused function.
6314 2018-07-20 Richard Biener <rguenther@suse.de>
6316 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
6317 (struct vn_phi_s): Likewise.
6318 (struct vn_reference_s): Likewise.
6319 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
6320 for searching the slot of an entry known to be in the hash itself.
6321 (vn_phi_hasher::equal): Likewise.
6322 (vn_reference_hasher::equal): Likewise.
6323 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
6325 (optimistic_info, current_info): Remove, keeping only valid_info.
6326 (vn_reference_lookup_1): Remove fallback lookup.
6327 (vn_reference_lookup_2): Likewise.
6328 (vn_nary_op_lookup_1): Likewise.
6329 (vn_phi_lookup): Likewise.
6330 (vn_nary_build_or_lookup_1): Make sure to not chain the built
6332 (vn_reference_insert): Adjust, chain the inserted hash element
6333 at last_inserted_ref.
6334 (vn_reference_insert_pieces): Likewise.
6335 (visit_reference_op_call): Likewise.
6336 (vn_nary_op_insert_into): Chain the inserted hash element at
6338 (vn_nary_op_insert_pieces): Adjust.
6339 (vn_nary_op_insert): Likewise.
6340 (vn_nary_op_insert_stmt): Likewise.
6341 (vn_phi_insert): Adjust, chain the inserted hash element at
6343 (process_scc): Remove clearing and copying the optimistic
6344 table. Instead remove elements inserted during an optimistic
6345 iteration from the single table we maintain.
6346 (init_scc_vn): Adjust.
6347 (free_scc_vn): Likewise.
6348 (sccvn_dom_walker::record_cond): Likewise.
6349 (sccvn_dom_walker::after_dom_children): Likewise.
6351 2018-07-19 Martin Sebor <msebor@redhat.com>
6353 PR tree-optimization/84047
6354 PR tree-optimization/83776
6355 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
6356 (check_array_bounds): Call it.
6358 2018-07-19 Martin Sebor <msebor@redhat.com>
6360 * align.h (align_flags): Use member initialization.
6362 2018-07-19 David Malcolm <dmalcolm@redhat.com>
6364 * Makefile.in (OBJS): Add optinfo.o.
6365 * coretypes.h (class symtab_node): New forward decl.
6366 (struct cgraph_node): New forward decl.
6367 (class varpool_node): New forward decl.
6368 * dump-context.h: New file.
6369 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
6371 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
6372 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
6373 (set_alt_dump_file): Likewise.
6374 (dump_context::~dump_context): New dtor.
6375 (dump_gimple_stmt): Move implementation to...
6376 (dump_context::dump_gimple_stmt): ...this new member function.
6377 Add the stmt to any pending optinfo, creating one if need be.
6378 (dump_gimple_stmt_loc): Move implementation to...
6379 (dump_context::dump_gimple_stmt_loc): ...this new member function.
6380 Start a new optinfo and add the stmt to it.
6381 (dump_gimple_expr): Move implementation to...
6382 (dump_context::dump_gimple_expr): ...this new member function.
6383 Add the stmt to any pending optinfo, creating one if need be.
6384 (dump_gimple_expr_loc): Move implementation to...
6385 (dump_context::dump_gimple_expr_loc): ...this new member function.
6386 Start a new optinfo and add the stmt to it.
6387 (dump_generic_expr): Move implementation to...
6388 (dump_context::dump_generic_expr): ...this new member function.
6389 Add the tree to any pending optinfo, creating one if need be.
6390 (dump_generic_expr_loc): Move implementation to...
6391 (dump_context::dump_generic_expr_loc): ...this new member
6392 function. Add the tree to any pending optinfo, creating one if
6394 (dump_printf): Move implementation to...
6395 (dump_context::dump_printf_va): ...this new member function. Add
6396 the text to any pending optinfo, creating one if need be.
6397 (dump_printf_loc): Move implementation to...
6398 (dump_context::dump_printf_loc_va): ...this new member function.
6399 Start a new optinfo and add the stmt to it.
6400 (dump_dec): Move implementation to...
6401 (dump_context::dump_dec): ...this new member function. Add the
6402 value to any pending optinfo, creating one if need be.
6403 (dump_context::dump_symtab_node): New member function.
6404 (dump_context::get_scope_depth): New member function.
6405 (dump_context::begin_scope): New member function.
6406 (dump_context::end_scope): New member function.
6407 (dump_context::ensure_pending_optinfo): New member function.
6408 (dump_context::begin_next_optinfo): New member function.
6409 (dump_context::end_any_optinfo): New member function.
6410 (dump_context::s_current): New global.
6411 (dump_context::s_default): New global.
6412 (dump_scope_depth): Delete global.
6413 (dumpfile_ensure_any_optinfo_are_flushed): New function.
6414 (dump_symtab_node): New function.
6415 (get_dump_scope_depth): Reimplement in terms of dump_context.
6416 (dump_begin_scope): Likewise.
6417 (dump_end_scope): Likewise.
6418 (selftest::temp_dump_context::temp_dump_context): New ctor.
6419 (selftest::temp_dump_context::~temp_dump_context): New dtor.
6420 (selftest::verify_item): New function.
6421 (ASSERT_IS_TEXT): New macro.
6422 (ASSERT_IS_TREE): New macro.
6423 (ASSERT_IS_GIMPLE): New macro.
6424 (selftest::test_capture_of_dump_calls): New test.
6425 (selftest::dumpfile_c_tests): Call it.
6426 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
6427 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
6428 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
6429 descriptive comment.
6430 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
6431 (dump_node, dump_bb): Move these unrelated decls.
6432 (class dump_manager): Add leading comment.
6433 * optinfo.cc: New file.
6434 * optinfo.h: New file.
6436 2018-07-19 Michael Collison <michael.collison@arm.com>
6437 Richard Henderson <rth@redhat.com>
6439 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
6440 (subti): Handle op1 zero.
6441 (subvti4, usub4ti4): New.
6442 (*sub<GPI>3_compare1_imm): New.
6443 (sub<GPI>3_carryinCV): New.
6444 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
6445 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
6447 2018-07-19 Michael Collison <michael.collison@arm.com>
6448 Richard Henderson <rth@redhat.com>
6450 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
6451 (addti3): Create simpler code if low part is already known to be 0.
6452 (addvti4, uaddvti4): New.
6453 (*add<GPI>3_compareC_cconly_imm): New.
6454 (*add<GPI>3_compareC_cconly): New.
6455 (*add<GPI>3_compareC_imm): New.
6456 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
6457 handle constants within this pattern..
6458 (*add<GPI>3_compareV_cconly_imm): New.
6459 (*add<GPI>3_compareV_cconly): New.
6460 (*add<GPI>3_compareV_imm): New.
6461 (add<GPI>3_compareV): New.
6462 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
6463 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
6464 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
6465 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
6466 with 'comparison' operator.
6467 (*add<GPI>3_compareV_cconly_imm): Ditto.
6468 (*add<GPI>3_compareV_cconly): Ditto.
6469 (*add<GPI>3_compareV_imm): Ditto.
6470 (add<GPI>3_compareV): Ditto.
6471 (add<mode>3_carryinC): Ditto.
6472 (*add<mode>3_carryinC_zero): Ditto.
6473 (*add<mode>3_carryinC): Ditto.
6474 (add<mode>3_carryinV): Ditto.
6475 (*add<mode>3_carryinV_zero): Ditto.
6476 (*add<mode>3_carryinV): Ditto.
6478 2018-07-19 Michael Collison <michael.collison@arm.com>
6479 Richard Henderson <rth@redhat.com>
6481 * config/aarch64/aarch64-modes.def (CC_V): New.
6482 * config/aarch64/aarch64-protos.h
6483 (aarch64_addti_scratch_regs): Declare
6484 (aarch64_subvti_scratch_regs): Declare.
6485 (aarch64_expand_subvti): Declare.
6486 (aarch64_gen_unlikely_cbranch): Declare
6487 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
6488 for signed overflow using CC_Vmode.
6489 (aarch64_get_condition_code_1): Handle CC_Vmode.
6490 (aarch64_gen_unlikely_cbranch): New function.
6491 (aarch64_addti_scratch_regs): New function.
6492 (aarch64_subvti_scratch_regs): New function.
6493 (aarch64_expand_subvti): New function.
6495 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6497 * config/aarch64/aarch64-option-extensions.def: New entry for profile
6499 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
6500 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
6503 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6506 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6507 address check not strict.
6509 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6511 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
6513 (store_pair_lanes<mode>): Likewise.
6514 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
6515 enum value 'ADDR_QUERY_LDP_STP_N'.
6516 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
6517 (aarch64_print_address_internal): Add declaration.
6518 (aarch64_print_ldpstp_address): Remove.
6519 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
6520 (aarch64_print_operand): Change printing of 'y'.
6521 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
6522 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
6523 'true' rather than '1'.
6524 * config/aarch64/constraints.md (Uml): Likewise.
6525 (Uml): Rename to Umn.
6528 2018-07-19 Richard Biener <rguenther@suse.de>
6530 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
6532 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
6533 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
6534 (vn_reference_hasher): Likewise.
6535 (struct vn_tables_s): Remove obstack and alloc-pool members.
6536 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
6537 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
6538 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
6539 (vn_reference_insert_pieces): Likewise.
6540 (alloc_vn_nary_op_noinit): Adjust.
6541 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
6542 (vn_phi_eq): Adjust.
6543 (shared_lookup_phiargs): Remove.
6544 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
6545 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
6546 (visit_reference_op_call): Likewise.
6547 (copy_nary, copy_phi, copy_reference): Remove.
6548 (process_scc): Rewind the obstack when iterating. Do not
6549 copy the elements to valid_info but just move them from one
6550 hashtable to the other.
6551 (allocate_vn_table): Adjust.
6552 (free_vn_table): Likewise.
6553 (init_scc_vn): Likewise.
6554 (free_scc_vn): Likewise.
6556 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
6559 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
6560 indirect_return as function type attribute.
6561 (ix86_attribute_table): Change indirect_return to function
6563 * doc/extend.texi: Update indirect_return attribute.
6565 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
6567 * wide-int.h (widest2_int): New.
6568 * gimple-fold.c (arith_overflowed_p): Use it.
6569 * tree.h (widest2_int_cst): New.
6570 * tree-vrp.c (wide_int_binop_overflow): Rename from
6571 vrp_int_const_binop.
6572 Rewrite to work on trees.
6573 (extract_range_from_multiplicative_op_1): Abstract code to...
6574 (wide_int_range_min_max): ...here.
6575 (wide_int_range_cross_product): ...and here.
6576 (extract_range_from_binary_expr_1): Abstract overflow code to...
6577 (wide_int_range_mult_wrapping): ...here.
6578 * tree-vrp.h (wide_int_range_cross_product): New.
6579 (wide_int_range_mult_wrapping): New.
6581 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
6582 Julia Koval <julia.koval@intel.com>
6584 * config/i386/x86-tune-costs.h (skylake_memcpy,
6585 skylake_memset): Replace rep_prefix with unrolling for size 512.
6587 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
6590 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
6591 comparision with EQ_EXPR in last stmt.
6593 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
6595 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
6596 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
6597 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
6598 previously known as "PowerPC AltiVec Built-in Functions". Move
6599 some material to new subsubsections "PowerPC AltiVec Built-in
6600 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
6602 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
6603 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
6604 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6605 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6607 2018-07-18 Richard Biener <rguenther@suse.de>
6609 PR tree-optimization/86557
6610 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6613 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
6615 * config/s390/s390.c (s390_function_profiler): Generate CFI.
6617 2018-07-17 Jeff Law <law@redhat.com>
6619 * config/arm/arm.c (get_label_padding): Update for recent
6620 changes to label_to_alignment.
6622 PR tree-optimization/86010
6623 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6625 * config/mips/mips.c (vr4130_align_insns): Update for recent
6626 changes to label_to_alignment.
6628 * config/frv/frv.c (frv_label_align): Update for recent changes
6629 to label_to_alignment.
6631 * config/nios2/nios2.c (nios2_label_align): Update for recent
6632 changes which dropped ALIGN_LABELS_LOG.
6634 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
6636 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6637 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6639 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
6641 * config/arc/arc.c (arc_label_align): Use align_labels instead of
6642 deprecated align_labels_log.
6644 2018-07-17 Richard Biener <rguenther@suse.de>
6647 * dwarf2out.c (init_sections_and_labels): Always generate
6648 a debug_line_str_section for early LTO debug.
6649 (dwarf2out_finish): Reset debug_line_str_hash output early.
6650 Bump counter for extra dwarf5 .debug_loc labels to not conflict
6652 (dwarf2out_early_finish): Output debug_line_str.
6654 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6656 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6657 index register on z196 or later.
6659 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6661 * config/s390/s390.c (s390_default_align): Set default function
6663 (s390_override_options_after_change): Call s390_default align.
6664 (s390_option_override_internal): Call s390_default_align.
6665 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6667 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6670 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6671 to _looptemp_ clauses, other than the first two.
6673 2018-07-17 Martin Liska <mliska@suse.cz>
6675 * opts.c: Do not enable OPT_falign_* for -Os.
6677 2018-07-17 Martin Liska <mliska@suse.cz>
6679 * align.h (MAX_CODE_ALIGN): New.
6680 (MAX_CODE_ALIGN_VALUE): New.
6681 * common/config/i386/i386-common.c (ix86_handle_option):
6682 (MAX_CODE_ALIGN): Moved to align.h.
6683 * final.c (MAX_CODE_ALIGN): Likewise.
6684 * opts.c (parse_and_check_align_values):
6685 (MAX_CODE_ALIGN): Likewise.
6686 (MAX_CODE_ALIGN_VALUE): Likewise.
6688 2018-07-17 Martin Liska <mliska@suse.cz>
6690 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6691 in order to fulfil coding style.
6692 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6693 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6694 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6695 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6696 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6697 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6698 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6699 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6700 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6702 2018-07-17 Martin Liska <mliska@suse.cz>
6704 * align.h: New file.
6705 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6707 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6708 align_flags of label_to_alignment.
6709 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6711 * config/m68k/m68k.c: Do not use removed align_labels_value and
6713 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6714 (LOOP_ALIGN): Likewise.
6715 (LABEL_ALIGN): Likewise.
6716 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6717 Remove not used macro.
6718 (rs6000_loop_align): Change return type to align_flags.
6719 (rs6000_loop_align_max_skip): Remove.
6720 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6721 Change return type to align_flags.
6722 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6723 Remove not used macro.
6724 (rs6000_loop_align): Change return type to align_flags.
6725 (rs6000_loop_align_max_skip): Remove.
6726 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6727 * config/rx/rx-protos.h (rx_align_for_label): Make it
6729 * config/rx/rx.c (rx_align_for_label): Change return type
6731 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6733 into align_flags class.
6734 (LABEL_ALIGN): Likewise.
6735 (LOOP_ALIGN): Likewise.
6736 * config/s390/s390.c (s390_label_align): Use align_flags
6738 (s390_asm_output_function_label): Likewise.
6739 * config/sh/sh.c (sh_override_options_after_change):
6740 Use align_flags class directly without macros.
6741 (find_barrier): Likewise.
6742 (barrier_align): Likewise.
6743 (sh_loop_align): Likewise.
6744 * config/spu/spu.c (spu_option_override):
6745 Use align_flags_tuple::get_value instead of removed macros.
6746 (spu_sched_init): Likewise.
6747 * config/spu/spu.h (GTY): Likewise.
6748 * config/visium/visium.c (visium_option_override):
6749 Set "8" as default secondary alignment.
6750 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6751 in order to guarantee secondary alignment of 8.
6752 * coretypes.h: Include align.h header file.
6753 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6754 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6755 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6756 * doc/tm.texi.in: Likewise.
6757 * final.c (struct label_alignment): Remove not used structure.
6758 (LABEL_ALIGN): Change type to align_flags.
6759 (LOOP_ALIGN): Likewise.
6760 (JUMP_ALIGN): Likewise.
6761 (default_loop_align_max_skip): Remove.
6762 (default_label_align_max_skip): Likewise.
6763 (default_jump_align_max_skip): Likewise.
6764 (default_label_align_after_barrier_max_skip):
6765 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6766 (LABEL_TO_MAX_SKIP): Remove.
6767 (label_to_alignment): Return align_flags type instead of integer.
6768 (label_to_max_skip): Remove.
6769 (align_fuzz): Use align_flags type.
6770 (compute_alignments): Use align_flags type and use align_flags::max
6771 to combine multiple alignments.
6772 (grow_label_align): Grow vec instead of C array.
6773 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6774 (shorten_branches): Use align_flags type and use align_flags::max
6775 to combine multiple alignments.
6776 (final_scan_insn_1): Remove usage of secondary alignment that comes
6777 from label alignment, but instead use proper secondary alignment
6778 which is computed in grow_label_align.
6779 * flags.h (struct align_flags_tuple): Move to align.h.
6780 (struct align_flags): Likewise.
6781 (state_align_loops): Rename to align_loops.
6782 (state_align_jumps): Rename to align_jumps.
6783 (state_align_labels): Rename to align_labels.
6784 (state_align_functions): Rename to align_functions.
6785 (align_loops_log): Remove.
6786 (align_jumps_log): Remove.
6787 (align_labels_log): Remove.
6788 (align_functions_log): Remove.
6789 (align_loops_max_skip): Remove.
6790 (align_jumps_max_skip): Remove.
6791 (align_labels_max_skip): Remove.
6792 (align_functions_max_skip): Remove.
6793 (align_loops_value): Remove.
6794 (align_jumps_value): Remove.
6795 (align_labels_value): Remove.
6796 (align_functions_value): Remove.
6797 * output.h (label_to_alignment): Change return type to align_flags.
6798 (label_to_max_skip): Remove.
6799 * target.def: Remove loop_align_max_skip, label_align_max_skip,
6800 jump_align_max_skip macros.
6801 * targhooks.h (default_loop_align_max_skip): Remove.
6802 (default_label_align_max_skip): Likewise.
6803 (default_jump_align_max_skip): Likewise.
6804 (default_label_align_after_barrier_max_skip): Remove.
6805 * toplev.c (read_log_maxskip): Use ::normalize function.
6806 (parse_N_M): Remove not used argument and also call ::normalize.
6807 (parse_alignment_opts): Do not pass unused arguments.
6808 * varasm.c (assemble_start_function): Use directly align_functions
6809 instead of removed macros.
6810 * system.h: Do not poison removed macros.
6812 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6815 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6816 and cond temporaries don't have reference type if iterator has
6817 pointer type. For init use &for_pre_body instead of pre_p if
6818 for_pre_body is non-empty.
6820 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6822 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6823 double-double modes to SFmode directly directly.
6824 (trunc<mode>sf2_fprs): Delete.
6826 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6828 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6829 for conversions between IFmode and the decimal floating point modes.
6830 (init_float128_ieee): Use the correct names for conversions between
6831 KFmode and the decimal floating point modes.
6833 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6835 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6836 for the conversions between TDmode and IFmode.
6837 (init_float128_ieee): Use more correct names for the conversions
6838 between TDmode and KFmode.
6840 2018-07-16 Jakub Jelinek <jakub@redhat.com>
6842 PR tree-optimization/86526
6843 * builtins.c (expand_builtin_memcmp): Formatting fixes.
6844 (inline_expand_builtin_string_cmp): Likewise.
6845 (inline_string_cmp): Likewise. Use c_readstr instead of
6846 builtin_memcpy_read_str. Add unit_mode temporary.
6848 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6851 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6852 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6854 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
6856 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6857 Alphabetize prototypes of built-in functions, separating out
6858 built-in functions that are listed in this section but should be
6859 described elsewhere.
6861 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
6864 * expmed.c (emit_store_flag): Do not emit setcc followed by a
6865 conditional move when trapping comparison was split to a
6866 non-trapping one (and vice versa).
6868 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6870 * config/s390/s390.c (s390_function_profiler): Generate nops
6871 instead of profiler call sequences.
6872 * config/s390/s390.opt: Add the new option.
6874 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6876 * config/s390/s390.c (s390_function_profiler): Generate
6877 __mcount_loc section.
6878 * config/s390/s390.opt: Add the new option.
6880 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6882 * common.opt: Add the new warning.
6883 * config/s390/s390.c (s390_function_profiler): Emit "brasl
6884 %r0,__fentry__" when -mfentry is specified.
6885 (s390_option_override_internal): Disallow -mfentry for 31-bit
6887 * config/s390/s390.opt: Add the new option.
6889 2018-07-16 Richard Biener <rguenther@suse.de>
6892 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6893 for function-local FUNCTION_DECL and RESULT_DECL immediately.
6895 2018-07-16 Martin Liska <mliska@suse.cz>
6898 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6901 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6903 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6905 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6907 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6909 * config/arc/arc-cpus.def (hs4x): New cpu.
6911 * config/arc/arc-tables.opt: Regenerate.
6912 * config/arc/arc.c (arc_sched_issue_rate): New function.
6913 (TARGET_SCHED_ISSUE_RATE): Define.
6914 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6915 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6917 (attr tune): Add ARCHS4x tune values.
6918 (attr tune_dspmpy): Define.
6919 (*tst): Correct instruction type.
6920 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6921 * config/arc/arcHS4x.md: New file.
6922 * config/arc/fpu.md: Update instruction type attributes.
6923 * config/arc/t-multilib: Regenerate.
6925 2018-07-16 Tom de Vries <tdevries@suse.de>
6928 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6930 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6932 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6935 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6937 PR tree-optimization/86514
6938 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6939 conversion to a boolean type from a type with greater precision.
6941 2018-07-16 Tom de Vries <tdevries@suse.de>
6943 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6944 dump_flags request TDF_SLIM.
6946 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6948 * fold-const.c (int_const_binop_1): Abstract...
6949 (wide_int_binop): ...wide int code here.
6950 (poly_int_binop): ...poly int code here.
6951 Abstract the rest of int_const_binop_1 into int_const_binop.
6952 * fold-const.h (wide_int_binop): New.
6953 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6954 Remove useless PLUS/MINUS_EXPR case.
6955 (zero_nonzero_bits_from_vr): Move wide int code...
6956 (zero_nonzero_bits_from_bounds): ...here.
6957 (extract_range_from_binary_expr_1): Move mask optimization code...
6958 (range_easy_mask_min_max): ...here.
6959 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6960 (range_easy_mask_min_max): New.
6962 2018-07-15 Jeff Law <law@redhat.com>
6965 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6968 2018-07-14 Jim Wilson <jimw@sifive.com>
6970 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6972 2018-07-14 Paul Koning <ni1d@arrl.net>
6974 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6976 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6978 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6981 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6982 Steve Munroe <munroesj52@gmail.com>
6984 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6985 (_mm_andnot_si128): Likewise.
6986 (_mm_or_si128): Likewise.
6987 (_mm_xor_si128): Likewise.
6989 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6992 * builtins.c (expand_builtin_memcmp): Inline the calls first
6993 when result_eq is false.
6994 (expand_builtin_strcmp): Inline the calls first.
6995 (expand_builtin_strncmp): Likewise.
6996 (inline_string_cmp): New routine. Expand a string compare
6997 call by using a sequence of char comparison.
6998 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6999 a call to str(n)cmp/memcmp.
7000 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
7002 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
7004 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
7006 * config/arm/driver-arm.c: Include arm-native.h.
7007 (host_detect_local_cpu): Use auto-generated data tables.
7008 (vendors, arm_cpu_table): Delete. Move part information to ...
7009 * config/arm/arm-cpus.in: ... here.
7010 * config/arm/parsecpu.awk (gen_native): New function.
7011 (vendor, part): New CPU fields.
7012 (END): Add support for building the native CPU detection tables.
7013 * config/arm/t-arm (arm-native.h): Add build rule.
7014 (driver-arm.o): Add dependency on arm-native.h.
7016 2018-07-13 Richard Biener <rguenther@suse.de>
7019 * match.pd (addr1 - addr2): Allow either of the operand to
7022 2018-07-13 Tom de Vries <tdevries@suse.de>
7024 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
7027 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
7029 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
7030 arrays instead of numbered variables.
7032 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
7034 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
7035 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
7037 2018-07-13 Richard Biener <rguenther@suse.de>
7040 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
7041 instead of get_context_die.
7043 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
7044 Richard Biener <rguenther@suse.de>
7047 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
7048 that the loop latch destination where phi is defined.
7050 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
7052 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
7053 (riscv_expand_epilogue): Add assertion to check interrupt mode.
7054 (riscv_set_current_function): Extract getting interrupt type to new
7056 (riscv_get_interrupt_type): New function.
7057 (riscv_merge_decl_attributes): New function, checking interrupt type is
7059 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
7061 2018-07-12 Paul Koning <ni1d@arrl.net>
7063 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
7066 2018-07-12 Paul Koning <ni1d@arrl.net>
7068 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
7069 zero reference, add doloop_end instead.
7070 * doc/md.texi (decrement_and_branch_until_zero): Remove.
7071 (Looping patterns): Remove decrement_and_branch_until_zero. Add
7072 detail for doloop_end.
7074 2018-07-12 Martin Sebor <msebor@redhat.com>
7077 * attribs.c (decl_attributes): Reject conflicting attributes before
7078 calling attribute handlers.
7080 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
7082 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
7084 (gcc::dump_manager::get_dump_file_name): likewise.
7085 (dump_begin): Likewise.
7086 * dumpfile.h (dump_begin): Update prototype.
7087 (gcc::dump_manager::get_dump_file_name,
7088 gcc::dump_manager::get_dump_file_name): Update prototype.
7090 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
7092 * internal-fn.h (vectorizable_internal_fn_p): New function.
7093 * tree-vect-slp.c (compatible_calls_p): Likewise.
7094 (vect_build_slp_tree_1): Remove nops argument. Handle calls
7095 to internal functions.
7096 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
7098 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
7100 * fold-const.h (inverse_conditions_p): Declare.
7101 * fold-const.c (inverse_conditions_p): New function.
7102 * match.pd: Use inverse_conditions_p. Add folds of view_converts
7103 that test the inverse condition of a conditional internal function.
7104 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
7105 * internal-fn.c (internal_fn_mask_index): Handle conditional
7107 (vectorized_internal_fn_supported_p): New function.
7108 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
7109 (any_pred_load_store): Replace with...
7110 (need_to_predicate): ...this new variable.
7111 (redundant_ssa_names): New variable.
7112 (ifcvt_can_use_mask_load_store): Move initial checks to...
7113 (ifcvt_can_predicate): ...this new function. Handle tree codes
7114 for which a conditional internal function exists.
7115 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
7116 instead of ifcvt_can_use_mask_load_store. Update after variable
7118 (predicate_load_or_store): New function, split out from
7119 predicate_mem_writes.
7120 (check_redundant_cond_expr): New function.
7121 (value_available_p): Likewise.
7122 (predicate_rhs_code): Likewise.
7123 (predicate_mem_writes): Rename to...
7124 (predicate_statements): ...this. Use predicate_load_or_store
7125 and predicate_rhs_code.
7126 (combine_blocks, tree_if_conversion): Update after above name changes.
7127 (ifcvt_local_dce): Handle redundant_ssa_names.
7128 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
7129 general conditional functions.
7130 * tree-vect-stmts.c (vectorizable_call): Likewise.
7132 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
7133 Alan Hayward <alan.hayward@arm.com>
7134 David Sherwood <david.sherwood@arm.com>
7136 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
7137 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
7138 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
7139 plus and minus and convert them into IFN_COND_FMA-based sequences.
7140 (convert_mult_to_fma): Handle conditional plus and minus.
7142 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
7144 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
7145 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
7146 (cond_fnms_optab): New optabs.
7147 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
7149 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
7150 * internal-fn.h (get_conditional_internal_fn): Declare.
7151 (get_unconditional_internal_fn): Likewise.
7152 * internal-fn.c (cond_ternary_direct): New macro.
7153 (expand_cond_ternary_optab_fn): Likewise.
7154 (direct_cond_ternary_optab_supported_p): Likewise.
7155 (FOR_EACH_COND_FN_PAIR): Likewise.
7156 (get_conditional_internal_fn): New function.
7157 (get_unconditional_internal_fn): Likewise.
7158 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
7159 (gimple_match_op::gimple_match_op): Add a new overload for 5
7161 (gimple_match_op::set_op): Likewise.
7162 (gimple_resimplify5): Declare.
7163 * genmatch.c (decision_tree::gen): Generate simplifications for
7165 * gimple-match-head.c (gimple_simplify): Define an overload for
7166 5 operands. Handle calls with 5 arguments in the top-level overload.
7167 (convert_conditional_op): Handle conversions from unconditional
7168 internal functions to conditional ones.
7169 (gimple_resimplify5): New function.
7170 (build_call_internal): Pass a fifth operand.
7171 (maybe_push_res_to_seq): Likewise.
7172 (try_conditional_simplification): Try converting conditional
7173 internal functions to unconditional internal functions.
7174 Handle 3-operand unconditional forms.
7175 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
7176 Define ternary equivalents of the current rules for binary conditional
7178 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
7180 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
7181 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
7182 (optab): Handle them.
7183 (SVE_COND_FP_TERNARY): New int iterator.
7184 (sve_fmla_op, sve_fmad_op): New int attributes.
7185 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
7186 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
7187 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
7189 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
7191 * target.def (preferred_else_value): New target hook.
7192 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
7193 * doc/tm.texi: Regenerate.
7194 * targhooks.h (default_preferred_else_value): Declare.
7195 * targhooks.c (default_preferred_else_value): New function.
7196 * internal-fn.h (conditional_internal_fn_code): Declare.
7197 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
7198 (get_conditional_internal_fn): Use it.
7199 (conditional_internal_fn_code): New function.
7200 * gimple-match.h (gimple_match_cond): New struct.
7201 (gimple_match_op): Add a cond member function.
7202 (gimple_match_op::gimple_match_op): Update all forms to take a
7204 * genmatch.c (expr::gen_transform): Use the same condition as res_op
7205 for the suboperation, but don't specify a particular else_value.
7206 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
7207 (visit_nary_op, visit_reference_op_load): Pass
7208 gimple_match_cond::UNCOND to the gimple_match_op constructor.
7209 * gimple-match-head.c: Include tree-eh.h
7210 (convert_conditional_op): New function.
7211 (maybe_resimplify_conditional_op): Likewise.
7212 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
7213 (gimple_resimplify2): Likewise.
7214 (gimple_resimplify3): Likewise.
7215 (gimple_resimplify4): Likewise.
7216 (maybe_push_res_to_seq): Return null for conditional operations.
7217 (try_conditional_simplification): New function.
7218 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
7220 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
7222 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
7224 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
7226 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
7228 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7230 (hash_tree): Do not hash DECL_FCONTEXT
7231 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
7232 Do not stream DECL_FCONTEXT.
7233 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
7234 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
7236 2018-07-12 Richard Biener <rguenther@suse.de>
7239 * dwarf2out.c (gen_block_die): Only output blocks when they have
7240 at least one !DECL_IGNORED_P variable.
7242 2018-07-12 Richard Biener <rguenther@suse.de>
7245 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
7246 Remove -mieee-fp handling.
7248 2018-07-12 Richard Biener <rguenther@suse.de>
7250 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
7251 left-over from last patch.
7253 2018-07-12 Jakub Jelinek <jakub@redhat.com>
7255 PR tree-optimization/86492
7256 * gimple-ssa-store-merging.c
7257 (imm_store_chain_info::coalesce_immediate_stores): Call
7258 check_no_overlap even for the merge_overlapping case. Formatting fix.
7260 2018-07-12 Richard Biener <rguenther@suse.de>
7263 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
7264 move possibly trapping operations into the conditional.
7266 2018-07-12 Richard Biener <rguenther@suse.de>
7268 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
7269 (vn_lookup_simplify_result): Remove recursion limit applied
7271 (vn_nary_build_or_lookup_1): Adjust.
7272 (try_to_simplify): Likewise.
7273 * gimple-match-head.c (gimple_resimplify1): Instead apply one
7275 (gimple_resimplify2): Likewise.
7276 (gimple_resimplify3): Likewise.
7277 (gimple_resimplify4): Likewise.
7279 2018-07-11 Jakub Jelinek <jakub@redhat.com>
7281 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
7282 Use __mmask64 type instead of __mmask8 for __M argument.
7283 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
7284 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
7286 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
7287 __mmask16 for __M argument.
7288 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
7289 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
7290 to __mmask16 instead of __mmask8.
7291 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
7292 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
7293 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
7294 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
7295 instead of __mmask16 for __U argument.
7296 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
7297 __mmask16 instead of __mmask8 for __U argument.
7298 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
7300 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
7302 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
7304 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
7306 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
7308 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
7310 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
7312 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
7314 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
7316 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
7318 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
7319 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
7320 return type as well as __M argument type and all casts from __mmask8
7322 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
7323 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
7324 return type as well as __M argument type and all casts from __mmask8
7326 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
7327 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
7328 return type as well as __M argument type and all casts from __mmask8
7330 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
7331 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
7332 return type as well as __M argument type and all casts from __mmask8
7334 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
7335 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
7338 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
7340 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
7341 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
7344 2018-07-11 Paul Koning <ni1d@arrl.net>
7346 * doc/md.texi (define_subst): Document how multiple occurrences of
7347 the same argument in the replacement pattern are handled.
7349 2018-07-11 Paul Koning <ni1d@arrl.net>
7351 * doc/extend.texi (Common Variable Attributes): Move "mode" into
7353 (Common Type Attributes): Add "mode" attribute.
7355 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
7357 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
7358 stream DECL_ORIGINAL_TYPE.
7359 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
7360 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
7361 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
7362 Do not walk original type.
7363 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
7365 (write_ts_decl_non_common_tree_pointers): Do not stream
7367 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
7368 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
7370 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
7372 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
7373 thread twice from the same starting edge.
7375 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
7377 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
7378 * gimple.c (gimple_call_nonnull_result_p): ...here...
7379 (gimple_call_nonnull_arg): ...and here.
7380 * gimple.h (gimple_call_nonnull_result_p): New.
7381 (gimple_call_nonnull_arg): New.
7383 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
7385 * config/arm/arm-cpus.in: Move information from fpu field of each
7386 cpu definition to the isa field.
7387 * config/arm/parsecpu.awk (fpu): Delete match rule.
7388 (gen_comm_data): Don't add bits from the CPU's FPU entry.
7390 2018-07-11 Richard Biener <rguenther@suse.de>
7393 * dwarf2out.c (init_sections_and_labels): Use
7394 output_asm_line_debug_info consistently.
7395 (dwarf2out_early_finish): Likewise.
7396 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
7399 2018-07-11 Richard Biener <rguenther@suse.de>
7401 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
7402 Rework father_bb setting in a way to avoid propagating constants
7403 multiple times on a loop body.
7405 2018-07-10 Mark Wielaard <mark@klomp.org>
7408 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
7410 2018-07-10 Richard Biener <rguenther@suse.de>
7412 * hash-map.h (hash_map::iterator::operator*): Return
7413 references to key and value.
7415 2018-07-10 Jakub Jelinek <jakub@redhat.com>
7418 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
7419 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
7420 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
7421 (gimplify_omp_for): For composite loops, move outer
7422 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
7423 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
7424 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
7425 TREE_LIST for both the original class iterator and the "last" helper
7426 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
7427 loop, remember has_decl_expr from outer composite loops for the
7428 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
7430 2018-07-09 Martin Sebor <msebor@redhat.com>
7434 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
7435 accessing implicitly initialized array elements.
7436 * expr.c (string_constant): Handle string initializers of
7437 character arrays within aggregates.
7438 * gimple-fold.c (fold_array_ctor_reference): Add argument.
7439 Store element offset. As a special case, handle zero size.
7440 (fold_nonarray_ctor_reference): Same.
7441 (fold_ctor_reference): Add argument. Store subobject offset.
7442 * gimple-fold.h (fold_ctor_reference): Add argument.
7444 2018-07-09 Paul Koning <ni1d@arrl.net>
7446 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
7447 (pdp11_insn_cost): New function.
7448 (pdp11_md_asm_adjust): New function.
7449 (TARGET_INVALID_WITHIN_DOLOOP): Define.
7450 (pdp11_rtx_costs): Update to match machine better.
7451 (output_addr_const_pdp11): Correct format mismatch warnings.
7452 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
7453 * config/pdp11/pdp11.md: General change to add base_cost and/or
7454 length attributes for use by new pdp11_insn_cost function.
7455 (MIN_BRANCH): Correct definition.
7457 (doloop_end): Use standard pattern name for looping pattern.
7458 (doloop_end_nocc): New.
7459 (movsf): Add another constraint alternative.
7460 (zero_extendqihi2): Add constraint alternatives for not in place
7462 (zero_extendhisi2): Remove.
7463 (shift patterns): Add CC handling variants.
7467 (define_peephole2): New peephole to recognize mov that sets CC for
7470 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7472 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
7473 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
7476 2018-07-09 Jakub Jelinek <jakub@redhat.com>
7479 * real.c (real_nextafter): Return true if result is denormal.
7481 2018-07-09 Martin Liska <mliska@suse.cz>
7483 * common.opt: Add back wrongly removed attribute.
7485 2018-07-09 Richard Biener <rguenther@suse.de>
7488 * dwarf2out.c (gen_block_die): For an early generated DIE
7489 always output high/low PC attributes.
7491 2018-07-09 Tom de Vries <tdevries@suse.de>
7493 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
7494 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
7495 onto VAR_DECL with abstract origin.
7497 2018-07-07 Jim Wilson <jimw@sifive.com>
7499 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
7501 2018-07-07 Tom de Vries <tdevries@suse.de>
7503 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
7505 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
7507 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
7509 (combine_bound): Use wide-int overflow calculation instead of
7511 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
7513 * fold-const.c (int_const_binop_2): Same.
7514 (extract_muldiv_1): Same.
7515 (fold_div_compare): Same.
7516 (fold_abs_const): Same.
7518 * poly-int.h (add): Same.
7522 * predict.c (predict_iv_comparison): Same.
7523 * profile-count.c (slow_safe_scale_64bit): Same.
7524 * simplify-rtx.c (simplify_const_binary_operation): Same.
7525 * tree-chrec.c (tree_fold_binomial): Same.
7526 * tree-data-ref.c (split_constant_offset_1): Same.
7527 * tree-if-conv.c (idx_within_array_bound): Same.
7528 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
7529 * tree-ssa-phiopt.c (minmax_replacement): Same.
7530 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
7531 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
7532 * vr-values.c (vr_values::adjust_range_with_scev): Same.
7533 * wide-int.cc (wi::add_large): Same.
7534 (wi::mul_internal): Same.
7535 (wi::sub_large): Same.
7536 (wi::divmod_internal): Same.
7537 * wide-int.h: Change overflow type to overflow_type for neg, add,
7538 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
7539 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
7540 mul_internal, divmod_internal.
7541 (overflow_type): New enum.
7542 (accumulate_overflow): New.
7544 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7546 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
7547 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
7549 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7551 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
7552 argument is checked for zero before entering loop, avoid checking again.
7554 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7556 * gimplify.h (generic_expr_could_trap_p): Set as global function.
7557 * gimplify.h (generic_expr_could_trap_p): Likwise.
7558 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
7560 2018-07-06 Jakub Jelinek <jakub@redhat.com>
7562 PR tree-optimization/86401
7563 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
7564 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
7565 (fold_bit_and_mask): ... here. New helper function for match.pd.
7566 * fold-const.h (fold_bit_and_mask): Declare.
7567 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
7569 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
7572 * target.def (translate_mode_attribute): New hook.
7573 * targhooks.h (default_translate_mode_attribute): Declare.
7574 * targhooks.c (default_translate_mode_attribute): New function.
7575 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
7576 * doc/tm.texi: Regenerate.
7577 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
7578 (rs6000_translate_mode_attribute): New function.
7580 2018-07-06 Paul Koning <ni1d@arrl.net>
7582 * doc/md.texi (define_split): Document DONE and FAIL.
7583 (define_peephole2): Ditto.
7585 2018-07-05 Jeff Law <law@redhat.com>
7587 PR tree-optimization/86010
7588 * tree-ssa-dse.c (compute_trims): More aggressively trim at
7589 both the head and tail of mem* and str* calls.
7591 2018-07-05 Jim Wilson <jimw@sifive.com>
7593 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
7595 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
7597 * config/aarch64/aarch64-simd.md: correct flags text for
7598 MIN_EXPR replacement.
7600 2018-07-05 James Clarke <jrtc27@jrtc27.com>
7602 * configure: Regenerated.
7604 2018-07-05 Carl Love <cel@us.ibm.com>
7606 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7607 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7608 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7609 VSX_BUILTIN_DOUBLEL_V4SF.
7611 2018-07-05 Martin Sebor <msebor@redhat.com>
7614 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7615 than its domain to compute its the upper bound of a char array.
7617 2018-07-05 Nathan Sidwell <nathan@acm.org>
7619 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7620 * doc/cpp.texi: Update comment.
7621 * doc/tm.texi: Rebuilt.
7622 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7623 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7624 * doc/extend.texi (Backwards Compatibility): Clarify it is system
7625 headers affected by extern "C".
7626 * system.h: Poison NO_IMPLICIT_EXTERN_C.
7627 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7628 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7629 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7630 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7631 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7632 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7633 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7634 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7635 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7636 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7637 config/sparc/sp64-elf.h, config/spu/spu.h,
7638 config/stormy16/stormy16.h, config/v850/v850.h,
7639 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7640 define NO_IMPLICIT_EXTERN_C.
7641 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7643 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7646 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7647 instead of GET_MODE_SIZE when comparing Units.
7649 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7652 * rtlanal.c (set_noop_p): Constrain on mode change,
7653 include hard-reg-set.h
7655 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7657 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7659 2018-07-05 Jakub Jelinek <jakub@redhat.com>
7662 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7665 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7667 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7669 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7672 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7674 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7676 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
7679 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7681 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
7683 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7684 neg_*_op* variables.
7686 2018-07-04 Martin Liska <mliska@suse.cz>
7688 * tree-switch-conversion.c: Define
7689 max_ratio_for_speed and max_ratio_for_size constants.
7691 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7692 Martin Liska <mliska@suse.cz>
7697 * common.opt: Rename align options with 'str_' prefix.
7698 * common/config/i386/i386-common.c (set_malign_value): New
7700 (ix86_handle_option): Use it to set -falign-* options/
7701 * config/aarch64/aarch64-protos.h (struct tune_params): Change
7702 type from int to string.
7703 * config/aarch64/aarch64.c: Update default values from int
7705 * config/alpha/alpha.c (alpha_override_options_after_change):
7707 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7708 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7709 max skip conditionally.
7710 * config/i386/freebsd.h (SUBALIGN_LOG): New.
7711 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7712 max skip conditionally.
7713 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7714 max skip conditionally.
7715 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7716 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7717 max skip conditionally.
7718 * config/i386/i386.c (struct ptt): Change type from int to
7720 (ix86_default_align): Set default values.
7721 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7722 max skip conditionally.
7723 * config/i386/iamcu.h (SUBALIGN_LOG): New.
7724 (ASM_OUTPUT_MAX_SKIP_ALIGN):
7725 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7726 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7727 max skip conditionally.
7728 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7729 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7730 * config/i386/x86-64.h (SUBALIGN_LOG): New.
7731 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7732 max skip conditionally.
7733 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7734 * config/ia64/ia64.c (ia64_option_override): Set default values
7735 for alignment options.
7736 * config/m68k/m68k.c: Handle new str_align_* options.
7737 * config/mips/mips.c (mips_set_compression_mode): Change
7739 (mips_option_override): Set default values for options.
7740 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7742 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7744 * config/rx/rx.c (rx_option_override): Likewise.
7745 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7746 (LABEL_ALIGN): Use align_labels_log.
7747 (LOOP_ALIGN): Use align_loops_align.
7748 * config/s390/s390.c (s390_asm_output_function_label): Use new
7750 * config/sh/sh.c (sh_override_options_after_change):
7751 Change type of constants.
7752 * config/spu/spu.c (spu_sched_init): Likewise.
7753 * config/sparc/sparc.c (sparc_option_override): Set default
7755 * config/visium/visium.c (visium_option_override): Likewise.
7756 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7757 emit p2align format with last argument if it's not needed.
7758 * doc/invoke.texi: Document extended format of -falign-*.
7759 * final.c: Use align_labels alignment.
7760 * flags.h (struct target_flag_state): Change type to use
7762 (struct align_flags_tuple): New.
7763 (struct align_flags): Likewise.
7764 (align_loops_log): Redefine macro to use new types.
7765 (align_loops_max_skip): Redefine macro to use new types.
7766 (align_jumps_log): Redefine macro to use new types.
7767 (align_jumps_max_skip): Redefine macro to use new types.
7768 (align_labels_log): Redefine macro to use new types.
7769 (align_labels_max_skip): Redefine macro to use new types.
7770 (align_functions_log): Redefine macro to use new types.
7771 (align_loops): Redefine macro to use new types.
7772 (align_jumps): Redefine macro to use new types.
7773 (align_labels): Redefine macro to use new types.
7774 (align_functions): Redefine macro to use new types.
7775 (align_functions_max_skip): Redefine macro to use new types.
7776 (align_loops_value): New macro.
7777 (align_jumps_value): New macro.
7778 (align_labels_value): New macro.
7779 (align_functions_value): New macro.
7780 * function.c (invoke_set_current_function_hook): Propagate
7781 alignment values from flags to global variables default in
7783 * ipa-icf.c (sem_function::equals_wpa): Use
7784 cl_optimization_option_eq instead of memcmp.
7785 * lto-streamer.h (cl_optimization_stream_out): Support streaming
7787 (cl_optimization_stream_in): Likewise.
7788 * optc-save-gen.awk: Support strings in cl_optimization.
7789 * opth-gen.awk: Likewise.
7790 * opts.c (finish_options): Remove error checking of invalid
7792 (MAX_CODE_ALIGN): Remove.
7793 (MAX_CODE_ALIGN_VALUE): Likewise.
7794 (parse_and_check_align_values): New function.
7795 (check_alignment_argument): Likewise.
7796 (common_handle_option): Use check_alignment_argument.
7797 * opts.h (parse_and_check_align_values): Declare.
7798 * toplev.c (init_alignments): Remove.
7799 (read_log_maxskip): New.
7800 (parse_N_M): Likewise.
7801 (parse_alignment_opts): Likewise.
7802 (backend_init_target): Remove usage of init_alignments.
7803 * toplev.h (parse_alignment_opts): Declare.
7804 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7806 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7807 * tree.c (cl_option_hasher::equal): New.
7808 * varasm.c: Use new global macros.
7810 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7812 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7813 Use a simpler align directive also if MAXSKIP = ALIGN-1.
7814 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7815 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7816 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7817 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7818 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7819 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7820 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7821 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7822 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7823 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7824 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7826 2018-07-04 Martin Liska <mliska@suse.cz>
7827 Jonathan Wakely <jwakely@redhat.com>
7829 * coverage.c: Use correct type.
7830 * doc/invoke.texi: Language correction.
7832 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
7835 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7836 ENDBRANCH for non-tail call which may return via indirect branch.
7837 * doc/extend.texi: Document indirect_return attribute.
7839 2018-07-03 Martin Sebor <msebor@redhat.com>
7841 PR tree-optimization/86274
7842 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7844 (format_floating): Correct handling of infinities and NaNs.
7846 2018-07-03 Martin Sebor <msebor@redhat.com>
7848 * print-tree.c (print_real_cst): New function.
7849 (print_node_brief): Call it.
7850 (print_node): Ditto.
7852 2018-07-03 Jeff Law <law@redhat.com>
7854 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7855 into a single pattern.
7857 * config/h8300/h8300.md (ors code_iterator): New.
7858 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7859 a single pattern and single splitter.
7860 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7861 (iorqi3_1, xorqi3_1): Likewise.
7862 (iorqi3, xorqi3 expanders): Similarly.
7864 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7865 (movmd_internal) into a single pattern using the P mode iterator.
7866 (movmd splitters): Similarly.
7867 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7868 (movsd splitters): Similarly.
7870 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7871 ADDB, ADDW and ADDL into a single ADD attribute which selects the
7872 right table based on the size of the operand.
7873 * config/h8300/h8300.md (length_table): Corresponding changes. All
7874 references to "addb", "addw" and "addl" changed to "add".
7875 (btst patterns): Merge two variants into a single pattern.
7876 (tstqi, tsthi): Likewise.
7877 (addhi3_incdec, addsi3_incdec): Likewise.
7878 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7879 (mulhi3, mulsi3): Likewise.
7880 (udivhi3, udivsi3): Likewise.
7881 (divhi3, divsi3): Likewise.
7882 (andorqi3, andorhi3, andorsi3): Likewise.
7884 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
7887 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7888 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7890 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7892 PR tree-optimization/85694
7893 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7894 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7896 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7897 (<u>avg<mode>3_ceil): New patterns.
7899 2018-07-03 David Malcolm <dmalcolm@redhat.com>
7901 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7902 scan-tree-dump directive.
7903 * gcc.dg/vect/slp-perm-2.c: Likewise.
7904 * gcc.dg/vect/slp-perm-3.c: Likewise.
7905 * gcc.dg/vect/slp-perm-5.c: Likewise.
7906 * gcc.dg/vect/slp-perm-6.c: Likewise.
7907 * gcc.dg/vect/slp-perm-7.c: Likewise.
7908 * gcc.dg/vect/slp-perm-8.c: Likewise.
7910 2018-07-03 Marek Polacek <polacek@redhat.com>
7913 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7915 2018-07-03 Richard Biener <rguenther@suse.de>
7918 * tree-ssa-structalias.c (find_func_clobbers): Properly
7919 handle indirect calls.
7921 2018-07-03 Jeff Law <law@redhat.com>
7923 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7924 (shifts): New code iterator.
7925 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7926 expander. Fix HImode handling on H8/SX.
7927 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7928 (subqi3, subhi3, subsi3 expanders): Likewise.
7929 (andqi3, andhi3, andsi3 expanders): Likewise.
7930 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7931 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7932 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7933 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7934 (zero_extendqihi2, zero_extendqisi2): Likewise.
7935 (extendqihi2, extendqisi2): Likewise.
7936 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7937 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7938 (rotlqi3_1, rotlhi3_1): Likewise.
7939 (logicalhi3_sn, logicalsi3_sn): Likewise.
7940 (logicalhi3, logicalsi3): Likewise.
7942 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7944 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7945 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7946 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7947 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7948 type to append_pattern_def_seq instead of creating a stmt_vec_info
7950 (build_mask_conversion): Likewise. Remove vinfo argument.
7951 (vect_add_conversion_to_patterm): Likewise, renaming to...
7952 (vect_add_conversion_to_pattern): ...this.
7953 (vect_recog_mask_conversion_pattern): Update call to
7954 build_mask_conversion. Pass the vector type to
7955 append_pattern_def_seq here too.
7956 (vect_recog_gather_scatter_pattern): Update call to
7957 vect_add_conversion_to_pattern.
7959 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7961 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7962 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7963 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7964 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7965 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7966 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7967 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7968 append_pattern_def_seq instead of new_pattern_def_seq.
7969 (vect_recog_divmod_pattern): Do both of the above.
7970 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7973 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7975 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7976 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7977 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7978 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7979 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7980 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7981 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7982 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7983 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7984 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7985 parameter with a single stmt_vec_info.
7986 (vect_recog_func_ptr): Likewise.
7987 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7988 (vect_try_gather_scatter_pattern): ...this.
7989 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7990 the stmt_vec_info of the statement to be matched. Don't clear
7991 STMT_VINFO_RELATED_STMT.
7992 (vect_pattern_recog): Update call accordingly.
7994 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7996 PR tree-optimization/85694
7997 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7998 (uavgM3_ceil): Document new optabs.
7999 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
8000 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
8002 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
8003 (savg_ceil_optab): New optabs.
8004 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
8005 (vect_vect_recog_func_ptrs): Add it.
8006 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
8007 constant directly from the associated lhs.
8009 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
8011 * tree-vect-patterns.c (vect_split_statement): New function.
8012 (vect_convert_input): Use it to try to split an existing cast.
8014 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
8016 * poly-int.h (print_hex): New function.
8017 * dumpfile.h (dump_dec, dump_hex): Declare.
8018 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
8019 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
8020 min_input_precision, operation_precision and operation_sign.
8021 * tree-vect-patterns.c (vect_get_range_info): New function.
8022 (vect_same_loop_or_bb_p, vect_single_imm_use)
8023 (vect_operation_fits_smaller_type): Delete.
8024 (vect_look_through_possible_promotion): Add an optional
8025 single_use_p parameter.
8026 (vect_recog_over_widening_pattern): Rewrite to use new
8027 stmt_vec_info infomration. Handle one operation at a time.
8028 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
8029 (vect_truncatable_operation_p, vect_set_operation_type)
8030 (vect_set_min_input_precision): New functions.
8031 (vect_determine_min_output_precision_1): Likewise.
8032 (vect_determine_min_output_precision): Likewise.
8033 (vect_determine_precisions_from_range): Likewise.
8034 (vect_determine_precisions_from_users): Likewise.
8035 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
8036 (vect_vect_recog_func_ptrs): Put over_widening first.
8038 (vect_pattern_recog): Call vect_determine_precisions.
8040 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
8042 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
8043 statements that have been replaced by further pattern statements.
8044 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
8046 2018-07-03 Richard Biener <rguenther@suse.de>
8048 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
8049 always set *dt. Dump vectype in vectype overload.
8050 * dumpfile.h (dump_gimple_expr): New function.
8051 (dump_gimple_expr_loc): Likewise.
8052 * dumpfile.c (dump_gimple_expr): New function.
8053 (dump_gimple_expr_loc): Likewise.
8055 2018-07-02 Jeff Law <law@redhat.com>
8057 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
8058 the H8/300, H8/300H and H8/S variants into a single pattern.
8059 (movhi_h8300, movqi_h8300hs): Similarly.
8060 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
8061 (QHI mode iterator): New.
8063 * config/h8300/h8300.md: Remove trailing whitespace.
8065 2018-07-02 Jim Wilson <jimw@sifive.com>
8067 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
8068 instead of emit_insn for interrupt returns.
8069 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
8070 (riscv_sret, riscv_uret): Likewise.
8072 2018-07-02 David Malcolm <dmalcolm@redhat.com>
8074 * pretty-print.c (selftest::test_pp_format): Move save and restore
8075 of quotes to class auto_fix_quotes, and add an instance.
8076 * selftest.c: Include "intl.h".
8077 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
8078 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
8079 * selftest.h (selftest::auto_fix_quotes): New class.
8081 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
8083 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
8084 (aarch64_sve_prepare_conditional_op): Remove.
8085 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
8086 Allow aarch64_simd_reg_or_zero as select operand; remove
8087 the aarch64_sve_prepare_conditional_op call.
8088 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
8089 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
8090 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
8091 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
8092 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
8093 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
8094 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
8095 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
8096 and a splitters to match all of the *_any patterns.
8097 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
8099 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
8100 (SVE_COND_FP_BINARY_REV): Remove.
8101 (sve_int_op_rev, sve_fp_op_rev): New.
8102 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
8103 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
8104 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
8105 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
8106 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
8107 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
8108 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
8109 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
8110 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
8112 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
8113 Remove match_dup 1 from the inner unspec.
8114 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
8116 * config/aarch64/aarch64.md (movprfx): New attr.
8117 (length): Default movprfx to 8.
8118 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
8119 (*madd<SVE_I>, *msub<SVE_I): Likewise.
8120 (*<su>mul<SVE_I>3_highpart): Likewise.
8121 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
8122 (*v<ASHIFT><SVE_I>3): Likewise.
8123 (*<su><MAXMIN><SVE_I>3): Likewise.
8124 (*<su><MAXMIN><SVE_F>3): Likewise.
8125 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
8126 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
8127 (*div<SVE_F>4): Likewise.
8129 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
8131 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
8134 2018-07-02 Richard Biener <rguenther@suse.de>
8136 PR tree-optimization/86363
8137 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
8138 memset argument refers to a non-variable address.
8140 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
8142 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
8143 {PLUS,MINUS}_EXPR code to...
8144 (adjust_symbolic_bound): ...here,
8145 (combine_bound): ...here,
8146 (set_value_range_with_overflow): ...and here.
8148 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
8150 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
8152 (extract_range_from_abs_expr): ...here.
8154 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
8156 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
8157 -fno-omit-frame-pointer when not optimizing.
8159 2018-07-02 Martin Liska <mliska@suse.cz>
8162 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
8163 (propagate_nothrow): Likewise.
8165 2018-07-02 Martin Liska <mliska@suse.cz>
8168 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
8170 2018-07-02 David Malcolm <dmalcolm@redhat.com>
8172 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
8173 function in r262149, changing "loc" param from source_location to
8174 const dump_location_t &.
8175 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
8176 declaration, as above.
8178 2018-07-01 Paul Koning <ni1d@arrl.net>
8180 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8181 -munit-asm, -mgnu-asm, -mdec-asm.
8182 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
8183 (pdp11_output_labelref): New.
8184 (pdp11_output_def): New.
8185 (pdp11_output_addr_vec_elt): New.
8186 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
8187 %# and %@ format codes.
8188 (pdp11_option_override): New.
8189 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
8190 (pdp11_output_ident): New.
8191 (pdp11_asm_named_section): New.
8192 (pdp11_asm_init_sections): New.
8193 (pdp11_file_start): New.
8194 (pdp11_file_end): New.
8195 (output_ascii): Use .ascii/.asciz for -mdec-asm.
8196 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
8197 %o, like %c but octal.
8198 (pdp11_option_override): New.
8199 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
8201 (DATA_SECTION_ASM_OP): Ditto.
8202 (READONLY_DATA_SECTION_ASM_OP): New.
8203 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
8204 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
8205 (ASM_OUTPUT_LABELREF): Ditto.
8206 (ASM_OUTPUT_DEF): Ditto.
8207 (ASM_OUTPUT_EXTERNAL): New.
8208 (ASM_OUTPUT_SOURCE_FILENAME): New.
8209 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
8210 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
8211 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
8212 %# and %@ format codes.
8213 * config/pdp11/pdp11.opt (mgnu-asm): New.
8214 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
8215 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
8216 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
8218 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
8220 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
8221 dereferencing path[] beyond its length.
8223 (debug_all_paths): New.
8224 (rewire_first_differing_edge): New.
8225 (adjust_paths_after_duplication): New.
8226 (duplicate_thread_path): Call adjust_paths_after_duplication.
8228 (thread_through_all_blocks): Add new argument to
8229 duplicate_thread_path.
8231 2018-06-30 Jim Wilson <jimw@sifive.com>
8233 * config/riscv/predicates.md (p2m1_shift_operand): New.
8234 (high_mask_shift_operand): New.
8235 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
8236 pattern using p2m1_shift_operand.
8237 (lshsi3_zero_extend_3+2): New combiner pattern using
8238 high_mask_shift_operand.
8240 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
8242 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
8244 (vect_recog_rotate_pattern): ...here.
8245 (vect_convert_input): Try to insert casts of invariants in the
8247 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
8248 preheader to be empty.
8250 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
8252 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
8253 vector type. If given, install it in the new statement's
8255 (vect_element_precision): New function.
8256 (vect_unpromoted_value): New struct.
8257 (vect_unpromoted_value::vect_unpromoted_value): New function.
8258 (vect_unpromoted_value::set_op): Likewise.
8259 (vect_look_through_possible_promotion): Likewise.
8260 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
8261 (vect_widened_op_tree, vect_convert_input): Likewise.
8262 (vect_convert_inputs, vect_convert_output): Likewise.
8263 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
8264 to handle the optional cast of the multiplication result and
8265 vect_widened_op_tree to detect the widened multiplication itself.
8266 Do not require the input and output of promotion casts to have
8267 the same sign, but base the signedness of the operation on the
8268 input rather than the result. If the pattern includes two
8269 promotions, check that those promotions have the same sign.
8270 Do not restrict the MULT_EXPR handling to a double-width result;
8271 handle quadruple-width results and wider. Use vect_convert_inputs
8272 to convert the inputs to the common type.
8273 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
8274 to handle the optional cast of the ABS result. Also allow a sign
8275 change or a sign extension between the ABS and MINUS.
8276 Use vect_widened_op_tree to detect the widened subtraction and use
8277 vect_convert_inputs to convert the inputs to the common type.
8278 (vect_handle_widen_op_by_const): Delete.
8279 (vect_recog_widen_op_pattern): New function.
8280 (vect_recog_widen_mult_pattern): Use it.
8281 (vect_recog_widen_shift_pattern): Likewise.
8282 (vect_recog_widen_sum_pattern): Use
8283 vect_look_through_possible_promotion to handle the promoted
8286 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
8288 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
8289 the containing gimple_seq *.
8290 * gimple-iterator.h (gsi_for_stmt): Declare it.
8291 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
8292 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
8293 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
8294 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8295 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
8297 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
8299 (vect_mark_pattern_stmts): ...here. Handle cases in which the
8300 statement being replaced is part of an existing pattern
8301 definition sequence, inserting the new pattern statements before
8303 (vect_pattern_recog_1): Don't return a bool. If the statement
8304 is already part of a pattern, instead apply pattern matching
8305 to the pattern definition statements. Don't clear the
8306 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
8307 (vect_pattern_recog): Don't break after the first match;
8308 continue processing the pattern definition statements instead.
8309 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
8311 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
8313 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8314 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8315 (vect_recog_widen_sum_pattern): Use it.
8317 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
8319 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8320 phi is not a pattern statement and has not been replaced by
8321 a pattern statement.
8322 * tree-vect-patterns.c (type_conversion_p): Don't check
8323 STMT_VINFO_IN_PATTERN_P.
8324 (vect_recog_vector_vector_shift_pattern): Likewise.
8325 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
8326 the pattern statement rather than the original statement; check
8327 directly for a WIDEN_MULT_EXPR here.
8328 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
8329 vect_is_simple_use to return the pattern statement rather
8330 than the original statement; use is_pattern_stmt_p to check
8331 for such a pattern statement.
8332 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
8333 to return the pattern statement rather than the original statement;
8334 don't do the same transformation here.
8335 (vect_is_simple_use): If the defining statement has been replaced
8336 by a pattern statement, return the pattern statement instead.
8337 Remove the corresponding (local) transformation from the vectype
8340 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
8342 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
8343 end and default to null.
8344 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8345 (vectorizable_reduction): Update calls accordingly, dropping the
8346 gimple ** argument if the passed-back statement isn't needed.
8347 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
8348 (vect_recog_rotate_pattern): Likewise.
8349 (vect_recog_mask_conversion_pattern): Likewise.
8350 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8351 (vect_mask_constant_operand_p): Likewise.
8352 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
8353 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
8354 (get_group_load_store_type, get_load_store_type): Likewise.
8355 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
8356 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
8357 (vectorizable_conversion, vectorizable_assignment): Likewise.
8358 (vectorizable_shift, vectorizable_operation): Likewise.
8359 (vectorizable_store, vect_is_simple_cond): Likewise.
8360 (vectorizable_condition, vectorizable_comparison): Likewise.
8361 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
8362 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
8363 and move it to the end. Cope with null def_stmt_outs.
8365 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8367 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
8369 2018-06-29 Jeff Law <law@redhat.com>
8371 * config/v850/v850.c (v850_legitimate_address_p): Handle large
8372 displacements for TARGET_V850E2V3 and newer.
8373 (TARGET_LRA_P): Remove. Defaults to LRA now.
8374 * config/v850/v850.md (sign23byte_load): Remove.
8375 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
8376 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
8378 2018-06-29 Martin Liska <mliska@suse.cz>
8381 * coverage.c (coverage_init): Mangle full path name.
8382 * doc/invoke.texi: Document the change.
8383 * gcov-io.c (mangle_path): New.
8384 * gcov-io.h (mangle_path): Likewise.
8385 * gcov.c (mangle_name): Use mangle_path for path mangling.
8387 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8389 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
8390 if starting source register is not even.
8392 2018-06-29 Martin Liska <mliska@suse.cz>
8394 PR tree-optimization/86263
8395 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
8396 Make edge redirection.
8398 2018-06-29 David Malcolm <dmalcolm@redhat.com>
8400 * dumpfile.c (dump_loc): Add indentation based on scope depth.
8401 (dump_scope_depth): New variable.
8402 (get_dump_scope_depth): New function.
8403 (dump_begin_scope): New function.
8404 (dump_end_scope): New function.
8405 * dumpfile.h (get_dump_scope_depth): New declaration.
8406 (dump_begin_scope): New declaration.
8407 (dump_end_scope): New declaration.
8408 (class auto_dump_scope): New class.
8409 (AUTO_DUMP_SCOPE): New macro.
8410 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
8413 2018-06-29 Richard Biener <rguenther@suse.de>
8415 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
8416 compute_all_dependences succeeds.
8417 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
8418 exceed --param loop-max-datarefs-for-datadeps.
8420 2018-06-29 Jakub Jelinek <jakub@redhat.com>
8422 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
8424 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
8427 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
8428 alternative 0 in preferred_for_speed attribute.
8430 2018-06-28 Paul Koning <ni1d@arrl.net>
8432 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
8433 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
8434 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
8435 * config/pdp11/pdp11.md: Correct "length" attribute calculation
8436 for shift insn patterns.
8438 2018-06-28 David Malcolm <dmalcolm@redhat.com>
8440 * cgraph.c (cgraph_node::get_body): Replace assignments to
8441 "dump_file" with calls to set_dump_file.
8442 * dumpfile.c (alt_dump_file): Make static, and group with...
8443 (alt_flags): ...this definition.
8444 (dumps_are_enabled): New variable.
8445 (refresh_dumps_are_enabled): New function.
8446 (set_dump_file): New function.
8447 (set_alt_dump_file): New function.
8448 (gcc::dump_manager::dump_start): Replace assignments to
8449 "dump_file" and "alt_dump_file" with calls to set_dump_file and
8451 (gcc::dump_manager::dump_finish): Likewise.
8452 * dumpfile.h (alt_dump_file): Delete decl.
8453 (dumps_are_enabled): New variable decl.
8454 (set_dump_file): New function decl.
8455 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
8457 * tree-nested.c (lower_nested_functions): Replace assignments to
8458 "dump_file" with calls to set_dump_file.
8460 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8462 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
8463 goto_locus of each outgoing edge of each basic block.
8465 2018-06-28 Richard Biener <rguenther@suse.de>
8467 * dwarf2out.c (decl_scope_table): Remove.
8468 (push_decl_scope): Likewise.
8469 (pop_decl_scope): Likewise.
8470 (gen_type_die_for_member): Do not call push/pop_decl_scope.
8471 (gen_struct_or_union_type_die): Likewise.
8472 (gen_tagged_type_die): Likewise.
8473 (dwarf2out_init): Do not initialize decl_scope_table.
8474 (dwarf2out_c_finalize): Do not free it.
8476 2018-06-28 Richard Biener <rguenther@suse.de>
8478 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
8479 deciding whether to not re-use a DIE.
8481 2018-06-28 Richard Biener <rguenther@suse.de>
8483 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
8484 DW_AT_abstract_origin attribute.
8486 2018-06-28 Martin Liska <mliska@suse.cz>
8488 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8489 Use newly introduced constants.
8490 * tree-switch-conversion.h (struct jump_table_cluster):
8491 Define max_ratio_for_size and max_ratio_for_speed.
8493 2018-06-28 Martin Liska <mliska@suse.cz>
8495 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8496 Add new checking assert to catch invalid state.
8497 (jump_table_cluster::can_be_handled): Handle single case
8499 (jump_table_cluster::is_beneficial): Bail out for such case.
8500 (bit_test_cluster::find_bit_tests):
8501 Add new checking assert to catch invalid state.
8502 (bit_test_cluster::can_be_handled): Handle single case
8504 (bit_test_cluster::is_beneficial): Bail out for such case.
8505 (switch_decision_tree::analyze_switch_statement):
8508 2018-06-28 Martin Liska <mliska@suse.cz>
8510 * common.opt: Introduce -completion option.
8511 * gcc.c (driver_handle_option): Handle it.
8512 (driver::main): Print completions if completion
8514 * opt-suggestions.c (option_proposer::get_completions):
8516 (option_proposer::suggest_completion): Likewise.
8517 (option_proposer::find_param_completions): Likewise.
8518 (verify_autocompletions): Likewise.
8519 (test_completion_valid_options): Likewise.
8520 (test_completion_valid_params): Likewise.
8521 (in_completion_p): Likewise.
8522 (empty_completion_p): Likewise.
8523 (test_completion_partial_match): Likewise.
8524 (test_completion_garbage): Likewise.
8525 (opt_proposer_c_tests): Likewise.
8526 * opt-suggestions.h: Declare new functions.
8527 * opts.c (common_handle_option): Handle OPT__completion_.
8528 * selftest-run-tests.c (selftest::run_tests): Add
8529 opt_proposer_c_tests.
8530 * selftest.c (assert_str_startswith): New.
8531 * selftest.h (assert_str_startswith): Likewise.
8532 (opt_proposer_c_tests): New.
8533 (ASSERT_STR_STARTSWITH): Likewise.
8535 2018-06-28 Martin Liska <mliska@suse.cz>
8537 * Makefile.in: Add opt-suggestions.o.
8538 * gcc-main.c: Include opt-suggestions.h.
8539 * gcc.c (driver::driver): Likewise.
8540 (driver::~driver): Remove m_option_suggestions.
8541 (driver::build_option_suggestions): Moved to option_proposer.
8542 (driver::suggest_option): Likewise.
8543 (driver::handle_unrecognized_options): Use option_proposer.
8544 * gcc.h (class driver): Add new memver m_option_proposer.
8545 * opt-suggestions.c: New file.
8546 * opt-suggestions.h: New file.
8548 2018-06-28 Martin Liska <mliska@suse.cz>
8550 * vec.h (class auto_string_vec): New (moved from auto_argvec).
8551 (auto_string_vec::~auto_string_vec): Likewise.
8553 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8555 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
8556 prevent_decl_creation_for_types fields up and add reset_location field.
8557 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
8558 statement if id->reset_location is true.
8559 (copy_edges_for_bb): Do not set goto_locus on the new edges if
8560 id->reset_location is true.
8561 (copy_phis_for_bb): Force input_location on the arguments if
8562 id->reset_location is true.
8563 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
8564 is set on the function to be inlined.
8566 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
8568 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
8570 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
8572 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
8573 registers for Pmode.
8574 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
8575 hard registers for the clobbered pseudo.
8577 2018-06-27 Paul Koning <ni1d@arrl.net>
8579 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8580 mutually exclusive options.
8581 * config/pdp11/constraints.md (h): New constraint.
8582 (O): Update definition to match shift code generation.
8583 (D): New constraint.
8584 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
8586 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
8588 (output_jump): Change arguments.
8589 (pdp11_fixed_cc_regs): New function.
8590 (pdp11_cc_mode): Ditto.
8591 (pdp11_expand_shift): Ditto.
8592 (pdp11_assemble_shift): Ditto.
8593 (pdp11_small_shift): Ditto.
8594 (pdp11_branch_cost): Remove.
8595 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
8597 (pdp11_register_move_cost): Update for CC registers.
8598 (pdp11_rtx_costs): Add case for LSHIFTRT.
8599 (pdp11_output_jump): Add CCNZ mode conditional branches.
8600 (notice_update_cc_on_set): Remove.
8601 (pdp11_cc_mode): New function.
8602 (simple_memory_operand): Correct pre/post decrement case.
8603 (no_side_effect_operand): New function.
8604 (pdp11_regno_reg_class): Add CC_REGS class.
8605 (pdp11_fixed_cc_regs): New function.
8606 (pdp11_small_shift): New function.
8607 (pdp11_expand_shift): New function to expand shift insns.
8608 (pdp11_assemble_shift): New function to output shifts.
8609 (pdp11_branch_cost): Remove.
8610 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8611 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8612 (WCHAR_TYPE): Ditto.
8613 (PTRDIFF_TYPE): Ditto.
8614 (ADJUST_INSN_LENGTH): New macro.
8615 (FIXED_REGISTERS): Add CC registers.
8616 (CALL_USED_REGISTERS): Ditto.
8618 (REG_CLASS_NAMES): Ditto.
8619 (REG_CLASS_CONTENTS): Ditto.
8620 (SELECT_CC_MODE): Use new function.
8621 (TARGET_FLAGS_REGNUM): New macro.
8622 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8623 (cc0_reg_rtx): Remove.
8624 (CC_STATUS_MDEP): Remove.
8625 (CC_STATUS_MDEFP_INIT): Remove.
8626 (CC_IN_FPU): Remove.
8627 (NOTICE_UPDATE_CC): Remove.
8628 (REGISTER_NAMES): Add CC registers.
8629 (BRANCH_COST): Change to constant 1.
8630 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8632 * config/pdp11/pdp11.opt (mbcopy): Remove.
8633 (mbcopy-builtin): Remove.
8634 (mbranch-cheap): Remove.
8635 (mbranch-expensive): Remove.
8636 * config/pdp11/predicates.md (expand_shift_operand): Update to
8637 match shift code generation.
8638 (ccnz_operator): New predicate.
8639 * doc/invoke.texi (PDP-11 Options): Remove deleted options
8640 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8641 Remove non-existent option -mabshi, -mno-abshi. Document mutually
8643 * doc/md.texi (PDP-11): Document new D and h constraints. Update
8644 description of O constraint.
8646 2018-06-27 Jeff Law <law@redhat.com>
8647 Austin Law <austinklaw@gmail.com>
8649 * config/v850/v850.md (addsi3_set_flags): New pattern.
8650 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8651 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8652 (zero_extendhisi2_v850_set_flags): Likewise.
8653 (zero_extendqisi2_v850_set_flags): Likewise.
8654 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8655 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8656 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8658 * config/v850/v850-protos.h (notice_update_cc): Remove.
8659 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8660 (v850_print_operand): Handle 'D' and "d".
8661 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8662 Add handling of arithmetic/logical operations compared against zero.
8663 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8664 Do not look at v850_compare_op, instead get mode from last argument.
8665 (v850_gen_compare): Remove
8666 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8667 after reload for prologue insns.
8668 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8670 (construct_save_jarl): Likewise.
8671 (TARGET_FLAGS_REGNUM): Define.
8672 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8673 (NOTICE_UPDATE_CC): Remove.
8674 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8675 than cc0. Conditionalize on reload_completed.
8676 (cmpsi_insn, setfcc_insn): Likewise.
8677 (tst1 splitter): Turn into define_and_split which sets the flags
8679 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8680 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8681 (cstoresf4, cstoredf4): Clobber the flags.
8682 (cmpsi, cmpsf, cmpdf): Remove expanders.
8683 (setf_insn): Remove pattern.
8684 (addsi3): Turn into define_and_split which clobbers the flags after
8685 reload and a suitable pattern (addsi3_clobber_flags) for use after
8687 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8688 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8689 (ashrsi3, ashrsi3_v850e2): Likewise.
8690 (bins): Clobber the flags.
8691 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8692 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8693 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8694 (call_value_internal_short, call_value_internal_long): Likewise.
8695 (callt_save_interrupt, callt_return_interrupt): Likewise.
8696 (save_interrupt, return_interrupt): Likewise.
8697 (callt_save_all_interrupt, save_all_interrupt): Likewise.
8698 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8699 (restore_all_interrupt, _restore_all_interrupt): Likewise.
8700 (All FP comparisons): Only allow after reload has completed.
8702 (divh, divhu): Tweak output template.
8703 (branch_z_normal, branch_z_invert): Remove
8704 (branch_nz_normal, branch_nz_invert): Likewise.
8705 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8707 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8708 * config/v850/v850.c (notice_update_cc): Remove.
8709 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
8710 (CC_NO_CARRY): Likewise.
8711 (NOTICE_UPDATE_CC): Define to nothing.
8712 * config/v850/v850.md: Remove block comment on cc0 handling
8713 Remove "cc" attribute from all patterns. Remove cc_status handling
8714 from all patterns. Minor formatting fixes.
8716 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8718 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8719 (cortex-a76.cortex-a55): Likewise.
8720 * config/aarch64/aarch64-tune.md: Regenerate.
8721 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8722 cortex-a76.cortex-a55.
8724 2018-06-27 Jeff Law <law@redhat.com>
8726 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8727 (MULTILIB_DIRNAMES): Similarly.
8729 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
8731 * gimple.h (gimple_return_retbnd): Delete.
8732 (gimple_return_set_retbnd): Likewise.
8733 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8734 gimple_return_set_retbnd.
8735 * gimple-pretty-print.c (dump_gimple_return): Remove call to
8736 gimple_return_retbnd and adjust.
8737 * tree-inline.h (struct copy_body_data): Remove retbnd field.
8738 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8739 Explicitly return NULL in a couple more cases. Move assertion
8740 on debug statements and remove unreachable code.
8741 (reset_debug_binding): Do not test id->retbnd.
8742 (expand_call_inline): Do not set it.
8744 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8746 * configure.ac: Add --disable-gcov option.
8747 * configure: Regenerate.
8748 * Makefile.in: Honour @enable_gcov@.
8749 * doc/install.texi: Document --disable-gcov.
8751 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8753 * config/arm/arm-cpus.in (cortex-a76): New entry.
8754 (cortex-a76.cortex-a55): Likewise.
8755 * config/arm/arm-tables.opt: Regenerate.
8756 * config/arm/arm-tune.md: Likewise.
8757 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8758 * doc/invoke.texi (ARM Options): Document cortex-a76 and
8759 cortex-a76.cortex-a55.
8761 2018-06-27 Tamar Christina <tamar.christina@arm.com>
8764 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8766 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
8768 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8770 (EPILOGUE_USES): Likewise.
8772 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
8774 * tree-inline.c (remap_location): New function extracted from...
8775 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
8776 (copy_phis_for_bb): ...here. Call remap_location.
8777 (copy_cfg_body): Adjust call to copy_edges_for_bb.
8779 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
8781 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8782 unaligned vsx for 16B memset.
8784 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
8787 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8788 ieee128_float_type_node to long_double_type_node unless
8789 TARGET_LONG_DOUBLE_128 is set.
8791 2018-06-26 David Malcolm <dmalcolm@redhat.com>
8793 * cfgloop.c (get_loop_location): Convert return type from
8794 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8795 by implicit construction from rtx_insn *, and using
8796 dump_user_location_t::from_function_decl for the fallback case.
8797 * cfgloop.h (get_loop_location): Convert return type from
8798 location_t to dump_user_location_t.
8799 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8800 dump_printf_loc to pass in a dump_location_t rather than a
8801 location_t, via the gimple stmt.
8802 * coverage.c (get_coverage_counts): Update calls to
8803 dump_printf_loc to pass in dump_location_t rather than a
8805 * doc/optinfo.texi (Dump types): Convert example of
8806 dump_printf_loc from taking "locus" to taking "insn". Update
8807 description of the "_loc" calls to cover dump_location_t.
8808 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8810 (dump_user_location_t::dump_user_location_t): New constructors,
8811 from gimple *stmt and rtx_insn *.
8812 (dump_user_location_t::from_function_decl): New function.
8813 (dump_loc): Make static.
8814 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8815 const dump_location_t &.
8816 (dump_generic_expr_loc): Delete.
8817 (dump_printf_loc): Convert param "loc" from location_t to
8818 const dump_location_t &.
8819 (selftest::test_impl_location): New function.
8820 (selftest::dumpfile_c_tests): New function.
8821 * dumpfile.h: Include "profile-count.h".
8822 (class dump_user_location_t): New class.
8823 (struct dump_impl_location_t): New struct.
8824 (class dump_location_t): New class.
8825 (dump_printf_loc): Convert 2nd param from source_location to
8826 const dump_location_t &.
8827 (dump_generic_expr_loc): Delete.
8828 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8829 const dump_location_t &.
8830 * gimple-fold.c (fold_gimple_assign): Update call to
8831 dump_printf_loc to pass in a dump_location_t rather than a
8832 location_t, via the gimple stmt.
8833 (gimple_fold_call): Likewise.
8834 * gimple-loop-interchange.cc
8835 (loop_cand::analyze_iloop_reduction_var): Update for change to
8836 check_reduction_path.
8837 (tree_loop_interchange::interchange): Update for change to
8839 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8840 change in return-type of find_loop_location.
8841 (graphite_regenerate_ast_isl): Likewise.
8842 * graphite-optimize-isl.c (optimize_isl): Likewise.
8843 * graphite.c (graphite_transform_loops): Likewise.
8844 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8845 pass in a dump_location_t rather than a location_t, via the
8847 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8848 * ipa.c (walk_polymorphic_call_targets): Likewise.
8849 * loop-unroll.c (report_unroll): Convert "locus" param from
8850 location_t to dump_location_t.
8851 (decide_unrolling): Update for change to get_loop_location's
8853 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8854 location_t to dump_user_location_t.
8855 (grid_find_single_omp_among_assignments_1): Updates calls to
8856 dump_printf_loc to pass in a dump_location_t rather than a
8857 location_t, via the gimple stmt.
8858 (grid_parallel_clauses_gridifiable): Convert "tloc" from
8859 location_t to dump_location_t. Updates calls to dump_printf_loc
8860 to pass in a dump_location_t rather than a location_t, via the
8862 (grid_inner_loop_gridifiable_p): Likewise.
8863 (grid_dist_follows_simple_pattern): Likewise.
8864 (grid_gfor_follows_tiling_pattern): Likewise.
8865 (grid_target_follows_gridifiable_pattern): Likewise.
8866 (grid_attempt_target_gridification): Convert initialization
8867 of local "grid" from memset to zero-initialization; FIXME: does
8868 this require C++11? Update call to dump_printf_loc to pass in a
8869 optinfo_location rather than a location_t, via the gimple stmt.
8870 * profile.c (read_profile_edge_counts): Updates call to
8871 dump_printf_loc to pass in a dump_location_t rather than a
8873 (compute_branch_probabilities): Likewise.
8874 * selftest-run-tests.c (selftest::run_tests): Call
8876 * selftest.h (dumpfile_c_tests): New decl.
8877 * tree-loop-distribution.c (pass_loop_distribution::execute):
8878 Update for change in return type of find_loop_location.
8879 * tree-parloops.c (parallelize_loops): Likewise.
8880 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8881 "locus" from location_t to dump_user_location_t.
8882 (canonicalize_loop_induction_variables): Likewise.
8883 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8884 for change in return type of find_loop_location.
8885 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8886 to dump_printf_loc to pass in a dump_location_t rather than a
8887 location_t, via the stmt.
8888 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8890 * tree-vect-loop-manip.c (find_loop_location): Convert return
8891 type from source_location to dump_user_location_t.
8892 (vect_do_peeling): Update for above change.
8893 (vect_loop_versioning): Update for change in type of
8895 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8896 from location_t to dump_user_location_t.
8897 (vect_estimate_min_profitable_iters): Update for change in type
8899 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8900 location_t to dump_location_t.
8901 (vect_slp_bb): Update for change in type of vect_location.
8902 * tree-vectorizer.c (vect_location): Convert from source_location
8903 to dump_user_location_t.
8904 (try_vectorize_loop_1): Update for change in vect_location's type.
8905 (vectorize_loops): Likewise.
8906 (increase_alignment): Likewise.
8907 * tree-vectorizer.h (vect_location): Convert from source_location
8908 to dump_user_location_t.
8909 (find_loop_location): Convert return type from source_location to
8910 dump_user_location_t.
8911 (check_reduction_path): Convert 1st param from location_t to
8912 dump_user_location_t.
8913 * value-prof.c (check_counter): Update call to dump_printf_loc to
8914 pass in a dump_user_location_t rather than a location_t; update
8915 call to error_at for change in type of "locus".
8916 (check_ic_target): Update call to dump_printf_loc to
8917 pass in a dump_user_location_t rather than a location_t, via the
8920 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8922 * config/s390/s390.h (enum processor_flags): Do not use
8923 default tune parameter when -march was specified.
8925 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8928 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8929 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8932 2018-06-26 Richard Biener <rguenther@suse.de>
8934 PR tree-optimization/86287
8936 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8937 (vect_analyze_loop): Initialize n_stmts.
8939 2018-06-26 Richard Biener <rguenther@suse.de>
8942 * fold-const.c (fold_convertible_p): Pointer extension
8945 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8948 * dwarf2out.c (loc_list_has_views): Adjust comments.
8949 (dw_loc_list): Split single cross-partition range with
8952 2018-06-25 Jeff Law <law@redhat.com>
8954 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8955 on -mbig-switch by default.
8957 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8959 (const_float_0_operand): Remove unused predicate.
8960 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8961 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8962 (recipsf2): New expander. Original pattern now called
8964 (recipdf2, recipdf2_insn): Similarly.
8965 (rsqrtsf2, rsqrtsf2_insn): Similarly
8966 (rsqrtdf2, rsqrtdf2_insn): Similarly
8968 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8970 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8971 Simplify logic for FreeBSD (twice).
8973 2018-06-25 Martin Sebor <msebor@redhat.com>
8975 PR tree-optimization/86204
8976 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8977 a strnlen result if it's less than the length of the string.
8979 2018-06-25 Martin Sebor <msebor@redhat.com>
8981 PR tree-optimization/85700
8982 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8983 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8984 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8986 2018-06-25 Martin Sebor <msebor@redhat.com>
8988 * doc/extend.texi (Zero-length arrays): Update and clarify.
8990 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8992 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8993 added IEEE/IBM long double multilib support on PowerPC little
8994 endian Linux systems.
8995 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8996 (MULTILIB_DEFAULTS): Likewise.
8997 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8999 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
9000 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
9001 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
9003 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
9006 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
9007 (REORDER_45): Likewise.
9009 2018-06-25 Jeff Law <law@redhat.com>
9011 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
9012 dividend to 32 bits. Adjust length.
9013 (udivmodhi4): Cleanup output template. Fix length.
9015 2018-06-25 Carl Love <cel@us.ibm.com>
9017 * config/rs6000/vsx.md: Change word selector to prefered location.
9019 2018-06-25 Richard Biener <rguenther@suse.de>
9021 PR tree-optimization/86304
9022 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
9023 epilogue-if-converted loops as well.
9025 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
9027 * lto-section-out.c (lto_begin_section): Do not print section
9028 name for noaddr and unnumbered dumps.
9030 2018-06-25 Richard Biener <rguenther@suse.de>
9032 * tree-vectorizer.h (struct vec_info_shared): New structure
9033 with parts split out from struct vec_info and loop_nest from
9034 struct _loop_vec_info.
9035 (struct vec_info): Adjust accordingly.
9036 (struct _loop_vec_info): Likewise.
9037 (LOOP_VINFO_LOOP_NEST): Adjust.
9038 (LOOP_VINFO_DATAREFS): Likewise.
9039 (LOOP_VINFO_DDRS): Likewise.
9040 (struct _bb_vec_info): Likewise.
9041 (BB_VINFO_DATAREFS): Likewise.
9042 (BB_VINFO_DDRS): Likewise.
9043 (struct _stmt_vec_info): Add dr_aux member.
9044 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
9045 (DR_MISALIGNMENT_UNINITIALIZED): New.
9046 (set_dr_misalignment): Adjust.
9047 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
9048 (vect_analyze_loop): Adjust prototype.
9049 (vect_analyze_loop_form): Likewise.
9050 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9051 Compute dependences lazily.
9052 (vect_record_base_alignments): Use shared datarefs/ddrs.
9053 (vect_verify_datarefs_alignment): Likewise.
9054 (vect_analyze_data_refs_alignment): Likewise.
9055 (vect_analyze_data_ref_accesses): Likewise.
9056 (vect_analyze_data_refs): Likewise.
9057 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
9058 constructor parameter for shared part.
9059 (vect_analyze_loop_form): Pass in shared part and adjust.
9060 (vect_analyze_loop_2): Pass in storage for the number of
9061 stmts. Move loop nest finding to the caller. Compute
9063 (vect_analyze_loop): Pass in shared part.
9064 (vect_transform_loop): Verify shared datarefs are unchanged.
9065 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
9066 constructor parameter for shared part.
9067 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
9068 (vect_slp_bb): Verify shared datarefs are unchanged before
9070 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
9072 (new_stmt_vec_info): Initialize DR_AUX misalignment to
9073 DR_MISALIGNMENT_UNINITIALIZED.
9074 * tree-vectorizer.c (vec_info::vec_info): Add constructor
9075 parameter for shared part.
9076 (vec_info::~vec_info): Adjust.
9077 (vec_info_shared::vec_info_shared): New.
9078 (vec_info_shared::~vec_info_shared): Likewise.
9079 (vec_info_shared::save_datarefs): Likewise.
9080 (vec_info_shared::check_datarefs): Likewise.
9081 (try_vectorize_loop_1): Construct shared part live for analyses
9082 of a single loop for multiple vector sizes.
9083 * tree-parloops.c (gather_scalar_reductions): Adjust.
9085 2018-06-25 Richard Biener <rguenther@suse.de>
9087 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
9088 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
9089 (vect_analyze_data_refs): Remove similar code from here and
9090 simplify accordingly.
9092 2018-06-25 Richard Biener <rguenther@suse.de>
9094 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
9095 for reverse storage order accesses rather than asserting
9096 they cannot happen here.
9098 2018-06-25 Tom de Vries <tdevries@suse.de>
9101 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
9102 Use data16 instead of .byte for insn prefix.
9104 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
9107 * parser.c (make_char_string_pack): Pass this literal chars
9108 through cpp_interpret_string.
9109 (cp_parser_userdef_numeric_literal): Check the result of
9110 make_char_string_pack.
9112 2018-06-24 Maya Rashish <coypu@sdf.org>
9114 * ginclude/stddef.h: Simplify conditions around avoiding
9115 re-definition of __size_t.
9117 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
9119 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
9120 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
9122 2018-06-22 Maya Rashish <coypu@sdf.org>
9124 * doc/invoke.texi (mno-fancy-math-387): Update for changes
9125 made to OpenBSD and NetBSD through the years.
9127 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9129 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9130 behavior of vec_pack (vector double, vector double) to match
9131 behavior of vec_float2 (vector double, vector double).
9133 2018-06-22 Olivier Hainque <hainque@adacore.com>
9135 * gimplify.c (gimplify_function_tree): Prevent creation
9136 of a trampoline for the address of the current function
9137 passed to entry/exit instrumentation hooks.
9139 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
9142 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
9145 2018-06-22 Martin Liska <mliska@suse.cz>
9147 PR tree-optimization/86263
9148 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9149 Bail out if is_enabled is false.
9150 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
9152 (jump_table_cluster::is_enabled): New function.
9154 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
9156 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9157 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
9158 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
9159 (lto_input_ts_binfo_tree_pointers): Likewise.
9160 * tree-streamer-out.c (streamer_write_tree_bitfields,
9161 write_ts_binfo_tree_pointers): Likewise.
9162 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
9164 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
9166 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
9168 2018-06-22 Martin Liska <mliska@suse.cz>
9170 * symbol-summary.h (get): Make it pure and inline move
9171 functionality from ::get function.
9172 (get): Remove and inline into ::get and ::get_create.
9173 (get_create): Move code from ::get function.
9175 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9178 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
9179 -x assembler-with-cpp.
9181 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9183 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
9184 _FILE_OFFSET_BITS=64 for C++.
9186 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
9188 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
9189 conversion insn that shows up when pr85657-3.c is compiled using
9190 IEEE 128-bit long double.
9191 (neg<mode>2_internal): Use the correct mode to check whether the
9192 mode is IBM extended.
9193 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
9194 multiply and divide external functions from being created more
9197 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
9199 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
9201 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
9202 the edge can be forwarded.
9203 (cfg_layout_merge_blocks): Likewise.
9205 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
9207 * except.c (finish_eh_generation): Commit edge insertions only after
9208 the EH edges have been redirected from post-landing to landing pads.
9210 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
9212 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
9213 create_tmp_var_for to create the FRAME decl.
9214 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
9216 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
9218 * tree-inline.c (copy_edges_for_bb): Minor tweak.
9219 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
9220 debug statement when resetting its value.
9221 (expand_call_inline): Copy the locus of the call onto the assignment
9222 of the return value, if any. Use local variable in more cases.
9224 2018-06-21 Martin Liska <mliska@suse.cz>
9226 * ipa-pure-const.c (propagate_nothrow): Use
9227 funct_state_summaries->get.
9228 (dump_malloc_lattice): Likewise.
9229 (propagate_malloc): Likewise.
9231 2018-06-21 Richard Biener <rguenther@suse.de>
9233 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
9234 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
9235 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
9237 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
9238 BLOCK_ABSTRACT_ORIGIN unconditionally.
9240 2018-06-21 David Malcolm <dmalcolm@redhat.com>
9242 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
9244 * ipa-reference.c (ipa_reference_c_finalize): Delete
9245 ipa_ref_opt_sum_summaries and set it to NULL.
9247 2018-06-21 Tom de Vries <tdevries@suse.de>
9249 PR tree-optimization/85859
9250 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
9251 test with comment from bb_no_side_effects_p.
9253 2018-06-21 Richard Biener <rguenther@suse.de>
9255 PR tree-optimization/86232
9256 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
9257 max for constant niter.
9259 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
9261 * config/aarch64/aarch64-simd.md
9262 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
9264 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
9266 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
9267 Make opernads of the unspec commutative.
9269 2018-06-21 Richard Biener <rguenther@suse.de>
9271 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
9272 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
9273 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
9274 (vect_analyze_data_ref_dependence): Re-order checks to deal with
9276 (vect_record_base_alignments): Do not record base alignment
9277 for gathers or scatters.
9278 (vect_compute_data_ref_alignment): Drop return value that is always
9279 true. Bail out early for gathers or scatters.
9280 (vect_enhance_data_refs_alignment): Bail out early for gathers
9282 (vect_find_same_alignment_drs): Likewise.
9283 (vect_analyze_data_refs_alignment): Remove dead code.
9284 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9285 (vect_analyze_data_refs): For possible gathers or scatters do
9286 not create an alternate DR, just check their possible validity
9287 and mark them. Adjust DECL_NONALIASED handling to not rely
9289 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
9290 update inits of gathers or scatters.
9291 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
9292 Also copy gather/scatter flag to pattern vinfo.
9294 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
9296 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9297 behavior of vec_packsu (vector unsigned long long, vector unsigned
9298 long long) to match behavior of vec_packs with same signature.
9300 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
9301 Thomas Schwinge <thomas@codesourcery.com>
9302 Cesar Philippidis <cesar@codesourcery.com>
9304 * gimplify.c (gimplify_scan_omp_clauses): Add support for
9305 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9306 (gimplify_adjust_omp_clauses): Likewise.
9307 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
9308 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
9309 (gimplify_omp_target_update): Update handling of acc update and
9311 * omp-low.c (install_var_field): Remove unused parameter
9312 base_pointers_restrict.
9313 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
9314 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
9316 (omp_target_base_pointers_restrict_p): Delete.
9317 (scan_omp_target): Update call to scan_sharing_clauses.
9318 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
9320 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
9321 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9322 (convert_local_omp_clauses): Likewise.
9323 * tree-pretty-print.c (dump_omp_clause): Likewise.
9324 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
9326 (omp_clause_code_name): Likewise.
9328 2018-06-20 Jakub Jelinek <jakub@redhat.com>
9331 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
9334 PR tree-optimization/86231
9335 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
9336 anti-range don't overwrite *vr0min before using it to compute *vr0max.
9338 2018-06-20 Tom de Vries <tdevries@suse.de>
9340 PR tree-optimization/86097
9341 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
9342 iv type if signedness of iv type is not the same as that of *nit.
9344 2018-06-20 Jakub Jelinek <jakub@redhat.com>
9346 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
9347 EDGE_EH edges, verify they are all EDGE_EH.
9349 2018-06-20 Maya Rashish <coypu@sdf.org>
9351 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
9353 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9355 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
9356 * config/aarch64/aarch64.c (xgene1_tunings): Add
9357 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
9358 (aarch64_mode_valid_for_sched_fusion_p):
9359 Allow 16-byte modes.
9360 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
9361 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
9363 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
9365 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
9366 * config/aarch64/iterators.md (VQ2): New mode iterator.
9368 2018-06-20 Martin Liska <mliska@suse.cz>
9370 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9371 Change default ratio from 10 to 8.
9373 2018-06-20 Martin Liska <mliska@suse.cz>
9375 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9377 (bit_test_cluster::find_bit_tests): Likewise.
9378 (switch_decision_tree::analyze_switch_statement): Find clusters.
9379 * tree-switch-conversion.h (struct jump_table_cluster): Document
9382 2018-06-20 Martin Liska <mliska@suse.cz>
9384 * tree-switch-conversion.c (switch_conversion::collect):
9385 Record m_uniq property.
9386 (switch_conversion::expand): Bail out for special conditions.
9387 (group_cluster::~group_cluster): New.
9388 (group_cluster::group_cluster): Likewise.
9389 (group_cluster::dump): Likewise.
9390 (jump_table_cluster::emit): New.
9391 (switch_decision_tree::fix_phi_operands_for_edges): New.
9392 (struct case_node): Remove struct.
9393 (jump_table_cluster::can_be_handled): New.
9394 (case_values_threshold): Moved to header.
9395 (reset_out_edges_aux): Likewise.
9396 (jump_table_cluster::is_beneficial): New.
9397 (bit_test_cluster::can_be_handled): Likewise.
9398 (add_case_node): Remove.
9399 (bit_test_cluster::is_beneficial): New.
9400 (case_bit_test::cmp): New.
9401 (bit_test_cluster::emit): New.
9402 (expand_switch_as_decision_tree_p): Remove.
9403 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
9404 (fix_phi_operands_for_edge): Likewise.
9405 (switch_decision_tree::analyze_switch_statement): New.
9406 (compute_cases_per_edge): Move ...
9407 (switch_decision_tree::compute_cases_per_edge): ... here.
9408 (try_switch_expansion): Likewise.
9409 (switch_decision_tree::try_switch_expansion): Likewise.
9410 (record_phi_operand_mapping): Likewise.
9411 (switch_decision_tree::record_phi_operand_mapping): Likewise.
9412 (emit_case_decision_tree): Likewise.
9413 (switch_decision_tree::emit): Likewise.
9414 (balance_case_nodes): Likewise.
9415 (switch_decision_tree::balance_case_nodes): Likewise.
9416 (dump_case_nodes): Likewise.
9417 (switch_decision_tree::dump_case_nodes): Likewise.
9418 (emit_jump): Likewise.
9419 (switch_decision_tree::emit_jump): Likewise.
9420 (emit_cmp_and_jump_insns): Likewise.
9421 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
9422 (emit_case_nodes): Likewise.
9423 (switch_decision_tree::emit_case_nodes): Likewise.
9424 (conditional_probability): Remove.
9425 * tree-switch-conversion.h (enum cluster_type): New.
9427 (struct cluster): Likewise.
9428 (cluster::cluster): Likewise.
9429 (struct simple_cluster): Likewise.
9430 (simple_cluster::simple_cluster): Likewise.
9431 (struct group_cluster): Likewise.
9432 (struct jump_table_cluster): Likewise.
9433 (struct bit_test_cluster): Likewise.
9434 (struct min_cluster_item): Likewise.
9435 (struct case_tree_node): Likewise.
9436 (case_tree_node::case_tree_node): Likewise.
9437 (jump_table_cluster::case_values_threshold): Likewise.
9438 (struct case_bit_test): Likewise.
9439 (struct switch_decision_tree): Likewise.
9440 (struct switch_conversion): Likewise.
9441 (switch_decision_tree::reset_out_edges_aux): Likewise.
9443 2018-06-20 Martin Liska <mliska@suse.cz>
9445 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
9446 (hoist_edge_and_branch_if_true): Likewise.
9447 (expand_switch_using_bit_tests_p): Likewise.
9448 (struct case_bit_test): Likewise.
9449 (case_bit_test_cmp): Likewise.
9450 (emit_case_bit_tests): Likewise.
9451 (switch_conversion::switch_conversion): New class.
9452 (struct switch_conv_info): Remove old struct.
9453 (collect_switch_conv_info): More to ...
9454 (switch_conversion::collect): ... this.
9455 (check_range): Likewise.
9456 (switch_conversion::check_range): Likewise.
9457 (check_all_empty_except_final): Likewise.
9458 (switch_conversion::check_all_empty_except_final): Likewise.
9459 (check_final_bb): Likewise.
9460 (switch_conversion::check_final_bb): Likewise.
9461 (create_temp_arrays): Likewise.
9462 (switch_conversion::create_temp_arrays): Likewise.
9463 (free_temp_arrays): Likewise.
9464 (gather_default_values): Likewise.
9465 (switch_conversion::gather_default_values): Likewise.
9466 (build_constructors): Likewise.
9467 (switch_conversion::build_constructors): Likewise.
9468 (constructor_contains_same_values_p): Likewise.
9469 (switch_conversion::contains_same_values_p): Likewise.
9470 (array_value_type): Likewise.
9471 (switch_conversion::array_value_type): Likewise.
9472 (build_one_array): Likewise.
9473 (switch_conversion::build_one_array): Likewise.
9474 (build_arrays): Likewise.
9475 (switch_conversion::build_arrays): Likewise.
9476 (gen_def_assigns): Likewise.
9477 (switch_conversion::gen_def_assigns): Likewise.
9478 (prune_bbs): Likewise.
9479 (switch_conversion::prune_bbs): Likewise.
9480 (fix_phi_nodes): Likewise.
9481 (switch_conversion::fix_phi_nodes): Likewise.
9482 (gen_inbound_check): Likewise.
9483 (switch_conversion::gen_inbound_check): Likewise.
9484 (process_switch): Use the newly created class.
9485 (switch_conversion::expand): New.
9486 (switch_conversion::~switch_conversion): New.
9487 * tree-switch-conversion.h: New file.
9489 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9491 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
9492 tree-vect-patterns.c.
9493 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
9494 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
9495 (vect_recog_sad_pattern): Likewise.
9496 (vect_recog_widen_sum_pattern): Likewise.
9497 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
9498 (vect_recog_widen_shift_pattern): Remove the type_in argument.
9499 (vect_recog_rotate_pattern): Likewise.
9500 (vect_recog_mult_pattern): Likewise.
9501 (vect_recog_vector_vector_shift_pattern): Likewise.
9502 (vect_recog_divmod_pattern): Likewise.
9503 (vect_recog_mixed_size_cond_pattern): Likewise.
9504 (vect_recog_bool_pattern): Likewise.
9505 (vect_recog_mask_conversion_pattern): Likewise.
9506 (vect_try_gather_scatter_pattern): Likewise.
9507 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
9508 (vect_recog_over_widening_pattern): Likewise.
9509 (vect_recog_gather_scatter_pattern): Likewise.
9510 (vect_recog_func_ptr): Move from tree-vectorizer.h
9511 (vect_vect_recog_func_ptrs): Move further down the file.
9512 (vect_recog_func): Likewise. Remove the third argument.
9513 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
9514 (vect_pattern_recog_1): Expect the pattern function to do any
9515 necessary target tests. Also expect it to provide a vector type.
9516 Remove the type_in handling.
9518 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9520 * tree-vect-patterns.c (vect_pattern_detected): New function.
9521 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
9522 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
9523 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
9524 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
9525 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9526 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9527 (vect_recog_mask_conversion_pattern)
9528 (vect_try_gather_scatter_pattern): Likewise.
9530 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9532 * tree-vect-patterns.c (vect_get_internal_def): New function.
9533 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9534 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
9535 (search_type_for_mask_1): Use it.
9537 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9539 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9540 redundant WIDEN_SUM_EXPR handling.
9541 (vect_recog_sad_pattern): Likewise.
9543 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9545 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9546 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
9547 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
9548 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
9549 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
9551 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9553 * tree-vect-stmts.c (vectorizable_call): Make sure that we
9554 use the stmt_vec_info of the original bb statement for the
9555 new zero assignment, even if the call is part of a pattern.
9557 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9559 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
9560 that the sequence is attached to the original statement rather
9561 than the pattern statement.
9562 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
9563 PATTERN_DEF_SEQ from the original statement rather than
9564 the main pattern statement.
9565 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
9566 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
9567 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
9569 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9571 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
9572 definition statements before the early exit for statements that aren't
9574 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
9576 (vect_transform_loop): ...here. Process pattern definition
9577 statements without first checking whether the main pattern
9578 statement is live or relevant.
9580 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9582 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
9583 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
9585 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
9587 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
9588 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
9589 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
9590 (expand_block_compare): Change select_block_compare_mode call.
9591 (expand_strncmp_align_check): Use new functions, fix comment.
9592 (emit_final_str_compare_gpr): New function.
9593 (expand_strn_compare): Refactor and clean up code.
9594 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
9596 2018-06-19 Tony Reix <tony.reix@atos.com>
9597 Damien Bergamini <damien.bergamini@atos.com>
9598 David Edelsohn <dje.gcc@gmail.com>
9600 * collect2.c (static_obj): New variable.
9601 (static_libs): New variable.
9602 (is_in_list): Uncomment declaration.
9603 (main): Track AIX libraries linked statically.
9604 (is_in_list): Uncomment definition.
9605 (scan_prog_file): Don't add AIX shared libraries initializer
9606 to constructor list if linking statically.
9608 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
9610 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9612 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9614 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
9616 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9619 2018-06-19 Martin Liska <mliska@suse.cz>
9621 * config/i386/i386.c (ix86_can_inline_p): Do not use
9622 ipa_fn_summaries::get_create.
9623 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9625 (devirtualization_time_bonus): Likewise.
9626 (ipcp_propagate_stage): Likewise.
9627 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9628 (edge_set_predicate): Likewise.
9629 (evaluate_conditions_for_known_args): Likewise.
9630 (evaluate_properties_for_edge): Likewise.
9631 (ipa_call_summary::reset): Tranform to ...
9632 (ipa_call_summary::~ipa_call_summary): ... this.
9633 (ipa_fn_summary::reset): Transform to ...
9634 (ipa_fn_summary::~ipa_fn_summary): ... this.
9635 (ipa_fn_summary_t::remove): Rename to ...
9636 (ipa_fn_summary_t::remove_callees): ... this.
9637 (ipa_fn_summary_t::duplicate): Use placement new
9638 instead of memory copy.
9639 (ipa_call_summary_t::duplicate): Likewise.
9640 (ipa_call_summary_t::remove): Remove.
9641 (dump_ipa_call_summary): Change get_create to get.
9642 (ipa_dump_fn_summary): Dump only when summary exists.
9643 (analyze_function_body): Use symbol_summary::get instead
9645 (compute_fn_summary): Likewise.
9646 (estimate_edge_devirt_benefit): Likewise.
9647 (estimate_edge_size_and_time): Likewise.
9648 (inline_update_callee_summaries): Likewise.
9649 (remap_edge_change_prob): Likewise.
9650 (remap_edge_summaries): Likewise.
9651 (ipa_merge_fn_summary_after_inlining): Likewise.
9652 (write_ipa_call_summary): Likewise.
9653 (ipa_fn_summary_write): Likewise.
9654 (ipa_free_fn_summary): Likewise.
9655 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9656 (struct ipa_call_summary): Likewise.
9657 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9659 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9660 (estimate_size_after_inlining): Likewise.
9661 (estimate_growth): Likewise.
9662 (growth_likely_positive): Likewise.
9663 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9664 (inline_call): Likewise.
9665 * ipa-inline.c (caller_growth_limits): Likewise.
9666 (can_inline_edge_p): Likewise.
9667 (can_inline_edge_by_limits_p): Likewise.
9668 (compute_uninlined_call_time): Likewise.
9669 (compute_inlined_call_time): Likewise.
9670 (want_inline_small_function_p): Likewise.
9671 (edge_badness): Likewise.
9672 (update_caller_keys): Likewise.
9673 (update_callee_keys): Likewise.
9674 (inline_small_functions): Likewise.
9675 (inline_to_all_callers_1): Likewise.
9676 (dump_overall_stats): Likewise.
9677 (early_inline_small_functions): Likewise.
9678 (early_inliner): Likewise.
9679 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9680 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9681 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9682 * ipa-split.c (execute_split_functions): Likewise.
9683 * symbol-summary.h: Likewise.
9684 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9686 2018-06-19 Richard Biener <rguenther@suse.de>
9688 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9689 (vectorize_loops): ... here. Fix dbgcnt handling.
9690 (try_vectorize_loop): Wrap try_vectorize_loop_1.
9692 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
9695 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9696 ieee128 argument takes up only one (vector) register, not two (floating
9699 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9701 * gimplify.c (gimplify_init_constructor): Really never clear for an
9702 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9704 2018-06-19 Richard Biener <rguenther@suse.de>
9706 PR tree-optimization/86179
9707 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9708 after failed recognition.
9710 2018-06-18 Martin Sebor <msebor@redhat.com>
9713 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9714 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9715 Handle integer subtraction.
9716 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9717 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9719 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9721 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9722 param from rtx to rtx_insn *.
9723 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9725 (frv_ifcvt_modify_insn): Likwise.
9726 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9727 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
9728 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9729 as_a <rtx_insn *> cast to local "unprotected_region" once
9730 it's been established that it's not NULL or pc_rtx.
9731 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9732 param "sethi" from rtx to rtx_insn *.
9733 (nds32_group_float_insns): Likewise for param "insn".
9734 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9736 (vax_output_int_subtract): Likewise.
9737 * config/vax/vax.c (vax_output_int_add): Likewise for param
9739 (vax_output_int_subtract): Likewise.
9740 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9741 (emit_pattern_after): Likewise for param "after".
9742 (emit_insn_after): Likewise.
9743 (emit_jump_insn_after): Likewise.
9744 (emit_call_insn_after): Likewise.
9745 (emit_debug_insn_after): Likewise.
9746 (emit_pattern_before): Likewise for param "before".
9747 (emit_insn_before): Likewise.
9748 (emit_jump_insn_before): Likewise.
9749 * final.c (get_insn_template): Likewise for param "insn", removing
9751 * output.h (get_insn_template): Likewise for 2nd param.
9752 * rtl.h (emit_insn_before): Likewise.
9753 (emit_jump_insn_before): Likewise.
9754 (emit_debug_insn_before_noloc): Likewise.
9755 (emit_insn_after): Likewise.
9756 (emit_jump_insn_after): Likewise.
9757 (emit_call_insn_after): Likewise.
9758 (emit_debug_insn_after): Likewise.
9759 (set_insn_deleted): Likewise for param.
9761 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
9764 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9765 floating point modes, so that IFmode is numerically greater than
9766 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9767 to declare the ordering. This prevents IFmode from being
9768 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9769 machine. Include rs6000-modes.h to share the fractional values
9770 between genmodes* and the rest of the compiler.
9774 * config/rs6000/rs6000-modes.h: New file.
9775 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9776 meaning of rs6000_long_double_size so that 126..128 selects an
9777 appropriate 128-bit floating point type.
9778 (rs6000_option_override_internal): Likewise.
9779 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9780 (TARGET_LONG_DOUBLE_128): Change the meaning of
9781 rs6000_long_double_size so that 126..128 selects an appropriate
9782 128-bit floating point type.
9783 (LONG_DOUBLE_TYPE_SIZE): Update comment.
9784 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9785 source and destination to match the standard usage.
9786 (truncifkf2): Likewise.
9787 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9788 ISA 2.07 to use an explicit clobber, instead of passing in a
9790 (copysign<mode>3_soft): Likewise.
9792 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9794 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9795 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9796 (vect_slp_analyze_instance_dependence): Likewise.
9797 (vect_enhance_data_refs_alignment): Likewise.
9798 (vect_analyze_data_refs_alignment): Likewise.
9799 (vect_slp_analyze_and_verify_instance_alignment
9800 (vect_analyze_data_ref_accesses): Likewise.
9801 (vect_prune_runtime_alias_test_list): Likewise.
9802 (vect_analyze_data_refs): Likewise.
9803 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9804 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9805 (vect_analyze_scalar_cycles_1): Likewise.
9806 (vect_get_loop_niters): Likewise.
9807 (vect_analyze_loop_form_1): Likewise.
9808 (vect_update_vf_for_slp): Likewise.
9809 (vect_analyze_loop_operations): Likewise.
9810 (vect_analyze_loop): Likewise.
9811 (vectorizable_induction): Likewise.
9812 (vect_transform_loop): Likewise.
9813 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9814 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9815 (vect_make_slp_decision): Likewise.
9816 (vect_detect_hybrid_slp): Likewise.
9817 (vect_slp_analyze_operations): Likewise.
9818 (vect_slp_bb): Likewise.
9819 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9820 (vectorizable_bswap): Likewise.
9821 (vectorizable_call): Likewise.
9822 (vectorizable_simd_clone_call): Likewise.
9823 (vectorizable_conversion): Likewise.
9824 (vectorizable_assignment): Likewise.
9825 (vectorizable_shift): Likewise.
9826 (vectorizable_operation): Likewise.
9827 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9829 2018-06-18 Martin Sebor <msebor@redhat.com>
9831 PR tree-optimization/81384
9832 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9833 * builtins.c (expand_builtin_strnlen): New function.
9834 (expand_builtin): Call it.
9835 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9836 * builtins.def (BUILT_IN_STRNLEN): New.
9837 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9838 Warn for bounds in excess of maximum object size.
9839 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9840 single-value ranges. Handle strnlen.
9841 (handle_builtin_strlen): Handle strnlen.
9842 (strlen_check_and_optimize_stmt): Same.
9843 * doc/extend.texi (Other Builtins): Document strnlen.
9845 2018-06-18 Maya Rashish <coypu@sdf.org>
9847 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9848 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9849 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9851 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9853 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9855 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9857 * tree.c (escaped_string::escape): Replace cast to char * by
9858 const_cast<char *> (unescaped).
9860 2018-06-18 Nick Clifton <nickc@redhat.com>
9863 * tree.c (escaped_string): New class. Converts an unescaped
9864 string into its escaped equivalent.
9865 (warn_deprecated_use): Use the new class to convert the
9866 deprecation message, if present.
9867 (test_escaped_strings): New self test.
9868 (test_c_tests): Add test_escaped_strings.
9869 * doc/extend.texi (deprecated): Add a note that the
9870 deprecation message is affected by the -fmessage-length
9871 option, and that control characters will be escaped.
9872 (#pragma GCC error): Document this pragma.
9873 (#pragma GCC warning): Likewise.
9874 * doc/invoke.texi (-fmessage-length): Document this option's
9875 effect on the #warning and #error preprocessor directives and
9876 the deprecated attribute.
9878 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
9880 * tree.c (decl_value_expr_lookup): Revert latest change.
9881 (decl_value_expr_insert): Likewise.
9883 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
9885 * gimplify.c (nonlocal_vlas): Delete.
9886 (nonlocal_vla_vars): Likewise.
9887 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9889 (gimplify_body): Do not create and destroy nonlocal_vlas.
9890 * tree-nested.c: Include diagnostic.h.
9891 (use_pointer_in_frame): Tweak.
9892 (lookup_field_for_decl): Add assertion and declare the transformation.
9893 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9894 internal error when the reference is in a wrong context. Do not
9895 create a debug decl by default.
9896 (note_nonlocal_block_vlas): Delete.
9897 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9898 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
9899 create a debug decl by default.
9900 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9901 call is in a wrong context.
9902 (fixup_vla_decls): New function.
9903 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9904 debug variables were created.
9905 * tree.c (decl_value_expr_lookup): Add checking assertion.
9906 (decl_value_expr_insert): Likewise.
9908 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9911 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9912 * tree-scalar-evolution.c (interpret_expr): Likewise.
9913 (expression_expensive_p): Likewise.
9914 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9915 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9916 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9917 (ssa_defined_by_minus_one_stmt_p): New.
9919 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9922 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9923 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9924 * dojump.c (do_jump): Likewise.
9925 * expr.c (expand_expr_real_2): Check operand type's sign.
9926 * fold-const.c (const_unop): Handle ABSU_EXPR.
9927 (fold_abs_const): Likewise.
9928 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9929 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9930 (strip_sign_op_1): Likesise.
9931 * match.pd: Add new pattern to generate ABSU_EXPR.
9932 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9933 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9934 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9935 * tree-inline.c (estimate_operator_cost): Likewise.
9936 * tree-pretty-print.c (dump_generic_node): Likewise.
9937 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9938 * tree.def (ABSU_EXPR): New.
9940 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9943 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9944 documented as preserved for backward compatibility only.
9945 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9947 PR rtl-optimization/86108
9948 * bb-reorder.c (create_forwarder_block): Renamed to ...
9949 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9950 jump from new landing pad to the second part.
9951 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9954 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9957 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9958 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9959 Only call store_expr for halves if the mode is the same.
9962 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9963 Fix up comment formatting.
9965 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9967 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9968 (typed_splay_tree::closure,
9969 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9970 (typed_splay_tree::typed_splay_tree,
9971 typed_splay_tree::operator =): Declared private.
9972 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9973 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9974 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9975 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9976 typed_splay_tree::splay_tree_splay,
9977 typed_splay_tree::splay_tree_foreach_helper,
9978 typed_splay_tree::splay_tree_insert,
9979 typed_splay_tree::splay_tree_remove,
9980 typed_splay_tree::splay_tree_lookup,
9981 typed_splay_tree::splay_tree_predecessor,
9982 typed_splay_tree::splay_tree_successor,
9983 typed_splay_tree::splay_tree_min,
9984 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9985 (typed_splay_tree::root, typed_splay_tree::comp,
9986 typed_splay_tree::delete_key,
9987 typed_splay_tree::delete_value): New data members.
9988 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9989 typed_splay_tree::remove.
9991 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9993 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9994 -mginv and -mno-ginv to the assembler.
9995 * config/mips/mips.opt (-mcrc): New option.
9997 * doc/invoke.text (-mcrc): Document.
10000 2018-06-15 Nick Clifton <nickc@redhat.com>
10003 * tree.c (escaped_string): New class. Converts an unescaped
10004 string into its escaped equivalent.
10005 (warn_deprecated_use): Use the new class to convert the
10006 deprecation message, if present.
10007 (test_escaped_strings): New self test.
10008 (test_c_tests): Add test_escaped_strings.
10009 * doc/extend.texi (deprecated): Add a note that the
10010 deprecation message is affected by the -fmessage-length
10011 option, and that control characters will be escaped.
10012 (#pragma GCC error): Document this pragma.
10013 (#pragma GCC warning): Likewise.
10014 * doc/invoke.texi (-fmessage-length): Document this option's
10015 effect on the #warning and #error preprocessor directives and
10016 the deprecated attribute.
10018 2018-06-15 Richard Biener <rguenther@suse.de>
10020 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
10021 here, also noting vector size used.
10022 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
10023 size used in MSG_OPTIMIZED_LOCATIONS dump.
10024 (pass_slp_vectorize::execute): Adjust.
10026 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
10029 * config/arc/arc.c (arc_return_address_register): Fix
10032 2018-06-15 Richard Biener <rguenther@suse.de>
10034 PR middle-end/86159
10035 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
10036 leave useless conversion stripping to force_gimple_operand_gsi.
10037 (gimplify_build2): Likewise.
10038 (gimplify_build1): Likewise.
10040 2018-06-15 Richard Biener <rguenther@suse.de>
10042 PR middle-end/86076
10043 * tree-cfg.c (move_stmt_op): unshare invariant addresses
10044 before adjusting their block.
10046 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
10048 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
10049 multilibs for *-*-rtems*.
10050 * config/riscv/t-rtems: New file.
10052 2018-06-14 Jakub Jelinek <jakub@redhat.com>
10054 PR middle-end/86122
10055 * match.pd ((A +- CST1) +- CST2): Punt if last resort
10056 unsigned_type_for returns NULL.
10059 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
10060 subregs of multi-word pseudos unless the float mode has word size.
10062 2018-06-14 Richard Biener <rguenther@suse.de>
10064 PR middle-end/86139
10065 * tree-vect-generic.c (build_word_mode_vector_type): Remove
10066 duplicate and harmful type_hash_canon.
10067 * tree.c (type_hash_canon): Assert we didn't find ourselves.
10069 2018-06-14 Richard Biener <rguenther@suse.de>
10072 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
10075 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
10077 * config/rtems.h (STDINT_LONG32): Define.
10079 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
10080 Prachi Godbole <prachi.godbole@imgtec.com>
10082 * config/mips/mips-cpus.def: Define P6600.
10083 * config/mips/mips-tables.opt: Regenerate.
10084 * config/mips/mips.c (mips_ucbranch_type): New enum.
10085 (mips_rtx_cost_data): Add support for P6600.
10086 (mips_issue_rate): Likewise.
10087 (mips_multipass_dfa_lookahead): Likewise.
10088 (mips_avoid_hazard): Likewise.
10089 (mips_reorg_process_insns): Likewise.
10090 (mips_classify_branch_p6600): New function.
10091 * config/mips/mips.h (TUNE_P6600): New define.
10092 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
10093 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
10094 * config/mips/mips.md: Include p6600.md.
10095 (processor): Add p6600.
10096 * config/mips/p6600.md: New file.
10097 * doc/invoke.texi: Add p6600 to supported architectures.
10099 2018-06-13 Martin Sebor <msebor@redhat.com>
10101 PR tree-optimization/86114
10102 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
10104 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
10106 2018-06-13 Richard Biener <rguenther@suse.de>
10108 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
10109 Properly set vector type of the intermediate stmt.
10110 * tree-vect-stmts.c (vectorizable_operation): The destination
10111 var always has vectype_out type.
10113 2018-06-13 Jeff Law <law@redhat.com>
10115 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
10116 integer 0 for argument to print_rtl_with_bb.
10117 (rl78_reorg): Likewise.
10119 2018-06-13 David Malcolm <dmalcolm@redhat.com>
10121 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
10122 from rtx to rtx_insn *.
10123 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
10125 (add_sched_insns_for_speculation): Likewise for local "target",
10126 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
10127 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
10128 from rtx_insn ** to rtx_code_label **.
10129 (reorg_emit_nops): Likewise.
10130 (c6x_reorg): Likewise for local "call_labels".
10131 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
10133 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
10134 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
10135 the loops over LABEL_REFS.
10136 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
10138 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
10139 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
10140 (split_branches): Strengthen local "olabel" from rtx to
10141 rtx_insn *, adding a safe_as_a cast.
10142 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
10144 (add_insn_after): Likewise for first two params.
10145 (add_insn_before): Likewise.
10146 (remove_insn): Likewise for param.
10147 (emit_pattern_before_noloc): Likewise for second and third params.
10148 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
10149 (emit_call_insn_before_noloc): Likewise.
10150 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
10152 (emit_barrier_before): Likewise.
10153 (emit_label_before): Strengthen "label" param from "rtx" to
10154 "rtx_code_label *". Strengthen "before" param from "rtx" to
10156 (emit_insn_after_1): Strengthen "after" param from "rtx" to
10158 (emit_pattern_after_noloc): Likewise.
10159 (emit_insn_after_noloc): Likewise.
10160 (emit_jump_insn_after_noloc): Likewise.
10161 (emit_call_insn_after_noloc): Likewise.
10162 (emit_debug_insn_after_noloc): Likewise.
10163 (emit_barrier_after): Likewise.
10164 (emit_label_after): Likewise for both params.
10165 (emit_pattern_after_setloc): Likewise for "after" param. Convert
10166 "loc" param from "int" to "location_t".
10167 (emit_insn_after_setloc): Likewise.
10168 (emit_jump_insn_after_setloc): Likewise.
10169 (emit_call_insn_after_setloc): Likewise.
10170 (emit_debug_insn_after_setloc): Likewise.
10171 (emit_pattern_before_setloc): Likewise for "before" param. Convert
10172 "loc" param from "int" to "location_t".
10173 (emit_pattern_before): Convert NULL_RTX to NULL.
10174 (emit_insn_before_setloc): Convert "loc" param from "int" to
10176 (emit_jump_insn_before_setloc): Likewise.
10177 (emit_call_insn_before_setloc): Likewise.
10178 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
10179 rtx_insn *. Convert "loc" param from "int" to "location_t".
10180 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
10181 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
10182 Convert 3rd param from "int" to "location_t".
10183 (emit_barrier_before, emit_barrier_after, next_real_insn):
10184 Strengthen param from rtx to rtx_insn *.
10185 (emit_label_before): Strengthen 1st param from "rtx" to
10186 "rtx_code_label *". Strengthen 2nd param from "rtx" to
10188 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
10189 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
10190 Strengthen 2nd param from "rtx" to "rtx_insn *".
10191 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
10192 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
10193 Likewise. Convert 3rd param from "int" to "location_t".
10194 (emit_label_after): Strengthen 1st param from "rtx" to
10195 "rtx_code_label *".
10196 (next_real_insn, remove_insn): Strengthen param from "rtx" to
10198 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
10199 from "rtx" to "rtx_insn *".
10201 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
10203 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
10204 bodies streamed in with -Q.
10205 * dumpfile.c (dump_files): Add lto-stream-out dump file.
10206 * dumpfile.h (tree_dump_index): Add lto_stream_out.
10207 * gimple-streamer-out.c: Include gimple-pretty-print.h
10208 (output_bb): Dump stmts streamed.
10209 * lto-section-out.c: Include print-tree.h
10210 (lto_begin_section): Dump sections created.
10211 (lto_output_decl_index): Dump decl encoded.
10212 * lto-streamer-out.c: Include print-tree.h
10213 (create_output_block): Dump output block created.
10214 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
10215 (output_function): Dump function output.
10216 (output_constructor): Dump constructor streamed.
10217 (write_global_stream): Output indexes encoded.
10218 (produce_asm_for_decls): Dump streams encoded.
10219 * lto-streamer.c (streamer_dump_file): New global var.
10220 * lto-streamer.h (streamer_dump_file): Declare.
10221 * passes.c (ipa_write_summaries): Initialize streamer dump.
10222 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
10225 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
10228 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
10229 offsets for register save directives. Emit a second batch of save
10230 directives, if need be, when the function accesses prior frames.
10232 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10234 * config/arc/fpu.md (fmasf4): Force operand to register.
10235 (fnmasf4): Likewise.
10237 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10239 * config/arc/arc-protos.h (arc_pad_return): Remove.
10240 * config/arc/arc.c (machine_function): Remove force_short_suffix
10242 (arc_print_operand): Adjust printing of '&'.
10243 (arc_verify_short): Remove conditional printing of short suffix.
10244 (arc_final_prescan_insn): Remove reference to size_reason.
10245 (pad_return): New function.
10246 (arc_reorg): Call pad_return.
10247 (arc_pad_return): Remove.
10248 (arc_init_machine_status): Remove reference to force_short_suffix.
10249 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
10250 (attr length): When attribute iscompact is true force to 2
10251 regardless; in the case of maybe check if we want to force the
10252 instruction to have 4 bytes length.
10253 (nopv): Change it to generate 4 byte long nop as well.
10254 (blockage): New pattern.
10255 (simple_return): Remove call to arc_pad_return.
10256 (p_return_i): Likewise.
10258 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10260 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
10262 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10264 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
10267 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10269 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
10270 for ARC700 and ARCv2.
10272 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
10275 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
10276 operands[2] instead of operands[1].
10279 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
10281 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
10282 case, check whether the outer register overlaps an unallocatable
10283 register, not just whether it fits the required class.
10285 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
10287 * poly-int.h (can_div_trunc_p): Add new overload in which all values
10289 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
10290 (memrefs_conflict_p): Likewise.
10291 (init_alias_analysis): Likewise.
10292 * cfgexpand.c (expand_debug_expr): Likewise.
10293 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
10294 * cse.c (fold_rtx): Likewise.
10295 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
10296 * expr.c (emit_block_move_hints): Likewise.
10297 (clear_storage_hints, push_block, emit_push_insn): Likewise.
10298 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
10299 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
10300 (emit_group_store): Likewise.
10301 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
10302 to read the PRE/POST_MODIFY increment.
10303 * calls.c (store_one_arg): Use strip_offset.
10304 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
10306 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
10308 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
10309 (simplify_binary_operation_1): Extend CONST_INT handling to
10311 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
10312 than a HOST_WIDE_INT.
10313 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
10315 (adjust_mems, add_stores): Update accodingly.
10316 (vt_canonicalize_addr): Track polynomial offsets.
10317 (emit_note_insn_var_location): Likewise.
10318 (vt_add_function_parameter): Likewise.
10319 (vt_initialize): Likewise.
10321 2018-06-12 Jeff Law <law@redhat.com>
10323 * config.gcc (alpha*-*-freebsd*): Remove.
10324 * config/alpha/freebsd.h: Remove.
10326 2018-06-12 David Malcolm <dmalcolm@redhat.com>
10329 * spellcheck-tree.c (levenshtein_distance): Rename to...
10330 (get_edit_distance): ...this, and update for underlying renaming.
10331 * spellcheck-tree.h (levenshtein_distance): Rename to...
10332 (get_edit_distance): ...this.
10333 * spellcheck.c (levenshtein_distance): Rename to...
10334 (get_edit_distance): ...this. Convert from Levenshtein distance
10335 to Damerau-Levenshtein distance by supporting transpositions of
10336 adjacent characters. Rename "v1" to "v_next" and "v0" to
10338 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
10339 (selftest::test_edit_distance_unit_test_oneway): ...this, and
10340 update for underlying renaming.
10341 (selftest::levenshtein_distance_unit_test): Rename to...
10342 (selftest::test_get_edit_distance_unit): ...this, and update for
10343 underlying renaming.
10344 (selftest::test_find_closest_string): Add example from PR 69968
10345 where transposition helps
10346 (selftest::test_metric_conditions): Update for renaming.
10347 (selftest::test_metric_conditions): Likewise.
10348 (selftest::spellcheck_c_tests): Likewise.
10349 * spellcheck.h (levenshtein_distance): Rename both overloads to...
10350 (get_edit_distance): ...this.
10351 (best_match::consider): Update for renaming.
10353 2018-06-12 Martin Sebor <msebor@redhat.com>
10355 PR tree-optimization/85259
10356 * builtins.c (compute_objsize): Handle constant offsets.
10357 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
10358 true iff a warning has been issued.
10359 * gimple.h (gimple_nonartificial_location): New function.
10360 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
10361 gimple_nonartificial_location and handle -Wno-system-headers.
10362 (handle_builtin_stxncpy): Same.
10364 2018-06-12 Martin Sebor <msebor@redhat.com>
10367 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
10369 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
10371 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
10372 BUILTIN_VEC_XST entries for pointer to double and long long.
10374 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
10377 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10379 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10382 2018-06-12 Martin Liska <mliska@suse.cz>
10384 * doc/options.texi: Document IntegerRange.
10386 2018-06-12 Martin Liska <mliska@suse.cz>
10388 * config/i386/i386.opt: Make MPX-related options as Deprecated.
10389 * opt-functions.awk: Handle Deprecated flag.
10390 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
10392 (read_cmdline_option): Report warning for a deprecated option.
10393 * opts.h (struct cl_option): Add new field cl_deprecated.
10394 (CL_ERR_DEPRECATED): New.
10396 2018-06-12 Martin Liska <mliska@suse.cz>
10398 * doc/options.texi: Document Deprecated option flag.
10400 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10402 * config/arc/arc-arch.h (arc_extras): New enum.
10403 (arc_cpu_t):Add field extra.
10404 (arc_cpu_types): Consider the extras.
10405 * config/arc/arc-cpus.def: Add extras info.
10406 * config/arc/arc-opts.h (processor_type): Consider extra field.
10407 * config/arc/arc.c (arc_override_options): Handle extra field.
10409 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10411 * config/arc/arc-arch.h: Update ARC_OPTX macro.
10412 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
10414 * config/arc/arc.c (arc_init): Update pic warning.
10415 (irq_range): Update irq range parsing warnings.
10416 (arc_override_options): Update various warning messages.
10417 (arc_handle_aux_attribute): Likewise.
10419 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
10421 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
10423 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10425 * doc/sourcebuild.texi: Document usage of line number 0 in verify
10426 compiler messages directives.
10428 2018-06-12 Matthew Fortune <mfortune@gmail.com>
10430 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
10431 * config/mips/mips-tables.opt: Regenerate.
10432 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
10434 * doc/invoke.texi: Document -march=i6500.
10436 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
10438 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
10439 (i6400_gpmul): Add cpu_unit.
10440 (i6400_gpdiv): Likewise.
10441 (i6400_msa_add_d): Update reservations.
10442 (i6400_msa_int_add) Likewise.
10443 (i6400_msa_short_logic3) Likewise.
10444 (i6400_msa_short_logic2) Likewise.
10445 (i6400_msa_short_logic) Likewise.
10446 (i6400_msa_move) Likewise.
10447 (i6400_msa_cmp) Likewise.
10448 (i6400_msa_short_float2) Likewise.
10449 (i6400_msa_div_d) Likewise.
10450 (i6400_msa_long_logic1) Likewise.
10451 (i6400_msa_long_logic2) Likewise.
10452 (i6400_msa_mult) Likewise.
10453 (i6400_msa_long_float2) Likewise.
10454 (i6400_msa_long_float4) Likewise.
10455 (i6400_msa_long_float5) Likewise.
10456 (i6400_msa_long_float8) Likewise.
10457 (i6400_fpu_fadd): Include frint type.
10458 (i6400_fpu_store): New define_insn_reservation.
10459 (i6400_fpu_load): Likewise.
10460 (i6400_fpu_move): Likewise.
10461 (i6400_fpu_fcmp): Likewise.
10462 (i6400_fpu_fmadd): Likewise.
10463 (i6400_int_mult): Include imul3nc type and update reservation.
10464 (i6400_int_div): Include idiv3 type and update reservation.
10465 (i6400_int_load): Update to check type not move_type.
10466 (i6400_int_store): Likewise.
10467 (i6400_int_prefetch): Set zero latency.
10469 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
10471 * gcc.c: Document new %@{...} sequence.
10472 (LINK_COMMAND_SPEC): Use it for the -L switches.
10473 (cpp_unique_options): Use it for the -I switches.
10474 (at_file_argbuf): New global variable.
10475 (in_at_file): Likewise.
10476 (alloc_args): Create at_file_argbuf.
10477 (clear_args): Truncate at_file_argbuf.
10478 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
10479 (open_at_file): New function.
10480 (close_at_file): Likewise.
10481 (create_at_file): Delete.
10482 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
10485 (validate_switches_from_spec): Deal with %@{...} sequence.
10486 (validate_switches): Likewise.
10487 (driver::finalize): Call clear_args.
10489 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
10491 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
10493 2018-06-11 Martin Sebor <msebor@redhat.com>
10495 * doc/invoke.texi (-Wall): List -Wc++17-compat.
10496 (Wno-class-memaccess): Add @opindex.
10497 (Wno-templates, Wno-multiple-inheritance): Same.
10498 (Wno-virtual-inheritance, Wno-namespaces): Same.
10499 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
10500 (Wno-format-overflow, Wno-format-truncation): Same.
10501 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
10502 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
10503 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
10504 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
10505 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
10506 (Wno-misspelled-isr): Same.
10508 2018-06-11 Martin Sebor <msebor@redhat.com>
10510 * PR tree-optimization/86083
10511 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
10513 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
10515 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
10517 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
10520 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
10521 on the correct operand.
10522 (*movdi_internal64): Ditto.
10524 2018-06-11 Martin Liska <mliska@suse.cz>
10526 PR tree-optimization/86089
10527 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
10529 2018-06-11 Julia Koval <julia.koval@intel.com>
10531 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
10532 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
10533 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
10535 2018-06-11 Olivier Hainque <hainque@adacore.com>
10537 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
10538 for Ada with strict dwarf2.
10540 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
10543 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
10546 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
10548 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
10550 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
10552 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
10555 2018-06-08 Martin Liska <mliska@suse.cz>
10557 * tree-cfg.h (debug_function): Fix argument type to match
10560 2018-06-08 Martin Liska <mliska@suse.cz>
10562 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
10563 Remove usage of MPX-related (and removed) fields.
10564 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
10566 2018-06-08 David Malcolm <dmalcolm@redhat.com>
10568 * cfg.c (debug): Use TDF_NONE rather than 0.
10569 * cfghooks.c (debug): Likewise.
10570 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
10571 (struct dump_option_value_info): Convert to...
10572 (struct kv_pair): ...this template type.
10573 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
10575 (optinfo_verbosity_options): Likewise.
10576 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
10578 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
10579 than int for "optgroup_flags" param.
10580 (dump_generic_expr_loc): Use dump_flags_t rather than int for
10582 (dump_dec): Likewise.
10583 (dump_finish): Use TDF_NONE rather than 0.
10584 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
10585 rather than int for "optgroup_flags" param. Use TDF_NONE rather
10586 than 0. Update for change to option_ptr.
10587 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
10588 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
10589 0. Update for changes to optinfo_verbosity_options and
10591 (opt_info_switch_p): Convert optgroup_flags from int to
10593 (dump_basic_block): Use dump_flags_t rather than int
10594 for "dump_kind" param.
10595 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
10596 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
10597 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
10598 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
10599 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
10600 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
10601 TDF_NONE): Convert from macros to...
10602 (enum dump_flag): ...this new enum.
10603 (dump_flags_t): Update to use enum.
10604 (operator|, operator&, operator~, operator|=, operator&=):
10605 Implement for dump_flags_t.
10606 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10607 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10608 Convert from macros to...
10609 (enum optgroup_flag): ...this new enum.
10610 (optgroup_flags_t): New typedef.
10611 (operator|, operator|=): Implement for optgroup_flags_t.
10612 (struct dump_file_info): Convert field "alt_flags" to
10613 dump_flags_t. Convert field "optgroup_flags" to
10615 (dump_basic_block): Use dump_flags_t rather than int for param.
10616 (dump_generic_expr_loc): Likewise.
10617 (dump_dec): Likewise.
10618 (dump_register): Convert param "optgroup_flags" to
10620 (opt_info_enable_passes): Likewise.
10621 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10623 * gimple-pretty-print.c (debug): Likewise.
10624 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10625 (merged_store_group::apply_stores): Likewise.
10626 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10627 * gimple.c (verify_gimple_pp): Likewise.
10628 * graphite-poly.c (print_pbb_body): Likewise.
10629 * passes.c (pass_manager::register_one_dump_file): Convert
10630 local "optgroup_flags" to optgroup_flags_t.
10631 * print-tree.c (print_node): Use TDF_NONE rather than 0.
10633 (debug_body): Likewise.
10634 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10635 to optgroup_flags_t.
10636 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10638 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10639 (convert_mult_to_fma): Likewise.
10640 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10641 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10642 * tree-vect-data-refs.c (dump_lower_bound): Convert param
10643 "dump_kind" to dump_flags_t.
10645 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10647 * config/rs6000/rs6000.c (min, max): Delete.
10649 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10651 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10652 -mabi=spe and -mabi=no-spe.
10654 2018-06-08 Martin Liska <mliska@suse.cz>
10656 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10657 where we expect an existing summary.
10659 2018-06-08 Martin Liska <mliska@suse.cz>
10661 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10662 * ipa-inline.h (estimate_edge_growth): Likewise.
10664 2018-06-08 Martin Liska <mliska@suse.cz>
10666 * cgraph.c (function_version_hasher::hash): Use
10667 cgraph_node::get_uid ().
10668 (function_version_hasher::equal):
10669 * cgraph.h (cgraph_node::get_uid): New method.
10670 * ipa-inline.c (update_caller_keys): Use
10671 cgraph_node::get_uid ().
10672 (update_callee_keys): Likewise.
10673 * ipa-utils.c (searchc): Likewise.
10674 (ipa_reduced_postorder): Likewise.
10675 * lto-cgraph.c (input_node): Likewise.
10676 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10677 * symbol-summary.h (symtab_insertion): Likewise.
10678 (symtab_removal): Likewise.
10679 (symtab_duplication): Likewise.
10680 * tree-pretty-print.c (dump_function_header): Likewise.
10681 * tree-sra.c (convert_callers_for_node): Likewise.
10683 2018-06-08 Martin Liska <mliska@suse.cz>
10685 * cgraph.c (symbol_table::create_edge): Always assign a new
10687 (symbol_table::free_edge): Do not recycle numbers.
10688 * cgraph.h (cgraph_edge::get): New method.
10689 * symbol-summary.h (symtab_removal): Use it.
10690 (symtab_duplication): Likewise.
10691 (call_summary::hashable_uid): Remove.
10693 2018-06-08 Martin Liska <mliska@suse.cz>
10695 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10696 (initialize_growth_caches): Remove.
10697 (free_growth_caches): Likewise.
10698 (do_estimate_edge_time): Use edge_growth_cache.
10699 (do_estimate_edge_size): Likewise.
10700 (do_estimate_edge_hints): Likewise.
10701 * ipa-inline.c (reset_edge_caches): Likewise.
10702 (recursive_inlining): Likewise.
10703 (inline_small_functions): Likewise.
10704 * ipa-inline.h (initialize_growth_caches): Remove.
10705 (estimate_edge_size): Likewise.
10706 (estimate_edge_time): Likewise.
10707 (estimate_edge_hints): Likewise.
10708 (reset_edge_growth_cache): Likewise.
10709 * symbol-summary.h (call_summary::remove): New method.
10711 2018-06-08 Martin Liska <mliska@suse.cz>
10713 * ipa-cp.c (class edge_clone_summary): New summary.
10714 (grow_edge_clone_vectors): Remove.
10715 (ipcp_edge_duplication_hook): Remove.
10716 (class edge_clone_summary_t): New call_summary class.
10717 (ipcp_edge_removal_hook): Remove.
10718 (edge_clone_summary_t::duplicate): New function.
10719 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10720 (create_specialized_node): Likewise.
10721 (ipcp_driver): Initialize edge_clone_summaries and do not
10724 2018-06-08 Martin Liska <mliska@suse.cz>
10726 * symbol-summary.h (get): New function.
10727 (call_summary::m_initialize_when_cloning): New class member.
10729 2018-06-08 Martin Liska <mliska@suse.cz>
10731 * cgraph.c (cgraph_node::remove): Do not recycle uid.
10732 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10733 (symbol_table::allocate_cgraph_symbol): Do not set uid.
10734 * passes.c (uid_hash_t): Record removed_nodes by their uids.
10735 (remove_cgraph_node_from_order): Use the removed_nodes set.
10736 (do_per_function_toporder): Likwise.
10737 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10738 instead of summary_uid.
10739 (symtab_removal): Likewise.
10740 (symtab_duplication): Likewise.
10742 2018-06-08 Martin Liska <mliska@suse.cz>
10744 * ipa-cp.c (ipcp_store_bits_results): Use
10745 ipcp_transformation_sum.
10746 (ipcp_store_vr_results): Likewise.
10747 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10749 (ipcp_transformation_initialize): ... this.
10750 (ipa_set_node_agg_value_chain):
10751 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10752 (write_ipcp_transformation_info): Likewise.
10753 (read_ipcp_transformation_info): Likewise.
10754 (ipcp_update_bits): Likewise.
10755 (ipcp_update_vr): Likewise.
10756 (ipcp_transform_function): Likewise.
10757 * ipa-prop.h: Rename ipcp_transformation_summary to
10758 ipcp_transformation.
10759 (class ipcp_transformation_t): New function summary.
10760 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10761 (ipa_get_agg_replacements_for_node): Likewise.
10763 2018-06-08 Martin Liska <mliska@suse.cz>
10765 * ipa-pure-const.c (struct funct_state_d): Do it class instead
10767 (class funct_state_summary_t): New function_summary class.
10768 (has_function_state): Remove.
10769 (get_function_state): Likewise.
10770 (set_function_state): Likewise.
10771 (add_new_function): Likewise.
10772 (funct_state_summary_t::insert): New function.
10773 (duplicate_node_data): Remove.
10774 (remove_node_data): Remove.
10775 (funct_state_summary_t::duplicate): New function.
10776 (register_hooks): Create new funct_state_summaries.
10777 (pure_const_generate_summary): Use it.
10778 (pure_const_write_summary): Likewise.
10779 (pure_const_read_summary): Likewise.
10780 (propagate_pure_const): Likewise.
10781 (propagate_nothrow): Likewise.
10782 (dump_malloc_lattice): Likewise.
10783 (propagate_malloc): Likewise.
10784 (execute): Do not register hooks, just remove summary
10786 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10789 2018-06-08 Martin Liska <mliska@suse.cz>
10791 * ipa-reference.c (remove_node_data): Remove.
10792 (duplicate_node_data): Likewise.
10793 (class ipa_ref_var_info_summary_t): New class.
10794 (class ipa_ref_opt_summary_t): Likewise.
10795 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10796 (get_reference_optimization_summary): Use
10797 ipa_ref_opt_sum_summaries.
10798 (set_reference_vars_info): Remove.
10799 (set_reference_optimization_summary): Likewise.
10800 (ipa_init): Create summaries.
10801 (init_function_info): Use function summary.
10802 (ipa_ref_opt_summary_t::duplicate): New function.
10803 (ipa_ref_opt_summary_t::remove): New function.
10804 (get_read_write_all_from_node): Fix GNU coding style.
10805 (propagate): Use function summary.
10806 (write_node_summary_p): Fix GNU coding style.
10807 (stream_out_bitmap): Likewise.
10808 (ipa_reference_read_optimization_summary): Use function summary.
10809 (ipa_reference_c_finalize): Do not release hooks.
10811 2018-06-08 Martin Liska <mliska@suse.cz>
10813 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10814 (analyze_function_body): Extract multiple calls of get_create.
10815 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10816 * ipa-inline.c (recursive_inlining): Use ::get method.
10817 * ipa-inline.h (estimate_edge_growth): Likewise.
10819 2018-06-08 Martin Liska <mliska@suse.cz>
10821 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10823 (hsa_function_summary::hsa_function_summary): Use the new enum
10825 (hsa_gpu_implementation_p): Use hsa_summaries::get.
10826 * hsa-gen.c (hsa_get_host_function): Likewise.
10827 (get_brig_function_name): Likewise.
10828 * ipa-hsa.c (process_hsa_functions): Likewise.
10829 (ipa_hsa_write_summary): Likewise.
10830 * symbol-summary.h (symtab_duplication): Use ::get function/
10831 (get): New function.
10833 2018-06-08 Martin Liska <mliska@suse.cz>
10835 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10837 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10838 (hsa_register_kernel): Likewise.
10839 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10840 * hsa-gen.c (hsa_get_host_function): Likewise.
10841 (get_brig_function_name): Likewise.
10842 (generate_hsa): Likewise.
10843 (pass_gen_hsail::execute): Likewise.
10844 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10845 (devirtualization_time_bonus): Likewise.
10846 (ipcp_propagate_stage): Likewise.
10847 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10848 (edge_set_predicate): Likewise.
10849 (evaluate_conditions_for_known_args): Likewise.
10850 (evaluate_properties_for_edge): Likewise.
10851 (ipa_fn_summary::reset): Likewise.
10852 (ipa_fn_summary_t::duplicate): Likewise.
10853 (dump_ipa_call_summary): Likewise.
10854 (ipa_dump_fn_summary): Likewise.
10855 (analyze_function_body): Likewise.
10856 (compute_fn_summary): Likewise.
10857 (estimate_edge_devirt_benefit): Likewise.
10858 (estimate_edge_size_and_time): Likewise.
10859 (estimate_calls_size_and_time): Likewise.
10860 (estimate_node_size_and_time): Likewise.
10861 (inline_update_callee_summaries): Likewise.
10862 (remap_edge_change_prob): Likewise.
10863 (remap_edge_summaries): Likewise.
10864 (ipa_merge_fn_summary_after_inlining): Likewise.
10865 (ipa_update_overall_fn_summary): Likewise.
10866 (read_ipa_call_summary): Likewise.
10867 (inline_read_section): Likewise.
10868 (write_ipa_call_summary): Likewise.
10869 (ipa_fn_summary_write): Likewise.
10870 (ipa_free_fn_summary): Likewise.
10871 * ipa-hsa.c (process_hsa_functions): Likewise.
10872 (ipa_hsa_write_summary): Likewise.
10873 (ipa_hsa_read_section): Likewise.
10874 * ipa-icf.c (sem_function::merge): Likewise.
10875 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10876 (do_estimate_edge_time): Likewise.
10877 (estimate_size_after_inlining): Likewise.
10878 (estimate_growth): Likewise.
10879 (growth_likely_positive): Likewise.
10880 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10881 (inline_call): Likewise.
10882 * ipa-inline.c (caller_growth_limits): Likewise.
10883 (can_inline_edge_p): Likewise.
10884 (can_inline_edge_by_limits_p): Likewise.
10885 (compute_uninlined_call_time): Likewise.
10886 (compute_inlined_call_time): Likewise.
10887 (want_inline_small_function_p): Likewise.
10888 (edge_badness): Likewise.
10889 (update_caller_keys): Likewise.
10890 (update_callee_keys): Likewise.
10891 (recursive_inlining): Likewise.
10892 (inline_small_functions): Likewise.
10893 (inline_to_all_callers_1): Likewise.
10894 (dump_overall_stats): Likewise.
10895 (early_inline_small_functions): Likewise.
10896 (early_inliner): Likewise.
10897 * ipa-inline.h (estimate_edge_growth): Likewise.
10898 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10899 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10900 * ipa-prop.h (IPA_NODE_REF): Likewise.
10901 (IPA_EDGE_REF): Likewise.
10902 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10903 (propagate_malloc): Likewise.
10904 * ipa-split.c (execute_split_functions): Likewise.
10905 * symbol-summary.h: Rename get to get_create.
10907 (get_create): Likewise.
10908 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10910 2018-06-08 Martin Liska <mliska@suse.cz>
10912 * symbol-summary.h (release): Move definition out of class
10914 (symtab_removal): Likewise.
10915 (symtab_duplication): Likewise.
10917 2018-06-08 Martin Liska <mliska@suse.cz>
10919 * symbol-summary.h (function_summary): Move constructor
10920 implementation out of class declaration.
10921 (release): Likewise.
10922 (symtab_insertion): Likewise.
10923 (symtab_removal): Likewise.
10924 (symtab_duplication): Likewise.
10927 2018-06-08 Martin Liska <mliska@suse.cz>
10929 * Makefile.in: Remove support for MPX (macros, related functions,
10930 fields in cgraph_node, ...).
10931 * builtin-types.def (BT_BND): Likewise.
10932 (BT_FN_BND_CONST_PTR): Likewise.
10933 (BT_FN_CONST_PTR_BND): Likewise.
10934 (BT_FN_VOID_PTR_BND): Likewise.
10935 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10936 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10937 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10938 (expand_builtin_mempcpy_with_bounds): Likewise.
10939 (expand_builtin_memset_with_bounds): Likewise.
10940 (expand_builtin_memset_args): Likewise.
10941 (std_expand_builtin_va_start): Likewise.
10942 (expand_builtin): Likewise.
10943 (expand_builtin_with_bounds): Likewise.
10944 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10945 (DEF_LIB_BUILTIN_CHKP): Likewise.
10946 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10947 (DEF_CHKP_BUILTIN): Likewise.
10948 (BUILT_IN_MEMCPY): Likewise.
10949 (BUILT_IN_MEMMOVE): Likewise.
10950 (BUILT_IN_MEMPCPY): Likewise.
10951 (BUILT_IN_MEMSET): Likewise.
10952 (BUILT_IN_STPCPY): Likewise.
10953 (BUILT_IN_STRCAT): Likewise.
10954 (BUILT_IN_STRCHR): Likewise.
10955 (BUILT_IN_STRCPY): Likewise.
10956 (BUILT_IN_STRLEN): Likewise.
10957 (BUILT_IN_MEMCPY_CHK): Likewise.
10958 (BUILT_IN_MEMMOVE_CHK): Likewise.
10959 (BUILT_IN_MEMPCPY_CHK): Likewise.
10960 (BUILT_IN_MEMSET_CHK): Likewise.
10961 (BUILT_IN_STPCPY_CHK): Likewise.
10962 (BUILT_IN_STRCAT_CHK): Likewise.
10963 (BUILT_IN_STRCPY_CHK): Likewise.
10964 * calls.c (store_bounds): Likewise.
10965 (emit_call_1): Likewise.
10966 (special_function_p): Likewise.
10967 (maybe_warn_nonstring_arg): Likewise.
10968 (initialize_argument_information): Likewise.
10969 (finalize_must_preallocate): Likewise.
10970 (compute_argument_addresses): Likewise.
10971 (expand_call): Likewise.
10972 * cfgexpand.c (expand_call_stmt): Likewise.
10973 (expand_return): Likewise.
10974 (expand_gimple_stmt_1): Likewise.
10975 (pass_expand::execute): Likewise.
10976 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10977 (cgraph_node::remove): Likewise.
10978 (cgraph_node::dump): Likewise.
10979 (cgraph_node::verify_node): Likewise.
10980 * cgraph.h (chkp_function_instrumented_p): Likewise.
10981 (symtab_node::get_alias_target): Likewise.
10982 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10983 (cgraph_local_p): Likewise.
10984 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10985 (cgraph_edge::rebuild_references): Likewise.
10986 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10987 (walk_polymorphic_call_targets): Likewise.
10988 (cgraph_node::expand_thunk): Likewise.
10989 (symbol_table::output_weakrefs): Likewise.
10990 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10991 (ix86_handle_option): Likewise.
10992 * config/i386/constraints.md: Likewise.
10993 * config/i386/i386-builtin-types.def (BND): Likewise.
10997 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10998 (BDESC_FIRST): Likewise.
11000 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
11001 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
11002 * config/i386/i386.c (enum reg_class): Likewise.
11003 (ix86_target_string): Likewise.
11004 (ix86_option_override_internal): Likewise.
11005 (ix86_conditional_register_usage): Likewise.
11006 (ix86_valid_target_attribute_inner_p): Likewise.
11007 (ix86_set_indirect_branch_type): Likewise.
11008 (ix86_set_current_function): Likewise.
11009 (ix86_function_arg_regno_p): Likewise.
11010 (init_cumulative_args): Likewise.
11011 (ix86_function_arg_advance): Likewise.
11012 (ix86_function_arg): Likewise.
11013 (ix86_pass_by_reference): Likewise.
11014 (ix86_function_value_regno_p): Likewise.
11015 (ix86_function_value_1): Likewise.
11016 (ix86_function_value_bounds): Likewise.
11017 (ix86_return_in_memory): Likewise.
11018 (ix86_setup_incoming_vararg_bounds): Likewise.
11019 (ix86_va_start): Likewise.
11020 (indirect_thunk_need_prefix): Likewise.
11021 (print_reg): Likewise.
11022 (ix86_print_operand): Likewise.
11023 (ix86_expand_call): Likewise.
11024 (ix86_output_function_return): Likewise.
11025 (reg_encoded_number): Likewise.
11026 (BDESC_VERIFYS): Likewise.
11027 (ix86_init_mpx_builtins): Likewise.
11028 (ix86_init_builtins): Likewise.
11029 (ix86_emit_cmove): Likewise.
11030 (ix86_emit_move_max): Likewise.
11031 (ix86_expand_builtin): Likewise.
11032 (ix86_builtin_mpx_function): Likewise.
11033 (ix86_get_arg_address_for_bt): Likewise.
11034 (ix86_load_bounds): Likewise.
11035 (ix86_store_bounds): Likewise.
11036 (ix86_load_returned_bounds): Likewise.
11037 (ix86_store_returned_bounds): Likewise.
11038 (ix86_class_likely_spilled_p): Likewise.
11039 (ix86_hard_regno_mode_ok): Likewise.
11040 (x86_order_regs_for_local_alloc): Likewise.
11041 (ix86_mitigate_rop): Likewise.
11042 (ix86_bnd_prefixed_insn_p): Likewise.
11043 (ix86_mpx_bound_mode): Likewise.
11044 (ix86_make_bounds_constant): Likewise.
11045 (ix86_initialize_bounds): Likewise.
11046 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
11047 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
11048 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
11049 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
11050 (TARGET_CHKP_BOUND_MODE): Likewise.
11051 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
11052 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
11053 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
11054 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
11055 * config/i386/i386.h (TARGET_MPX): Likewise.
11056 (TARGET_MPX_P): Likewise.
11057 (VALID_BND_REG_MODE): Likewise.
11058 (FIRST_BND_REG): Likewise.
11059 (LAST_BND_REG): Likewise.
11060 (enum reg_class): Likewise.
11061 (BND_REG_P): Likewise.
11062 (BND_REGNO_P): Likewise.
11063 (BNDmode): Likewise.
11064 (ADJUST_INSN_LENGTH): Likewise.
11065 * config/i386/i386.md: Likewise.
11066 * config/i386/i386.opt: Likewise.
11067 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
11068 (defined): Likewise.
11069 (LINK_MPX): Likewise.
11070 (MPX_SPEC): Likewise.
11071 (LIBMPX_SPEC): Likewise.
11072 (LIBMPXWRAPPERS_SPEC): Likewise.
11073 (CHKP_SPEC): Likewise.
11074 * config/i386/predicates.md: Likewise.
11075 * dbxout.c (dbxout_type): Likewise.
11076 * doc/extend.texi: Likewise.
11077 * doc/invoke.texi: Likewise.
11078 * doc/md.texi: Likewise.
11079 * doc/tm.texi: Likewise.
11080 * doc/tm.texi.in: Likewise.
11081 * dwarf2out.c (is_base_type): Likewise.
11082 (gen_formal_types_die): Likewise.
11083 (gen_subprogram_die): Likewise.
11084 (gen_type_die_with_usage): Likewise.
11085 (gen_decl_die): Likewise.
11086 (dwarf2out_late_global_decl): Likewise.
11087 * expr.c (expand_assignment): Likewise.
11088 (emit_storent_insn): Likewise.
11089 (store_expr_with_bounds): Likewise.
11090 (store_expr): Likewise.
11091 (expand_expr_real_1): Likewise.
11092 * expr.h (store_expr_with_bounds): Likewise.
11093 * function.c (use_register_for_decl): Likewise.
11094 (struct bounds_parm_data): Likewise.
11095 (assign_parms_augmented_arg_list): Likewise.
11096 (assign_parm_find_entry_rtl): Likewise.
11097 (assign_parm_is_stack_parm): Likewise.
11098 (assign_parm_load_bounds): Likewise.
11099 (assign_bounds): Likewise.
11100 (assign_parms): Likewise.
11101 (expand_function_start): Likewise.
11102 * gcc.c (CHKP_SPEC): Likewise.
11103 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
11104 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
11105 (wrestrict_dom_walker::check_call): Likewise.
11106 * gimple.c (gimple_build_call_from_tree): Likewise.
11107 * gimple.h (enum gf_mask): Likewise.
11108 (gimple_call_with_bounds_p): Likewise.
11109 (gimple_call_set_with_bounds): Likewise.
11110 * gimplify.c (gimplify_init_constructor): Likewise.
11111 * ipa-cp.c (initialize_node_lattices): Likewise.
11112 (propagate_constants_across_call): Likewise.
11113 (find_more_scalar_values_for_callers_subset): Likewise.
11114 * ipa-hsa.c (process_hsa_functions): Likewise.
11115 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
11116 * ipa-icf.c (sem_function::merge): Likewise.
11117 * ipa-inline.c (early_inliner): Likewise.
11118 * ipa-pure-const.c (warn_function_noreturn): Likewise.
11119 (warn_function_cold): Likewise.
11120 (propagate_pure_const): Likewise.
11121 * ipa-ref.h (enum GTY): Likewise.
11122 * ipa-split.c (find_retbnd): Likewise.
11123 (consider_split): Likewise.
11124 (split_function): Likewise.
11125 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11126 * ipa.c (walk_polymorphic_call_targets): Likewise.
11127 (symbol_table::remove_unreachable_nodes): Likewise.
11128 (process_references): Likewise.
11129 (cgraph_build_static_cdtor_1): Likewise.
11130 * lto-cgraph.c (lto_output_node): Likewise.
11131 (output_refs): Likewise.
11132 (compute_ltrans_boundary): Likewise.
11133 (input_overwrite_node): Likewise.
11134 (input_node): Likewise.
11135 (input_cgraph_1): Likewise.
11136 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
11137 * passes.c (pass_manager::execute_early_local_passes): Likewise.
11138 (class pass_chkp_instrumentation_passes): Likewise.
11139 (make_pass_chkp_instrumentation_passes): Likewise.
11140 * passes.def: Likewise.
11141 * rtl.h (struct GTY): Likewise.
11142 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
11143 * stor-layout.c (layout_type): Likewise.
11144 * symtab.c: Likewise.
11145 * target.def: Likewise.
11146 * targhooks.c (default_chkp_bound_type): Likewise.
11147 (default_chkp_bound_mode): Likewise.
11148 (default_builtin_chkp_function): Likewise.
11149 (default_chkp_function_value_bounds): Likewise.
11150 (default_chkp_make_bounds_constant): Likewise.
11151 (default_chkp_initialize_bounds): Likewise.
11152 * targhooks.h (default_chkp_bound_type): Likewise.
11153 (default_chkp_bound_mode): Likewise.
11154 (default_builtin_chkp_function): Likewise.
11155 (default_chkp_function_value_bounds): Likewise.
11156 (default_chkp_make_bounds_constant): Likewise.
11157 (default_chkp_initialize_bounds): Likewise.
11158 * toplev.c (compile_file): Likewise.
11159 (process_options): Likewise.
11160 * tree-core.h (DEF_BUILTIN): Likewise.
11161 (DEF_BUILTIN_CHKP): Likewise.
11162 * tree-inline.c (declare_return_variable): Likewise.
11163 (remap_gimple_stmt): Likewise.
11164 (copy_bb): Likewise.
11165 (initialize_inlined_parameters): Likewise.
11166 (expand_call_inline): Likewise.
11167 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
11168 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
11169 (make_pass_ipa_chkp_produce_thunks): Likewise.
11170 (make_pass_chkp): Likewise.
11171 (make_pass_chkp_opt): Likewise.
11172 (make_pass_chkp_instrumentation_passes): Likewise.
11173 * tree-pretty-print.c (dump_generic_node): Likewise.
11174 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
11175 * tree-ssa-dce.c (propagate_necessity): Likewise.
11176 (eliminate_unnecessary_stmts): Likewise.
11177 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
11178 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
11179 * tree-ssa-sccvn.h: Likewise.
11180 * tree-ssa-strlen.c (get_string_length): Likewise.
11181 (valid_builtin_call): Likewise.
11182 (adjust_last_stmt): Likewise.
11183 (handle_builtin_strchr): Likewise.
11184 (handle_builtin_strcpy): Likewise.
11185 (handle_builtin_stxncpy): Likewise.
11186 (handle_builtin_memcpy): Likewise.
11187 (handle_builtin_strcat): Likewise.
11188 (strlen_check_and_optimize_stmt): Likewise.
11189 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
11190 * tree-streamer-in.c: Likewise.
11191 * tree-streamer.c (record_common_node): Likewise.
11192 * tree.c (tree_code_size): Likewise.
11193 (wide_int_to_tree_1): Likewise.
11194 (type_contains_placeholder_1): Likewise.
11195 (build_common_tree_nodes): Likewise.
11196 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
11197 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
11198 (POINTER_BOUNDS_P): Likewise.
11199 (BOUNDED_TYPE_P): Likewise.
11200 (BOUNDED_P): Likewise.
11201 (CALL_WITH_BOUNDS_P): Likewise.
11202 (pointer_bounds_type_node): Likewise.
11203 * value-prof.c (gimple_ic): Likewise.
11204 * var-tracking.c (vt_add_function_parameters): Likewise.
11205 * varasm.c (make_decl_rtl): Likewise.
11206 (assemble_start_function): Likewise.
11207 (output_constant): Likewise.
11208 (maybe_assemble_visibility): Likewise.
11209 * varpool.c (ctor_for_folding): Likewise.
11210 * chkp-builtins.def: Remove.
11211 * ipa-chkp.c: Remove.
11212 * ipa-chkp.h: Remove.
11213 * rtl-chkp.c: Remove.
11214 * rtl-chkp.h: Remove.
11215 * tree-chkp-opt.c: Remove.
11216 * tree-chkp.c: Remove.
11217 * tree-chkp.h: Remove.
11219 2018-06-07 Carl Love <cel@us.ibm.com>
11221 * config/rs6000/vsx.md (vextract_fp_from_shorth,
11222 vextract_fp_from_shortl): Add BE support.
11224 2018-06-07 Paul Koning <ni1d@arrl.net>
11226 * compare-elim.c (try_merge_compare): Don't merge compare if
11227 address contains a side effect.
11228 (try_eliminate_compare): Likewise.
11230 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
11232 * config.gcc: Support "tremont".
11233 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
11234 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11236 * config/i386/i386.c (m_TREMONT): Define.
11237 (processor_target_table): Add "tremont".
11238 (PTA_TREMONT): Define.
11239 (ix86_lea_outperforms): Add TARGET_TREMONT.
11240 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
11241 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
11242 and M_INTEL_GOLDMONT_PLUS.
11243 (fold_builtin_cpu): Add "tremont".
11244 (ix86_add_stmt_cost): Add TARGET_TREMONT.
11245 (ix86_option_override_internal): Add "tremont".
11246 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
11247 (processor_type): Add PROCESSOR_TREMONT.
11248 * config/i386/x86-tune.def: Add m_TREMONT.
11249 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
11251 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11253 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
11254 symbol defined for msp430i* devices to be lower case.
11256 2018-06-07 Richard Biener <rguenther@suse.de>
11258 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
11259 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
11260 Properly wrap signed arithmetic if overflow wraps.
11262 2018-06-07 Jakub Jelinek <jakub@redhat.com>
11264 PR tree-optimization/69615
11265 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
11266 of a cast from a same precision integral SSA_NAME in a bb dominated
11267 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
11268 cast to utype if rhs2 has already a compatible type.
11270 2018-06-07 Richard Biener <rguenther@suse.de>
11272 PR tree-optimization/85935
11273 * graphite-scop-detection.c (find_params_in_bb): Analyze
11274 condition operands with respect to the correct loop. Assert
11275 the analysis doesn't fail.
11277 2018-06-04 Carl Love <cel@us.ibm.com>
11279 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
11280 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
11281 as it is slightly cheaper.
11282 (first_match_or_eos_index_<mode>):
11283 Calculate index using natural element order.
11284 (first_match_index_<mode>):
11285 Calculate index using natural element order.
11286 (first_match_or_eos_index_<mode>):
11287 Calculate index using natural order.
11288 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
11289 for BE and LE modes.
11290 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
11291 P9V_BUILTIN_VCLZLSBB_V16QI.
11292 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
11295 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
11297 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
11298 indentation and line wrap for many prototypes. Add missing
11299 @smallexample directives around block of prototypes for vec_xl and
11302 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
11304 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
11305 track if we pass or return IEEE 128-bit floating point.
11306 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
11307 C++ mangling that is compatible with GCC 8.1.
11308 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
11309 (init_cumulative_args): Note if we pass or return IEEE 128-bit
11310 floating point types.
11311 (rs6000_function_arg_advance_1): Likewise.
11312 (rs6000_mangle_type): Optionally generate mangled names that match
11313 what GCC 8.1 generated for IEEE 128-bit floating point types.
11314 (rs6000_globalize_decl_name): If we have an external function that
11315 passes or returns IEEE 128-bit types, generate a weak reference
11316 from the mangled name used in GCC 8.1 to the current mangled
11318 (rs6000_init_builtins): Make __ibm128 use the long double type if
11319 long double is IBM extended double. Make __float128 use the long
11320 double type if long double is IEEE 128-bit.
11323 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
11324 macro for __ibm128 built-in functions.
11325 (PACK_IF): Add __ibm128 pack/unpack functions.
11326 (UNPACK_IF): Likewise.
11327 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
11328 enable long double built-in functions if long double is IEEE
11329 128-bit floating point.
11330 (rs6000_invalid_builtin): Update long double built-in function
11332 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
11333 functions, adjust the built-in function to use the long double
11334 built-in function if __ibm128 and long double are the same type.
11335 * doc/extend.texi (PowerPC builtins): Update documention for
11336 __builtin_{,un}pack_longdouble. Add documentation for
11337 __builtin_{,un}pack_ibm128.
11339 2018-06-06 Jim Wilson <jimw@sifive.com>
11341 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
11342 (struct machine_function): New field interrupt_mode.
11343 (riscv_handle_type_attribute): New function. Add forward declaration.
11344 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
11345 (riscv_expand_epilogue): Check interrupt_mode field.
11346 (riscv_set_current_function): Check interrupt attribute args and
11347 set interrupt_mode field.
11348 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
11349 (riscv_sret, riscv_uret): New.
11350 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
11351 new arguments to interrupt attribute.
11353 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
11356 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
11357 Don't handle -mcpu=power8 if -mpower9-vector is also used.
11359 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
11361 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
11362 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
11363 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11364 several redundant entries.
11366 2018-06-06 David Malcolm <dmalcolm@redhat.com>
11368 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
11369 type from "rtx" to "rtx_insn *".
11370 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
11371 for local "call_insn", removing cast.
11372 (ix86_expand_call): Likewise, introducing a "call_insn" local.
11374 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
11376 PR tree-optimization/86066
11377 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
11378 for BIT_INSERT_EXPR stores.
11380 2018-06-06 Richard Biener <rguenther@suse.de>
11382 PR tree-optimization/86062
11383 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11384 component refs ontop
11385 of to be offsetted base.
11387 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11389 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
11390 to be static and remove check on interrupt attribute name.
11392 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
11394 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11395 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
11397 2018-06-05 Steve Ellcey <sellcey@cavium.com>
11400 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
11402 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
11403 Remove second argument, change how error is called.
11404 (aarch64_layout_arg): Remove second argument from
11405 aarch64_err_no_fpadvsimd call.
11406 (aarch64_init_cumulative_args): Ditto.
11407 (aarch64_gimplify_va_arg_expr): Ditto.
11408 * config/aarch64/aarch64.md (mov<mode>): Ditto.
11410 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
11412 * config/i386/i386.md (simple_return_indirect_internal): New expander.
11413 (*simple_return_indirect_internal<mode>): Rename from
11414 simple_return_indirect_internal. Use W mode iterator.
11415 (rstorssp): New expander.
11416 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
11417 (clrssbsy): New expander.
11418 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
11420 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
11422 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
11424 (cmse_check_pointed_object): Likewise.
11426 2018-06-05 Martin Liska <mliska@suse.cz>
11428 PR gcov-profile/47618
11429 * doc/invoke.texi: Document how -fprofile-dir format
11432 2018-06-05 Richard Biener <rguenther@suse.de>
11434 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
11435 removal pretend DOM info isn't available so we do not update
11436 it and only remove edges, not dominated blocks. Actually free
11437 DOM info in case we removed something. Remove unreachable blocks.
11438 (mfb_keep_latches): Work with either DOM info or marked backedges.
11439 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
11440 first. Mark backedges if DOM info isn't available.
11441 (Re-)compute DOM info after cleanup_control_flow_pre.
11443 2018-06-05 Richard Biener <rguenther@suse.de>
11445 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
11446 (locus_discrim_hasher::hash): Adjust.
11447 (locus_discrim_hasher::equal): Likewise.
11448 (next_discriminator_for_locus): Work on line directly.
11449 (same_line_p): Pass in expanded locus1 as well.
11450 (assign_discriminators): Avoid redundant location expansions.
11452 2018-06-05 Richard Biener <rguenther@suse.de>
11454 PR tree-optimization/86046
11455 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
11456 if required after clearing TREE_ADDRESSABLE.
11458 2018-06-05 Richard Biener <rguenther@suse.de>
11460 PR tree-optimization/86047
11461 * tree-ssa-loop.c (for_each_index): Glob handling of all
11462 decls and constants and really handle all of them.
11464 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11467 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
11468 qualifier_void_pointer and qualifier_const_void_pointer.
11469 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
11470 (arm_init_builtins): Handle the above.
11471 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
11472 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
11473 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
11476 2018-06-05 Martin Liska <mliska@suse.cz>
11478 * auto-profile.c (read_autofdo_file): Do not use
11479 gcov_ctr_summary struct.
11480 (afdo_callsite_hot_enough_for_early_inline): Likewise.
11481 * coverage.c (struct counts_entry): Likewise.
11482 (read_counts_file): Read just single summary entry.
11483 (get_coverage_counts): Use gcov_summary struct.
11484 * coverage.h (get_coverage_counts): Likewise.
11485 * gcov-dump.c (dump_working_sets): Likewise.
11486 (tag_summary): Dump just single summary.
11487 * gcov-io.c (gcov_write_summary): Write just histogram
11489 (gcov_read_summary): Read just single summary.
11490 (compute_working_sets): Use gcov_summary struct.
11491 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
11492 of GCOV_COUNTERS_SUMMABLE.
11493 (GCOV_COUNTERS_SUMMABLE): Remove.
11494 (GCOV_FIRST_VALUE_COUNTER): Replace with
11495 GCOV_COUNTER_V_INTERVAL.
11496 (struct gcov_ctr_summary): Remove.
11497 (struct gcov_summary): Directly use fields of former
11499 (compute_working_sets): Use gcov_summary struct.
11500 * gcov.c (read_count_file): Do not use ctrs fields.
11501 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
11503 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
11505 * profile.c: Likewise.
11506 * profile.h: Likewise.
11508 2018-06-05 Martin Liska <mliska@suse.cz>
11510 PR gcov-profile/84846
11511 * gcov.c (output_lines): Print working directory only
11512 in intermediate format.
11514 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
11516 * config/s390/s390-builtin-types.def: Add void function type.
11517 * config/s390/s390-builtins.def: Use the function type for the
11520 2018-06-04 Jim Wilson <jimw@sifive.com>
11522 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
11524 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
11525 and maybe_eh_return. Change regno to unsigned int. Use new args to
11526 handle EH_RETURN_DATA_REGNO registers properly.
11527 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
11528 (riscv_expand_epilogue): Update comment. Change argument name and
11529 type. Update code to use new name and type. Pass new args to
11530 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
11532 * config/riscv/riscv.md (NORMAL_RETURN): New.
11533 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
11534 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
11535 (eh_return): Call gen_eh_return_internal and emit barrier.
11536 (eh_return_internal): Call riscv_expand_epilogue.
11538 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
11540 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
11541 bit_insertion field and declare can_be_merged_into method.
11542 (merged_store_group::can_be_merged_into): New method.
11543 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
11544 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
11545 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
11547 2018-06-04 Richard Biener <rguenther@suse.de>
11549 PR tree-optimization/85955
11550 * builtins.c (fold_builtin_sincos): Convert pointers to
11551 destination to appropriate type before dereferencing.
11553 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
11555 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
11557 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
11559 * expr.c (expand_expr_real_1): Force the operand into memory if
11560 its TYPE_MODE is BLKmode and if there is no integer mode for
11561 the number of bits being extracted.
11563 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11567 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11568 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
11570 2018-06-04 Richard Biener <rguenther@suse.de>
11572 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
11573 (cleanup_tree_cfg_noloop): ... single caller. Do
11574 start_recording_case_labels later.
11576 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
11578 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
11579 to _IMMINTRIN_H_INCLUDED.
11580 * config/i386/pconfigintrin.h: Ditto.
11581 * config/i386/waitpkgintrin.h: Ditto.
11582 * config/i386/immintrin.h: Add includes for sgxintrin.h,
11583 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
11584 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
11585 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
11586 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
11587 waitpkgintrin.h and cldemoteintrin.h.
11589 2018-06-04 Richard Biener <rguenther@suse.de>
11591 PR tree-optimization/86038
11592 * tracer.c (find_best_successor): Check probability for
11593 being initialized, bail out if not.
11595 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
11598 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
11599 of bits to ignore when comparing architectures.
11601 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11603 PR tree-optimization/69615
11604 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11605 maximum or minimum of the type, try to merge it also as if
11606 range1 is + [-, x - 1] or + [x + 1, -].
11609 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11611 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
11613 PR tree-optimization/86034
11614 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11615 the unsigned bitfield type in a bit insertion sequence if it does not
11616 have a larger precision than the bitfield size.
11617 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11619 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
11621 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11623 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11625 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11626 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11627 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11628 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11630 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11632 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11633 Disable -fdelete-null-pointer-checks for ELF toolchain.
11635 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11636 Kito Cheng <kito.cheng@gmail.com>
11638 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11639 (nds32le-*-*, nds32be-*-*): Integrate checking process.
11640 (nds32*-*-*): Add glibc and uclibc conditions.
11641 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11642 (TARGET_EXCEPT_UNWIND_INFO): Define.
11643 * config/nds32/elf.h: New file.
11644 * config/nds32/linux.h: New file.
11645 * config/nds32/nds32-elf.opt: New file.
11646 * config/nds32/nds32-linux.opt: New file.
11647 * config/nds32/nds32-fp-as-gp.c
11648 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11649 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11651 (nds32_asm_file_end): Ditto.
11652 (nds32_print_operand): Ditto.
11653 (nds32_insert_attributes): Ditto.
11654 (nds32_init_libfuncs): New function.
11655 (TARGET_HAVE_TLS): Define.
11656 (TARGET_INIT_LIBFUNCS): Define.
11657 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11659 (TARGET_ELF): Apply different mcmodel setting.
11660 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11661 been migrated into elf.h and linux.h files.
11662 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11663 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11664 (mcmodel): The content has been migrated into nds32-elf.opt and
11665 nds32-linux.opt files.
11666 * config/nds32/t-elf: New file.
11667 * config/nds32/t-linux: New file.
11669 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11670 Shiva Chen <shiva0217@gmail.com>
11672 * config/nds32/constants.md (unspec_volatile_element): Add
11673 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11674 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11676 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11677 (make_pass_nds32_fp_as_gp): Declare.
11678 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11680 (nds32_asm_function_end_prologue): Remove unused asm output.
11681 (nds32_asm_function_begin_epilogue): Remove unused asm output.
11682 (nds32_asm_file_start): Output necessary fp_as_gp information.
11683 (nds32_option_override): Adjust register usage.
11684 (nds32_expand_prologue): Consider fp_as_gp situation.
11685 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11686 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11689 (simple_return): Ditto.
11690 (omit_fp_begin): Output special directive for fp_as_gp.
11691 (omit_fp_end): Output special directive for fp_as_gp.
11692 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11693 mforbid-fp-as-gp): New options.
11695 2018-06-01 Mark Wielaard <mark@klomp.org>
11697 * dwarf2out.c (dwarf2out_finish): Remove generation of
11698 DW_AT_loclists_base.
11700 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
11702 * gimple-ssa-store-merging.c: Include gimple-fold.h.
11703 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11704 (struct merged_store_group): Add bit_insertion field.
11705 (dump_char_array): Use standard hexadecimal format.
11706 (merged_store_group::merged_store_group): Set bit_insertion to false.
11707 (merged_store_group::apply_stores): Use optimal buffer size. Deal
11708 with BIT_INSERT_EXPR stores. Move up code updating the mask and
11709 also print the mask in the dump file.
11710 (pass_store_merging::gate): Minor tweak.
11711 (imm_store_chain_info::coalesce_immediate): Fix wrong association
11712 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
11713 stores with INTEGER_CST stores.
11714 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11715 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11716 and use it throughout. Generate bit insertion sequences if need be.
11717 (pass_store_merging::process_store): Remove redundant condition.
11718 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11720 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
11722 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11723 the 128-bit floating point types. Fix function comment.
11725 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11727 * config/aarch64/aarch64-simd.md
11728 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11730 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11733 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11735 PR tree-optimization/85989
11736 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11738 (backprop::intersect_uses): Check it when deciding whether this
11739 is a backedge reference.
11740 (backprop::process_block): Add each phi to m_visited_phis
11741 after visiting it, then clear it at the end.
11743 2018-06-01 Richard Biener <rguenther@suse.de>
11745 * tree-vectorizer.h (vect_dr_stmt): New function.
11746 (vect_get_load_cost): Adjust.
11747 (vect_get_store_cost): Likewise.
11748 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11749 Use vect_dr_stmt instead of DR_SMTT.
11750 (vect_record_base_alignments): Likewise.
11751 (vect_calculate_target_alignment): Likewise.
11752 (vect_compute_data_ref_alignment): Likewise and make static.
11753 (vect_update_misalignment_for_peel): Likewise.
11754 (vect_verify_datarefs_alignment): Likewise.
11755 (vector_alignment_reachable_p): Likewise.
11756 (vect_get_data_access_cost): Likewise. Pass down
11757 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11758 (vect_get_peeling_costs_all_drs): Likewise.
11759 (vect_peeling_hash_get_lowest_cost): Likewise.
11760 (vect_enhance_data_refs_alignment): Likewise.
11761 (vect_find_same_alignment_drs): Likewise.
11762 (vect_analyze_data_refs_alignment): Likewise.
11763 (vect_analyze_group_access_1): Likewise.
11764 (vect_analyze_group_access): Likewise.
11765 (vect_analyze_data_ref_access): Likewise.
11766 (vect_analyze_data_ref_accesses): Likewise.
11767 (vect_vfa_segment_size): Likewise.
11768 (vect_small_gap_p): Likewise.
11769 (vectorizable_with_step_bound_p): Likewise.
11770 (vect_prune_runtime_alias_test_list): Likewise.
11771 (vect_analyze_data_refs): Likewise.
11772 (vect_supportable_dr_alignment): Likewise.
11773 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11774 (vect_gen_prolog_loop_niters): Likewise.
11775 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11776 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11778 (vect_recog_mask_conversion_pattern): Likewise.
11779 (vect_try_gather_scatter_pattern): Likewise.
11780 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11781 to vect_get_store_cost.
11782 (vect_get_store_cost): Get stmt_info instead of DR.
11783 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11784 (vect_get_load_cost): Get stmt_info instead of DR.
11786 2018-06-01 Richard Biener <rguenther@suse.de>
11788 PR middle-end/86017
11789 * gimple-fold.c (var_decl_component_p): Also allow offsetted
11790 vars wrapped in MEM_REFs.
11792 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11794 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11795 Fix subreg tests so that we only return a choice between
11796 GENERAL_REGS and FP_REGS if the original classes included both.
11798 2018-06-01 Richard Biener <rguenther@suse.de>
11801 * tree-ssa-structalias.c (get_function_part_constraint):
11802 Handle NULL fi->decl.
11803 (find_func_aliases_for_call): Properly handle indirect
11804 fi from direct call.
11805 (find_func_clobbers): Likewise.
11806 (ipa_pta_execute): Likewise.
11807 (create_variable_info_for): For functions that are ifunc_resolver
11808 resolve to a varinfo that contains the result of the resolver call.
11809 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11812 2018-05-31 Michael Collison <michael.collison@arm.com>
11814 * config/aarch64/aarch64.md:
11815 (*fix_to_zero_extenddfdi2): New pattern.
11816 * gcc.target/aarch64/fix_extend1.c: New testcase.
11818 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
11820 PR middle-end/78809
11821 PR middle-end/83026
11822 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11823 and BUILT_IN_STRNCMP_EQ.
11824 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11825 BUILT_IN_STRNCMP_EQ.
11826 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11827 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11828 (gimple_fold_builtin): Likewise.
11829 * tree-ssa-strlen.c (compute_string_length): New function.
11830 (determine_min_obsize): New function.
11831 (handle_builtin_string_cmp): New function to handle calls to
11832 string compare functions.
11833 (strlen_optimize_stmt): Add handling to builtin string compare
11835 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11836 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11837 * tree.c (build_common_builtin_nodes): Add new defines of
11838 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11840 2018-05-31 Jakub Jelinek <jakub@redhat.com>
11843 * bb-reorder.c (pass_partition_blocks::gate): Return false for
11844 functions with naked attribute.
11846 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
11848 * config/i386/sse.md (avx_vec_concat<mode>):
11849 Substitute concat_tg_mode mode attribute with xtg_mode.
11850 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11851 (concat_tg_mode): Remove mode attribute.
11853 2018-05-31 Martin Sebor <msebor@redhat.com>
11856 * calls.c (alloc_max_size): Correct a logic error/typo.
11857 Treat excessive arguments as infinite. Warn for invalid arguments.
11858 * doc/invoke.texi (-Walloc-size-larger-than): Update.
11860 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
11863 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11864 and movx for Haswell.
11866 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
11867 Cesar Philippidis <cesar@codesourcery.com>
11869 PR middle-end/85879
11870 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11871 when emitting error on private/firstprivate reductions.
11872 * omp-low.c (lower_omp_target): Avoid reference-type processing
11873 on pointers for firstprivate clause.
11875 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11877 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11880 * config/aarch64/aarch64-simd.md
11881 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11882 (aarch64_ld1_x3_<mode>): Likewise
11883 (aarch64_st1x2<VALLDIF:mode>): Likewise
11884 (aarch64_st1_x2_<mode>): Likewise
11885 (aarch64_st1x3<VALLDIF:mode>): Likewise
11886 (aarch64_st1_x3_<mode>): Likewise
11887 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11888 (vld1_s8_x3): Likewise.
11889 (vld1_u16_x3): Likewise.
11890 (vld1_s16_x3): Likewise.
11891 (vld1_u32_x3): Likewise.
11892 (vld1_s32_x3): Likewise.
11893 (vld1_u64_x3): Likewise.
11894 (vld1_s64_x3): Likewise.
11895 (vld1_f16_x3): Likewise.
11896 (vld1_f32_x3): Likewise.
11897 (vld1_f64_x3): Likewise.
11898 (vld1_p8_x3): Likewise.
11899 (vld1_p16_x3): Likewise.
11900 (vld1_p64_x3): Likewise.
11901 (vld1q_u8_x3): Likewise.
11902 (vld1q_s8_x3): Likewise.
11903 (vld1q_u16_x3): Likewise.
11904 (vld1q_s16_x3): Likewise.
11905 (vld1q_u32_x3): Likewise.
11906 (vld1q_s32_x3): Likewise.
11907 (vld1q_u64_x3): Likewise.
11908 (vld1q_s64_x3): Likewise.
11909 (vld1q_f16_x3): Likewise.
11910 (vld1q_f32_x3): Likewise.
11911 (vld1q_f64_x3): Likewise.
11912 (vld1q_p8_x3): Likewise.
11913 (vld1q_p16_x3): Likewise.
11914 (vld1q_p64_x3): Likewise.
11915 (vst1_s64_x2): Likewise.
11916 (vst1_u64_x2): Likewise.
11917 (vst1_f64_x2): Likewise.
11918 (vst1_s8_x2): Likewise.
11919 (vst1_p8_x2): Likewise.
11920 (vst1_s16_x2): Likewise.
11921 (vst1_p16_x2): Likewise.
11922 (vst1_s32_x2): Likewise.
11923 (vst1_u8_x2): Likewise.
11924 (vst1_u16_x2): Likewise.
11925 (vst1_u32_x2): Likewise.
11926 (vst1_f16_x2): Likewise.
11927 (vst1_f32_x2): Likewise.
11928 (vst1_p64_x2): Likewise.
11929 (vst1q_s8_x2): Likewise.
11930 (vst1q_p8_x2): Likewise.
11931 (vst1q_s16_x2): Likewise.
11932 (vst1q_p16_x2): Likewise.
11933 (vst1q_s32_x2): Likewise.
11934 (vst1q_s64_x2): Likewise.
11935 (vst1q_u8_x2): Likewise.
11936 (vst1q_u16_x2): Likewise.
11937 (vst1q_u32_x2): Likewise.
11938 (vst1q_u64_x2): Likewise.
11939 (vst1q_f16_x2): Likewise.
11940 (vst1q_f32_x2): Likewise.
11941 (vst1q_f64_x2): Likewise.
11942 (vst1q_p64_x2): Likewise.
11943 (vst1_s64_x3): Likewise.
11944 (vst1_u64_x3): Likewise.
11945 (vst1_f64_x3): Likewise.
11946 (vst1_s8_x3): Likewise.
11947 (vst1_p8_x3): Likewise.
11948 (vst1_s16_x3): Likewise.
11949 (vst1_p16_x3): Likewise.
11950 (vst1_s32_x3): Likewise.
11951 (vst1_u8_x3): Likewise.
11952 (vst1_u16_x3): Likewise.
11953 (vst1_u32_x3): Likewise.
11954 (vst1_f16_x3): Likewise.
11955 (vst1_f32_x3): Likewise.
11956 (vst1_p64_x3): Likewise.
11957 (vst1q_s8_x3): Likewise.
11958 (vst1q_p8_x3): Likewise.
11959 (vst1q_s16_x3): Likewise.
11960 (vst1q_p16_x3): Likewise.
11961 (vst1q_s32_x3): Likewise.
11962 (vst1q_s64_x3): Likewise.
11963 (vst1q_u8_x3): Likewise.
11964 (vst1q_u16_x3): Likewise.
11965 (vst1q_u32_x3): Likewise.
11966 (vst1q_u64_x3): Likewise.
11967 (vst1q_f16_x3): Likewise.
11968 (vst1q_f32_x3): Likewise.
11969 (vst1q_f64_x3): Likewise.
11970 (vst1q_p64_x3): Likewise.
11972 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11974 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11975 user_label_prefix to name.
11977 * tree-core.h: Update comment about the format of NAME string
11978 passed to handler in attribute_spec.
11980 * config/msp430/msp430.md: Remove erroneous subreg expression from
11981 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11982 zero_extend{q,h}isi2.
11984 2018-05-30 Borislav Petkov <bp@suse.de>
11986 * doc/extend.texi: Document some architecture specific
11987 constraints and sort entries.
11989 2018-05-30 Martin Sebor <msebor@redhat.com>
11991 PR middle-end/85369
11992 * builtins.c (expand_builtin_stpcpy_1): New function.
11993 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11994 only if the former succeeds.
11996 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11998 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
12001 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
12003 * doc/invoke.texi (-flinker-output): Document
12005 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
12007 * passes.c (ipa_write_summaries): Only modify statements if body
12009 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
12010 incrementally linking.
12011 (ipa_passes): Likewise.
12012 * lto-cgraph.c (lto_output_node): When incrementally linking do not
12013 pass down resolution info.
12014 * common.opt (flag_incremental_link): Update info.
12015 * gcc.c (plugin specs): Turn flinker-output=* to
12016 -plugin-opt=-linker-output-known
12017 * toplev.c (compile_file): Also cut compilation when doing incremental
12019 * flag-types. (enum lto_partition_model): Add
12020 LTO_LINKER_OUTPUT_NOLTOREL.
12021 (invoke.texi): Add -flinker-output docs.
12022 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
12023 link same way as WPA; do not stream in dead initializers.
12025 * dwarf2out.c (dwarf2out_die_ref_for_decl,
12026 darf2out_register_external_decl): Support incremental link.
12028 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
12030 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
12032 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
12034 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
12035 it down to simple_object_copy_lto_debug_sections.
12036 (run_gcc): Determine incremental LTO link time and configure
12037 lto1 into non-wpa mode, disable renaming of debug sections.
12039 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
12041 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12042 descriptions of various incorrectly documented functions.
12044 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
12047 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12048 address check not strict.
12050 2018-05-30 Richard Biener <rguenther@suse.de>
12052 PR tree-optimization/85964
12053 * tracer.c (better_p): Drop initialized count check, we only
12054 call the function with initialized counts now.
12055 (find_best_successor): Do find a best edge if one
12056 has uninitialized count.
12057 (find_best_predecessor): Likewise. Do BB frequency check only
12058 if count is initialized.
12060 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
12062 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
12063 (aarch64_ldrstr_offset_compare): New.
12064 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
12065 load/store orderings.
12066 (aarch64_gen_adjusted_ldpstp): Likewise.
12068 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
12070 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12071 Check for subset of GENERAL_REGS and FP_REGS.
12072 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
12075 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
12077 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
12078 and wi::to_poly_offset. Add the current offset and then check
12079 whether the sum fits, rather than using an unchecked addition of
12080 a checked term. Check for a shwi rather than a uhwi.
12081 * expr.c (get_bit_range): Use tree_to_poly_uint64.
12082 (store_constructor): Use poly_int_tree_p.
12083 (expand_expr_real_1): Likewise.
12084 * function.c (assign_temp): Likewise.
12085 * fold-const.c (const_binop): Use poly_int_tree_p and
12086 wi::to_poly_offset.
12087 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
12089 * ipa-icf-gimple.c (func_checker::compare_operand): Use
12090 to_poly_offset for MEM offsets.
12091 * ipa-icf.c (sem_variable::equals): Likewise.
12092 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
12093 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
12094 wi::to_poly_offset for BIT_FIELD_REF offsets.
12095 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
12096 wi::to_poly_offset.
12097 * var-tracking.c (emit_note_insn_var_location): Use
12098 tree_to_poly_uint64.
12100 2018-05-29 Jim Wilson <jimw@sifive.com>
12102 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
12104 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
12107 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
12108 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
12110 (sse4_1_round<mode>2): Use nonimmediate_operand
12111 for operand 1 predicate.
12113 2018-05-29 Martin Sebor <msebor@redhat.com>
12114 Richard Biener <rguenther@suse.de>
12117 * calls.c (get_size_range): Call determine_value_range instead
12118 of get_value_range..
12119 * tree-vrp.h (determine_value_range): Declared new function.
12120 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
12122 2018-05-29 Richard Biener <rguenther@suse.de>
12124 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
12125 sure to use non-pattern stmts for get_earlier_stmt arguments.
12126 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
12127 called on pattern stmts.
12128 (get_later_stmt): Likewise.
12130 2018-05-29 Martin Liska <mliska@suse.cz>
12132 PR gcov-profile/85759
12133 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
12136 2018-05-29 Jakub Jelinek <jakub@redhat.com>
12138 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
12140 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
12144 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12145 VEC_PACK_FLOAT_EXPR): New tree codes.
12146 * tree-pretty-print.c (op_code_prio): Handle
12147 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
12148 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
12149 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
12150 * tree-inline.c (estimate_operator_cost): Likewise.
12151 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
12152 * fold-const.c (const_binop): Likewise.
12153 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
12154 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
12155 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12156 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
12157 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
12158 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
12159 * expr.c (expand_expr_real_2): Likewise.
12160 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
12161 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
12162 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
12164 * optabs.c (expand_widen_pattern_expr): For
12165 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
12166 sign from result type rather than operand's type.
12167 (expand_binop_directly): For vec_packu_float_optab and
12168 vec_packs_float_optab allow result type to be different from operand's
12170 * optabs-tree.c (optab_for_tree_code): Handle
12171 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12172 VEC_PACK_FLOAT_EXPR. Formatting fixes.
12173 * tree-vect-generic.c (expand_vector_operations_1): Handle
12174 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12175 VEC_PACK_FLOAT_EXPR.
12176 * tree-vect-stmts.c (supportable_widening_operation): Handle
12178 (supportable_narrowing_operation): Handle FLOAT_EXPR.
12179 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
12180 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
12181 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
12182 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
12184 (vec_pack<floatprefix>_float_<mode>): New expander.
12185 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
12187 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
12188 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
12189 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
12190 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
12191 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
12193 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
12194 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
12195 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12196 VEC_PACK_FLOAT_EXPR): Document.
12198 2018-05-29 Richard Biener <rguenther@suse.de>
12200 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
12202 (stmt_vec_info_vec): Make pointer.
12203 (init_stmt_vec_info_vec): Remove.
12204 (free_stmt_vec_info_vec): Likewise.
12205 (set_stmt_vec_info_vec): New function.
12206 (free_stmt_vec_infos): Likewise.
12207 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
12208 (set_vinfo_for_stmt): Likewise.
12209 (get_earlier_stmt): Likewise.
12210 (get_later_stmt): Likewise.
12211 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
12212 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
12213 (vec_info::~vec_info): Free stmt_vec_infos.
12214 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
12215 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
12216 (pass_slp_vectorize::execute): Likewise.
12217 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
12218 (free_stmt_vec_info_vec): Likewise.
12219 (set_stmt_vec_info_vec): New function.
12220 (free_stmt_vec_infos): Likewise.
12221 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
12222 the global stmt_vec_info_vec.
12223 * tree-parloops.c (gather_scalar_reductions): Use
12224 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
12227 2018-05-29 Richard Biener <rguenther@suse.de>
12229 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
12231 2018-05-29 Martin Liska <mliska@suse.cz>
12232 David Malcolm <dmalcolm@redhat.com>
12234 * vec.c (test_reverse): New.
12235 (vec_c_tests): Add new test.
12236 * vec.h (vl_ptr>::reverse): New function.
12238 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
12240 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
12242 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
12245 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
12247 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
12249 2018-05-28 Richard Biener <rguenther@suse.de>
12251 PR tree-optimization/85933
12252 * tree-vect-data-refs.c (vect_record_base_alignments): Only
12253 look at stmts marked as vectorizable.
12255 2018-05-28 Richard Biener <rguenther@suse.de>
12257 PR tree-optimization/85934
12258 * tree-vect-generic.c (expand_vector_operations_1): Hoist
12259 vector boolean check before scalar optimization.
12261 2018-05-28 Jakub Jelinek <jakub@redhat.com>
12263 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
12266 2018-05-28 Mark Wielaard <mark@klomp.org>
12268 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
12269 if it is an expression containing a minus sign.
12271 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
12273 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
12275 2018-05-27 Paul Koning <ni1d@arrl.net>
12277 * config/pdp11/pdp11.md (truncsihi2): Remove.
12279 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
12280 Chung-Ju Wu <jasonwucj@gmail.com>
12282 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
12284 (unaligned_store_dw): Ditto.
12285 * config/nds32/nds32-memory-manipulation.c
12286 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
12287 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
12288 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
12289 (emit_setmem_word_loop): Rename to ...
12290 (emit_setmem_doubleword_loop): ... this.
12291 (nds32_gen_dup_4_byte_to_word_value): New function.
12292 (nds32_gen_dup_8_byte_to_double_word_value): New function.
12293 (nds32_expand_setmem_loop): Refine implementation.
12294 (nds32_expand_setmem_loop_v3m): Ditto.
12295 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
12298 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
12300 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
12302 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
12304 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
12305 (nds32_init_machine_status): Initialize machine->attr_naked_p and
12306 machine->attr_no_prologue_p.
12307 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
12308 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
12309 (nds32_expand_epilogue): Consider attr_naked_p.
12310 (nds32_expand_epilogue_v3pop): Likewise.
12311 (nds32_can_use_return_insn): Likewise.
12312 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
12313 attr_no_prologue_p fields.
12314 * config/nds32/nds32.opt (mret-in-naked-func): New option.
12316 2018-05-27 Jakub Jelinek <jakub@redhat.com>
12319 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
12321 * config/i386/sse.md
12322 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
12324 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
12326 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
12328 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
12330 (*<floatsuffix>floatv2div2sf2): Rename to ...
12331 (*float<floatunssuffix>v2div2sf2): ... this.
12332 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
12333 (float<floatunssuffix>v2div2sf2_mask): ... this.
12334 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
12335 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
12336 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
12338 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
12340 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12342 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12344 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12346 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12348 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
12349 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
12350 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
12351 gen_ufix_truncv8dfv8si2.
12352 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
12353 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
12354 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
12355 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
12356 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
12357 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
12358 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
12359 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
12361 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12365 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
12367 2018-05-25 Jim Wilson <jimw@sifive.com>
12369 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
12370 * config/riscv/riscv.c (struct machine_function): Add
12371 interrupt_handler_p and attribute_checked_p fields.
12372 (riscv_attribute_table): Add interrupt.
12373 (riscv_interrupt_type_p): New.
12374 (riscv_save_reg_p): Save extra regs for interrupt handler.
12375 (riscv_use_save_libcall): Return false for interrupt handler.
12376 (riscv_first_stack_step): Add forward declaration.
12377 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
12378 for interrupt handler with large frame. Use it for saved reg list.
12379 (riscv_expand_prologue): Move flag_stack_usage_info support to
12380 eliminate duplication.
12381 (riscv_expand_epilogue): Generate mret for interrupt handler.
12382 (riscv_epilogue_uses): New.
12383 (riscv_can_use_return_insn): Return false for interrupt handler.
12384 (riscv_function_ok_for_sibcall): Likewise.
12385 (riscv_set_current_function): Add interrupt handler support.
12386 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
12387 * config/riscv/riscv.md (UNSPECV_MRET): New.
12389 (riscv_frflags, riscv_fsflags): Use tab after opcode.
12391 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
12393 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
12395 PR tree-optimization/85712
12396 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
12397 this candidate has already been replaced in-situ by a copy.
12399 2018-05-25 Jason Merrill <jason@redhat.com>
12401 PR c++/80485 - inline function non-zero address.
12402 * symtab.c (nonzero_address): Check DECL_COMDAT.
12404 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
12407 * config/alpha/alpha.md (ashlsi3): New insn pattern.
12408 (*ashlsi_se): Rename from *ashldi_se. Define as sign
12409 extension of SImode operation. Use const123_operand predicate.
12410 (*saddsi_1): Remove.
12411 (*saddl_se_1): Ditto.
12412 (*ssubsi_1): Ditto.
12413 (*ssubl_se_1): Ditto.
12414 * config/alpha/predicates.md (const123_operand): New predicate.
12415 * config/alpha/constraints.md (P): Use IN_RANGE.
12417 2018-05-25 Richard Biener <rguenther@suse.de>
12419 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
12421 (ref_maybe_used_by_stmt_p): Likewise.
12422 (stmt_may_clobber_ref_p): Likewise.
12423 (stmt_may_clobber_ref_p_1): Likewise.
12424 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
12426 (ref_maybe_used_by_stmt_p): Likewise.
12427 (stmt_may_clobber_ref_p): Likewise.
12428 (stmt_may_clobber_ref_p_1): Likewise.
12429 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
12430 the alias oracle to disambiguate DRs with stmts DR analysis
12432 (vect_analyze_data_refs): Do not give up on not analyzable
12433 DRs for BB vectorization. Remove code truncating the dataref
12436 2018-05-25 Jakub Jelinek <jakub@redhat.com>
12439 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12440 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
12441 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
12443 2018-05-25 Richard Biener <rguenther@suse.de>
12445 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
12446 function, combining stmt data ref gathering and fatal analysis
12448 (vect_analyze_data_refs): Remove now redudnant code and simplify.
12449 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
12450 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
12451 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
12452 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
12454 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12456 PR tree-optimization/85720
12457 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
12458 SCC if all partitions are builtins.
12459 (version_loop_by_alias_check): New parameter. Generate cancelable
12460 runtime alias check if all partitions are builtins.
12461 (distribute_loop): Update call to above function.
12463 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12465 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
12466 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
12467 (parm_default_def_partition_arg): Ditto.
12468 (set_parm_default_def_partition): Ditto.
12469 (get_parm_default_def_partitions): Ditto and make it static.
12470 (get_undefined_value_partitions): Ditto and make it static.
12471 (remove_ssa_form): Refactor call to init_var_map here.
12472 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
12473 computation for loop region.
12474 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
12475 (register_default_def): Delete.
12476 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
12477 (parm_default_def_partition_arg): Ditto.
12478 (set_parm_default_def_partition): Ditto.
12479 (get_parm_default_def_partitions): Ditto and make it static.
12480 (get_undefined_value_partitions): Ditto and make it static.
12481 (coalesce_with_default, coalesce_with_default): Update comment.
12482 (create_coalesce_list_for_region): New func factored out from
12483 create_outofssa_var_map.
12484 (populate_coalesce_list_for_outofssa): New func factored out from
12485 create_outofssa_var_map and coalesce_ssa_name.
12486 (create_outofssa_var_map): Delete.
12487 (coalesce_ssa_name): Refactor to support live range computation.
12488 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
12489 (get_parm_default_def_partitions): Delete.
12490 (get_undefined_value_partitions): Ditto.
12491 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
12492 computation for loop region.
12493 (new_tree_live_info, loe_visit_block): Ditto.
12494 (live_worklist, set_var_live_on_entry): Ditto.
12495 (calculate_live_on_exit, verify_live_on_entry): Ditto.
12496 * tree-ssa-live.h (struct _var_map): New fields.
12497 (init_var_map): Change decl.
12498 (region_contains_p): New.
12500 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12502 * tree-ssa-live.h (live_merge_and_clear): Delete.
12504 2018-05-25 Richard Biener <rguenther@suse.de>
12507 * tree-dump.c (dequeue_and_dump): Remove access to removed
12508 operand 2 of a SWITCH_EXPR.
12510 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12512 * doc/sourcebuild.texi (vect_double_cond_arith): Include
12513 multiplication and division.
12514 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
12515 (cond_udiv@var{m}, cond_umod@var{m}): Document.
12516 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
12517 (cond_udiv_optab, cond_umod_optab): New optabs.
12518 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
12519 (IFN_COND_RDIV): New internal functions.
12520 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
12521 TRUNC_MOD_EXPR and RDIV_EXPR.
12522 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
12523 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
12525 (SVE_INT_BINARY): Include mult.
12526 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
12527 (optab, sve_int_op): Handle mult.
12528 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
12530 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
12531 for SVE_INT_BINARY_SD.
12533 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12535 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
12536 (optab, sve_int_op): Handle div and udiv.
12537 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
12538 for SVE_INT_BINARY_SD.
12539 (*<optab><mode>3): New insn for the same.
12541 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12543 * tree-vect-patterns.c: Include predict.h.
12544 (vect_recog_divmod_pattern): Restrict check for division support
12545 to when optimizing for size.
12547 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12549 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
12550 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
12551 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
12552 (gimple_match_op::set_op): Likewise.
12553 (gimple_resimplify4): Declare.
12554 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
12555 (expr::gen_transform): Likewise.
12556 (decision_tree::gen): Generate a simplification routine for 4 operands.
12557 * gimple-match-head.c (gimple_simplify): Add an overload for
12558 4 operands. In the top-level function, handle up to 4 call
12559 arguments and call gimple_resimplify4.
12560 (gimple_resimplify4): New function.
12561 (build_call_internal): Pass a fourth operand.
12562 (maybe_push_to_seq): Likewise.
12563 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
12564 Fold VEC_COND_EXPRs of an operation and a default value into
12565 an IFN_COND_* function if possible.
12566 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
12568 (SVE_COND_FP_BINARY): Include them.
12569 (optab, sve_fp_op): Handle them.
12570 (SVE_INT_BINARY_REV): New code iterator.
12571 (SVE_COND_FP_BINARY_REV): New int iterator.
12572 (commutative): New int attribute.
12573 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
12575 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
12577 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
12578 (*cond_<optab><mode>): New patterns for reversed operands.
12580 2018-05-25 Richard Biener <rguenther@suse.de>
12582 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
12583 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
12584 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
12585 (STMT_VINFO_GROUPED_ACCESS): Adjust.
12586 * tree-vect-data-refs.c (everywhere): Adjust users.
12587 * tree-vect-loop.c (everywhere): Likewise.
12588 * tree-vect-slp.c (everywhere): Likewise.
12589 * tree-vect-stmts.c (everywhere): Likewise.
12590 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12592 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12594 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
12596 (gcc_cv_as_section_exclude): ... this.
12597 Try Solaris as #exclude syntax.
12598 * configure: Regenerate.
12599 * config.in: Regenerate.
12600 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
12602 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
12603 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
12605 * varasm.c (default_elf_asm_named_section): Don't check if
12606 HAVE_GAS_SECTION_EXCLUDE is defined.
12608 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12610 * doc/md.texi: Update the documentation of the cond_* optabs
12611 to mention the new final operand. Fix GET_MODE_NUNITS call.
12612 Describe the scalar case too.
12613 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12614 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12616 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12617 (get_conditional_internal_fn): Update comment.
12618 * tree-vect-loop.c (vectorizable_reduction): Pass the original
12619 accumulator value as a final argument to conditional functions.
12620 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12621 a define_expand and add an "else" operand. Assert for now that
12622 the else operand is equal to operand 2. Use SVE_INT_BINARY and
12623 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12624 (*cond_<optab><mode>): New patterns.
12625 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12626 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12627 (UNSPEC_COND_EOR): Delete.
12628 (optab): Remove associated mappings.
12629 (SVE_INT_BINARY): New code iterator.
12630 (sve_int_op): Remove int attribute and add "minus" to the code
12632 (SVE_COND_INT_OP): Delete.
12633 (SVE_COND_FP_OP): Rename to...
12634 (SVE_COND_FP_BINARY): ...this.
12636 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12638 * optabs.c (can_reuse_operands_p): New function.
12639 (maybe_legitimize_operands): Try to reuse the results for
12642 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12644 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12645 Add {q} suffix to insn mnemonic.
12647 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12649 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12650 (msp430_warn_func_return): New.
12652 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
12654 * fold-const.c (tree_nonzero_bits): New function.
12655 * fold-const.h (tree_nonzero_bits): Likewise.
12656 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12657 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12659 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12663 * varasm.c (assemble_alias): Check ifunc_resolver only on
12666 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12669 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12670 when memory input operand is handled.
12672 2018-05-24 Luis Machado <luis.machado@linaro.org>
12674 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12676 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12678 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12680 * match.pd: Delay FMA folds until after vectorization.
12682 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
12685 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12686 address check not strict.
12688 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12690 * gimple-match.h (gimple_match_op): New class.
12691 (mprts_hook): Replace parameters with a gimple_match_op *.
12692 (maybe_build_generic_op): Likewise.
12693 (gimple_simplified_result_is_gimple_val): Replace parameters with
12694 a const gimple_match_op *.
12695 (gimple_simplify): Replace code_helper * and tree * parameters with
12696 a gimple_match_op * parameter.
12697 (gimple_resimplify1): Replace code_helper *, tree and tree *
12698 parameters with a gimple_match_op * parameter.
12699 (gimple_resimplify2): Likewise.
12700 (gimple_resimplify3): Likewise.
12701 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12702 parameters with a gimple_match_op * parameter.
12703 * gimple-match-head.c (gimple_simplify): Change prototypes of
12704 auto-generated functions to take a gimple_match_op * instead of
12705 separate code_helper * and tree * parameters. Make the same
12706 change in the top-level overload and update calls to the
12707 gimple_resimplify routines. Update calls to the auto-generated
12708 functions and to maybe_push_res_to_seq in the publicly-facing
12709 operation-specific gimple_simplify overloads.
12710 (gimple_match_op::MAX_NUM_OPS): Define.
12711 (gimple_resimplify1): Replace rcode and ops with a single res_op
12712 parameter. Update call to gimple_simplify.
12713 (gimple_resimplify2): Likewise.
12714 (gimple_resimplify3): Likewise.
12715 (mprts_hook): Replace parameters with a gimple_match_op *.
12716 (maybe_build_generic_op): Likewise.
12717 (build_call_internal): Replace type, nargs and ops with
12718 a gimple_match_op *.
12719 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12720 with a single gimple_match_op *. Update calls to mprts_hook,
12721 build_call_internal and gimple_simplified_result_is_gimple_val.
12722 Factor out code that is common to the tree_code and combined_fn cases.
12723 * genmatch.c (expr::gen_transform): Replace tem_code and
12724 tem_ops with a gimple_match_op called tem_op. Update calls
12725 to the gimple_resimplify functions and maybe_push_res_to_seq.
12726 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12727 res_ops. Update call to the gimple_resimplify functions.
12728 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12729 (decision_tree::gen): Make the functions take a gimple_match_op *
12730 called res_op instead of separate res_code and res_ops parameters.
12731 Update call accordingly.
12732 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12733 and ops with a single res_op parameter. Update calls to
12734 maybe_build_generic_op and maybe_push_res_to_seq.
12735 (fold_stmt_1): Update calls to gimple_simplify and
12736 replace_stmt_with_simplification.
12737 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12738 and gimple_simplified_result_is_gimple_val.
12739 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12741 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12742 with a gimple_match_op *.
12743 (vn_nary_build_or_lookup): Likewise. Update call to
12744 vn_nary_build_or_lookup_1.
12745 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12746 gimple_match_op *. Update calls to the gimple_resimplify routines
12747 and to gimple_simplified_result_is_gimple_val.
12748 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12749 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12750 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12751 (visit_nary_op): Likewise.
12752 (visit_reference_op_load): Likewise.
12754 2018-05-23 Luis Machado <luis.machado@linaro.org>
12756 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12757 modifier for printing the step amount.
12759 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
12762 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12765 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
12767 * doc/sourcebuild.texi (Endianness): New subsubsection.
12769 2018-05-23 Luis Machado <luis.machado@linaro.org>
12771 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12772 <prefetch_dynamic_strides>: New const bool field.
12773 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12774 prefetch_dynamic_strides.
12775 (exynosm1_prefetch_tune): Likewise.
12776 (thunderxt88_prefetch_tune): Likewise.
12777 (thunderx_prefetch_tune): Likewise.
12778 (thunderx2t99_prefetch_tune): Likewise.
12779 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12781 (aarch64_override_options_internal): Update to set
12782 PARAM_PREFETCH_DYNAMIC_STRIDES.
12783 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12784 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12785 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12786 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12787 prefetch-dynamic-strides setting.
12789 2018-05-23 Luis Machado <luis.machado@linaro.org>
12791 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12792 <minimum_stride>: New const int field.
12793 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12794 minimum_stride field defaulting to -1.
12795 (exynosm1_prefetch_tune): Likewise.
12796 (thunderxt88_prefetch_tune): Likewise.
12797 (thunderx_prefetch_tune): Likewise.
12798 (thunderx2t99_prefetch_tune): Likewise.
12799 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12800 <default_opt_level>: Set to 3.
12801 (aarch64_override_options_internal): Update to set
12802 PARAM_PREFETCH_MINIMUM_STRIDE.
12803 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12804 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12805 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12806 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12807 stride is constant and is below the minimum stride threshold.
12809 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12811 * config/arm/arm-cpus.in (mode26): Delete.
12812 (armv4): Delete mode26 reference.
12813 * config/arm/arm.c (arm_configure_build_target): Delete use of
12816 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12818 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12820 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12821 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
12823 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
12824 (floatunsdidf2): Ditto.
12826 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12828 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12829 (fixuns_trunc<mode>si2_avx512f): Ditto.
12830 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12831 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12832 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12834 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12836 PR rtl-optimization/79985
12837 * df-scan.c (df_insn_refs_collect): Remove special case for
12838 global registers and asm statements.
12840 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12842 * extend.texi (Global Register Variables): Rewrite the bullet list.
12843 Note that the register is available for allocation. Note that access
12844 via inline asm must use constraints. Add note about async-signal
12845 handlers. Remove paragraph about automagic register selection.
12847 2018-05-23 Richard Biener <rguenther@suse.de>
12849 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12850 of fixed offset from memset VN.
12852 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
12854 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12855 first_interp field.
12856 (alloc_cand_and_find_basis): Initialize first_interp field.
12857 (slsr_process_mul): Modify first_interp field.
12858 (slsr_process_add): Likewise.
12859 (slsr_process_cast): Modify first_interp field for each new
12861 (slsr_process_copy): Likewise.
12862 (dump_candidate): Dump first_interp field.
12863 (replace_mult_candidate): Process all interpretations, not just
12865 (replace_rhs_if_not_dup): Likewise.
12866 (replace_one_candidate): Likewise.
12868 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
12870 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12872 (aarch64_needs_frame_chain): New function.
12873 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12875 2018-05-23 Sudakshina Das <sudi.das@arm.com>
12878 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12879 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12880 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12881 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12882 as true for strict-align.
12883 (aarch64_can_inline_p): Perform checks even when callee has no
12884 attributes to check for strict alignment.
12885 * doc/extend.texi (AArch64 Function Attributes): Document
12887 * doc/invoke.texi: (AArch64 Options): Likewise.
12889 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
12891 PR tree-optimization/85853
12892 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12893 the handling of the root of the node to...
12894 (vect_slp_analyze_node_operations_1): ...this new function,
12895 and run the whole thing with the child nodes' def types
12896 set according to their SLP node's def type.
12898 2018-05-23 Richard Biener <rguenther@suse.de>
12900 PR middle-end/85874
12901 * tree-data-ref.c (create_runtime_alias_checks): Defer
12902 and ignore overflow warnings.
12904 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12906 PR tree-optimization/85822
12907 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12910 2018-05-23 Richard Biener <rguenther@suse.de>
12912 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12913 memset constants via native_interpret_expr.
12915 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12918 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12920 (cgraph_node::create_alias): Likewise.
12921 (cgraph_node::get_availability): Check ifunc_resolver instead
12922 of looking up ifunc attribute.
12923 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12924 * varasm.c (do_assemble_alias): Likewise.
12925 (assemble_alias): Likewise.
12926 (default_binds_local_p_3): Likewise.
12927 * cgraph.h (cgraph_node): Add ifunc_resolver.
12928 (cgraph_node::only_called_directly_or_aliased_p): Return false
12929 for IFUNC resolver.
12930 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12932 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12933 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12934 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12935 instead of looking up ifunc attribute.
12937 2018-05-22 Luis Machado <luis.machado@linaro.org>
12939 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12941 2018-05-22 Martin Sebor <msebor@redhat.com>
12943 PR middle-end/85359
12944 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12945 only when expasion succeeds.
12946 (expand_builtin_strcmp): Same.
12947 (expand_builtin_strncmp): Same.
12949 2018-05-22 Martin Sebor <msebor@redhat.com>
12951 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12953 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12954 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12956 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12957 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12959 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12960 Add check for legitimate_address.
12961 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12962 (aarch64_swap_ldrstr_operands): New.
12963 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12966 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12967 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12969 * config/aarch64/aarch64.md: New patterns to generate stp
12971 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12972 single words and double words.
12973 (load_pair_sw, load_pair_dw): Likewise.
12974 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12976 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12978 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12979 for different mode ldpstp and add peephole for merged zero stores.
12980 Likewise for loads.
12981 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12983 (aarch64_gen_store_pair): Rename calls to match new patterns.
12984 (aarch64_gen_load_pair): Rename calls to match new patterns.
12985 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12986 (load_pair<DREG:mode><DREG2:mode>): ... This.
12987 (store_pair<mode>): Rename to...
12988 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12989 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12990 New mode iterators.
12991 (V_INT_EQUIV): Handle SImode.
12992 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12995 2018-05-22 Martin Sebor <msebor@redhat.com>
12998 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12999 or ajust the presumed bound on an operation to avoid unnecessary
13002 2018-05-22 Martin Sebor <msebor@redhat.com>
13004 PR tree-optimization/85826
13005 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
13006 assuming that a DECL necesarily has a constant size.
13008 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
13010 PR middle-end/85862
13011 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
13013 2018-05-22 Richard Biener <rguenther@suse.de>
13015 PR tree-optimization/85834
13016 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
13017 non-constant and non-zero memset arguments.
13019 2018-05-22 Martin Liska <mliska@suse.cz>
13022 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
13024 2018-05-22 Richard Biener <rguenther@suse.de>
13026 PR tree-optimization/85863
13027 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
13028 comparisons when vectype is specified.
13029 (vectorizable_condition): Do not specify vectype for
13030 vect_is_simple_cond when SLP vectorizing.
13032 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
13035 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
13036 define __ibm128 as long double.
13037 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
13038 as a distinct type when IEEE 128-bit support is enabled.
13039 (init_float128_ieee): Fix up conversions between IFmode and IEEE
13040 128-bit types to use the correct functions.
13041 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
13042 convert between 128-bit floating point types that have different
13043 modes but the same representation, instead of using gen_lowpart to
13045 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
13047 (IFKF_reg): New attributes to give the register constraints for
13049 (extend<mode>tf2_internal): New insns to mark an explicit
13050 conversion between 128-bit floating point types that have a
13051 different mode but share the same representation.
13053 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
13055 PR tree-optimization/85814
13056 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
13057 a null return from get_strinfo when unsharing the next
13058 strinfo in the chain.
13060 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13063 * varasm.c (weak_finish): Clean up weak_decls.
13065 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13067 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
13068 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
13069 UNSPEC_UADALP values.
13070 * config/aarch64/iterators.md (ABAL): New int iterator.
13073 (sur): Add mappings for the above.
13074 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
13076 (aarch64_<sur>abal<mode>_4): Likewise.
13077 (aarch64_<sur>adalp<mode>_3): Likewise.
13078 (<sur>sadv16qi): New define_expand.
13080 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
13082 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
13083 (*movdf_internal): Ditto.
13084 (*rcpsf2_sse): Ditto.
13085 (*rsqrtsf2_sse): Ditto.
13086 (*sqrt<mode>2_sse): Ditto.
13088 2018-05-21 Tamar Christina <tamar.christina@arm.com>
13090 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
13092 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
13093 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
13094 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
13095 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
13097 * config/aarch64/arm_neon.h: Likewise.
13098 * config/aarch64/iterators.md (VQ_I): New.
13100 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
13102 * config.gcc: Add arc/t-multilib-linux to tmake_file for
13104 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
13107 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
13109 * config/nds32/constraints.md (S): New constraint.
13110 * config/nds32/nds32.md (call_internal): Use constraint S.
13111 (call_value_internal): Likewise.
13112 (sibcall_internal): Likewise.
13113 (sibcall_value_internal): Likewise.
13115 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
13116 Chung-Ju Wu <jasonwucj@gmail.com>
13118 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
13119 into consideration.
13121 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
13122 Chung-Ju Wu <jasonwucj@gmail.com>
13124 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
13125 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
13126 (nds32_rtx_costs_impl): Simplify.
13127 (nds32_address_cost_impl): Simplify.
13128 (nds32_init_rtx_costs): New function.
13129 (nds32_rtx_costs_speed_prefer): Likewise.
13130 (nds32_rtx_costs_size_prefer): Likewise.
13131 (nds32_address_cost_speed_prefer): Likewise.
13132 (nds32_address_cost_speed_fwprop): Likewise.
13133 (nds32_address_cost_size_prefer): Likewise.
13134 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
13135 * config/nds32/nds32.c (nds32_option_override): Use
13136 nds32_init_rtx_costs function.
13138 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
13140 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
13141 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
13142 (TARGET_PIPELINE_N8): Likewise.
13143 (TARGET_PIPELINE_N10): Likewise.
13144 (TARGET_PIPELINE_N13): Likewise.
13145 (TARGET_PIPELINE_GRAYWOLF): Likewise.
13147 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
13149 * config/nds32/nds32-fpu.md: Update copyright year.
13151 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
13153 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
13155 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
13157 * config/nds32/nds32.c
13158 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
13159 * config/nds32/nds32.opt (minline-asm-r15): New option.
13161 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
13163 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
13165 * config/nds32/nds32.md (abssi2): New pattern.
13167 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
13169 * config/i386/i386.md (rex64namesuffix): New mode attribute.
13170 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
13171 Merge insn pattern from sse_cvtsi2ss<round_name> and
13172 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
13173 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
13174 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
13175 using SWI48 mode iterator.
13176 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
13177 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
13178 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
13179 pattern from sse_cvttss2si<round_saeonly_name>
13180 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
13181 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
13182 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
13183 using SWI48 mode iterator.
13184 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
13185 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
13186 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
13187 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
13188 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
13189 using SWI48 mode iterator.
13190 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
13191 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
13192 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
13193 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
13194 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
13195 SWI48 mode iterator.
13196 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
13197 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
13198 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
13199 pattern from sse_cvttsd2si<round_saeonly_name>
13200 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
13202 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
13204 * config/nds32/nds32-md-auxiliary.c
13205 (nds32_valid_smw_lwm_base_p): Refine.
13206 (nds32_output_smw_single_word): Refine.
13207 (nds32_output_smw_double_word): New.
13208 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
13210 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
13212 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
13213 (nds32_output_stack_pop): Refine.
13214 (nds32_expand_unaligned_load): Refine.
13215 (nds32_expand_unaligned_store): Refine.
13217 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13218 Chung-Ju Wu <jasonwucj@gmail.com>
13220 * config/nds32/constants.md: Add TP_REGNUM constant.
13221 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
13222 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
13224 * config/nds32/nds32-doubleword.md: Consider flag_pic.
13225 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
13226 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
13227 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
13228 and PIC code generation.
13229 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
13231 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
13233 * config/nds32/nds32.md: Support TLS and PIC.
13234 * config/nds32/nds32.c: Support TLS and PIC.
13235 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
13236 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
13239 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
13241 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
13242 mode with E_ prefix.
13244 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13245 Chung-Ju Wu <jasonwucj@gmail.com>
13247 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
13248 * config/nds32/nds32-md-auxiliary.c
13249 (symbolic_reference_mentioned_p): New.
13250 (nds32_legitimize_ict_address): New.
13251 (nds32_expand_ict_move): New.
13252 (nds32_indirect_call_referenced_p): New.
13253 (nds32_symbol_binds_local_p): Delete.
13254 (nds32_long_call_p): Modify.
13255 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
13256 * config/nds32/nds32-protos.h
13257 (symbolic_reference_mentioned_p): Declare.
13258 (nds32_legitimize_ict_address): Declare.
13259 (nds32_expand_ict_move): Declare.
13260 (nds32_indirect_call_referenced_p): Declare.
13261 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
13262 (nds32_relax_group): Use nds32_ict_const_p as condition.
13263 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
13264 (nds32_asm_file_start): Output ict_model directive in asm code.
13265 (nds32_legitimate_address_p): Consider indirect call.
13266 (nds32_print_operand): Consider indirect call.
13267 (nds32_print_operand_address): Consider indirect call.
13268 (nds32_insert_attributes): Handle "indirect_call" attribute.
13269 (TARGET_LEGITIMATE_ADDRESS_P): Define.
13270 (TARGET_LEGITIMATE_CONSTANT_P): Define.
13271 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
13272 (TARGET_DELEGITIMIZE_ADDRESS): Define.
13273 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
13274 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
13275 (TARGET_ICT_MODEL_SMALL): Define.
13276 (TARGET_ICT_MODEL_LARGE): Define.
13277 * config/nds32/nds32.md (movsi): Consider ict model.
13278 (call, call_value): Consider ict model.
13279 (sibcall, sibcall_value): Consider ict model.
13280 * config/nds32/nds32.opt (mict-model): New option.
13281 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
13284 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
13285 Monk Chiang <sh.chiang04@gmail.com>
13286 Jim Wilson <jimw@sifive.com>
13288 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
13289 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
13290 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
13291 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
13292 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
13293 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
13294 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
13295 compute save_libcall_adjustment properly.
13296 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
13297 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
13298 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
13299 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
13300 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
13301 (ABI_SPEC): Handle mabi=ilp32e.
13302 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
13303 (RVE): Add RVE mask.
13304 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
13305 <-march>: Add rv32e as an example.
13307 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
13310 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
13311 (intra_create_variable_infos): Handle C++ constructors.
13313 2018-05-18 Martin Liska <mliska@suse.cz>
13315 * passes.def: Remove a redundant pass.
13317 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
13320 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
13322 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13324 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
13326 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
13328 (armv2, armv2a, armv3, armv3m): Delete architectures.
13329 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
13330 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
13331 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
13333 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
13334 (*mulsidi3adddi): Likewise.
13335 (mulsidi3): Likewise.
13336 (*mulsidi3_nov6): Likewise.
13337 (umulsidi3): Likewise.
13338 (umulsidi3_nov6): Likewise.
13339 (umaddsidi4): Likewise.
13340 (*umulsidi3adddi): Likewise.
13341 (smulsi3_highpart): Likewise.
13342 (*smulsi3_highpart_nov6): Likewise.
13343 (umulsi3_highpart): Likewise.
13344 (*umulsi3_highpart_nov6): Likewise.
13345 * config/arm/arm.h (arm_arch3m): Delete.
13346 * config/arm/arm.c (arm_arch3m): Delete.
13347 (arm_option_override_internal): Update armv3-related comment.
13348 (arm_configure_build_target): Delete use of isa_bit_mode32.
13349 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
13350 (arm_rtx_costs_internal): Delete check of arm_arch3m.
13351 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
13352 (mulsa3): Likewise.
13353 (mulusa3): Likewise.
13354 * config/arm/arm-protos.h (arm_arch3m): Delete.
13355 * config/arm/arm-tables.opt: Regenerate.
13356 * config/arm/arm-tune.md: Likewise.
13357 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
13358 deleted architectures.
13360 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13362 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
13363 (armv5t, armv5te): New features.
13364 (ARMv5, ARMv5e): Delete fgroups.
13365 (ARMv5t, ARMv5te): Adjust for above changes.
13366 (ARMv6m): Likewise.
13367 (armv5, armv5e): Delete arches.
13368 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
13370 (*call_reg_arm): Likewise.
13371 (*call_value_reg_armv5): Likewise.
13372 (*call_value_reg_arm): Likewise.
13373 (*call_symbol): Likewise.
13374 (*call_value_symbol): Likewise.
13375 (*sibcall_insn): Likewise.
13376 (*sibcall_value_insn): Likewise.
13377 (clzsi2): Likewise.
13378 (prefetch): Likewise.
13379 (define_split and define_peephole2 dependent on arm_arch5):
13381 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
13383 (TARGET_ARM_QBIT): Likewise.
13384 (TARGET_DSP_MULTIPLY): Likewise.
13385 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
13386 (arm_arch5, arm_arch5e): Delete.
13387 (arm_arch5t, arm_arch5te): Declare.
13388 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
13389 (arm_arch5t): Declare.
13390 (arm_option_reconfigure_globals): Update for the above.
13391 (arm_options_perform_arch_sanity_checks): Update comment, replace
13392 use of arm_arch5 with arm_arch5t.
13393 (use_return_insn): Likewise.
13394 (arm_emit_call_insn): Likewise.
13395 (output_return_instruction): Likewise.
13396 (arm_final_prescan_insn): Likewise.
13397 (arm_coproc_builtin_available): Likewise.
13398 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
13399 arm_arch5e with arm_arch5t and arm_arch5te.
13400 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
13401 (arm_arch5t, arm_arch5te): Declare.
13402 * config/arm/arm-tables.opt: Regenerate.
13403 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
13404 * config/arm/t-multilib: Likewise.
13405 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
13406 instead of arm_arch5.
13407 (*call_reg_thumb1): Likewise.
13408 (*call_value_reg_thumb1_v5): Likewise.
13409 (*call_value_reg_thumb1): Likewise.
13410 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
13412 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
13414 2018-05-18 Martin Liska <mliska@suse.cz>
13416 PR gcov-profile/84846
13417 * doc/gcov.texi: Document -t option of gcov tool.
13419 2018-05-18 Martin Liska <mliska@suse.cz>
13421 PR gcov-profile/84846
13422 * gcov.c (print_usage): Add new -t option.
13423 (process_args): Handle the option.
13424 (generate_results): Use stdout as output when requested by
13427 2018-05-18 Martin Liska <mliska@suse.cz>
13429 PR gcov-profile/84846
13430 * coverage.c (coverage_init): Write PWD to .gcno file.
13431 * doc/gcov.texi: Document how working directory is printed.
13432 * gcov-dump.c (dump_gcov_file): Print PWD.
13433 * gcov.c (output_intermediate_file): Likewise.
13434 (read_graph_file): Read PWD string.
13435 (output_lines): Print PWD.
13437 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13439 PR middle-end/85817
13440 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
13441 for retval and return false if all args to phi are zero.
13443 2018-05-18 Richard Biener <rguenther@suse.de>
13445 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
13447 (evrp_dom_walker::before_dom_children): Call it.
13449 2018-05-18 Richard Biener <rguenther@suse.de>
13451 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
13452 results when processing array refs with variable index.
13454 2018-05-18 Toon Moene <toon@moene.org>
13456 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
13457 directly after that of -floop-interchange. Indicate that both
13458 options are enabled by default when specifying -O3.
13460 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13462 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
13463 iterator. Delete separate integer-mode vec_set<mode> expander.
13464 (aarch64_simd_vec_setv2di): Delete.
13465 (vec_setv2di): Delete.
13466 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
13467 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
13468 the "w, r" alternative.
13470 2018-05-18 Martin Liska <mliska@suse.cz>
13472 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
13473 * tree-pass.h (make_pass_lower_switch_O0): New function.
13474 * tree-switch-conversion.c (node_has_low_bound): Remove.
13475 (node_has_high_bound): Likewise.
13476 (node_is_bounded): Likewise.
13477 (class pass_lower_switch): Make it a template type and create
13479 (pass_lower_switch::execute): Add template argument.
13480 (make_pass_lower_switch): New function.
13481 (make_pass_lower_switch_O0): New function.
13482 (do_jump_if_equal): Remove.
13483 (emit_case_nodes): Simplify to just handle all 3 cases and leave
13484 all the hard work to tree optimization passes.
13486 2018-05-18 Martin Liska <mliska@suse.cz>
13488 * dbgcnt.c (limit_low): Renamed from limit.
13489 (limit_high): New variable.
13490 (dbg_cnt_is_enabled): Check for upper limit.
13491 (dbg_cnt): Adjust dumping.
13492 (dbg_cnt_set_limit_by_index): Add new argument for high
13494 (dbg_cnt_set_limit_by_name): Likewise.
13495 (dbg_cnt_process_single_pair): Parse new format.
13496 (dbg_cnt_process_opt): Use strtok.
13497 (dbg_cnt_list_all_counters): Remove 'value' and add
13499 * doc/invoke.texi: Document changes.
13501 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
13503 * doc/sourcebuild.texi (scalar_all_fma): Document.
13504 * tree.def (FMA_EXPR): Delete.
13505 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
13506 * internal-fn.c (ternary_direct): New macro.
13507 (expand_ternary_optab_fn): Likewise.
13508 (direct_ternary_optab_supported_p): Likewise.
13509 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
13510 * builtins.c (fold_builtin_fma): Delete.
13511 (fold_builtin_3): Don't call it.
13512 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
13513 * expr.c (expand_expr_real_2): Likewise.
13514 * fold-const.c (operand_equal_p): Likewise.
13515 (fold_ternary_loc): Likewise.
13516 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
13517 * gimple.c (DEFTREECODE): Likewise.
13518 * gimplify.c (gimplify_expr): Likewise.
13519 * optabs-tree.c (optab_for_tree_code): Likewise.
13520 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13521 * tree-eh.c (operation_could_trap_p): Likewise.
13522 (stmt_could_throw_1_p): Likewise.
13523 * tree-inline.c (estimate_operator_cost): Likewise.
13524 * tree-pretty-print.c (dump_generic_node): Likewise.
13525 (op_code_prio): Likewise.
13526 * tree-ssa-loop-im.c (stmt_cost): Likewise.
13527 * tree-ssa-operands.c (get_expr_operands): Likewise.
13528 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
13529 * fold-const-call.h (fold_fma): Delete.
13530 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
13531 CFN_FNMA and CFN_FNMS.
13532 (fold_fma): Delete.
13533 * genmatch.c (combined_fn): New enum.
13534 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
13535 (commutative_op): New function.
13536 (commutate): Use it. Handle more than 2 operands.
13537 (dt_operand::gen_gimple_expr): Use commutative_op.
13538 (parser::parse_expr): Allow :c to be used with non-binary
13539 operators if the commutative operand is known.
13540 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
13541 CFN_FMS, CFN_FNMA and CFN_FNMS.
13542 (backprop::process_assign_use): Remove FMA_EXPR handling.
13543 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
13544 (gen_hsa_fma): New function.
13545 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
13546 IFN_FNMA and IFN_FNMS.
13547 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
13548 * gimple-fold.h (follow_all_ssa_edges): Declare.
13549 * gimple-fold.c (follow_all_ssa_edges): New function.
13550 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
13551 gimple_build interface and use follow_all_ssa_edges to fold the result.
13552 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
13553 instead of checking for optabs directly.
13554 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
13555 rather than FMA_EXPRs.
13556 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
13557 call to IFN_FMA instead of an FMA_EXPR.
13559 2018-05-17 Jim Wilson <jimw@sifive.com>
13561 * expr.c (do_tablejump): When converting index to Pmode, if we have a
13562 sign extended promoted subreg, and the range does not have the sign bit
13563 set, then do a sign extend.
13565 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
13566 test, check for sign extended subreg and/or constant operands, and
13567 do a sign extend in that case.
13569 2018-05-17 Steve Ellcey <sellcey@cavium.com>
13571 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
13572 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
13574 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
13575 Change logics_shift_reg to logics_shift_imm.
13576 (thunderx2t99_fp_loadpair_basic): Delete.
13577 (thunderx2t99_fp_storepair_basic): Delete.
13578 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
13579 (thunderx2t99_asimd_polynomial): Delete.
13580 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
13581 and neon_fp_mul_d_scalar_q.
13582 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
13583 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
13584 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
13585 (thunderx2t99_asimd_lut): Add missing tbl types.
13586 (thunderx2t99_asimd_ext): Delete.
13587 (thunderx2t99_asimd_load1_1_mult): Delete.
13588 (thunderx2t99_asimd_load1_2_mult): Delete.
13589 (thunderx2t99_asimd_load1_ldp): New.
13590 (thunderx2t99_asimd_load1): New.
13591 (thunderx2t99_asimd_load2): Add missing *load2* types.
13592 (thunderx2t99_asimd_load3): New.
13593 (thunderx2t99_asimd_load4): New.
13594 (thunderx2t99_asimd_store1_1_mult): Delete.
13595 (thunderx2t99_asimd_store1_2_mult): Delete.
13596 (thunderx2t99_asimd_store2_mult): Delete.
13597 (thunderx2t99_asimd_store2_onelane): Delete.
13598 (thunderx2t99_asimd_store_stp): New.
13599 (thunderx2t99_asimd_store1): New.
13600 (thunderx2t99_asimd_store2): New.
13601 (thunderx2t99_asimd_store3): New.
13602 (thunderx2t99_asimd_store4): New.
13604 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
13606 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13607 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
13609 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
13610 Segher Boessenkool <segher@kernel.crashing.org>
13613 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13616 2018-05-17 Richard Biener <rguenther@suse.de>
13618 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13619 for pruning loop and prune defs feeding only already visited PHIs.
13621 2018-05-17 Richard Biener <rguenther@suse.de>
13623 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13625 2018-05-17 Bin Cheng <bin.cheng@arm.com>
13626 Richard Biener <rguenther@suse.de>
13628 PR tree-optimization/85793
13629 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13630 for VMAT_ELEMENTWISE.
13632 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13634 * internal-fn.h (lookup_internal_fn): Declare
13635 * internal-fn.c (lookup_internal_fn): New function.
13636 * gimple.c (gimple_build_call_from_tree): Handle calls to
13637 internal functions.
13638 * gimple-pretty-print.c (dump_gimple_call): Print "." before
13639 internal function names.
13640 * tree-pretty-print.c (dump_generic_node): Likewise.
13641 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13643 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13645 * gimple-fold.h (gimple_build): Make the function forms take
13646 combined_fn rather than built_in_function.
13647 (gimple_simplify): Likewise.
13648 * gimple-match-head.c (gimple_simplify): Likewise.
13649 * gimple-fold.c (gimple_build): Likewise.
13650 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13651 rather than gimple_build_call_internal.
13652 (get_initial_defs_for_reduction): Likewise.
13653 (vect_create_epilog_for_reduction): Likewise.
13654 (vectorizable_live_operation): Likewise.
13656 2018-05-17 Martin Liska <mliska@suse.cz>
13658 * gimple-ssa-sprintf.c (format_directive): Do not use
13659 space in between 'G_' and '('.
13661 2018-05-17 Jakub Jelinek <jakub@redhat.com>
13664 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13665 even if the mask is not all ones.
13668 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13670 (ix86_gimple_fold_builtin): Likewise.
13673 * config/i386/i386.c: Include tree-vector-builder.h.
13674 (ix86_vector_shift_count): New function.
13675 (ix86_fold_builtin): Fold shift builtins by scalar count.
13676 (ix86_gimple_fold_builtin): Likewise.
13678 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13679 _mm512_setzero): New intrinsics.
13681 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
13682 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13684 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13685 code generation for cases where splatting a value is not useful.
13686 * simplify-rtx.c (simplify_ternary_operation): Simplify
13687 vec_merge across a vec_duplicate and a paradoxical subreg forming
13688 a vector mode to a vec_concat.
13690 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
13692 * config.gcc: Support "goldmont-plus".
13693 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13695 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13696 PROCESSOR_GOLDMONT_PLUS.
13697 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13698 (processor_target_table): Add "goldmont-plus".
13699 (PTA_GOLDMONT_PLUS): Define.
13700 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13701 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13702 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13703 (fold_builtin_cpu): Add "goldmont-plus".
13704 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13705 (ix86_option_override_internal): Add "goldmont-plus".
13706 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13707 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13708 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13709 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13711 2018-05-17 Richard Biener <rguenther@suse.de>
13713 PR tree-optimization/85757
13714 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13715 remove defs that only feed that PHI from further processing.
13717 2018-05-16 Jim Wilson <jimw@sifive.com>
13719 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13721 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13723 2018-05-16 Mark Wielaard <mark@klomp.org>
13725 * dwarf2out.c (count_index_strings): New function.
13726 (output_indirect_strings): Call count_index_strings and generate
13727 header for dwarf_version >= 5.
13729 2018-05-16 Mark Wielaard <mark@klomp.org>
13731 * dwarf2out.c (dwarf_FORM): New function.
13732 (set_indirect_string): Use dwarf_FORM.
13733 (reset_indirect_string): Likewise.
13734 (size_of_die): Likewise.
13735 (value_format): Likewise.
13736 (output_die): Likewise.
13737 (add_skeleton_AT_string): Likewise.
13738 (output_macinfo_op): Likewise.
13739 (index_string): Likewise.
13740 (output_index_string_offset): Likewise.
13741 (output_index_string): Likewise.
13742 (count_index_strings): Likewise.
13744 2018-05-16 Carl Love <cel@us.ibm.com>
13746 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13747 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13749 2018-05-16 Martin Jambor <mjambor@suse.cz>
13751 * ipa-prop.c (ipa_free_all_edge_args): Remove.
13752 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13754 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
13756 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13757 (fnma<mode>4): Likewise.
13758 (fms<mode>4): Likewise.
13759 (fnms<mode>4): Likewise.
13760 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13761 (aarch64_fnma<mode>4): Likewise.
13762 (aarch64_fms<mode>4): Likewise.
13763 (aarch64_fnms<mode>4): Likewise.
13764 (aarch64_fnmadd<mode>4): Likewise.
13766 2018-05-16 Jason Merrill <jason@redhat.com>
13768 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
13770 2018-05-16 Richard Biener <rguenther@suse.de>
13772 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13773 (dump_stmt_cost): Declare.
13774 (add_stmt_cost): Dump cost we add.
13775 (add_stmt_costs): New function.
13776 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13777 No longer exported.
13778 (vect_analyze_stmt): Adjust prototype.
13779 (vectorizable_condition): Likewise.
13780 (vectorizable_live_operation): Likewise.
13781 (vectorizable_reduction): Likewise.
13782 (vectorizable_induction): Likewise.
13783 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13784 cost vector to pass to vectorizable_ and record afterwards.
13785 (vect_model_reduction_cost): Take cost vector argument and adjust.
13786 (vect_model_induction_cost): Likewise.
13787 (vectorizable_reduction): Likewise.
13788 (vectorizable_induction): Likewise.
13789 (vectorizable_live_operation): Likewise.
13790 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13791 SLP_TREE_NUMBER_OF_VEC_STMTS.
13792 (vect_analyze_slp_cost_1): Remove.
13793 (vect_analyze_slp_cost): Likewise.
13794 (vect_slp_analyze_node_operations): Take visited args and
13795 a target cost vector. Avoid processing already visited stmt sets.
13796 (vect_slp_analyze_operations): Use a local cost vector to gather
13797 costs and register those of non-discarded instances.
13798 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13799 (vect_schedule_slp_instance): Remove copying of
13800 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
13802 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13803 adding cost. Record cost entry location.
13804 (vect_prologue_cost_for_slp_op): Function to compute cost of
13805 a constant or invariant generated for SLP vect in the prologue,
13806 split out from vect_analyze_slp_cost_1.
13807 (vect_model_simple_cost): Make static. Adjust for SLP costing.
13808 (vect_model_promotion_demotion_cost): Likewise.
13809 (vect_model_store_cost): Likewise, make static.
13810 (vect_model_load_cost): Likewise.
13811 (vectorizable_bswap): Add cost vector arg and adjust.
13812 (vectorizable_call): Likewise.
13813 (vectorizable_simd_clone_call): Likewise.
13814 (vectorizable_conversion): Likewise.
13815 (vectorizable_assignment): Likewise.
13816 (vectorizable_shift): Likewise.
13817 (vectorizable_operation): Likewise.
13818 (vectorizable_store): Likewise.
13819 (vectorizable_load): Likewise.
13820 (vectorizable_condition): Likewise.
13821 (vectorizable_comparison): Likewise.
13822 (can_vectorize_live_stmts): Likewise.
13823 (vect_analyze_stmt): Likewise.
13824 (vect_transform_stmt): Adjust calls to vectorizable_*.
13825 * tree-vectorizer.c: Include gimple-pretty-print.h.
13826 (dump_stmt_cost): New function.
13828 2018-05-16 Richard Biener <rguenther@suse.de>
13830 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13831 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13832 * tree-ssa-dse.c: Include tree-ssa-loop.h.
13833 (check_name): New callback.
13834 (dse_classify_store): Track cycles via a visited bitmap of PHI
13835 defs and simplify handling of in-loop and across loop dead stores
13836 and properly fail for loop-variant refs. Handle byte-tracking with
13837 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13840 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
13842 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13843 (vect_get_mask_type_for_stmt): Likewise.
13844 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13846 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
13847 to determine the statement's vector type and the vector type that
13848 should be used for calculating nunits. Deal with cases in which
13849 the type has to be deferred.
13850 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13851 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13852 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13853 (vect_determine_vf_for_stmt): New functions, split out from...
13854 (vect_determine_vectorization_factor): ...here.
13855 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13856 (vect_get_mask_type_for_stmt): New functions, split out from
13857 vect_determine_vectorization_factor.
13859 2018-05-16 Richard Biener <rguenther@suse.de>
13861 * tree-cfg.c (verify_gimple_assign_ternary): Properly
13862 verify the [VEC_]COND_EXPR embedded comparison.
13864 2018-05-15 Martin Sebor <msebor@redhat.com>
13866 PR tree-optimization/85753
13867 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13868 RECORD_TYPE in addition to ARRAY_TYPE.
13870 2018-05-15 Martin Sebor <msebor@redhat.com>
13872 PR middle-end/85643
13873 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13875 2018-05-15 Richard Biener <rguenther@suse.de>
13877 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13878 add by_clobber_p one. Change algorithm to collect all defs
13879 representing uses we need to walk and try reducing them to
13880 a single one before failing.
13881 (dse_dom_walker::dse_optimize_stmt): Adjust.
13883 2018-05-13 Mark Wielaard <mark@klomp.org>
13885 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13886 (size_of_loc_descr): Likewise.
13887 (output_loc_operands): Likewise.
13888 (output_loc_operands_raw): Likewise.
13889 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13890 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13891 (hash_loc_operands): Likewise.
13892 (compare_loc_operands): Likewise.
13894 2018-05-14 Mark Wielaard <mark@klomp.org>
13896 * dwarf2out.c (count_index_addrs): New function.
13897 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13899 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13901 PR tree-optimization/83648
13902 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13903 return value as malloc candidate.
13905 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13908 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13909 param as true in call to suggest_attribute.
13911 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13913 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13914 -mreadonly-in-sdata.
13916 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13918 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13920 (aarch64_crypto_aesd_fused): Likewise.
13922 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13924 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13925 (movsi_aarch64): Likewise.
13926 (load_pairsi): Likewise.
13927 (load_pairdi): Likewise.
13928 (store_pairsi): Likewise.
13929 (store_pairdi): Likewise.
13930 (load_pairsf): Likewise.
13931 (load_pairdf): Likewise.
13932 (store_pairsf): Likewise.
13933 (store_pairdf): Likewise.
13934 (zero_extend): Likewise.
13935 (trunc): Swap alternatives.
13936 (fcvt_target): Add '?' to prefer w over r.
13938 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13941 * config/i386/i386.md: Disallow non-commutative arithmetics in
13942 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13943 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13944 in the peephole2 before it.
13946 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13948 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13949 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13950 (ix86_handle_option): Handle -mcldemote.
13951 * config.gcc: New header.
13952 * config/i386/cldemoteintrin.h: New file.
13953 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13954 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13956 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13957 OPTION_MASK_ISA_CLDEMOTE.
13958 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13959 (ix86_valid_target_attribute_inner_p): Ditto.
13960 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13961 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13962 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13963 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13964 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13966 * config/i386/i386.opt: Add -mcldemote.
13967 * config/i386/x86intrin.h: New header.
13968 * doc/invoke.texi: Add -mcldemote.
13970 2018-05-14 Richard Biener <rguenther@suse.de>
13972 * doc/match-and-simplify.texi: Adjust :s documentation.
13974 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13976 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13977 intended memcpy size.
13978 (REORDER_45): Likewise.
13980 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13982 * sort.cc: New file.
13983 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13984 * vec.c (qsort_chk): Use gcc_qsort.
13985 * Makefile.in (OBJS-libcommon): Add sort.o.
13986 (build/sort.o): New target. Use it...
13987 (BUILD_RTL): ... here, and...
13988 (build/gencfn-macros): ... here, and...
13989 (build/genmatch): ... here.
13991 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13992 Chung-Ju Wu <jasonwucj@gmail.com>
13994 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13995 * config/nds32/nds32-graywolf.md: New file.
13996 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13997 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13999 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
14000 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
14001 * config/nds32/nds32.md (pipeline_model): Add graywolf.
14002 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
14003 * config/nds32/pipelines.md: Include n15 settings.
14005 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
14006 Chung-Ju Wu <jasonwucj@gmail.com>
14008 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
14009 * config/nds32/nds32-n13.md: New file.
14010 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
14011 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
14013 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
14014 * config/nds32/nds32.md (pipeline_model): Add n13.
14015 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
14016 * config/nds32/pipelines.md: Include n13 settings.
14018 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
14019 Chung-Ju Wu <jasonwucj@gmail.com>
14021 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
14022 * config/nds32/nds32-n10.md: New file.
14023 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
14024 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
14026 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
14027 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
14028 * config/nds32/nds32.md (pipeline_model): Add n10.
14029 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
14030 * config/nds32/pipelines.md: Include n10 settings.
14032 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
14033 Kito Cheng <kito.cheng@gmail.com>
14034 Chung-Ju Wu <jasonwucj@gmail.com>
14036 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
14037 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14038 Add enum values for DSP extension instructions.
14039 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
14041 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
14042 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
14043 New code iterators.
14044 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
14045 * config/nds32/nds32-dspext.md: New file for DSP implementation.
14046 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
14047 * config/nds32/nds32-intrinsic.md: Likewise.
14048 * config/nds32/nds32_intrinsic.h: Likewise.
14049 * config/nds32/nds32-md-auxiliary.c: Likewise.
14050 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
14051 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
14052 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
14053 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
14054 * config/nds32/nds32-protos.h: New declarations for DSP extension.
14055 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
14056 TYPE_DMAC in switch statement.
14057 * config/nds32/nds32.c: New checking and implementation for DSP
14058 extension instructions.
14059 * config/nds32/nds32.h: Likewise.
14060 * config/nds32/nds32.md: Likewise.
14061 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
14062 * config/nds32/predicates.md: Implement new predicates for DSP
14065 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
14067 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
14068 Reformat alternatives and attributes so it is easier to identify
14069 which constraints/attributes go with which instruction.
14070 (mov<mode>_hardfloat32, FMOVE64): Likewise.
14071 (mov<mode>_softfloat32, FMOVE64): Likewise.
14072 (mov<mode>_hardfloat64, FMOVE64): Likewise.
14073 (mov<mode>_softfloat64, FMOVE64): Likewise.
14075 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
14077 * doc/extend.texi (PowerPC Built-in Functions): Rename this
14079 (Basic PowerPC Built-in Functions): The new name of the
14080 subsection previously known as "PowerPC Built-in Functions".
14081 (Basic PowerPC Built-in Functions Available on all Configurations):
14083 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
14084 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
14085 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
14086 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
14088 2018-05-11 Martin Jambor <mjambor@suse.cz>
14091 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
14094 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
14097 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
14099 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
14101 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
14102 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
14103 (ix86_handle_option): Handle -mwaitpkg.
14104 * config.gcc: New header.
14105 * config/i386/cpuid.h (bit_WAITPKG): New bit.
14106 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
14107 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
14109 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14110 OPTION_MASK_ISA_WAITPKG.
14111 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
14112 (ix86_option_override_internal): Add PTA_WAITPKG.
14113 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
14114 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
14115 IX86_BUILTIN_TPAUSE.
14116 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
14117 __builtin_ia32_umwait and __builtin_ia32_tpause.
14118 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
14119 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
14120 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
14121 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
14122 UNSPECV_TPAUSE): New.
14123 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
14124 * config/i386/i386.opt: Add -mwaitpkg.
14125 * config/i386/waitpkgintrin.h: New file.
14126 * config/i386/x86intrin.h: New header.
14127 * doc/invoke.texi: Add -mwaitpkg.
14129 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
14132 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
14134 (cortex-m0): Use armv6s-m isa.
14135 (cortex-m0plus): Likewise.
14136 (cortex-m1): Likewise.
14137 (cortex-m0.small-multiply): Likewise.
14138 (cortex-m0plus.small-multiply): Likewise.
14139 (cortex-m1.small-multiply): Likewise.
14141 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
14142 Jakub Jelinek <jakub@redhat.com>
14144 PR tree-optimization/85692
14145 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
14146 source permute as well.
14148 2018-05-11 Martin Liska <mliska@suse.cz>
14151 * doc/extend.texi: Document LLVM style format for no_sanitize
14154 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
14156 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
14157 mode_supports_vsx_dform_quad to mode_supports_dq_form.
14158 (mode_supports_vsx_dform_quad): Likewise.
14159 (mode_supports_vmx_dform): Move these functions to be next to the
14160 other mode_supports functions.
14161 (mode_supports_dq_form): Likewise.
14162 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
14163 mode_supports_dq_form.
14164 (reg_offset_addressing_ok_p): Likewise.
14165 (offsettable_ok_by_alignment): Likewise.
14166 (rs6000_legitimate_offset_address_p): Likewise.
14167 (legitimate_lo_sum_address_p): Likewise.
14168 (rs6000_legitimize_address): Likewise.
14169 (rs6000_legitimize_reload_address): Likewise.
14170 (rs6000_secondary_reload_inner): Likewise.
14171 (rs6000_preferred_reload_class): Likewise.
14172 (rs6000_output_move_128bit): Likewise.
14174 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
14176 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
14177 Generate SImode target register for null target.
14178 <case IX86_BUILTIN_XGETBV>: Ditto.
14179 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
14180 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
14182 2018-05-10 Carl Love <cel@us.ibm.com>
14184 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14185 dcbtt and dcbtstt if operands[2] is 0.
14187 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
14190 * config/i386/sse.md (usadv64qi): New expander.
14192 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
14194 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
14195 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
14196 -maltivec=be support.
14197 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
14198 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
14199 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
14200 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
14201 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
14202 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
14203 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
14204 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
14205 altivec_vsumsws): Adjust.
14206 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
14207 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
14208 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
14210 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
14211 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
14212 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
14213 (altivec_lve<VI_char>x): Delete expand.
14214 (*altivec_lve<VI_char>x_internal): Rename to...
14215 (altivec_lve<VI_char>x): ... this.
14216 (altivec_lvxl_<mode>): Delete expand.
14217 (*altivec_lvxl_<mode>_internal): Rename to ...
14218 (altivec_lvxl_<mode>): ... this.
14219 (altivec_stvxl_<mode>): Delete expand.
14220 (*altivec_stvxl_<mode>_internal): Rename to ...
14221 (altivec_stvxl_<mode>): ... this.
14222 (altivec_stve<VI_char>x): Delete expand.
14223 (*altivec_stve<VI_char>x_internal): Rename to ...
14224 (altivec_stve<VI_char>x): ... this.
14225 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
14226 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
14227 reduc_plus_scal_<mode>): Adjust.
14228 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
14230 (rs6000_cpu_cpp_builtins): Adjust.
14231 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
14232 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
14233 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
14234 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
14235 -maltivec=be support.
14236 (rs6000_split_vec_extract_var): Adjust.
14237 (rs6000_split_v4si_init): Adjust.
14238 (swap_selector_for_mode): Delete.
14239 (altivec_expand_lvx_be, altivec_expand_stvx_be,
14240 altivec_expand_stvex_be): Delete.
14241 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
14242 -maltivec=be support.
14243 (rs6000_gimple_fold_builtin): Ditto.
14244 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
14246 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
14247 (TARGET_DIRECT_MOVE_64BIT): Adjust.
14248 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
14249 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
14250 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
14251 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
14252 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
14253 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
14254 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
14255 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
14256 anonymous split): Adjust.
14257 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
14258 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
14260 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
14262 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
14263 when --with-gxx-include-dir is also specified.
14264 * configure: Regenerate.
14266 2018-05-09 Jim Wilson <jimw@sifive.com>
14269 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
14270 * config/riscv/t-withmultilib: New.
14271 * config/riscv/withmultilib.h: New.
14272 * doc/install.texi: Document RISC-V --with-multilib-list support.
14274 2018-05-09 Richard Biener <rguenther@suse.de>
14276 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
14278 (vect_bb_vectorization_profitable_p): Adjust. Compute
14279 actual scalar cost using the cost vector and the add_stmt_cost
14282 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
14284 PR rtl-optimization/85645
14285 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
14286 in the REG_CFA_REGISTER note for LR, don't leave it empty.
14288 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
14290 PR rtl-optimization/85645
14291 * shrink-wrap.c (spread_components): Return a boolean saying if
14292 anything was changed.
14293 (try_shrink_wrapping_separate): Iterate spread_components until
14294 nothing changes anymore.
14296 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
14298 PR rtl-optimization/85645
14299 * regrename.c (build_def_use): Also kill the chains that include the
14300 destination of a REG_CFA_REGISTER note.
14302 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
14304 PR rtl-optimization/85645
14305 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
14306 insn that has a REG_CFA_REGISTER note.
14308 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
14310 * cfgexpand.c (expand_clobber): New function.
14311 (expand_gimple_stmt_1): Use it.
14312 * tree-vect-stmts.c (vect_clobber_variable): New function,
14314 (vectorizable_simd_clone_call): ...here.
14315 (vectorizable_store): Emit a clobber either side of an
14316 IFN_STORE_LANES sequence.
14317 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
14319 2018-05-09 Tom de Vries <tom@codesourcery.com>
14322 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
14323 (define_insn "trap_if_false"): Add exit after trap.
14325 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
14327 PR rtl-optimization/85638
14328 * bb-reorder.c: Include common/common-target.h.
14329 (create_forwarder_block): New function extracted from...
14330 (fix_up_crossing_landing_pad): ...here. Rename into...
14331 (dw2_fix_up_crossing_landing_pad): ...this.
14332 (sjlj_fix_up_crossing_landing_pad): New function.
14333 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
14334 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
14335 from both partitions and exit the loop after one iteration.
14337 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
14340 * doc/extend.texi (PowerPC Built-in Functions): Rename this
14342 (Basic PowerPC Built-in Functions): The new name of the
14343 subsection previously known as "PowerPC Built-in Functions".
14344 (Basic PowerPC Built-in Functions Available on all Configurations):
14346 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14348 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14350 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14352 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14355 2018-05-08 Jim Wilson <jimw@sifive.com>
14357 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
14358 (LD_EMUL_SUFFIX): New.
14359 (LINK_SPEC): Use it.
14361 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
14363 * doc/extend.texi (PowerPC Built-in Functions): Rename this
14365 (Basic PowerPC Built-in Functions): The new name of the
14366 subsection previously known as "PowerPC Built-in Functions".
14367 (Basic PowerPC Built-in Functions Available on all Configurations):
14369 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14371 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14373 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14375 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14378 2018-05-08 Jakub Jelinek <jakub@redhat.com>
14381 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
14382 after cmpelim optimization.
14384 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
14386 * config.gcc: Support "goldmont".
14387 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
14388 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14389 PROCESSOR_GOLDMONT.
14390 * config/i386/i386.c (m_GOLDMONT): Define.
14391 (processor_target_table): Add "goldmont".
14392 (PTA_GOLDMONT): Define.
14393 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
14394 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
14395 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
14396 (fold_builtin_cpu): Add "goldmont".
14397 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
14398 (ix86_option_override_internal): Add "goldmont".
14399 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
14400 (processor_type): Add PROCESSOR_GOLDMONT.
14401 * config/i386/i386.md: Add CPU "glm".
14402 * config/i386/glm.md: New file.
14403 * config/i386/x86-tune.def: Add m_GOLDMONT.
14404 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
14406 2018-05-08 Jakub Jelinek <jakub@redhat.com>
14409 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
14411 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
14412 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
14413 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
14416 * config/i386/i386.c (ix86_fold_builtin): Handle
14417 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
14420 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
14421 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
14423 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
14426 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
14427 (check_arch): Likewise.
14428 (check_fpu): Return the result rather than printing it.
14429 (end arch): Fix operator precedence.
14430 (end cpu): Likewise.
14431 (END): Print the result from check_fpu.
14433 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14434 Alan Hayward <alan.hayward@arm.com>
14435 David Sherwood <david.sherwood@arm.com>
14437 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
14438 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
14439 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
14440 (*fcmuo<mode>_and): New patterns.
14442 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14444 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
14445 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
14446 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
14447 (cmp_op, sve_imm_con): New code attributes.
14448 (SVE_COND_INT_CMP, imm_con): Delete.
14449 (cmp_op): Remove above unspecs from int attribute.
14450 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
14452 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
14453 comparison-specific unspecs.
14454 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
14455 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
14456 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
14457 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
14458 (*vec_fcm<cmp_op><mode>): Rename to...
14459 (*fcm<cmp_op><mode>): ...this and adjust likewise.
14460 (*vec_fcmuo<mode>): Rename to...
14461 (*fcmuo<mode>): ...this and adjust likewise.
14462 (*pred_fcm<cmp_op><mode>): New pattern.
14463 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
14464 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
14466 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
14468 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
14469 (aarch64_emit_sve_predicated_cond): New function.
14470 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
14471 (aarch64_emit_unspec_cond_or): Replace with...
14472 (aarch64_emit_sve_or_conds): ...this new function. Use
14473 aarch64_emit_sve_ptrue_op for the individual comparisons and
14474 aarch64_emit_binop to OR them together.
14475 (aarch64_emit_inverted_unspec_cond): Replace with...
14476 (aarch64_emit_sve_inverted_cond): ...this new function. Use
14477 aarch64_emit_sve_ptrue_op for the comparison and
14478 aarch64_emit_unop to invert the result.
14479 (aarch64_expand_sve_vec_cmp_float): Update after the above
14480 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
14482 2018-05-07 Nathan Sidwell <nathan@acm.org>
14484 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
14485 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
14486 (Backwards Compatibility): Likewise.
14488 2018-05-07 Luis Machado <luis.machado@linaro.org>
14492 2018-05-07 Luis Machado <luis.machado@linaro.org>
14494 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14495 <prefetch_dynamic_strides>: New const bool field.
14496 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14497 prefetch_dynamic_strides.
14498 (exynosm1_prefetch_tune): Likewise.
14499 (thunderxt88_prefetch_tune): Likewise.
14500 (thunderx_prefetch_tune): Likewise.
14501 (thunderx2t99_prefetch_tune): Likewise.
14502 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14504 (aarch64_override_options_internal): Update to set
14505 PARAM_PREFETCH_DYNAMIC_STRIDES.
14506 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14507 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14508 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14509 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14510 prefetch-dynamic-strides setting.
14512 2018-05-07 Luis Machado <luis.machado@linaro.org>
14514 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14515 <minimum_stride>: New const int field.
14516 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14517 minimum_stride field.
14518 (exynosm1_prefetch_tune): Likewise.
14519 (thunderxt88_prefetch_tune): Likewise.
14520 (thunderx_prefetch_tune): Likewise.
14521 (thunderx2t99_prefetch_tune): Likewise.
14522 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14523 (aarch64_override_options_internal): Update to set
14524 PARAM_PREFETCH_MINIMUM_STRIDE.
14525 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14526 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14527 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14528 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14529 stride is constant and is below the minimum stride threshold.
14531 2018-05-07 Luis Machado <luis.machado@linaro.org>
14533 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
14536 2018-05-07 Luis Machado <luis.machado@linaro.org>
14538 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14539 <prefetch_dynamic_strides>: New const bool field.
14540 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14541 prefetch_dynamic_strides.
14542 (exynosm1_prefetch_tune): Likewise.
14543 (thunderxt88_prefetch_tune): Likewise.
14544 (thunderx_prefetch_tune): Likewise.
14545 (thunderx2t99_prefetch_tune): Likewise.
14546 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14548 (aarch64_override_options_internal): Update to set
14549 PARAM_PREFETCH_DYNAMIC_STRIDES.
14550 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14551 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14552 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14553 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14554 prefetch-dynamic-strides setting.
14556 2018-05-07 Luis Machado <luis.machado@linaro.org>
14558 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14559 <minimum_stride>: New const int field.
14560 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14561 minimum_stride field.
14562 (exynosm1_prefetch_tune): Likewise.
14563 (thunderxt88_prefetch_tune): Likewise.
14564 (thunderx_prefetch_tune): Likewise.
14565 (thunderx2t99_prefetch_tune): Likewise.
14566 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14567 (aarch64_override_options_internal): Update to set
14568 PARAM_PREFETCH_MINIMUM_STRIDE.
14569 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14570 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14571 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14572 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14573 stride is constant and is below the minimum stride threshold.
14575 2018-05-06 Jakub Jelinek <jakub@redhat.com>
14578 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
14579 the type is addressable. Don't force op into register if it has
14582 2018-05-05 Roland McGrath <mcgrathr@google.com>
14585 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
14586 any section for which we don't know a specific type it should have,
14587 regardless of name. Previously this was done only for the exact
14588 names ".init_array", ".fini_array", and ".preinit_array".
14589 (default_elf_asm_named_section): Add comment about
14590 relationship with default_section_type_flags and SECTION_NOTYPE.
14591 (get_section): Don't consider it a type conflict if one side has
14592 SECTION_NOTYPE and the other doesn't, as long as neither has the
14593 SECTION_BSS et al used in the default_section_type_flags logic.
14595 2018-05-05 Tom de Vries <tom@codesourcery.com>
14598 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
14599 (workaround_barsyncs): New function.
14600 (nvptx_reorg): Use workaround_barsyncs.
14601 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14602 (define_expand "nvptx_membar_cta"): New define_expand.
14603 (define_insn "*nvptx_membar_cta"): New insn.
14605 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
14607 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14608 To improve optimization opportunities.
14609 * builtin-types.def: The new needed builtin types for the above.
14611 2018-05-04 Richard Biener <rguenther@suse.de>
14613 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14614 * gimple-ssa-store-merging.c
14615 (imm_store_chain_info::output_merged_store): Remove redundant create,
14616 release split_store vector contents on failure.
14617 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14618 scalar stmt vector on cache hit.
14620 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
14622 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14624 * config.gcc (powerpc-xilinx-eabi*): Remove.
14625 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14627 (fusion_addis_mem_combo_load): Ditto.
14628 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14630 (rs6000_cpu_cpp_builtins): Ditto.
14631 * config/rs6000/rs6000-linux.c
14632 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14633 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14634 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14636 (rs6000_setup_reg_addr_masks): Ditto.
14637 (rs6000_init_hard_regno_mode_ok): Ditto.
14638 (rs6000_option_override_internal): Ditto.
14639 (legitimate_lo_sum_address_p): Ditto.
14640 (rs6000_legitimize_address): Ditto.
14641 (rs6000_legitimize_reload_address): Ditto.
14642 (rs6000_legitimate_address_p): Ditto.
14643 (abi_v4_pass_in_fpr): Ditto.
14644 (setup_incoming_varargs): Ditto.
14645 (rs6000_gimplify_va_arg): Ditto.
14646 (rs6000_split_multireg_move): Ditto.
14647 (rs6000_savres_strategy): Ditto.
14648 (rs6000_emit_prologue_components): Ditto.
14649 (rs6000_emit_epilogue_components): Ditto.
14650 (rs6000_emit_prologue): Ditto.
14651 (rs6000_emit_epilogue): Ditto.
14652 (rs6000_elf_file_end): Ditto.
14653 (rs6000_function_value): Ditto.
14654 (rs6000_libcall_value): Ditto.
14655 * config/rs6000/rs6000.h: Ditto.
14656 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14657 (TARGET_MINMAX): ... this. New.
14658 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14659 * config/rs6000/rs6000.md: Remove Xilinx FP support.
14660 (*movsi_internal1_single): Delete.
14661 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14662 mfpu=, mxilinx-fpu): Delete.
14663 * config/rs6000/singlefp.h: Delete.
14664 * config/rs6000/sysv4.h: Remove Xilinx FP support.
14665 * config/rs6000/t-rs6000: Ditto.
14666 * config/rs6000/t-xilinx: Delete.
14667 * config/rs6000/titan.md: Adjust for fp_type removal.
14668 * config/rs6000/vsx.md: Remove Xilinx FP support.
14669 (VStype_simple): Delete.
14670 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14671 * config/rs6000/xfpu.h: Delete.
14672 * config/rs6000/xfpu.md: Delete.
14673 * config/rs6000/xilinx.h: Delete.
14674 * config/rs6000/xilinx.opt: Delete.
14675 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14676 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14678 2018-05-04 Tom de Vries <tom@codesourcery.com>
14681 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14684 2018-05-04 Richard Biener <rguenther@suse.de>
14686 PR middle-end/85627
14687 * tree-complex.c (update_complex_assignment): We are always in SSA form.
14688 (expand_complex_div_wide): Likewise.
14689 (expand_complex_operations_1): Likewise.
14690 (expand_complex_libcall): Preserve EH info of the original stmt.
14691 (tree_lower_complex): Handle removed blocks.
14692 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14693 on complex multiplication and division libcall builtins.
14695 2018-05-04 Richard Biener <rguenther@suse.de>
14697 PR middle-end/85574
14698 * fold-const.c (negate_expr_p): Restrict negation of operand
14699 zero of a division to when we know that can happen without
14701 (fold_negate_expr_1): Likewise.
14703 2018-05-04 Jakub Jelinek <jakub@redhat.com>
14706 * real.h (real_nextafter): Declare.
14707 * real.c (real_nextafter): New function.
14708 * fold-const-call.c (fold_const_nextafter): New function.
14709 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14710 CASE_CFN_NEXTTOWARD.
14711 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14712 even when arg1_mode is different from arg0_mode.
14714 2018-05-03 Nathan Sidwell <nathan@acm.org>
14716 * doc/extend.texi (Deprecated Features): Remove
14717 -ffriend-injection.
14718 (Backwards Compatibility): Likewise.
14719 * doc/invoke.texi (C++ Language Options): Likewise.
14720 (C++ Dialect Options): Likewise.
14722 2018-05-03 Jakub Jelinek <jakub@redhat.com>
14725 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14726 _mm512_mask_mullox_epi64): New intrinsics.
14728 2018-05-03 Tom de Vries <tom@codesourcery.com>
14731 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14732 dump files): Add offload-tree.
14734 2018-05-03 Richard Biener <rguenther@suse.de>
14736 PR tree-optimization/85615
14737 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14738 to loops not nested in BBs loop father to avoid creating multi-entry
14741 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14743 PR tree-optimization/70291
14744 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14745 arguments. Change return type to tree. Emit libcall as a new
14746 statement rather than replacing existing one when inplace_p is true.
14747 (expand_complex_multiplication_components): New function.
14748 (expand_complex_multiplication): Expand floating-point complex
14749 multiplication using the above.
14750 (expand_complex_division): Rename inner_type parameter to type.
14751 Update expand_complex_libcall call-site.
14752 (expand_complex_operations_1): Update expand_complex_multiplication
14753 and expand_complex_division call-sites.
14755 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14758 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14759 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14760 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14761 the highest significant bit of the shift count mask is clear. In
14762 check whether and[sq]i3 is needed verify that all significant bits
14763 of the shift count other than the highest are set.
14765 2018-05-02 Tom de Vries <tom@codesourcery.com>
14768 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14769 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14770 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14771 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14772 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14773 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14774 __builtin_goacc_parlevel_size.
14776 2018-05-02 Richard Biener <rguenther@suse.de>
14778 PR tree-optimization/85597
14779 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14780 do not use split vect_get_vec_defs call but call vect_get_slp_defs
14783 2018-05-02 Tom de Vries <tom@codesourcery.com>
14786 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14787 dump files): Add ltrans-tree.
14789 2018-05-02 Tom de Vries <tom@codesourcery.com>
14792 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14793 dump files): Add wpa-ipa.
14795 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
14797 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
14798 powerpc*-*-linux*paired* target.
14799 * config/rs6000/750cl.h: Delete.
14800 * config/rs6000/paired.h: Delete.
14801 * config/rs6000/paired.md: Delete.
14802 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14804 * config/rs6000/rs6000-builtin.def: Remove paired float support.
14805 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14806 comment. Remove paired float support.
14807 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14808 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14810 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14811 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14813 * config/rs6000/rs6000.c: Remove paired float support.
14814 (paired_expand_vector_init, paired_expand_vector_move,
14815 paired_emit_vector_compare, paired_emit_vector_cond_expr,
14816 (paired_expand_lv_builtin, paired_expand_stv_builtin,
14817 paired_expand_builtin, paired_expand_predicate_builtin,
14818 paired_init_builtins): Delete.
14819 * config/rs6000/rs6000.h: Remove paired float support.
14820 * config/rs6000/rs6000.md: Remove paired float support.
14821 (move_from_CR_ov_bit): Delete.
14822 * config/rs6000/rs6000.opt (mpaired): Delete.
14823 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14824 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14826 2018-05-02 Richard Biener <rguenther@suse.de>
14828 PR middle-end/85567
14829 * gimplify.c (gimplify_save_expr): When in SSA form allow
14830 SAVE_EXPRs to compute to SSA vars.
14832 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14835 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14836 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14837 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14838 clobber operands[2], instead use a new pseudo. Formatting fixes.
14840 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
14842 PR tree-optimization/85586
14843 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14844 exit early for statements in the same group if the accesses are
14847 2018-05-02 Tom de Vries <tom@codesourcery.com>
14850 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14853 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
14855 PR tree-optimization/85143
14856 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14858 2018-05-01 Tom de Vries <tom@codesourcery.com>
14861 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14862 not found" error message.
14864 2018-05-01 Tom de Vries <tom@codesourcery.com>
14867 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14868 * vec.c (test_ordered_remove_if): New function.
14869 (vec_c_tests): Call test_ordered_remove_if.
14870 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14871 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14872 * tree-vect-patterns.c (vect_pattern_recog_1): Use
14873 VEC_ORDERED_REMOVE_IF.
14875 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14877 PR tree-optimization/82665
14878 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14879 pointer subtraction where arguments come from a memchr call.
14881 2018-05-01 Jakub Jelinek <jakub@redhat.com>
14883 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14884 --push-state --as-needed and --pop-state instead of --as-needed and
14885 --no-as-needed if ld supports it.
14886 * configure: Regenerated.
14889 * doc/install.texi2html: Replace _002d with - and _002a with * in
14890 generated html files using sed.
14892 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14895 * gcc-rich-location.c (blank_line_before_p): New function.
14896 (use_new_line): New function.
14897 (gcc_rich_location::add_fixit_insert_formatted): New function.
14898 * gcc-rich-location.h
14899 (gcc_rich_location::add_fixit_insert_formatted): New function.
14901 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14903 * selftest.c (assert_streq): Rename "expected" and "actual" to
14904 "val1" and "val2". Extend NULL-handling to cover both inputs
14905 symmetrically, while still requiring both to be non-NULL for a pass.
14906 * selftest.h (assert_streq): Rename "expected" and "actual" to
14908 (ASSERT_EQ): Likewise.
14909 (ASSERT_EQ_AT): Likewise.
14910 (ASSERT_KNOWN_EQ): Likewise.
14911 (ASSERT_KNOWN_EQ_AT): Likewise.
14912 (ASSERT_NE): Likewise.
14913 (ASSERT_MAYBE_NE): Likewise.
14914 (ASSERT_MAYBE_NE_AT): Likewise.
14915 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14916 the assertion to pass.
14917 (ASSERT_STREQ_AT): Likewise.
14919 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14921 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14922 interaction with -pie.
14924 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14926 * selftest.h: Fix alphabetization of per-source-file selftest
14929 2018-04-30 Jason Merrill <jason@redhat.com>
14931 PR c++/61982 - dead stores to destroyed objects.
14932 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14935 2018-04-30 Jason Merrill <jason@redhat.com>
14937 * tree.c (build_clobber): New.
14938 * tree.h: Declare it.
14939 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14941 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14943 * diagnostic-show-locus.c (layout::layout): Update for
14944 location_get_source_line returning a char_span.
14945 (struct char_span): Move to input.h.
14946 (struct correction): Update for fields in char_span becoming
14948 (struct source_line): Update for location_get_source_line
14949 returning a char_span.
14950 (layout::print_line): Likewise.
14951 * edit-context.c (edited_file::print_content): Likewise.
14952 (edited_file::print_diff_hunk): Likewise.
14953 (edited_file::print_run_of_changed_lines): Likewise.
14954 (edited_file::get_num_lines): Likewise.
14955 (edited_line::edited_line): Likewise.
14956 * final.c (asm_show_source): Likewise.
14957 * input.c (location_get_source_line): Convert return type
14958 from const char * to char_span, losing the final "line_len"
14960 (dump_location_info): Update for the above.
14961 (get_substring_ranges_for_loc): Likewise. Use a char_span
14962 when handling the literal within the line.
14963 (test_reading_source_line): Update for location_get_source_line
14964 returning a char_span.
14965 * input.h (class char_span): Move here from
14966 diagnostic-show-locus.c, converting from a struct to a class.
14967 Make data members private.
14968 (char_span::operator bool): New.
14969 (char_span::length): New.
14970 (char_span::get_buffer): New.
14971 (char_span::operator[]): New.
14972 (char_span::subspan): Make const.
14973 (char_span::xstrdup): New.
14974 (location_get_source_line): Convert return type from const char *
14975 to char_span, losing the final "line_size" param.
14977 2018-04-30 Jan Hubicka <jh@suse.cz>
14979 * lto-wrapper.c (ltrans_priorities): New static var.
14980 (cmp_priority): New.
14981 (run_gcc): Read priorities and if doing parallel build order
14982 the Makefile by them.
14984 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14986 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14988 2018-04-30 Richard Biener <rguenther@suse.de>
14990 * tree-cfg.c (verify_address): Remove base argument, add
14991 flag whether to check TREE_ADDRESSABLE and do that.
14992 (verify_expr): Remove.
14993 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14994 (verify_gimple_assign_single): Likewise.
14995 (verify_gimple_switch): Likewise.
14996 (verify_expr_location_1): Dereference tp once. Add (disabled)
14997 piece from verify_expr.
14998 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
15000 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
15002 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
15004 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
15006 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
15007 (small_data_pattern): Likewise.
15008 (arc_rewrite_small_data): Likewise.
15009 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
15010 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
15011 (get_symbol_alignment): New function.
15012 (legitimate_small_data_address_p): Likewise.
15013 (legitimate_scaled_address): Update, call
15014 legitimate_small_data_address_p.
15015 (output_sdata): New static variable.
15016 (arc_print_operand): Update how we handle small data operands.
15017 (arc_print_operand_address): Likewise.
15018 (arc_legitimate_address_p): Update, use
15019 legitimate_small_data_address_p.
15020 (arc_rewrite_small_data_p): Remove.
15021 (arc_rewrite_small_data_1): Likewise.
15022 (arc_rewrite_small_data): Likewise.
15023 (small_data_pattern): Likewise.
15024 (compact_sda_memory_operand): Update to use
15025 legitimate_small_data_address_p and get_symbol_alignment.
15026 (prepare_move_operands): Don't rewite sdata pattern.
15027 (prepare_extend_operands): Remove.
15028 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
15030 (zero_extendqisi2): Likewise.
15031 (zero_extendhisi2): Likewise.
15032 (extendqihi2): Likewise.
15033 (extendqisi2): Likewise.
15034 (extendhisi2): Likewise.
15035 (addsi3): Likewise.
15036 (subsi3): Likewise.
15037 (andsi3): Likewise.
15038 * config/arc/constraints.md (Usd): Change it to memory constraint.
15040 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
15042 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
15043 as source of std instructions.
15044 * config/arc/arc.md (movsi_insn): Update pattern predicate to
15045 allow 6-bit constants as source for store instructions.
15046 (movdi_insn): Update instruction pattern to allow 6-bit constants
15047 as source for store instructions.
15049 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
15051 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
15053 2018-04-30 Nathan Sidwell <nathan@acm.org>
15054 Sandra Loosemore <sandra@codesourcery.com>
15056 * dumpfile.c (dump_open): Allow '-' for stdout.
15057 * doc/invoke.texi (Developer Options): Document dump filename
15058 determination early. Document stdin/stdout selection.
15060 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
15062 Microblaze Target: PIC data text relative
15064 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
15065 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
15067 * config/microblaze/microblaze.h (microblaze_constant_address_p):
15068 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
15069 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
15070 New addressing mode for data-text relative position indepenedent code.
15071 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
15072 'ADDRESS_SYMBOLIC_TXT_REL'.
15073 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
15074 (microblaze_legitimate_pic_operand): Exclude function calls from
15075 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
15076 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
15078 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
15079 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
15080 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
15081 for 'address + offset'.
15082 (microblaze_expand_prologue): Add new function prologue call for
15084 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
15085 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
15086 table in case of TARGET_PIC_DATA_TEXT_REL.
15087 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
15088 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
15089 Add new macros 'UNSPEC_TEXT',
15090 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
15091 + exclude function calls from 'UNSPEC_PLT' in case of data text
15093 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
15094 new target hook for generating address diff vector tables in case of
15096 * doc/tm.texi : Regenerate.
15097 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
15098 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
15099 of addr diff vector generation.
15100 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
15101 target hook definition.
15102 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
15103 Add default function for generate_pic_addr_diff_vec -> flag_pic.
15104 * doc/invoke.texi (Add new pic option): Add new microblaze pic
15105 option for data text relative.
15107 2018-04-30 Richard Biener <rguenther@suse.de>
15109 * tree-chrec.h (evolution_function_is_constant_p): Remove
15111 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
15113 2018-04-30 Richard Biener <rguenther@suse.de>
15116 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
15118 2018-04-30 Richard Biener <rguenther@suse.de>
15120 PR tree-optimization/28364
15121 PR tree-optimization/85275
15122 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
15123 copying first exit test.
15125 2018-04-28 Mark Wielaard <mark@klomp.org>
15127 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
15128 dwarf_version >= 5.
15129 (dwarf_AT): Handle DW_AT_addr_base.
15130 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
15132 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
15135 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
15136 (*ashl<dwi>3_doubleword_mask_1): Ditto.
15137 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
15138 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
15140 2018-04-28 Richard Biener <rguenther@suse.de>
15142 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
15143 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
15144 to reflect use. Only add interesting stmts.
15146 2018-04-27 Martin Jambor <mjambor@suse.cz>
15149 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
15150 the jump function allows for passing through aggregate values.
15152 2018-04-27 David Malcolm <dmalcolm@redhat.com>
15154 * input.h (in_system_header_at): Convert from macro to inline
15156 (from_macro_expansion_at): Likewise.
15157 (from_macro_definition_at): Likewise.
15159 2018-04-27 Jeff Law <law@redhat.com>
15161 * config.gcc: Mark tile* targets as deprecated/obsolete.
15163 2018-04-27 Richard Biener <rguenther@suse.de>
15165 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
15168 2018-04-27 Richard Biener <rguenther@suse.de>
15170 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
15172 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
15174 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
15175 with Yd constraint. Set "preferred_for_speed" attribute from
15176 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
15177 with Yd constraint.
15178 (*movdi_internal): Ditto.
15179 (movti_interunit splitters): Remove
15180 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
15181 (movdi_interunit splitters): Ditto.
15182 * config/i386/constraints.md (Ye): Remove.
15183 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
15185 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15188 * config/aarch64/constraints.md (Usg): Limit to 31.
15189 (Usj): Limit to 63.
15191 2018-04-27 Jakub Jelinek <jakub@redhat.com>
15193 PR tree-optimization/85529
15194 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
15195 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
15196 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
15197 zero extension or masking of the MSB bit.
15198 (optimize_range_tests): Add FIRST_BB argument, pass it through
15199 to optimize_range_tests_var_bound.
15200 (maybe_optimize_range_tests, reassociate_bb): Adjust
15201 optimize_range_tests callers.
15203 2018-04-26 Richard Biener <rguenther@suse.de>
15204 Jakub Jelinek <jakub@redhat.com>
15206 * cgraph.h (symbol_table): Just declare debug method here.
15207 * symtab.c (symbol_table::debug): Define.
15209 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
15211 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
15213 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
15215 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
15216 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
15217 (*movdi_internal): Substitute Yi and Yj constraint with x
15218 and Ym and Yn constraint with y constraint. Update "isa"
15219 attribute and set "preferred_for_speed" attribute from
15220 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
15221 (*movsi_internal): Ditto.
15222 (*movdf_internal): Ditto.
15223 (*movsf_internal): Ditto.
15224 (*zero_extendsidi2): Ditto.
15225 * config/i386/sse.md (vec_set<mode>_0): Ditto.
15226 (sse2_loadld): Ditto.
15227 (*vec_extract<ssevecmodelower>_0): Ditto.
15228 (*vec_extractv4si_0_zext_sse4): Ditto.
15229 (vec_concatv2di): Ditto.
15230 (*vec_dup<mode>): Ditto.
15231 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
15232 * config/i386/constraints.md (Yi): Remove.
15237 2018-04-26 Nathan Sidwell <nathan@acm.org>
15239 * dumpfile.c (dump_open): New.
15240 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
15241 (dump_finish): Detect stdio/stderr by value not name.
15243 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
15245 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
15247 2018-04-26 Tom de Vries <tom@codesourcery.com>
15250 * config/nvptx/nvptx.c (verify_neutering_jumps)
15251 (verify_neutering_labels): New function
15252 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
15254 2018-04-26 Tom de Vries <tom@codesourcery.com>
15257 * config/nvptx/nvptx.c (needs_neutering_p): New function.
15258 (nvptx_single): Use needs_neutering_p to skip over insns that do not
15261 2018-04-26 Richard Biener <rguenther@suse.de>
15262 Tom de Vries <tom@codesourcery.com>
15265 * lto-streamer-out.c (output_function): Fixup loops if required to match
15266 discovery done in the reader.
15268 2018-04-26 Richard Biener <rguenther@suse.de>
15270 PR tree-optimization/85116
15271 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
15272 have a loop exit from the single latch predecessor. Remove
15273 case of header with just condition.
15274 (ch_base::copy_headers): Exclude infinite loops from any
15276 (pass_ch::execute): Record exits.
15278 2018-04-26 Richard Biener <rguenther@suse.de>
15280 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
15281 prologue cost vector and pass it to vect_get_load_cost.
15282 (vect_get_peeling_costs_all_drs): Likewise.
15283 (vect_peeling_hash_get_lowest_cost): Likewise.
15284 (vect_enhance_data_refs_alignment): Likewise.
15286 2018-04-26 Richard Biener <rguenther@suse.de>
15288 PR middle-end/85450
15289 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
15290 checking of integer<->pointer conversions.
15291 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
15292 sign-/zero-extending pointer types.
15293 (expand_omp_for_static_chunk): Likewise.
15295 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
15296 Jean Lee <xiaoyur347@gmail.com>
15298 * config/mips/mips.c (mips_asan_shadow_offset): New function.
15299 (TARGET_ASAN_SHADOW_OFFSET): Define.
15300 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
15301 true for -fsanitize=address.
15303 2018-04-25 Mark Wielaard <mark@klomp.org>
15305 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
15308 2018-04-25 Jakub Jelinek <jakub@redhat.com>
15310 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
15311 than "alu", remove explicit "memory" and "imm_disp" attributes.
15312 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
15314 PR middle-end/85414
15315 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
15316 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
15317 gen_lowpart_no_emit.
15319 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
15322 * config/i386/i386.c (ix86_expand_builtin): Change memory
15323 operand to XI, extend p0 to Pmode.
15324 * config/i386/i386.md: Change unspec volatile and operand
15325 1 mode to XI, change operand 0 mode to P.
15327 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
15329 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
15330 GET_MODE_MASK before any checking.
15331 (nds32_can_use_bset_p): Likewise.
15332 (nds32_can_use_btgl_p): Likewise.
15334 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
15336 * config/nds32/nds32-doubleword.md: New define_split pattern for
15337 illegal register number.
15339 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
15341 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
15343 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
15345 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
15347 2018-04-25 Richard Biener <rguenther@suse.de>
15349 * lto-streamer.h (LTO_major_version): Bump to 8.
15351 2018-04-25 Jakub Jelinek <jakub@redhat.com>
15353 * BASE-VER: Set to 9.0.0.
15355 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
15357 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
15358 in __abskf2 and __powikf2.
15360 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15363 * config/aarch64/constraints.md (Usg, Usj): New constraints.
15364 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
15365 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
15366 Use the above on operand 2. Reindent.
15367 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
15369 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
15372 * common/config/i386/i386-common.c (ix86_handle_option): Don't
15374 * config/i386/i386.opt (mcet): Removed.
15375 * doc/install.texi: Remove -mcet documentation.
15376 * doc/invoke.texi: Likewise.
15378 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
15381 * doc/install.texi: Remove -mcet from bootstrap-cet.
15383 2018-04-24 Jakub Jelinek <jakub@redhat.com>
15386 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
15387 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
15391 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
15392 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
15393 containing a CONST_VECTOR.
15395 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
15397 * doc/install.texi: Update newlib dependency for nvptx.
15399 2018-04-24 Jakub Jelinek <jakub@redhat.com>
15402 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
15403 instead of INTVAL when shifting x left.
15405 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
15407 PR tree-optimization/85478
15408 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
15409 vect_grouped_store_supported for single element vectors.
15411 2018-04-24 Richard Biener <rguenther@suse.de>
15414 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
15415 load cost increase to the case of non-constant step.
15417 2018-04-24 Jakub Jelinek <jakub@redhat.com>
15420 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
15421 destination if any_malformed_asm.
15423 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
15425 PR middle-end/85496
15426 * expr.c (store_field): In the bitfield case, if the value comes from
15427 a function call and is returned in registers by means of a PARALLEL,
15428 do not change the mode of the temporary unless BLKmode and VOIDmode.
15430 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
15432 PR rtl-optimization/85423
15433 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
15434 dependencies to debug insns when the previous insn is non-debug.
15436 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15438 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
15439 enums into a single definition.
15440 (fls): Fix predicates and printing.
15443 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15445 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
15446 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
15447 and short u6 immediate.
15448 (check_if_valid_sleep_operand): Remove.
15449 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
15451 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15453 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
15454 flag_always_save_lp condition.
15455 * config/nds32/nds32.opt (malways-save-lp): New option.
15457 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15459 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
15460 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
15461 * config/nds32/nds32.h
15462 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
15463 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
15465 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15467 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
15468 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
15470 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15471 Chung-Ju Wu <jasonwucj@gmail.com>
15473 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
15475 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
15476 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
15478 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15480 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
15482 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15484 * config/nds32/nds32-protos.h (nds32_data_alignment,
15485 nds32_local_alignment): Declare.
15486 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
15487 nds32_local_alignment): New functions.
15488 (TARGET_CONSTANT_ALIGNMENT): Define.
15489 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
15491 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15493 * config/nds32/nds32.c
15494 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
15495 (TARGET_MODES_TIEABLE_P): Likewise.
15497 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15499 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
15500 level Ofast and Og.
15502 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
15503 Chung-Ju Wu <jasonwucj@gmail.com>
15505 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15506 for unaligned access.
15507 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15509 * config/nds32/nds32-intrinsic.md: Likewise.
15510 * config/nds32/nds32_intrinsic.h: Likewise.
15511 * config/nds32/nds32.h (nds32_builtins): Likewise.
15512 * config/nds32/nds32.opt (munaligned-access): New option.
15513 * config/nds32/nds32.c (nds32_asm_file_start): Display
15514 flag_unaligned_access status.
15516 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15518 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
15519 -mno-relax is present.
15520 * config/riscv/linux.h (LINK_SPEC): Ditto.
15522 2018-04-20 Martin Sebor <msebor@redhat.com>
15525 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
15527 (gimple_fold_builtin_stxcpy_chk): Same.
15528 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
15530 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
15533 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
15534 __powikf2 when long double is IEEE 128-bit.
15536 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15538 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
15539 step to make sure stack always aligned.
15541 2018-04-20 Carl Love <cel@us.ibm.com>
15544 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
15545 size check for arg0.
15547 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
15548 Tom de Vries <tom@codesourcery.com>
15551 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
15552 Emit insns for calls too.
15553 (nvptx_find_par): Always look for worker-level predecessor insn.
15554 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
15556 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
15557 (nvptx_process_pars): Propagate frames for calls.
15559 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
15562 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
15564 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
15565 (ix86_handle_option): Don't handle OPT_mibt.
15566 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
15568 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
15570 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
15571 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
15572 (ix86_target_macros): Define __CET__ with flag_cf_protection
15573 for -fcf-protection.
15574 * config/i386/i386.c (isa2_opts): Remove -mibt.
15575 * config/i386/i386.h (TARGET_IBT): Removed.
15576 (TARGET_IBT_P): Likewise.
15577 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
15578 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
15579 * config/i386/i386.opt (mcet): Update help message.
15580 (mshstk): Likewise.
15582 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
15583 -mcet as an alias for -mshstk.
15585 2018-04-20 Richard Biener <rguenther@suse.de>
15587 PR middle-end/85475
15588 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
15589 complexity by forcing a single use of the multiply operand.
15591 2018-04-20 Martin Jambor <mjambor@suse.cz>
15594 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
15595 recursion dependency to only apply to non-clones.
15597 2018-04-20 Martin Jambor <mjambor@suse.cz>
15600 * ipa-cp.c (create_specialized_node): Check that clones of
15601 self-recursive edges exist during IPA-CP.
15603 2018-04-19 Toon Moene <toon@moene.org>
15605 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15608 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15610 PR tree-optimization/85467
15611 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15612 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
15613 VECTOR_CST element to type.
15615 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15618 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15619 * config/i386/i386.md (builtin_setjmp_setup): Removed.
15620 (builtin_longjmp): Likewise.
15621 (save_stack_nonlocal): New pattern.
15622 (restore_stack_nonlocal): Likewise.
15624 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15627 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15628 Replace ASM_OUTPUT_LABEL with fprintf.
15630 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15633 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15634 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15635 * config/i386/i386-c.c (ix86_target_macros_internal): Also
15636 define __IBT__ and __SHSTK__ for -fcf-protection.
15637 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15639 (ix86_trampoline_init): Likewise.
15640 (x86_output_mi_thunk): Likewise.
15641 (ix86_notrack_prefixed_insn_p): Likewise.
15642 (ix86_option_override_internal): Don't disallow -fcf-protection.
15643 * config/i386/i386.md (rdssp<mode>): Also enable for
15645 (incssp<mode>): Likewise.
15646 (nop_endbr): Likewise.
15647 * config/i386/i386.opt (mcet): Change help message to built-in
15650 (mshstk): Likewise.
15651 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15652 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
15653 enable CET built-in functions.
15655 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
15657 * common/config/i386/i386-common.c
15658 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15659 OPTION_MASK_ISA_MOVDIRI_UNSET,
15660 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15661 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15662 * config.gcc (movdirintrin.h): New header.
15663 * config/i386/cpuid.h (bit_MOVDIRI,
15664 bit_MOVDIR64B): New bits.
15665 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15667 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15668 (VOID, PVOID, PCVOID)): New function types.
15669 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15670 __builtin_ia32_directstoreu_u64,
15671 __builtin_ia32_movdir64b): New builtins.
15672 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15673 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15675 (ix86_valid_target_attribute_inner_p): Ditto.
15676 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15677 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15678 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15679 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15680 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15681 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15682 (movdiri<mode>, movdir64b_<mode>): New.
15683 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15684 * config/i386/immintrin.h: Include movdirintrin.h.
15685 * config/i386/movdirintrin.h: New file.
15686 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15688 2018-04-19 Richard Biener <rguenther@suse.de>
15690 PR middle-end/85455
15691 * cfg.c (clear_bb_flags): When loop state says we have
15692 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15694 2018-04-19 Richard Biener <rguenther@suse.de>
15696 PR tree-optimization/84737
15697 * tree-vect-data-refs.c (vect_copy_ref_info): New function
15698 copying restrict info.
15699 (vect_setup_realignment): Use it.
15700 * tree-vectorizer.h (vect_copy_ref_info): Declare.
15701 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15702 the first DR to all generated stores.
15703 (vectorizable_load): Likewise for loads.
15705 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15707 PR tree-optimization/85446
15708 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15709 the integral and pointer types to have the same precision.
15711 * doc/install.texi: Document --disable-cet being the default and
15714 2018-04-18 Martin Liska <mliska@suse.cz>
15716 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15719 2018-04-18 Martin Liska <mliska@suse.cz>
15722 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15725 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15726 arguments if they are comparable.
15728 2018-04-18 Martin Liska <mliska@suse.cz>
15731 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15734 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15737 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
15740 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15741 ENDBR after calling __morestack.
15743 2018-04-18 David Malcolm <dmalcolm@redhat.com>
15746 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15747 by using gcc_base_ver to generate a gcc_driver_version, and use
15748 it when generating GCC_DRIVER_NAME.
15749 * configure: Regenerate.
15751 2018-04-18 Jakub Jelinek <jakub@redhat.com>
15754 * config.gcc: Obsolete powerpc*-*-*spe*.
15756 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15759 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15760 (stabstr_D): Change type of unum from unsigned int to
15761 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
15764 2018-04-17 Jim Wilson <jimw@sifive.com>
15767 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15768 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15769 Set arg_pointer_offset after using pretend_args_size.
15771 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15773 PR rtl-optimization/85431
15774 * dse.c (record_store): Ignore zero width stores.
15777 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
15778 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15779 __builtin_stack_restore rather than after it.
15780 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15781 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15782 argument instead of virtual_dynamic_stack_rtx.
15784 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
15786 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15788 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15789 Add note to error message to explain internal mapping of overloaded
15790 built-in function name to non-overloaded built-in function name.
15791 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15794 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15797 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15798 where the inputs overlap with the output.
15800 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15802 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15803 (=v, v) alternative and explicit "memory" attribute.
15804 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
15805 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15807 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15808 "sselog1" type instead of "sselog".
15809 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15810 "sselog". Remove explicit "memory" attribute.
15811 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15812 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15814 (vec_extract_hi_v32hi): Merge all alternatives into one, use
15815 "sselog1" type instead of "sselog". Remove explicit "memory"
15817 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15818 use "sselog1" type instead of "sselog". Remove explicit "memory"
15820 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15821 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15823 (vec_extract_hi_v64qi): Merge all alternatives into one, use
15824 "sselog1" type instead of "sselog". Remove explicit "memory"
15826 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15827 use "sselog1" type instead of "sselog". Remove explicit "memory"
15831 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15833 PR middle-end/85414
15834 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15837 2018-04-17 Martin Jambor <mjambor@suse.cz>
15840 * ipa-cp.c (create_specialized_node): Call
15841 expand_all_artificial_thunks if necessary.
15843 2018-04-17 Martin Liska <mliska@suse.cz>
15846 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15847 in message, remote space in between '_G' and '('.
15849 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15852 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15853 avx512f_vmcmp<mode>3<round_saeonly_name>,
15854 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15855 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15856 avx512f_rndscale<mode><round_saeonly_name>,
15857 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15858 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15859 Use %<iptr>2 instead of %2 for -masm=intel.
15860 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15861 avx512f_vcvttss2usi<round_saeonly_name>,
15862 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15864 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15865 avx512f_vcvttsd2usi<round_saeonly_name>,
15866 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15867 Use %q1 instead of %1 for -masm=intel.
15868 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15869 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15870 of %3 for -masm=intel.
15871 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15873 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15875 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15877 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15878 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15880 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15882 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15883 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15884 %g1 and one with %0 and %1.
15885 (avx512er_vmrcp28<mode><round_saeonly_name>,
15886 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15887 %1 for -masm=intel.
15888 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15889 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15890 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15891 of %0 and %{%4%} for -masm=intel.
15892 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15893 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15894 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15895 order of %0 and %{%5%}%{z%} for -masm=intel.
15897 2018-04-17 Jan Hubicka <jh@suse.cz>
15900 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15902 2018-04-17 Martin Liska <mliska@suse.cz>
15905 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15906 for target_clone error message. Make default implementation
15907 clone to be a local declaration.
15908 (separate_attrs): Add new argument and check for an empty
15910 (expand_target_clones): Handle it.
15911 (ipa_target_clone): Make redirection just for target_clones
15914 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15915 Tom de Vries <tom@codesourcery.com>
15917 PR middle-end/84955
15918 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15919 tiled basic blocks without omp continue statements.
15921 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15924 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15925 vec_extract expression as having side effects to make sure it gets
15928 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15931 * config/i386/i386.c (get_builtin_code_for_version): Check
15934 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15937 * config.gcc: Support "skylake".
15938 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15940 * config/i386/i386.c (m_SKYLAKE): Define.
15941 (processor_target_table): Add "skylake".
15942 (ix86_option_override_internal): Add "skylake".
15943 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15944 PROCESSOR_CANNONLAKE.
15945 (get_builtin_code_for_version): Fix priority for
15946 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15947 PROCESSOR_SKYLAKE-AVX512.
15948 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15949 (processor_type): Add PROCESSOR_SKYLAKE.
15951 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15952 Jason Merrill <jason@redhat.com>
15955 * convert.c (convert_to_integer_1): Use direct recursion for
15956 enumeral types and types with a precision less than the number
15957 of bits in their mode.
15959 2018-04-16 Julia Koval <julia.koval@intel.com>
15962 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15963 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15965 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15968 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15969 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15970 and -mno-direct-move.
15972 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15975 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15976 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15977 Ensure negative shifts result in {0}.
15979 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15981 PR rtl-optimization/79916
15982 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15983 regs (if any) to define how to gnerate SD moves when LRA is in
15986 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15988 PR rtl-optimization/85393
15989 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15990 * except.c (expand_dw2_landing_pad_for_region): Make static.
15991 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15992 a label and unconditional jump to old_bb, rather than
15993 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15996 PR rtl-optimization/85376
15997 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15998 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15999 instead of a specific value.
16001 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
16002 Bin Cheng <bin.cheng@arm.com>
16004 PR tree-optimization/82965
16005 PR tree-optimization/83991
16006 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
16007 by_profile_only parameter.
16008 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
16009 information if the loop was predicted to iterate too many times.
16010 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
16012 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
16015 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
16018 2018-04-13 Martin Liska <mliska@suse.cz>
16019 Jakub Jelinek <jakub@redhat.com>
16021 PR middle-end/81657
16022 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
16023 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
16024 * builtins.c (expand_builtin_memory_copy_args): Use
16025 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
16026 handle dest_addr == pc_rtx.
16028 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
16031 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
16032 asked to not generate direct moves.
16033 (fix_trunc<mode>si2_stfiwx): Similar.
16034 (fix_trunc<mode>si2_internal): Similar.
16036 2018-04-12 Jakub Jelinek <jakub@redhat.com>
16039 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
16040 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
16041 lookup if dest in some wider mode is known to be const0_rtx and
16042 if so, record permanent equivalence for it to be ZERO_EXTEND of
16043 the narrower mode destination.
16045 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
16047 * lto-streamer-out.c (output_function): Revert 259346.
16048 * omp-expand.c (expand_oacc_for): Likewise.
16050 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
16052 PR rtl-optimization/85354
16053 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
16054 * sel-sched.c (sel_global_init): ... here.
16056 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
16059 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
16060 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
16061 mode for PE-COFF targets.
16062 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
16063 (i386_pe_asm_lto_end): Likewise.
16064 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
16065 (TARGET_ASM_LTO_END): Likewise.
16066 * config/i386/winnt.c (saved_debug_info_level): New static variable.
16067 (i386_pe_asm_lto_start): New function.
16068 (i386_pe_asm_lto_end): Likewise.
16070 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
16071 Richard Biener <rguenther@suse.de>
16073 PR middle-end/84955
16074 * lto-streamer-out.c (output_function): Fix CFG loop state before
16076 * omp-expand.c (expand_oacc_for): Handle calls to internal
16077 functions like regular functions.
16079 2018-04-12 Richard Biener <rguenther@suse.de>
16082 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
16083 for the early LTO debug to properly generate references to it
16084 during DIE emission. Do not re-use that for the skeleton for
16086 (dwarf2out_early_finish): Likewise.
16088 2018-04-12 Jakub Jelinek <jakub@redhat.com>
16091 * config/i386/sse.md
16092 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
16093 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
16094 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
16095 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
16096 and output is a reg, avoid creating invalid lowpart subreg, but
16097 instead split into a 512-bit move. Don't split if not AVX512VL,
16098 input is xmm16+ reg and output is a mem.
16099 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
16100 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
16101 xmm16+ reg and output is a mem.
16103 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16105 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
16106 also for flag_dwarf2_cfi_asm.
16108 2018-04-12 Jakub Jelinek <jakub@redhat.com>
16110 PR rtl-optimization/85342
16111 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
16112 a bool scalar var inside of the loop instead. Don't try to update
16113 recog_data.operand after failed apply_change_group.
16115 2018-04-12 Tom de Vries <tom@codesourcery.com>
16118 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
16119 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
16120 array with flexible array member as array without given dimension.
16121 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
16122 argument for undefined param to true.
16124 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
16127 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16128 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
16129 from PowerPC section.
16130 * config/rs6000/sysv4.opt (mcall-): Improve help text.
16131 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
16132 help text that is too long.
16133 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
16134 help text that is too long.
16135 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
16136 help text that is too long.
16138 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
16140 * config/alpha/alpha.md (stack_probe_internal): Rename
16141 from "probe_stack". Update all callers.
16143 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
16145 PR rtl-optimization/84566
16146 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
16147 sched_macro_fuse_insns.
16149 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
16152 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
16153 (compute_block_dependences): ... from here.
16155 2018-04-11 Jakub Jelinek <jakub@redhat.com>
16157 PR tree-optimization/85331
16158 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
16159 from int to HOST_WIDE_INT.
16161 2018-04-11 Martin Jambor <mjambor@suse.cz>
16164 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
16165 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
16166 not the same as the source val.
16167 (cgraph_edge_brings_value_p): New parameter.
16168 (gather_edges_for_value): Pass destination value to
16169 cgraph_edge_brings_value_p.
16170 (perhaps_add_new_callers): Likewise.
16171 (get_info_about_necessary_edges): Likewise and exclude values brought
16172 only by self-recursive edges.
16173 (create_specialized_node): Redirect only clones of self-calling edges.
16174 (+self_recursive_pass_through_p): New function.
16175 (find_more_scalar_values_for_callers_subset): Use it.
16176 (find_aggregate_values_for_callers_subset): Likewise.
16177 (known_aggs_to_agg_replacement_list): Removed.
16178 (decide_whether_version_node): Re-calculate known constants for all
16179 remaining context clones.
16181 2018-04-11 Richard Biener <rguenther@suse.de>
16184 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
16185 from early DWARF output.
16186 (dwarf2out_early_finish): Output line info unconditionally into
16187 early DWARF and add reference to it.
16189 2018-04-11 Jakub Jelinek <jakub@redhat.com>
16192 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
16193 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
16194 other than V2DFmode using iptr mode attribute.
16195 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
16197 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
16199 PR rtl-optimization/84659
16200 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
16202 2018-04-11 Jakub Jelinek <jakub@redhat.com>
16205 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
16207 (output_loc_list): Pass address of a dummy size variable even in the
16208 locview handling loop.
16209 (index_location_lists): Add comment on why skip_loc_list_entry can't
16212 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
16215 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
16218 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
16221 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16222 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
16223 and -mstring-compare-inline-limit.
16225 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
16228 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
16229 for stack clash protection in a register whenever we need it to be in
16232 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
16234 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
16235 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
16237 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
16240 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
16242 (mlong-double-): Ditto.
16243 * config/rs6000/sysv4.opt (msdata=): Ditto.
16244 (mtls-size=): Ditto.
16246 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16248 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16249 erroneous entries for
16250 "vector int vec_ldl (int, long int *)", and
16251 "vector unsigned int vec_ldl (int, unsigned long int *)".
16252 Add comments and entries for
16253 "vector bool char vec_ldl (int, bool char *)",
16254 "vector bool short vec_ldl (int, bool short *)",
16255 "vector bool int vec_ldl (int, bool int *)",
16256 "vector bool long long vec_ldl (int, bool long long *)",
16257 "vector pixel vec_ldl (int, pixel *)",
16258 "vector long long vec_ldl (int, long long *)",
16259 "vector unsigned long long vec_ldl (int, unsigned long long *)".
16260 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
16261 type tree bool_long_long_type_node and correct definition of
16262 bool_V2DI_type_node to make reference to this new type tree.
16263 (rs6000_mangle_type): Replace erroneous reference to
16264 bool_long_type_node with bool_long_long_type_node.
16265 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
16266 comments to emphasize sign distinctions for char and int types and
16267 replace RS6000_BTI_bool_long constant with
16268 RS6000_BTI_bool_long_long constant. Also add comment to restrict
16269 use of RS6000_BTI_pixel.
16270 (bool_long_type_node): Remove this macro definition.
16271 (bool_long_long_type_node): New macro definition
16273 2018-04-10 Jakub Jelinek <jakub@redhat.com>
16275 PR rtl-optimization/85300
16276 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
16277 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
16278 simplify_unary_operation fails.
16280 2018-04-10 Martin Liska <mliska@suse.cz>
16282 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
16283 cgraph_edge and ipa_ref.
16285 2018-04-10 Jakub Jelinek <jakub@redhat.com>
16289 * config/i386/sse.md
16290 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
16291 computation of the VEC_MERGE selector from mask.
16292 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
16293 Fix decoding of the VEC_MERGE selector into mask.
16295 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
16297 PR tree-optimization/85286
16298 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
16300 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
16302 * final.c (final_1): Set insn_last_address as well as
16303 insn_current_address.
16305 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16308 * explow.c (emit_stack_probe): Call validize_mem on memory location
16309 before passing it to gen_probe_stack. Create address operand and
16310 legitimize it for the probe_stack_address case.
16312 2018-04-09 Jan Hubicka <jh@suse.cz>
16315 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
16316 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
16317 * tree.c (free_lang_data_in_type): Fix handling of binfos;
16319 (free_lang_data): Rebuild type inheritance graph.
16321 2018-04-09 Martin Sebor <msebor@redhat.com>
16323 * invoke.texi (-finline-small-functions): Mention other optimization
16325 (-findirect-inlining, -fpartial-inlining): Same.
16326 (-finline-functions-called-once): Same.
16327 (-freorder-blocks-and-partition): Same.
16329 2018-04-09 Jan Hubicka <jh@suse.cz>
16332 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
16333 jumps; choose last target that matches the criteria (i.e.
16334 no partition changes for non-crossing jumps).
16335 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
16336 support for redirecting crossing jumps to non-crossing.
16338 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
16340 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
16341 also for naked functions.
16343 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
16345 * config/arc/arc.md (add_shift): New pattern.
16346 (add_shift2): Likewise.
16347 (sub_shift): Likewise.
16348 (sub_shift_cmp0_noout): Likewise.
16349 (compare_si_ashiftsi): Likewise.
16350 (xbfu_cmp0_noout): New combine pattern.
16351 (xbfu_cmp0"): Likewise.
16352 (movsi_set_cc_insn): Place the predicable variant first.
16353 (commutative_binary_cmp0_noout): Remove clobber.
16354 (commutative_binary_cmp0): New pattern.
16355 (noncommutative_binary_cmp0): Likewise.
16356 (noncommutative_binary_cmp0_noout): Likewise.
16357 (noncommutative_binary_comparison_result_used): Removed.
16358 (rsub_cmp0): New pattern.
16359 (rsub_cmp0_noout): Likewise.
16360 (extzvsi): Changed, keep only meaningful variants.
16361 (SQH, SEZ): New iterators.
16362 (SQH_postfix): New mode attribute.
16363 (SEZ_prefix): New code attribute.
16364 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
16365 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
16366 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
16367 of numerical value.
16368 (noncommutative_operator): Check the availability of barrel
16371 2018-04-09 Richard Biener <rguenther@suse.de>
16373 PR tree-optimization/85284
16374 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
16375 Only use the niter constraining form of simple_iv when the exit
16376 is always executed.
16378 2018-04-09 Tom de Vries <tom@codesourcery.com>
16381 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16382 (define_expand "*memory_barrier"): New define_expand.
16383 (define_insn "memory_barrier"): New insn.
16385 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16387 PR rtl-optimization/80463
16388 PR rtl-optimization/83972
16389 PR rtl-optimization/83480
16391 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
16392 correct producer for the insn.
16393 (tidy_control_flow): Fixup seqnos in case of debug insns.
16395 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16397 PR rtl-optimization/83913
16399 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
16400 different sched-times when merging exprs.
16402 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16404 PR rtl-optimization/83962
16406 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
16407 tidy_fallthru_edge and tidy_control_flow.
16409 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16411 PR rtl-optimization/83530
16413 * sel-sched.c (force_next_insn): New global variable.
16414 (remove_insn_for_debug): When force_next_insn is true, also leave only
16415 next insn in the ready list.
16416 (sel_sched_region): When the region wasn't scheduled, make another pass
16417 over it with force_next_insn set to 1.
16419 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16421 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
16423 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16424 for interrupt control.
16425 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16426 functions for interrupt control.
16427 * config/nds32/nds32-intrinsic.md: Likewise.
16428 * config/nds32/nds32_intrinsic.h: Likewise.
16429 * config/nds32/nds32.h (nds32_builtins): Likewise.
16431 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16433 * config/nds32/nds32.c (nds32_init_machine_status,
16434 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
16435 strict_aligned_p field.
16436 (nds32_expand_to_rtl_hook): New function.
16437 (TARGET_EXPAND_TO_RTL_HOOK): Define.
16438 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
16440 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16441 Chung-Ju Wu <jasonwucj@gmail.com>
16443 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
16444 * config/nds32/nds32-n7.md: New file.
16445 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
16446 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
16448 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
16449 * config/nds32/nds32.md (pipeline_model): Add n7.
16450 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
16451 * config/nds32/pipelines.md: Include n7 settings.
16453 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16454 Chung-Ju Wu <jasonwucj@gmail.com>
16456 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
16457 * config/nds32/nds32-e8.md: New file.
16458 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
16459 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
16461 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
16462 * config/nds32/nds32.md (pipeline_model): Add e8.
16463 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
16464 * config/nds32/pipelines.md: Include e8 settings.
16466 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16467 Chung-Ju Wu <jasonwucj@gmail.com>
16469 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
16470 * config/nds32/nds32-n8.md: New file.
16471 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
16472 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
16474 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
16475 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
16476 * config/nds32/nds32.md (pipeline_model): Add n8.
16477 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
16478 * config/nds32/pipelines.md: Include n8 settings.
16480 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16481 Chung-Ju Wu <jasonwucj@gmail.com>
16483 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
16484 * config/nds32/nds32-n9-2r1w.md: New file.
16485 * config/nds32/nds32-n9-3r2w.md: New file.
16486 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
16487 nds32_register_ports): New or modify for cpu n9.
16488 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
16490 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
16491 * config/nds32/nds32-utils.c: New file.
16492 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
16493 TARGET_MUL_SLOW): Define.
16494 * config/nds32/nds32.md (pipeline_model): New attribute.
16495 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
16496 New options that support cpu n9.
16497 * config/nds32/pipelines.md: Include n9 settings.
16498 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
16500 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16502 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
16503 information if necessary.
16504 (output_cond_branch_compare_zero): Likewise.
16505 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
16506 (nds32_target_alignment): Refine for alignment.
16507 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
16508 (FUNCTION_BOUNDARY): Modify.
16509 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
16511 * config/nds32/nds32.opt (malways-align, malign-functions): New.
16513 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16515 * config/nds32/constants.md (unspec_volatile_element): Add values for
16516 TLB operation and data prefetch.
16517 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16518 functions for TLB operation and data prefetch.
16519 * config/nds32/nds32-intrinsic.md: Likewise.
16520 * config/nds32/nds32_intrinsic.h: Likewise.
16521 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
16522 (nds32_print_operand): Likewise.
16523 * config/nds32/nds32.h (nds32_builtins): Likewise.
16525 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
16526 Andrew Pinski <pinsika@gcc.gnu.org>
16528 PR middle-end/82976
16529 * match.pd: Use constant_boolean_node of correct type instead of
16530 boolean_true_node or boolean_false_node for simplifying
16531 pointer comparisons to zero.
16533 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16535 PR tree-optimization/80021
16536 * tree.c (verify_type_variant): Make error call in verify_variant_match
16537 translatable and remove final full stop.
16539 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16541 * config/nds32/constants.md (unspec_volatile_element): Add
16542 UNSPEC_VOLATILE_EH_RETURN.
16543 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
16544 nds32_output_stack_pop): Support dwarf exception handling process.
16545 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
16546 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
16547 exception handling process.
16548 (nds32_compute_stack_frame): Likewise.
16549 (nds32_return_addr_rtx): Likewise.
16550 (nds32_initial_elimination_offset): Likewise.
16551 (nds32_expand_prologue): Likewise.
16552 (nds32_expand_epilogue): Likewise.
16553 (nds32_dynamic_chain_address): New function.
16554 * config/nds32/nds32.h (machine_function): Add fields for dwarf
16555 exception handling.
16556 (DYNAMIC_CHAIN_ADDRESS): Define.
16557 (EH_RETURN_DATA_REGNO): Define.
16558 (EH_RETURN_STACKADJ_RTX): Define.
16559 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
16560 patterns for dwarf exception handling.
16562 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16564 * config/nds32/nds32.h: Clean up obsolete macros.
16566 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16568 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16569 Add enum values for particular instructions.
16570 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16571 particular intrinsic functions.
16572 * config/nds32/nds32-intrinsic.md: Likewise.
16573 * config/nds32/nds32_intrinsic.h: Likewise.
16574 * config/nds32/nds32.h (nds32_builtins): Likewise.
16575 * config/nds32/nds32.md (type): Add pbsad and pbsada.
16576 (btst, ave): New patterns for particular instructions.
16578 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16580 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16581 Add enum values for atomic load/store and memory sync.
16582 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
16584 * config/nds32/nds32-intrinsic.md: Likewise.
16585 * config/nds32/nds32_intrinsic.h: Likewise.
16586 * config/nds32/nds32.h (nds32_builtins): Likewise.
16588 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16590 PR tree-optimization/85257
16591 * fold-const.c (native_encode_vector): If not all elts could fit
16592 and off is -1, return 0 rather than offset.
16593 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
16594 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
16595 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
16596 adjust buffer in native_interpret_expr call.
16598 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16600 * config/nds32/constants.md (unspec_volatile_element): Add cache
16601 control enum values.
16602 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
16603 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
16604 * config/nds32/nds32.c (nds32_cctl_names): New.
16605 (nds32_print_operand): Handle cache control register names.
16606 * config/nds32/nds32.h (nds32_builtins): New enum values.
16607 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16609 * config/nds32/nds32.md (type): Add mmu.
16610 * config/nds32/pipelines.md (simple_insn): Add mmu.
16612 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16614 * config/nds32/nds32.md (type): Remove call.
16615 * config/nds32/pipelines.md (simple_insn): Likewise.
16617 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16619 * config/nds32/constants.md (unspec_volatile_element): Add
16620 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16621 UNSPEC_VOLATILE_FMFCFG.
16622 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16623 description for fmfcfg and fmfcsr.
16624 (bdesc_1arg): Add fmtcsr.
16625 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16626 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16627 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16628 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16629 unspec_fmfcfg): New patterns.
16630 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16631 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16632 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16633 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16634 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16635 __nds32__fmfcfg): Define.
16637 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16639 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16640 intrinsic register names.
16641 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16642 intrinsic register enum values and macros.
16644 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16646 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16647 for load/store addressing form.
16648 (nds32_print_operand_address): Likewise.
16650 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
16653 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16654 based on LABEL_REF. Remove useless assertion.
16655 (pic_address_needs_scratch): Fix formatting.
16656 (sparc_legitimize_pic_address): Minor tweaks.
16657 (sparc_delegitimize_address): Adjust assertion accordingly.
16658 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16659 into symbolic_operand.
16660 (movsi_high_pic_label_ref): Likewise.
16661 (movsi_lo_sum_pic_label_ref): Likewise.
16662 (movdi_pic_label_ref): Likewise.
16663 (movdi_high_pic_label_ref): Likewise.
16664 (movdi_lo_sum_pic_label_ref): Likewise.
16666 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
16668 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16669 custom LIB_SPEC setup.
16671 2018-04-06 Ruslan Bukin <br@bsdpad.com>
16672 Kito Cheng <kito.cheng@gmail.com>
16674 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16675 * config/riscv/freebsd.h: New.
16677 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16679 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16680 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16683 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16684 Kito Cheng <kito.cheng@gmail.com>
16686 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16687 nds32_output_call, nds32_symbol_binds_local_p): New functions.
16688 * config/nds32/nds32-protos.h (nds32_output_call,
16689 nds32_output_return): Declare.
16690 * config/nds32/nds32.md: Refine all the call and return patterns.
16692 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16695 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16696 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16698 PR rtl-optimization/84872
16699 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16700 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16701 EDGE_CROSSING edge.
16703 2018-04-06 Tamar Christina <tamar.christina@arm.com>
16705 * expr.c (copy_blkmode_to_reg): Revert 254862.
16706 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16708 2018-04-06 Richard Biener <rguenther@suse.de>
16710 PR middle-end/85244
16711 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16712 after seeing a component reference with an adjacent field. Treat
16713 refs to arrays at struct end of external decls similar to
16714 refs to unconstrained commons.
16716 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16719 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16720 look through SAVE_EXPRs with non-side-effects argument. Adjust
16722 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16725 2018-04-06 Richard Biener <rguenther@suse.de>
16727 PR middle-end/85180
16728 * alias.c (find_base_term): New wrapper around find_base_term
16729 unwinding CSELIB_VAL_PTR changes.
16730 (find_base_term): Do not restore CSELIB_VAL_PTR during the
16733 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16735 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16737 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16738 constant definitions.
16739 ("nop"): lr 0,0 -> nopr r0
16740 ("nop_lr0", "nop_lr1"): New insn definitions.
16742 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16744 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16745 NDS32_V3PUSH_AVAILABLE_P macro.
16747 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
16748 Chung-Ju Wu <jasonwucj@gmail.com>
16750 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16751 (nds32*-*-*): Add float and fpu_config into supported_defaults.
16752 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16753 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16754 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16755 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16756 * config/nds32/constraints.md: New constraints and checking for hard
16757 float configuration.
16758 * config/nds32/iterators.md: New mode iterator and attribute for hard
16759 float configuration.
16760 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16762 * config/nds32/nds32-fpu.md: New file.
16763 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16764 deal with hard float code generation.
16765 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16767 (abi_type, float_reg_number): New enum type.
16768 * config/nds32/nds32-predicates.c: New predicates for hard float.
16769 * config/nds32/nds32-protos.h: Declare functions for hard float.
16770 * config/nds32/nds32.c: Implementation for hard float configuration.
16771 * config/nds32/nds32.h: Definitions for hard float configuration.
16772 * config/nds32/nds32.md: Include hard float machine description and
16773 modify patterns for hard float configuration.
16774 * config/nds32/nds32.opt: New options for hard float configuration.
16775 * config/nds32/predicates.md: New predicates for hard float
16778 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16780 * common/config/nds32/nds32-common.c
16781 (nds32_option_optimization_table): Enable -mreleax-hint by default.
16783 2018-04-05 Jakub Jelinek <jakub@redhat.com>
16785 PR middle-end/85195
16786 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16787 CONSTRUCTOR_ELT (ctor, ...)->value.
16789 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
16792 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16794 2018-04-05 Tom de Vries <tom@codesourcery.com>
16797 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16800 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16801 Kito Cheng <kito.cheng@gmail.com>
16803 * config/nds32/constraints.md (U33): Fine-tune checking condition.
16804 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16805 * config/nds32/nds32.h (nds32_16bit_address_type): Add
16806 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16808 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16809 Kito Cheng <kito.cheng@gmail.com>
16811 * config/nds32/constraints.md (Ufe): New memory constraint.
16812 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16813 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16814 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16816 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16817 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16819 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16821 * config/nds32/nds32.md: Use optimize_size in the condition for
16822 alu-shift instructions.
16824 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16826 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16828 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16830 * config/nds32/nds32.md (negsi2): Refine pattern.
16832 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16833 Chung-Ju Wu <jasonwucj@gmail.com>
16835 * config/nds32/iterators.md (shift_rotate): New code iterator.
16836 (shift): New code attribute.
16837 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16838 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16839 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16840 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16841 bit-wise operations.
16842 (andsi3, *andsi3): Ditto.
16843 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16844 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16845 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16846 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16847 nds32_ior_operand, nds32_xor_operand): New predicates.
16849 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16851 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16852 (addsi3, subsi3): ... this.
16854 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16856 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16858 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16860 * config/nds32/nds32.md: Adjust indention.
16862 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16864 * config/nds32/nds32.md (feature): New attribute.
16866 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16868 * config/nds32/nds32.md (subtype): New attribute.
16870 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
16873 * config/arm/arm-builtins.c (arm_expand_builtin): Change
16874 expansion to perform a bitwise AND of the argument followed by a
16875 boolean negation of the result.
16877 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
16879 PR rtl-optimization/84878
16880 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16881 the basic block. Assert the use reference is not artificial and that
16882 it has an associated insn.
16884 2018-04-04 Michael Matz <matz@suse.de>
16886 * builtins.c (compute_objsize): Pass correct operand
16887 to array_at_struct_end_p.
16889 2018-04-04 Richard Biener <rguenther@suse.de>
16892 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16893 from contexts for DINFO_LEVEL_TERSE and below.
16895 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16897 * config/nds32/nds32-doubleword.md (move_<mode>): Require
16898 resiter_operand condition.
16899 * config/nds32/nds32.md (*move<mode>): Ditto.
16901 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16902 Monk Chiang <sh.chiang04@gmail.com>
16904 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16906 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16908 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16910 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16911 Kito Cheng <kito.cheng@gmail.com>
16913 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16914 nds32_cond_code_str, output_cond_branch,
16915 output_cond_branch_compare_zero, nds32_expand_cbranch,
16916 nds32_expand_cstore, nds32_expand_movcc,
16917 nds32_output_cbranchsi4_equality_zero,
16918 nds32_output_cbranchsi4_equality_reg,
16919 nds32_output_cbranchsi4_equality_reg_or_const_int,
16920 nds32_output_cbranchsi4_greater_less_zero: New functions.
16921 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16922 nds32_expand_cstore, nds32_expand_movcc,
16923 nds32_output_cbranchsi4_equality_zero,
16924 nds32_output_cbranchsi4_equality_reg,
16925 nds32_output_cbranchsi4_equality_reg_or_const_int,
16926 nds32_output_cbranchsi4_greater_less_zero): Declare.
16927 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16928 nds32_rimm11s_operand): New predicates.
16929 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16930 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16933 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16935 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16936 * config/nds32/nds32.md: Ditto.
16937 * config/nds32/pipelines.md: Ditto.
16939 2018-04-04 Richard Biener <rguenther@suse.de>
16941 PR tree-optimization/85168
16942 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16943 propagating abnormals.
16945 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16947 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16949 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16950 Kito Cheng <kito.cheng@gmail.com>
16952 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16953 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16954 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16955 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16956 * config/nds32/nds32.md (sibcall_internal): New.
16957 (sibcall_register): Remove.
16958 (sibcall_immediate): Remove.
16959 (sibcall_value_internal): New.
16960 (sibcall_value_register): Remove.
16961 (sibcall_value_immediate): Remove.
16962 * config/nds32/predicates.md (nds32_general_register_operand): New.
16963 (nds32_call_address_operand): New.
16965 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16967 PR rtl-optimization/85167
16968 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16969 bb_defs if *split_p, instead preinitialize it to NULL.
16971 PR tree-optimization/85156
16972 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16973 evaluating the argument multiple times.
16975 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16977 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16979 (_mm_cvtpd_ps): Likewise.
16980 (_mm_cvttpd_epi32): Likewise.
16981 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16982 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16983 vector, pixel, and bool following altivec.h include.
16985 2018-04-03 Martin Sebor <msebor@redhat.com>
16987 * doc/extend.texi (Common Function Attributes): Clarify.
16988 (const attribute): Likewise.
16989 (pure attribute): Likewise.
16991 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16994 * config/i386/i386.c (ix86_expand_vector_set): Use
16995 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16997 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16999 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
17000 instructions when changing rounding bits to preserve precision bits
17001 in the x87 control word.
17003 2018-04-03 Martin Liska <mliska@suse.cz>
17005 PR tree-optimization/82491
17006 * rtl.h (strip_offset_and_add): Replace += suboffset with
17007 poly_uint64 () + suboffset.
17009 2018-03-29 Martin Liska <mliska@suse.cz>
17010 Martin Jambor <mjambor@suse.cz>
17013 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
17014 param_type is not an integral or pointer type.
17016 2018-04-03 Richard Biener <rguenther@suse.de>
17018 * sese.h (recompute_all_dominators): Remove.
17020 2018-04-02 Martin Sebor <msebor@redhat.com>
17022 * doc/invoke.texi (-Wrestrict): Fix typos.
17024 2018-04-02 Jim Wilson <jimw@sifive.com>
17026 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
17027 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
17028 (<optab>di3, <optab>si3_extend): Likewise.
17029 (<optab>si3_mask, <optab>si3_mask_1): New.
17030 (<optab>di3_mask, <optab>di3_mask_1): New.
17031 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
17032 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
17033 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
17035 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
17037 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
17040 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
17042 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
17043 (nds32_canonicalize_comparison): New function.
17045 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
17046 Kito Cheng <kito.cheng@gmail.com>
17047 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17049 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
17050 * config/nds32/constants.md (unspec_volatile_element): Add
17051 UNSPEC_VOLATILE_RELAX_GROUP.
17052 * config/nds32/nds32-relax-opt.c: New file.
17053 * config/nds32/nds32-predicates.c
17054 (nds32_symbol_load_store_p): New function.
17055 * config/nds32/nds32-protos.h
17056 (nds32_symbol_load_store_p): Declare function.
17057 (make_pass_nds32_relax_opt): Declare new rtl pass function.
17058 * config/nds32/nds32.c
17059 (nds32_register_pass): New function to register pass.
17060 (nds32_register_passes): New function to register passes.
17061 * config/nds32/nds32.md (relax_group): New pattern.
17062 * config/nds32/nds32.opt (mrelax-hint): New option.
17063 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
17065 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
17067 * config/nds32/t-nds32: Modify files dependency.
17069 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
17071 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
17072 (PROFILE_HOOK): Define its implementation.
17074 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
17076 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
17077 type and 32-bit size.
17079 2018-04-01 Jakub Jelinek <jakub@redhat.com>
17081 PR middle-end/85090
17082 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
17083 (V_128_256): New mode iterator.
17084 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
17085 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
17086 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
17088 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
17089 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
17091 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
17094 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
17095 NaN inputs correctly.
17097 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
17100 * config/rs6000/vsx.md (??r): New mode attribute.
17101 (*vsx_mov<mode>_64bit): Use it.
17102 (*vsx_mov<mode>_32bit): Likewise.
17104 2018-03-30 Martin Sebor <msebor@redhat.com>
17106 PR tree-optimization/84818
17107 * builtins.c (check_access): Use warning_n.
17109 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17112 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
17114 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
17117 2018-03-30 Julia Koval <julia.koval@intel.com>
17120 * x86-tune.def (movx, partial_reg_dependency): Enable for
17123 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
17125 PR inline-asm/84985
17126 * lra-constraints.c (process_alt_operands): Move setting
17127 this_alternative_matches below.
17129 2018-03-29 Martin Liska <mliska@suse.cz>
17132 * doc/invoke.texi: Document how LTO works with debug info.
17133 Describe auto-load support of binutils. Mention 'x86-64'
17134 as valid option value of -march option.
17136 2018-03-29 Jakub Jelinek <jakub@redhat.com>
17138 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
17141 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
17142 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
17143 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
17146 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
17149 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
17150 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
17151 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
17152 for RS6000_BTM_POWERPC64.
17153 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
17154 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
17155 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
17158 (DIVDEU): Likewise.
17160 2018-03-28 Carl Love <cel@us.ibm.com>
17163 2017-09-27 Carl Love <cel@us.ibm.com>
17165 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
17166 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
17167 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
17170 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17172 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
17173 instead of __vector bool.
17174 (_mm_max_pu8): Likewise.
17175 (_mm_min_pi16): Likewise.
17177 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
17180 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
17181 (DIVWEUO): Likewise.
17182 (DIVDEO): Likewise.
17183 (DIVDEUO): Likewise.
17184 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
17185 DIVWEUO and DIVDEUO.
17186 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
17187 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
17188 (div_extend): Likewise.
17189 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
17191 (__builtin_divweuo): Likewise.
17192 (__builtin_divdeo): Likewise.
17193 (__builtin_divdeuo): Likewise.
17195 2018-03-28 Jakub Jelinek <jakub@redhat.com>
17198 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
17199 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
17201 PR tree-optimization/82004
17202 * gimple-match-head.c (optimize_pow_to_exp): New function.
17203 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
17204 Don't fold to exp if optimize_pow_to_exp is false.
17206 2018-03-28 Martin Liska <mliska@suse.cz>
17209 * calls.c (initialize_argument_information): Fix trailing space.
17210 * common.opt: Fix typo and provide better explanation for
17211 -fsanitize-coverage option.
17212 * config/i386/i386.opt: Fix typo.
17214 2018-03-28 Jakub Jelinek <jakub@redhat.com>
17215 Martin Liska <mliska@suse.cz>
17218 * gimplify.c (asan_poison_variable): Don't do the check for
17219 gimplify_omp_ctxp here.
17220 (gimplify_decl_expr): Do it here.
17221 (gimplify_target_expr): Likewise.
17223 2018-03-28 Martin Liska <mliska@suse.cz>
17226 * config/i386/i386.c (ix86_function_arg_advance): Do not call
17227 chkp_type_bounds_count if MPX is not enabled.
17229 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
17231 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
17233 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
17236 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
17237 function to create the function decl for complex long double
17238 multiply and divide for -mabi=ieeelongdouble.
17239 (init_float128_ieee): Call it.
17241 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
17244 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
17245 -fcf-protection=branch -mibt.
17246 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
17248 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17251 * config/arm/arm.c (arm_valid_symbolic_address): Handle
17252 arm_word_relocations.
17254 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
17257 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
17258 extern array declarations.
17260 2018-03-27 Richard Biener <rguenther@suse.de>
17262 PR middle-end/84067
17263 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
17264 explicit single_use checks.
17266 2018-03-27 Richard Biener <rguenther@suse.de>
17268 PR tree-optimization/85082
17269 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
17272 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17274 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
17275 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
17276 Turn on fasynchronous-unwind-tables and funwind-tables.
17278 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
17281 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
17282 (*bmi_blsr_<mode>_ccz): Ditto.
17284 2018-03-26 Tom de Vries <tom@codesourcery.com>
17286 PR tree-optimization/85063
17287 * omp-general.c (offloading_function_p): New function. Factor out
17289 * omp-offload.c (pass_omp_target_link::gate): ... here.
17290 * omp-general.h (offloading_function_p): Declare.
17291 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
17292 with attribute omp declare target for offloading functions.
17294 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
17296 PR tree-optimization/84005
17297 * tree-data-ref.h (get_base_for_alignment): Declare.
17298 * tree-data-ref.c (get_base_for_alignment_1): New function.
17299 (get_base_for_alignment): Likewise.
17300 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
17301 get_base_for_alignment to find a suitable base object, instead
17302 of always using drb->base_address.
17304 2018-03-23 Jakub Jelinek <jakub@redhat.com>
17306 PR inline-asm/85022
17307 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
17308 known size by default.
17310 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
17312 PR inline-asm/85030
17313 * lra-constraints.c (process_alt_operands): Don't match BLKmode
17314 and non BLKmode operands.
17316 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17319 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
17320 Clean up attributes.
17322 2018-03-23 Richard Biener <rguenther@suse.de>
17325 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
17326 we are going to emit early debug for LTO.
17328 2018-03-23 Jakub Jelinek <jakub@redhat.com>
17330 PR inline-asm/85034
17331 * function.c (match_asm_constraints_1): Don't optimize if input
17332 doesn't satisfy general_operand predicate for output's mode.
17334 PR inline-asm/85022
17335 * alias.c (write_dependence_p): Don't require for x_canonicalized
17336 non-VOIDmode if x has VOIDmode.
17339 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
17340 just don't try to optimize it rather than assert it never happens.
17342 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
17344 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
17345 macro expansions for definition of ST_INTERNAL_<mode> and
17346 LD_INTERNAL_<mode> builtins.
17347 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
17349 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
17351 (altivec_expand_st_builtin): Likewise.
17352 (altivec_expand_builtin): Remove calls to deleted functions.
17353 (rs6000_address_for_altivec): Delete this function.
17354 * config/rs6000/vector.md: Remove expands for
17355 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
17357 2018-03-22 Sudakshina Das <sudi.das@arm.com>
17360 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
17361 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
17362 re-computing once computed.
17363 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
17364 (arm_init_machine_status): Initialize
17365 machine->static_chain_stack_bytes.
17367 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
17370 * doc/extend.texi: Add four new prototypes for vec_ld.
17371 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
17372 definitions for more logical presentation.
17373 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
17374 entries for V1TI variants of __builtin_altivec_ld builtin.
17375 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
17376 handling of V1TI variant of LVX icode pattern.
17377 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
17378 (rs6000_gimple_fold_builtin): Likewise.
17379 (altivec_init_builtins): Add code to define
17380 __builtin_altivec_lvx_v1ti function.
17382 2018-03-22 Jakub Jelinek <jakub@redhat.com>
17384 PR inline-asm/84941
17385 * function.c (match_asm_constraints_1): Don't do the optimization
17386 if input isn't a REG, SUBREG, MEM or constant.
17388 2018-03-22 Tom de Vries <tom@codesourcery.com>
17390 PR tree-optimization/84956
17391 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
17392 bb_has_abnormal_pred.
17394 2018-03-22 Jakub Jelinek <jakub@redhat.com>
17397 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
17398 DECL_INITIAL (decl) to decl at the end.
17399 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
17400 adjust the comment.
17402 2018-03-21 Joseph Myers <joseph@codesourcery.com>
17404 * doc/extend.texi (__builtin_tgmath): Document when complex
17405 integer types are treated as _Complex _Float64.
17407 2018-03-21 Tom de Vries <tom@codesourcery.com>
17409 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
17411 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17413 PR tree-optimization/84960
17414 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
17415 if it is ENTRY block, move them into single succ of ENTRY in that case.
17417 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
17419 PR tree-optimization/84811
17420 * poly-int.h (poly_span_traits): Remove the T3 parameter and
17421 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
17422 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
17423 (known_subrange_p): Update accordingly. Cast each value involved
17424 in the size comparison, rather than casting the result of the
17427 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17429 PR tree-optimization/84982
17430 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
17431 by flipping the least significant bit rather than all bits from
17432 bitpos to bitpos + bitsize - 1.
17434 2018-03-21 Nathan Sidwell <nathan@acm.org>
17436 * doc/extend.texi (Deprecated Features): Remove mention of
17437 long-deleted deprecations.
17439 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17442 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
17443 * configure: Regenerate.
17445 2018-03-21 Tom de Vries <tom@codesourcery.com>
17447 PR tree-optimization/83126
17448 * tree-parloops.c (num_phis): New function.
17449 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
17451 2018-03-21 Nathan Sidwell <nathan@acm.org>
17453 * doc/extend.texi (Deprecated Features): Update deprecated flags,
17454 mention anon-struct/union members and trailing attributes.
17456 2018-03-21 Bin Cheng <bin.cheng@arm.com>
17458 PR tree-optimization/84969
17459 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
17460 builtin memset partitions if they set different rhs values.
17462 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17464 PR rtl-optimization/84989
17465 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
17466 VEC_DUPLICATE with scalar result mode.
17468 2018-03-21 Martin Liska <mliska@suse.cz>
17471 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
17472 not intended return statement.
17474 2018-03-21 Martin Liska <mliska@suse.cz>
17477 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
17478 (chkp_find_bound_slots_1): Limit number of iterations.
17480 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
17483 * Minor grammar fixes for x86 options.
17485 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17488 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
17489 holding REG_CFA_RESTORE notes, instead turn them into a USE.
17491 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
17494 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
17495 (altivec_lvx_<mode>_1op): Likewise.
17496 (altivec_stvx_<mode>_2op): Likewise.
17497 (altivec_stvx_<mode>_1op): Likewise.
17498 (altivec_lvx_<VM2:mode>): New define_expand.
17499 (altivec_stvx_<VM2:mode>): Likewise.
17500 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
17501 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17502 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
17503 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17504 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
17505 (rs6000_gen_lvx): Likewise.
17506 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
17507 (altivec_expand_stv_builtin): Likewise.
17508 (altivec_expand_builtin): Likewise.
17509 * config/rs6000/vector.md: Likewise.
17511 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17514 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
17517 2018-03-20 Richard Biener <rguenther@suse.de>
17520 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
17521 sign-conversions as zero, fall back to standard scalar_stmt
17524 2018-03-20 Martin Liska <mliska@suse.cz>
17527 * predict.c (rebuild_frequencies): Handle case when we have
17528 PROFILE_ABSENT, but flag_guess_branch_prob is false.
17530 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17533 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
17534 flag_section_anchors.
17535 * varasm.c (use_blocks_for_decl_p): Remove hack for
17536 dw2_force_const_mem.
17539 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
17541 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
17542 be created, use lowpart_subreg of operands[0] rather than operands[0]
17544 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
17545 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
17546 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
17547 and n constraint instead of aarch64_shift_imm_di and Usd.
17548 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
17549 (*aarch64_<optab>_reg_minus<mode>3): ... this.
17551 2018-03-20 Sudakshina Das <sudi.das@arm.com>
17554 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
17555 to favor GPR over NEON registers.
17556 (<shift>di3_neon): Likewise.
17558 2018-03-20 Tom de Vries <tom@codesourcery.com>
17561 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
17562 (nvptx_process_pars): Emit bar.sync asap and alap.
17564 2018-03-20 Tom de Vries <tom@codesourcery.com>
17567 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
17568 seen_label if seen_label is already set.
17570 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17573 * config/i386/i386.c (fold_builtin_cpu): For features above 31
17574 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
17575 Use 1U instead of 1. Formatting fixes.
17578 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
17579 instead of TREE_TYPE (s1) for the return value.
17581 2018-03-19 Jakub Jelinek <jakub@redhat.com>
17583 PR tree-optimization/84946
17584 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
17585 bitsize + bitsize in poly_uint64 rather than poly_int64.
17588 * dwarf2asm.c: Include fold-const.c.
17589 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
17590 of decl rather than decl itself.
17592 PR rtl-optimization/84643
17593 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
17595 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
17598 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
17599 calling assemble_variable.
17601 2018-03-19 Sudakshina Das <sudi.das@arm.com>
17604 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17605 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17607 2018-03-19 Jim Wilson <jimw@sifive.com>
17610 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17611 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17612 (riscv_first_stack_step): Likewise.
17613 (riscv_option_override): Use STACK_BOUNDARY instead of
17614 MIN_STACK_BOUNDARY.
17615 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17616 MIN_STACK_BOUNDARY.
17617 (BIGGEST_ALIGNMENT): Set to 128.
17618 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17619 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17622 2018-03-19 Richard Biener <rguenther@suse.de>
17624 PR tree-optimization/84933
17625 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17626 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17628 2018-03-19 Richard Biener <rguenther@suse.de>
17630 PR tree-optimization/84859
17631 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17632 (cond_if_else_store_replacement): Perform sinking operation on
17633 single-store BBs regardless of MAX_STORES_TO_SINK setting.
17634 Generalize what a BB with a single eligible store is.
17636 2018-03-19 Richard Biener <rguenther@suse.de>
17638 PR tree-optimization/84929
17639 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17640 chrec_is_positive against non-chrec arg.
17642 2018-03-19 Tamar Christina <tamar.christina@arm.com>
17645 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17647 2018-03-18 Martin Liska <mliska@suse.cz>
17649 PR rtl-optimization/84635
17650 * regrename.c (build_def_use): Use matches_mode only when
17653 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
17655 PR tree-optimization/84913
17656 * tree-vect-loop.c (vectorizable_reduction): Don't try to
17657 vectorize chains of COND_EXPRs.
17659 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17661 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17663 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17665 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17667 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17669 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17671 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17672 Kito Cheng <kito.cheng@gmail.com>
17674 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17675 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17676 (nds32_adjust_reg_alloc_order): New function.
17677 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17679 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
17681 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17682 nds32_print_operand, nds32_print_operand_address): Use
17683 HOST_WIDE_INT_PRINT_DEC instead.
17685 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17687 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17689 2018-03-17 Jakub Jelinek <jakub@redhat.com>
17692 * config/i386/i386.c (initial_ix86_tune_features,
17693 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17694 unsigned long long.
17695 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17696 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17697 rather than 1u << ix86_tune. Formatting fix.
17698 (ix86_option_override_internal): Change ix86_arch_mask from
17699 unsigned int to unsigned HOST_WIDE_INT, initialize to
17700 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17701 (ix86_function_specific_restore): Likewise.
17703 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17706 * postreload.c (reload_combine_recognize_pattern): Perform
17707 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17708 truncate_int_for_mode the result for the destination's mode.
17711 * hsa-gen.c (mem_type_for_type): Fix comment typo.
17712 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17714 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17717 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
17720 * lra-assigns.c (lra_split_hard_reg_for): Don't use
17721 regno_allocno_class_array and sorted_pseudos.
17722 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17723 insns where regno is used.
17725 2018-03-16 Martin Liska <mliska@suse.cz>
17728 * multiple_target.c (create_dispatcher_calls): Redirect
17729 reference in the symbol table.
17731 2018-03-16 Martin Liska <mliska@suse.cz>
17734 * multiple_target.c (create_dispatcher_calls): Redirect also
17737 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17741 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17742 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17743 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17745 2018-03-16 Julia Koval <julia.koval@intel.com>
17747 * doc/invoke.texi (Skylake Server): Add CLWB.
17748 Cannonlake): Remove CLWB.
17750 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17752 PR tree-optimization/84841
17753 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17755 (FLOAT_ONE_CONST_TYPE): Define.
17756 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17757 (sort_by_operand_rank): Put entries with higher constant_type last
17758 rather than first to match comments.
17760 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
17762 * config/nios2/nios2.md (movsi_internal): Fix thinko in
17765 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17768 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17769 check and use address of target always.
17771 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
17774 * config/i386/i386.c (indirect_thunk_needed): Update comments.
17775 (indirect_thunk_bnd_needed): Likewise.
17776 (indirect_thunks_used): Likewise.
17777 (indirect_thunks_bnd_used): Likewise.
17778 (indirect_return_needed): New.
17779 (indirect_return_bnd_needed): Likewise.
17780 (output_indirect_thunk_function): Add a bool argument for
17782 (output_indirect_thunk_function): Don't generate alias for
17783 function return thunk.
17784 (ix86_code_end): Call output_indirect_thunk_function to generate
17785 function return thunks.
17786 (ix86_output_function_return): Set indirect_return_bnd_needed
17787 and indirect_return_needed instead of indirect_thunk_bnd_needed
17788 and indirect_thunk_needed.
17790 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
17792 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17793 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17794 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17796 2018-03-15 David Malcolm <dmalcolm@redhat.com>
17797 Paul Hua <paul.hua.gm@gmail.com>
17800 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17802 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
17804 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17805 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17806 resp. SFmode cases.
17808 2018-03-15 Tamar Christina <tamar.christina@arm.com>
17811 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17812 instead of GET_MODE_SIZE when comparing Units.
17814 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17817 * varasm.c (hash_section): Return an unchangeble hash value
17818 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17819 Return !aarch64_can_use_per_function_literal_pools_p ().
17821 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17824 * optabs.c (emit_conditional_move): Pass address of cmode's copy
17825 rather than address of cmode as last argument to prepare_cmp_insn.
17827 2018-03-15 Julia Koval <julia.koval@intel.com>
17829 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17830 F_AVX512VNNI, F_AVX512BITALG): New.
17832 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
17835 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
17836 insn for floating-point loads and stores.
17838 2018-03-14 Carl Love <cel@us.ibm.com>
17840 * config/rs6000/rs6000-c.c: Add macro definitions for
17841 ALTIVEC_BUILTIN_VEC_PERMXOR.
17842 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17843 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17844 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17845 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17847 * config/doc/extend.texi: Add prototypes for vec_permxor.
17849 2018-03-14 David Malcolm <dmalcolm@redhat.com>
17852 * diagnostic-show-locus.c (class layout_point): Convert m_line
17853 from int to linenum_type.
17854 (line_span::comparator): Use linenum "compare" function when
17855 comparing line numbers.
17856 (test_line_span): New function.
17857 (layout_range::contains_point): Convert param "row" from int to
17859 (layout_range::intersects_line_p): Likewise.
17860 (layout::will_show_line_p): Likewise.
17861 (layout::print_source_line): Likewise.
17862 (layout::should_print_annotation_line_p): Likewise.
17863 (layout::print_annotation_line): Likewise.
17864 (layout::print_leading_fixits): Likewise.
17865 (layout::annotation_line_showed_range_p): Likewise.
17866 (struct line_corrections): Likewise for field m_row.
17867 (line_corrections::line_corrections): Likewise for param "row".
17868 (layout::print_trailing_fixits): Likewise.
17869 (layout::get_state_at_point): Likewise.
17870 (layout::get_x_bound_for_row): Likewise.
17871 (layout::print_line): Likewise.
17872 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17873 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17874 * input.c (selftest::test_linenum_comparisons): New function.
17875 (selftest::input_c_tests): Call it.
17876 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17877 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17878 * selftest.h (ASSERT_GT): New macro.
17879 (ASSERT_GT_AT): New macro.
17880 (ASSERT_LT): New macro.
17881 (ASSERT_LT_AT): New macro.
17883 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
17885 PR rtl-optimization/84780
17886 * combine.c (distribute_links): Don't make a link based on pc_rtx.
17888 2018-03-14 Martin Liska <mliska@suse.cz>
17890 * tree.c (record_node_allocation_statistics): Use
17891 get_stats_node_kind.
17892 (get_stats_node_kind): New function extracted from
17893 record_node_allocation_statistics.
17894 (free_node): Use get_stats_node_kind.
17896 2018-03-14 Richard Biener <rguenther@suse.de>
17898 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17899 that the value-set of ANTIC_IN doesn't grow.
17902 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17904 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17905 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17907 2018-03-14 Julia Koval <julia.koval@intel.com>
17909 * config.gcc (icelake-client, icelake-server): New.
17911 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17912 (initial_ix86_arch_features): Ditto.
17913 (PTA_SKYLAKE): Add SGX.
17914 (PTA_ICELAKE): Remove.
17915 (PTA_ICELAKE_CLIENT): New.
17916 (PTA_ICELAKE_SERVER): New.
17917 (ix86_option_override_internal): Split up icelake on icelake client and
17919 (get_builtin_code_for_version): Ditto.
17920 (fold_builtin_cpu): Ditto.
17921 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17922 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17923 * config/i386/i386.h (processor_type): Ditto.
17924 * doc/invoke.texi: Ditto.
17926 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17929 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17930 INTEGER_CST offset, add it together with bitpos / 8 and
17931 sign extend based on POINTER_SIZE.
17935 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17938 * config/i386/constraints.md (Yc): New register constraint.
17939 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17940 Use Yc constraint for alternative 2 of operand 0. Remove
17941 preferred_for_speed attribute.
17943 2018-03-14 Richard Biener <rguenther@suse.de>
17945 PR tree-optimization/84830
17946 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17947 with the old one to avoid oscillations.
17949 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17952 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17954 (assign_by_spills): Return a flag of reload assignment failure.
17955 Do not process the reload assignment failures. Do not spill other
17956 reload pseudos if they has the same reg class. Update n if
17958 (lra_assign): Add a return arg. Set up from the result of
17959 assign_by_spills call.
17960 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17961 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17962 usage_insns if it is not NULL.
17963 (spill_hard_reg_in_range): New function.
17964 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17965 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17966 function prototypes.
17967 (lra_assign): Change prototype.
17968 * lra.c (lra): Add code to deal with fails by splitting hard reg
17971 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17973 * config/riscv/riscv.opt (mrelax): New option.
17974 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17975 "norelax" when riscv_mrelax is disabled.
17976 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17978 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17981 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17982 reassociation for int modes.
17984 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17986 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17987 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17989 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17990 * config/aarch64/aarch64-sve.md
17991 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17992 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17993 (*extend<mode><Vwide>2): Rename to...
17994 (aarch64_sve_extend<mode><Vwide>2): ...this.
17995 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17996 renaming the old pattern to...
17997 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17999 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
18000 define_expand, renaming the old pattern to...
18001 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
18002 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
18003 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
18004 account when deciding which SVE instruction the optab should use.
18005 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
18007 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
18009 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
18010 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
18011 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
18012 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
18013 (tlsdesc_small_<mode>): Turn a define_expand and use
18014 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
18015 (tlsdesc_small_advsimd_<mode>): ...this.
18016 (tlsdesc_small_sve_<mode>): New pattern.
18018 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
18020 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
18021 (UNSPEC_UMUL_HIGHPART): New constants.
18022 (MUL_HIGHPART): New int iteraor.
18023 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
18024 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
18026 (*<su>mul<mode>3_highpart): New define_insn.
18028 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18031 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18034 2018-03-13 Martin Liska <mliska@suse.cz>
18037 * (sem_item_optimizer::sem_item_optimizer): Initialize new
18039 (sem_item_optimizer::~sem_item_optimizer): Release it.
18040 (sem_item_optimizer::merge_classes): Register variable aliases.
18041 (sem_item_optimizer::fixup_pt_set): New function.
18042 (sem_item_optimizer::fixup_points_to_sets): Likewise.
18043 * ipa-icf.h: Declare new variables and functions.
18045 2018-03-13 Jakub Jelinek <jakub@redhat.com>
18047 PR middle-end/84834
18048 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
18049 integer_pow2p@2 and test integer_pow2p in condition.
18050 (A < 0 ? C : 0): Similarly for @1.
18052 PR middle-end/84831
18053 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
18054 characters starting at p contain '\0' character, don't look beyond
18058 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
18059 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
18062 * reg-stack.c (change_stack): Change update_end var from int to
18063 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
18064 also call set_block_for_insn on the newly added insns and rescan.
18067 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
18068 on the last operand.
18071 * tree.c (stabilize_reference_1): Return save_expr (e) for
18072 STATEMENT_LIST even if it doesn't have side-effects.
18074 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
18076 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
18078 2018-03-12 Renlin Li <renlin.li@arm.com>
18080 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
18081 aarch64_output_scalar_simd_mov_immediate.
18083 2018-03-12 Martin Sebor <msebor@redhat.com>
18085 PR tree-optimization/83456
18086 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
18087 for perfectly overlapping calls to memcpy.
18088 (gimple_fold_builtin_memory_chk): Same.
18089 (gimple_fold_builtin_strcpy): Handle no-warning.
18090 (gimple_fold_builtin_stxcpy_chk): Same.
18091 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
18093 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
18095 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
18096 parameter. Use it for SFmode.
18097 (rs6000_function_arg_advance_1): Adjust.
18098 (rs6000_function_arg): Adjust.
18099 (rs6000_gimplify_va_arg): Pass false for that new parameter.
18101 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
18103 PR rtl-optimization/84169
18104 PR rtl-optimization/84780
18105 * combine.c (can_combine_p): Check for a 2-insn combination whether
18106 the destination register is used between the two insns, too.
18108 2018-03-12 Richard Biener <rguenther@suse.de>
18110 PR tree-optimization/84803
18111 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
18112 for refs DR analysis didn't process.
18114 2018-03-12 Richard Biener <rguenther@suse.de>
18116 PR tree-optimization/84777
18117 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
18118 force-vectorize loops ignore whether we are optimizing for size.
18120 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
18122 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
18123 (TARGET_MD_ASM_ADJUST): Define.
18125 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
18126 Kito Cheng <kito.cheng@gmail.com>
18127 Chung-Ju Wu <jasonwucj@gmail.com>
18129 * config/nds32/nds32.c (nds32_compute_stack_frame,
18130 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
18131 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
18132 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
18133 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
18134 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
18135 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
18136 * config/nds32/nds32.md (prologue, epilogue): Use macro
18137 NDS32_V3PUSH_AVAILABLE_P to do checking.
18139 2018-03-11 Jakub Jelinek <jakub@redhat.com>
18142 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
18143 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
18144 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
18145 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
18146 addition of most attributes on !orig_type_die or the attribute not
18147 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
18149 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
18150 Chung-Ju Wu <jasonwucj@gmail.com>
18152 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
18153 __NDS32_VH__ macro.
18154 * config/nds32/nds32.opt (mvh): New option.
18156 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
18157 Chung-Ju Wu <jasonwucj@gmail.com>
18159 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
18161 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
18162 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
18165 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
18166 Chung-Ju Wu <jasonwucj@gmail.com>
18168 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
18170 * config/nds32/nds32-multiple.md (strlensi): New pattern.
18171 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
18173 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
18174 Kito Cheng <kito.cheng@gmail.com>
18175 Chung-Ju Wu <jasonwucj@gmail.com>
18177 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
18178 UNSPEC_FFMISM and UNSPEC_FLMISM.
18179 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
18180 for ffb, ffmism and flmism.
18181 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
18182 (unspec_ffmism): Ditto.
18183 (unspec_flmism): Ditto.
18184 (nds32_expand_builtin_impl): Check if string extension is available.
18185 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
18186 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
18188 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
18191 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
18194 * lra-assigns.c (assign_by_spills): Return a flag of reload
18195 assignment failure. Do not process the reload assignment
18196 failures. Do not spill other reload pseudos if they has the same
18198 (lra_assign): Add a return arg. Set up from the result of
18199 assign_by_spills call.
18200 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18201 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
18202 usage_insns if it is not NULL.
18203 (spill_hard_reg_in_range): New function.
18204 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18205 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18206 function prototypes.
18207 (lra_assign): Change prototype.
18208 * lra.c (lra): Add code to deal with fails by splitting hard reg
18211 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
18214 * config/i386/i386.opt: Replace Enforcment with Enforcement.
18216 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
18219 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
18220 (dw_val_node): Add val_symbolic_view.
18221 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
18222 (symview_upper_bound): New.
18223 (new_line_info_table): Initialize symviews_since_reset.
18224 (dwarf2out_source_line): Count symviews_since_reset and set
18225 symview_upper_bound.
18226 (dw_val_equal_p): Handle symview.
18227 (add_AT_symview): New.
18228 (print_dw_val): Handle symview.
18229 (attr_checksum, attr_checksum_ordered): Likewise.
18230 (same_dw_val_p, size_of_die): Likewise.
18231 (value_format, output_die): Likewise.
18232 (add_high_low_attributes): Use add_AT_symview for entry_view.
18233 (dwarf2out_finish): Reset symview_upper_bound, clear
18236 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
18239 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
18240 Add strict argument and use it.
18241 (rs6000_split_multireg_move): Update for new strict argument.
18242 (mem_operand_gpr): Disallow all non-offsettable addresses.
18243 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
18245 2018-03-09 Jakub Jelinek <jakub@redhat.com>
18248 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
18249 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
18250 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
18253 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
18254 decl, use remap_type if we want to use the type.
18256 2018-03-09 Martin Sebor <msebor@redhat.com>
18258 PR tree-optimization/84526
18259 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18261 (builtin_access::generic_overlap): Be prepared to handle non-array
18264 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
18266 PR rtl-optimization/84682
18267 * lra-constraints.c (process_address_1): Check is_address flag
18268 for address constraints.
18269 (process_alt_operands): Likewise.
18270 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
18271 preprocess_constraints.
18272 * recog.h (preprocess_constraints): Add oploc parameter.
18274 * recog.c (preprocess_constraints): Test address_operand for
18275 CT_ADDRESS constraints.
18277 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
18280 * lra-assigns.c (assign_by_spills): Return a flag of reload
18281 assignment failure. Do not process the reload assignment
18282 failures. Do not spill other reload pseudos if they has the same
18284 (lra_assign): Add a return arg. Set up from the result of
18285 assign_by_spills call.
18286 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18287 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
18288 usage_insns if it is not NULL.
18289 (spill_hard_reg_in_range): New function.
18290 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18291 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18292 function prototypes.
18293 (lra_assign): Change prototype.
18294 * lra.c (lra): Add code to deal with fails by splitting hard reg
18297 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18300 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
18301 Accept complain bool parameter. Only emit errors if it is true.
18302 (arm_parse_cpu_option_name): Likewise.
18303 (arm_target_thumb_only): Adjust callers of the above.
18304 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
18305 prototype to take a default true bool parameter.
18306 (arm_parse_arch_option_name): Likewise.
18308 2018-03-09 David Malcolm <dmalcolm@redhat.com>
18309 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
18313 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
18314 * configure: Regenerate.
18315 * configure.ac ("linker --version-script option"): New.
18316 ("linker soname option"): New.
18318 2018-03-09 Richard Biener <rguenther@suse.de>
18320 PR tree-optimization/84775
18321 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
18322 immediate uses of predicate stmts and mark them modified.
18325 PR tree-optimization/84178
18326 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18328 (version_loop_for_if_conversion): Delay update_ssa call.
18329 (tree_if_conversion): Delay update_ssa until after predicate
18332 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
18335 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
18336 when the function accesses prior frames.
18338 2018-03-08 Jakub Jelinek <jakub@redhat.com>
18341 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
18342 gen_llsym, otherwise call maybe_gen_llsym.
18344 PR inline-asm/84742
18345 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
18346 has ',' character inside of it.
18348 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18351 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
18352 as clobbering CC_REGNUM.
18354 2018-03-08 Richard Biener <rguenther@suse.de>
18356 PR middle-end/84552
18357 * tree-scalar-evolution.c: Include tree-into-ssa.h.
18358 (follow_copies_to_constant): Do not follow SSA names registered
18361 2018-03-08 Richard Biener <rguenther@suse.de>
18363 PR tree-optimization/84178
18364 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18366 (version_loop_for_if_conversion): Delay update_ssa call.
18367 (tree_if_conversion): Delay update_ssa until after predicate
18370 2018-03-08 David Malcolm <dmalcolm@redhat.com>
18372 PR tree-optimization/84178
18373 * tree-if-conv.c (release_bb_predicate): Remove the
18374 the assertion that the stmts have NULL use_ops.
18375 Discard the statements, asserting that they haven't
18376 yet been added to a BB.
18378 2018-03-08 Richard Biener <rguenther@suse.de>
18380 PR tree-optimization/84746
18381 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
18382 (phi_translate): Pass in destination ANTIC_OUT set.
18383 (phi_translate_1): Likewise. For a simplified result lookup
18384 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
18385 (phi_translate_set): Adjust.
18386 (do_pre_regular_insertion): Likewise.
18387 (do_pre_partial_partial_insertion): Likewise.
18389 2018-03-08 Martin Liska <mliska@suse.cz>
18391 PR gcov-profile/84735
18392 * doc/gcov.texi: Document usage of profile files.
18393 * gcov-io.h: Document changes in the format.
18395 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
18399 * dwarf2out.c (struct dw_line_info_table): Update comments for
18401 (FORCE_RESET_NEXT_VIEW): New.
18402 (FORCE_RESETTING_VIEW_P): New.
18403 (RESETTING_VIEW_P): Check for -1 too.
18404 (ZERO_VIEW_P): Likewise.
18405 (new_line_info_table): Force-reset next view.
18406 (dwarf2out_begin_function): Likewise.
18407 (dwarf2out_source_line): Simplify zero_view_p initialization.
18408 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
18409 view directly. Omit view when omitting .loc at line 0.
18411 2018-03-08 Jakub Jelinek <jakub@redhat.com>
18413 PR tree-optimization/84740
18414 * tree-switch-conversion.c (process_switch): Call build_constructors
18415 only if info.phi_count is non-zero.
18417 PR tree-optimization/84739
18418 * tree-tailcall.c (find_tail_calls): Check call arguments against
18419 DECL_ARGUMENTS (current_function_decl) rather than
18420 DECL_ARGUMENTS (func) when checking for tail recursion.
18422 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18424 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
18425 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
18426 Volker Reichelt's entry and add entries for people that perform
18427 GCC fuzzy testing and report numerous bugs.
18429 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
18432 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
18433 readonly data in sdata, if that is disabled.
18434 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
18435 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
18436 -mreadonly-in-sdata option.
18438 2018-03-07 Martin Sebor <msebor@redhat.com>
18440 PR tree-optimization/84468
18441 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
18442 basic block when looking for nul assignment.
18444 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
18447 * except.h (output_function_exception_table): Adjust prototype.
18448 * except.c (output_function_exception_table): Remove FNNAME parameter
18449 and add SECTION parameter. Ouput one part of the table at a time.
18450 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
18451 the first part of the exception table and emit unwind directives.
18452 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
18453 (i386_pe_seh_cold_init): Likewise.
18454 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
18455 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
18456 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
18457 (ix86_output_call_insn): Emit a nop in one more case for SEH.
18458 * config/i386/winnt.c: Include except.h.
18459 (struct seh_frame_state): Add reg_offset, after_prologue and
18460 in_cold_section fields.
18461 (i386_pe_seh_end_prologue): Set seh->after_prologue.
18462 (i386_pe_seh_cold_init): New function.
18463 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
18464 to seh->in_cold_section.
18465 (seh_emit_push): Record the offset of the push.
18466 (seh_emit_save): Record the offet of the save.
18467 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
18468 Test seh->after_prologue to disregard the epilogue.
18469 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
18470 (i386_pe_end_cold_function): New function.
18472 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18475 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
18476 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
18479 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
18481 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
18482 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
18484 PR middle-end/84723
18485 * multiple_target.c: Include tree-inline.h and intl.h.
18486 (expand_target_clones): Diagnose and fail if node->definition and
18487 !tree_versionable_function_p (node->decl).
18489 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
18491 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
18493 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
18494 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18495 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
18497 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18500 * combine.c (try_combine): Use reg_or_subregno instead of handling
18501 just paradoxical SUBREGs and REGs.
18503 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
18505 * config/arc/arc.c (arc_finalize_pic): Remove function.
18506 (arc_must_save_register): We use single base PIC register, remove
18507 checks to save/restore the PIC register.
18508 (arc_expand_prologue): Likewise.
18509 * config/arc/arc-protos.h (arc_set_default_type_attributes):
18511 (arc_verify_short): Likewise.
18512 (arc_attr_type): Likewise.
18513 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
18514 (walk_stores): Likewise.
18515 (arc_address_cost): Make it static.
18516 (arc_verify_short): Likewise.
18517 (branch_dest): Likewise.
18518 (arc_attr_type): Likewise.
18519 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
18520 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
18521 (arc_final_prescan_insn): Remove inserting the nops due to
18522 hardware hazards. It is done in reorg step.
18523 (insn_length_variant_t): Remove.
18524 (insn_length_parameters_t): Likewise.
18525 (arc_insn_length_parameters): Likewise.
18526 (arc_get_insn_variants): Likewise.
18527 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
18529 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18531 PR inline-asm/84683
18532 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
18535 PR tree-optimization/84687
18536 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
18538 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
18540 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18542 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
18543 Rename to ppc_speculation_barrier.
18544 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
18545 __builtin_ppc_speculation_barrier.
18547 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18550 * combine.c (combine_simplify_rtx): Don't try to simplify if
18551 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
18554 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
18556 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
18557 to 32 bytes when compiling for POWER9.
18559 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18562 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
18563 regparm >= 3 with no arg reg available also for calls with
18564 flag_force_indirect_call. Pass decl to ix86_function_regparm.
18567 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
18569 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
18571 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
18574 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
18576 2018-03-05 Richard Biener <rguenther@suse.de>
18578 PR tree-optimization/84486
18579 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
18580 When inserting a __builtin_assume_aligned call set the LHS
18581 SSA name alignment info accordingly.
18583 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
18585 PR tree-optimization/84114
18586 * config/aarch64/aarch64.c (aarch64_reassociation_width)
18587 Avoid reassociation of FLOAT_MODE addition.
18589 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
18591 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
18592 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
18593 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
18594 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
18595 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
18596 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
18597 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
18599 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
18600 __builtin_ia32_wbinvd): New builtins.
18601 (SPECIAL_ARGS2): New.
18602 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
18603 (SPECIAL_ARGS2): New.
18604 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18605 (ix86_valid_target_attribute_inner_p): Ditto.
18606 (ix86_init_mmx_sse_builtins): Add special_args2.
18607 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18608 TARGET_WBNOINVD_P): New.
18609 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18610 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18611 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18612 * config/i386/immintrin.h (_wbinvd): New intrinsic.
18613 * config/i386/pconfigintrin.h: New file.
18614 * config/i386/wbnoinvdintrin.h: Ditto.
18615 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18617 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18619 2018-03-05 Richard Biener <rguenther@suse.de>
18621 PR tree-optimization/84670
18622 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18624 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18625 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18626 (compute_antic_aux): Only assert the number of values in ANTIC_IN
18627 doesn't grow if all successors (recursively) were visited at least
18630 2018-03-05 Richard Biener <rguenther@suse.de>
18632 PR tree-optimization/84650
18633 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18634 if executed in the loop pipeline.
18636 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
18638 * doc/configfiles.texi (Configuration Files): Move info about
18639 conditionalizing $target-protos.h to...
18640 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
18641 differs from $target-protos.h.
18643 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
18644 Chung-Ju Wu <jasonwucj@gmail.com>
18646 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18647 * config/nds32/nds32-multiple.md (setmemsi): Define.
18648 * config/nds32/nds32-memory-manipulation.c
18649 (nds32_gen_dup_4_byte_to_word_value): New.
18650 (emit_setmem_word_loop): New.
18651 (emit_setmem_byte_loop): New.
18652 (nds32_expand_setmem_loop): New.
18653 (nds32_expand_setmem_loop_v3m): New.
18654 (nds32_expand_setmem_unroll): New.
18655 (nds32_expand_setmem): New.
18657 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18658 Chung-Ju Wu <jasonwucj@gmail.com>
18660 * config/nds32/nds32-memory-manipulation.c
18661 (nds32_emit_load_store): New.
18662 (nds32_emit_post_inc_load_store): New.
18663 (nds32_emit_mem_move): New.
18664 (nds32_emit_mem_move_block): New.
18665 (nds32_expand_movmemsi_loop_unknown_size): New.
18666 (nds32_expand_movmemsi_loop_known_size): New.
18667 (nds32_expand_movmemsi_loop): New.
18668 (nds32_expand_movmemsi_unroll): New.
18669 (nds32_expand_movmemqi): Rename ...
18670 (nds32_expand_movmemsi): ... to this.
18671 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18672 (movmemsi): ... to this.
18673 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18674 (nds32_expand_movmemsi): ... to this.
18676 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18677 Monk Chiang <sh.chiang04@gmail.com>
18678 Chung-Ju Wu <jasonwucj@gmail.com>
18680 * config/nds32/nds32-protos.h
18681 (nds32_expand_load_multiple): New arguments.
18682 (nds32_expand_store_multiple): Ditto.
18683 (nds32_valid_multiple_load_store): Rename ...
18684 (nds32_valid_multiple_load_store_p): ... to this.
18685 * config/nds32/nds32-memory-manipulation.c
18686 (nds32_expand_load_multiple): Refine implementation.
18687 (nds32_expand_store_multiple): Ditto.
18688 * config/nds32/nds32-multiple.md
18689 (load_multiple): Update nds32_expand_load_multiple interface.
18690 (store_multiple): Update nds32_expand_store_multiple interface.
18691 * config/nds32/nds32-predicates.c
18692 (nds32_valid_multiple_load_store): Rename ...
18693 (nds32_valid_multiple_load_store_p): ... to this and refine
18695 * config/nds32/predicates.md
18696 (nds32_load_multiple_and_update_address_operation): New predicate.
18697 (nds32_store_multiple_and_update_address_operation): New predicate.
18699 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18700 Chung-Ju Wu <jasonwucj@gmail.com>
18702 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18703 (combo): New attribute.
18704 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18706 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
18708 * config/nds32/nds32.opt: Change -mcmodel= default value.
18710 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
18711 Monk Chiang <sh.chiang04@gmail.com>
18712 Chung-Ju Wu <jasonwucj@gmail.com>
18714 * config/nds32/constants.md (unspec_element): New enum.
18715 * config/nds32/constraints.md (Umw): New constraint.
18716 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18717 * config/nds32/nds32-intrinsic.md: Likewise.
18718 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18719 (nds32_valid_smw_lwm_base_p): New.
18720 (nds32_output_smw_single_word): New.
18721 (nds32_output_lmw_single_word): New.
18722 (nds32_expand_unaligned_load): New.
18723 (nds32_expand_unaligned_store): New.
18724 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18725 (nds32_output_smw_single_word): Declare.
18726 (nds32_output_lmw_single_word): Declare.
18727 (nds32_expand_unaligned_load): Declare.
18728 (nds32_expand_unaligned_store): Declare.
18729 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18730 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18731 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18732 NDS32_BUILTIN_UASTORE_DW.
18733 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18736 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
18737 Kito Cheng <kito.cheng@gmail.com>
18738 Chung-Ju Wu <jasonwucj@gmail.com>
18740 * config/nds32/nds32-intrinsic.c
18741 (nds32_expand_builtin_null_ftype_reg): Delete.
18742 (nds32_expand_builtin_reg_ftype_imm): Ditto.
18743 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18744 (nds32_read_argument): New.
18745 (nds32_legitimize_target): Ditto.
18746 (nds32_legitimize_argument): Ditto.
18747 (nds32_check_constant_argument): Ditto.
18748 (nds32_expand_unop_builtin): Ditto.
18749 (nds32_expand_unopimm_builtin): Ditto.
18750 (nds32_expand_binop_builtin): Ditto.
18751 (nds32_builtin_decl_impl): Ditto.
18752 (builtin_description): Ditto.
18753 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18754 (nds32_init_builtins_impl): Ditto.
18755 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18756 (nds32_builtin_decl): New.
18757 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18758 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18760 2018-03-02 Jeff Law <law@redhat.com>
18762 * reorg.c (stop_search_p): Handle DEBUG_INSN.
18763 (redundant_insn, fill_simple_delay_slots): Likewise.
18764 (fill_slots_from_thread): Likewise.
18765 * resource.c (mark_referenced_resources): Likewise.
18766 (mark_set_resources, find_dead_or_set_registers): Likewise.
18768 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18770 * substring-locations.h (format_warning_va): Formatting fix for
18771 ATTRIBUTE_GCC_DIAG.
18772 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18774 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18775 * substring-locations.c: Include intl.h.
18776 (format_warning_va): Turned into small wrapper around
18777 format_warning_n_va, renamed to ...
18778 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18779 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18781 (format_warning_at_substring_n): New function.
18782 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18783 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
18784 format_warning_at_substring with just a shorter name instead of
18785 const function pointer.
18786 (fmtwarn_n): New function.
18787 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18788 appropriate, get rid of all the fmtstr temporaries, move conditionals
18789 with G_() wrapped string literals directly into fmtwarn arguments,
18790 cast dir.len to (int), formatting fixes.
18792 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
18794 * doc/invoke.texi: Remove "Cilk Plus" references.
18796 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18797 Richard Biener <rguenther@suse.de>
18800 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18801 for error or warning attributes if CALL_FROM_THUNK_P is set.
18804 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18807 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18808 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18811 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18812 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18814 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18815 instead of -1U in last predictors element's probability member.
18817 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18820 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18821 arguments if they are comparable.
18823 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18825 PR tree-optimization/84634
18826 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18827 masks and masked_loop_p with a single loop_masks, making sure it's
18828 null for bb vectorization.
18830 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18832 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18833 (vect_analyze_data_ref_access): Use loop->safe_len rather than
18834 loop->force_vectorize to check whether there is no alias.
18836 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18839 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18841 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18843 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18844 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18845 instead of a loop around prev_real_insn.
18846 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18849 PR inline-asm/84625
18850 * config/i386/i386.c (ix86_print_operand): Use conditional
18851 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18854 2018-03-02 Richard Biener <rguenther@suse.de>
18856 PR tree-optimization/84427
18857 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18858 (bitmap_set_subtract_values): Rewrite to handle multiple
18861 (prune_clobbered_mems): Likewise.
18862 (phi_translate): Take edge instead of pred/phiblock.
18863 (phi_translate_1): Likewise.
18864 (phi_translate_set): Likewise. Insert all translated
18865 exprs for a value into the set, keeping possibly multiple
18866 expressions per value.
18867 (compute_antic_aux): Adjust for phi_translate changes.
18868 When intersecting union the expressions and prune those
18869 not in the final value set, keeping possibly multiple
18870 expressions per value. Do not use value-insertion
18871 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18872 all expressions. Add verification that the value-sets
18873 only shrink during iteration.
18874 (compute_partial_antic_aux): Adjust for the phi_translate changes.
18875 (do_pre_regular_insertion): Likewise.
18876 (do_pre_partial_partial_insertion): Likewise.
18878 2018-03-02 Richard Biener <rguenther@suse.de>
18881 * config/darwin.c (saved_debug_info_level): New static global.
18882 (darwin_asm_lto_start): Disable debug info generation for LTO out.
18883 (darwin_asm_lto_end): Restore debug info generation settings.
18885 2018-03-01 Martin Liska <mliska@suse.cz>
18888 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18889 volatile arguments.
18891 2018-03-01 Richard Biener <rguenther@suse.de>
18894 * dwarf2out.c (gen_variable_die): Properly handle late VLA
18895 type annotation with LTO when debug was disabled at compile-time.
18897 2018-03-01 Matthew Fortune <mfortune@gmail.com>
18899 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18901 (mips_final_postscan_insn): Likewise.
18903 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18905 PR rtl-optimization/84528
18906 * alias.c (init_alias_target): Add commentary.
18907 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18908 a unique base value if the frame pointer is not eliminated
18909 to the stack pointer.
18911 2018-03-01 Tom de Vries <tom@codesourcery.com>
18913 PR rtl-optimization/83327
18914 * lra-int.h (hard_regs_spilled_into): Declare.
18915 * lra.c (hard_regs_spilled_into): Define.
18916 (init_reg_info): Init hard_regs_spilled_into.
18917 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18918 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18919 (process_bb_lives): Handle hard_regs_spilled_into.
18920 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18921 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18923 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18925 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18926 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18927 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18928 * config/rs6000/aix72.h: New file.
18930 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18932 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18933 instead of warning_at with conditional singular and plural messages
18937 * stor-layout.c (update_alignment_for_field): For
18938 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18939 && !DECL_PACKED (field), do the alignment update, just use
18940 only desired_align instead of MAX (type_align, desired_align)
18942 (place_field): Don't do known_align < desired_align handling
18943 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18944 is non-NULL, instead do it after rli->prev_field handling and
18945 only if not within a bitfield word. For DECL_PACKED (field)
18946 use type_align of BITS_PER_UNIT.
18948 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18950 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18951 superfluous parentheses and trailing spaces.
18953 2018-02-28 Richard Biener <rguenther@suse.de>
18955 PR tree-optimization/84584
18956 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18957 SCoPs with fake exit edge.
18959 2018-02-28 Martin Liska <mliska@suse.cz>
18962 * timevar.c (timer::print): Fix format to properly print 100%
18965 2018-02-28 Richard Biener <rguenther@suse.de>
18967 PR middle-end/84607
18968 * genmatch.c (capture_info::walk_match): Do not mark
18969 captured expressions without operands as expr_p given
18970 they act more like predicates and should be subject to
18971 "lost tail" side-effect preserving.
18973 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18975 PR rtl-optimization/81611
18976 * auto-inc-dec.c (attempt_change): Move dead note from
18977 mem_insn if it's the next use of regno
18978 (find_address): Take address use of reg holding
18979 non-incremented value. Add parm to limit search to the named
18981 (merge_in_block): Attempt to use a mem insn that is the next
18982 use of the original regno.
18984 2018-02-27 Martin Sebor <msebor@redhat.com>
18987 * doc/invoke.texi (-Wmissing-attributes): New option.
18988 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18990 2018-02-27 Martin Sebor <msebor@redhat.com>
18992 PR translation/84207
18993 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18994 n argument to unsigned HOST_WIDE_INT.
18995 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18996 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18997 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18998 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
19000 2018-02-27 Richard Biener <rguenther@suse.de>
19002 PR tree-optimization/84512
19003 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
19004 Do not use the estimate returned from record_stmt_cost for
19005 the scalar iteration cost but sum properly using add_stmt_cost.
19007 2018-02-27 Richard Biener <rguenther@suse.de>
19009 PR tree-optimization/84466
19010 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19011 Adjust last change to less strictly validate use operands.
19013 2018-02-27 Martin Liska <mliska@suse.cz>
19015 PR gcov-profile/84548
19016 * gcov.c (process_file): Allow partial overlap and consider it
19017 also as group functions.
19018 (output_lines): Properly calculate range of lines for a group.
19020 2018-02-27 Martin Liska <mliska@suse.cz>
19022 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
19023 'ggc' suffixes. Change first column width.
19024 (timer::print): Fix formatting of the column.
19026 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
19028 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
19029 preserve inline entry blocks for the sake of debug inline
19030 entry point markers alone.
19031 (remove_unused_locals): Suggest in comments a better place to
19032 force the preservation of inline entry blocks that are
19033 otherwise unused, but do not preserve them.
19035 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
19037 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
19039 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
19042 * config/i386/constraints.md (Bs): Replace
19043 ix86_indirect_branch_register with
19044 TARGET_INDIRECT_BRANCH_REGISTER.
19046 * config/i386/i386.md (indirect_jump): Likewise.
19047 (tablejump): Likewise.
19048 (*sibcall_memory): Likewise.
19049 (*sibcall_value_memory): Likewise.
19050 Peepholes of indirect call and jump via memory: Likewise.
19051 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
19052 (*sibcall_value_GOT_32): Likewise.
19053 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19054 (GOT_memory_operand): Likewise.
19055 (call_insn_operand): Likewise.
19056 (sibcall_insn_operand): Likewise.
19057 (GOT32_symbol_operand): Likewise.
19058 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
19060 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
19062 PR rtl-optimization/83496
19063 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
19064 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
19065 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
19066 redundant insn, if any.
19067 (relax_delay_slots): Likewise.
19068 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
19070 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
19072 PR tree-optimization/83965
19073 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
19074 that grouped statements are part of a reduction chain. Return
19075 true if the statement is not marked as a reduction itself but
19076 is part of a group.
19077 (vect_recog_dot_prod_pattern): Don't check whether the statement
19078 is part of a group here.
19079 (vect_recog_sad_pattern): Likewise.
19080 (vect_recog_widen_sum_pattern): Likewise.
19082 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
19085 * final.c (rest_of_clean_state): Also look for calls inside sequences.
19087 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
19090 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
19092 (ix86_output_indirect_function_return): New prototype.
19093 (ix86_split_simple_return_pop_internal): Likewise.
19094 * config/i386/i386.c (indirect_return_via_cx): New.
19095 (indirect_return_via_cx_bnd): Likewise.
19096 (indirect_thunk_name): Handle return va CX_REG.
19097 (output_indirect_thunk_function): Create alias for
19098 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
19099 (ix86_output_indirect_jmp): Remove the bool argument.
19100 (ix86_output_indirect_function_return): New function.
19101 (ix86_split_simple_return_pop_internal): Likewise.
19102 * config/i386/i386.md (*indirect_jump): Don't pass false
19103 to ix86_output_indirect_jmp.
19104 (*tablejump_1): Likewise.
19105 (simple_return_pop_internal): Change it to define_insn_and_split.
19106 Call ix86_split_simple_return_pop_internal to split it for
19107 -mfunction-return=.
19108 (simple_return_indirect_internal): Call
19109 ix86_output_indirect_function_return instead of
19110 ix86_output_indirect_jmp.
19112 2018-02-26 Jakub Jelinek <jakub@redhat.com>
19115 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
19116 memset and value initialization afterwards.
19118 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
19120 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
19122 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
19125 * common/config/aarch64/aarch64-common.c
19126 (aarch_option_optimization_table[]): Switch
19127 off fomit-frame-pointer
19129 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
19130 Chung-Ju Wu <jasonwucj@gmail.com>
19132 * config/nds32/nds32-multiple.md (load_multiple): Disallow
19134 (store_multiple): Ditto.
19136 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
19138 * config.gcc: Add --with-cpu support for nds32 target.
19139 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
19140 * config/nds32/nds32.opt: Add -mcpu= option.
19142 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
19144 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
19145 isel=yes): Warn for these deprecated options.
19147 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
19149 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
19150 ISA_2_5_MASKS_EMBEDDED.
19152 2018-02-23 Jakub Jelinek <jakub@redhat.com>
19154 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
19155 p->max as pointers rather than using iterative_hash_expr.
19157 2018-02-23 Carl Love <cel@us.ibm.com>
19159 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
19160 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
19162 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
19163 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
19164 P8V_BUILTIN_VEC_VUNSIGNED2.
19166 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
19169 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
19170 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
19172 * lra-constraints.c (curr_insn_transform): Set up
19173 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
19175 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
19176 * lra-eliminations.c (spill_pseudos): Ditto.
19177 (process_insn_for_elimination): Ditto.
19178 * lra-lives.c (reg_early_clobber_p): Use the new macros.
19179 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
19180 LRA_NON_CLOBBERED_ALT.
19182 2018-02-22 Martin Sebor <msebor@redhat.com>
19184 PR tree-optimization/84480
19185 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
19186 to maybe_diag_stxncpy_trunc. Call it.
19187 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
19188 from gimple_fold_builtin_strcpy. Print inlining stack.
19189 (handle_builtin_stxncpy): Print inlining stack.
19190 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
19192 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
19195 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
19196 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
19197 and -fcheck-pointer-bounds are used together.
19198 (indirect_thunk_prefix): New enum.
19199 (indirect_thunk_need_prefix): New function.
19200 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
19201 "_nt" instead of "_bnd" for NOTRACK prefix.
19202 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
19203 (output_indirect_thunk_function): Likewise.
19205 (ix86_code_end): Update output_indirect_thunk_function calls.
19206 (ix86_output_indirect_branch_via_reg): Replace
19207 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
19208 (ix86_output_indirect_branch_via_push): Likewise.
19209 (ix86_output_function_return): Likewise.
19210 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
19211 incompatible with -fcf-protection=branch and
19212 -fcheck-pointer-bounds.
19214 2018-02-22 Steve Ellcey <sellcey@cavium.com>
19217 * config/aarch64/aarch64.c (aarch64_print_address_internal):
19218 Change gcc_assert call to output_operand_lossage.
19220 2018-02-22 Steve Ellcey <sellcey@cavium.com>
19222 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
19224 2018-02-22 DJ Delorie <dj@redhat.com>
19225 Sebastian Perta <sebastian.perta@renesas.com>
19226 Oleg Endo <olegendo@gcc.gnu.org>
19228 * config/rx/rx.c (rx_rtx_costs): New function.
19229 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
19231 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
19233 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
19235 2018-02-22 Martin Liska <mliska@suse.cz>
19238 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
19239 Add "native" as a possible value.
19241 2018-02-22 Martin Liska <mliska@suse.cz>
19244 * config/i386/i386.c (ix86_option_override_internal):
19245 Add "native" as a possible value for -march and -mtune.
19247 2018-02-22 Jakub Jelinek <jakub@redhat.com>
19250 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
19251 to all type variants.
19253 PR tree-optimization/84503
19254 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
19255 width as info->bitpos + info->bitsize - start.
19256 (merged_store_group::merge_overlapping): Simplify width computation.
19257 (check_no_overlap): New function.
19258 (imm_store_chain_info::try_coalesce_bswap): Compute expected
19259 start + width and last_order of the group, fail if check_no_overlap
19261 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
19262 to group if check_no_overlap fails.
19264 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
19266 * config/rs6000/altivec.md: Delete contraint arguments to
19267 define_expand, define_split, and define_peephole2, and in
19268 define_insn_and_split if always unused.
19269 * config/rs6000/darwin.md: Ditto.
19270 * config/rs6000/dfp.md: Ditto.
19271 * config/rs6000/rs6000.md: Ditto.
19272 * config/rs6000/sync.md: Ditto.
19273 * config/rs6000/vector.md: Ditto.
19274 * config/rs6000/vsx.md: Ditto.
19276 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
19278 * config/rs6000/altivec.md: Write output control strings as braced
19279 blocks instead of double-quoted strings.
19280 * config/rs6000/darwin.md: Ditto.
19281 * config/rs6000/rs6000.md: Ditto.
19282 * config/rs6000/vector.md: Ditto.
19283 * config/rs6000/vsx.md: Ditto.
19285 2018-02-21 Jason Merrill <jason@redhat.com>
19287 PR c++/84314 - ICE with templates and fastcall attribute.
19288 * attribs.c (build_type_attribute_qual_variant): Remove assert.
19290 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
19292 * ipa-cp.c (determine_versionability): Fix comment typos.
19294 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
19297 * ipa-cp.c (determine_versionability): Do not version functions caling
19300 2018-02-21 Martin Liska <mliska@suse.cz>
19303 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
19304 Add "native" as a possible value.
19305 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
19306 the macro when native cpu detection is available.
19308 2018-02-21 Martin Liska <mliska@suse.cz>
19311 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
19312 Add "native" as a possible value.
19313 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
19314 when native cpu detection is available.
19316 2018-02-21 Jakub Jelinek <jakub@redhat.com>
19317 Martin Sebor <msebor@redhat.com>
19319 PR tree-optimization/84478
19320 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
19322 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
19323 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
19324 support which is conservatively correct, for 2 only stay conservative
19325 for maxlen. Formatting and comment capitalization fixes. Add STRICT
19326 argument to the 2 argument get_range_strlen, adjust 6 arg
19327 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
19329 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
19330 (gimple_fold_builtin_strlen): Pass true as last argument to
19333 2018-02-20 Martin Sebor <msebor@redhat.com>
19335 PR middle-end/84095
19336 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
19337 (builtin_memref::set_base_and_offset): Same. Handle inner references.
19338 (builtin_memref::builtin_memref): Factor out parts into
19339 set_base_and_offset and call it.
19341 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
19343 PR middle-end/84406
19344 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
19345 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
19346 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
19347 search at the associated MODE_INT.
19349 2018-02-20 Jeff Law <law@redhat.com>
19351 PR middle-end/82123
19352 PR tree-optimization/81592
19353 PR middle-end/79257
19354 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
19355 for range data rather than using global data.
19356 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
19357 range data rather than using global data.
19358 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
19359 pass it to children as needed.
19360 (struct directive::fmtresult): Similarly.
19361 (struct directive::set_width): Similarly.
19362 (struct directive::set_precision): Similarly.
19363 (format_integer, format_directive, parse_directive): Similarly.
19364 (format_none): Accept unnamed vr_values parameter.
19365 (format_percent, format_floating, format_character): Similarly.
19366 (format_string, format_plain): Similarly.
19367 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
19368 the EVRP range analyzer for range data rather than using global data.
19369 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
19370 gimple-ssa-evrp-analyze.h
19371 (class sprintf_dom_walker): Add after_dom_children member function.
19372 Add evrp_range_analyzer member.
19373 (sprintf_dom_walker::before_dom_children): Call into the EVRP
19374 range analyzer as needed.
19375 (sprintf_dom_walker::after_dom_children): New member function.
19376 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
19378 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
19379 (evrp_range_analyzer::pop_to_marker): Likewise.
19381 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
19383 PR tree-optimization/84419
19384 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
19385 with the required type if its current type is compatible but
19388 2018-02-20 Jakub Jelinek <jakub@redhat.com>
19390 PR middle-end/82004
19391 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
19392 after vectorization.
19394 2018-02-20 Martin Liska <mliska@suse.cz>
19397 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
19398 possible values if we don't have a hint.
19400 2018-02-20 Martin Liska <mliska@suse.cz>
19404 * final.c (shorten_branches): Build align_tab array with one
19406 * opts.c (finish_options): Add alignment option limit check.
19407 (MAX_CODE_ALIGN): Likewise.
19408 (MAX_CODE_ALIGN_VALUE): Likewise.
19409 * doc/invoke.texi: Document maximum allowed option value for
19410 all -falign-* options.
19412 2018-02-19 Jakub Jelinek <jakub@redhat.com>
19415 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
19416 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
19417 * var-tracking.c (emit_note_insn_var_location): Remove all references
19418 to NOTE_INSN_CALL_ARG_LOCATION.
19419 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
19420 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
19421 Use copy_rtx_if_shared.
19422 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
19423 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
19424 (dwarf2out_var_location): Remove handling of
19425 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
19427 * final.c (final_scan_insn): Remove all references to
19428 NOTE_INSN_CALL_ARG_LOCATION.
19429 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
19430 before dumping final insns.
19431 * except.c (emit_note_eh_region_end): Remove all references to
19432 NOTE_INSN_CALL_ARG_LOCATION.
19433 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
19434 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
19435 * config/arc/arc.c (hwloop_optimize): Likewise.
19436 * config/arm/arm.c (create_fix_barrier): Likewise.
19437 * config/s390/s390.c (s390_chunkify_start): Likewise.
19438 * config/sh/sh.c (find_barrier): Likewise.
19439 * config/i386/i386.c (rest_of_insert_endbranch,
19440 ix86_seh_fixup_eh_fallthru): Likewise.
19441 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
19442 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
19443 * config/frv/frv.c (frv_function_prologue): Likewise.
19444 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
19446 (note_outside_basic_block_p): Remove all references to
19447 NOTE_INSN_CALL_ARG_LOCATION.
19448 * gengtype.c (adjust_field_rtx_def): Likewise.
19449 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
19451 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
19452 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
19455 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
19458 PR tree-optimization/84452
19459 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
19460 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
19463 2018-02-19 Martin Liska <mliska@suse.cz>
19466 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
19468 2018-02-19 Martin Liska <mliska@suse.cz>
19469 Richard Sandiford <richard.sandiford@linaro.org>
19471 PR tree-optimization/82491
19472 * gimple-fold.c (get_base_constructor): Make earlier bail out
19475 2018-02-19 Carl Love <cel@us.ibm.com>
19477 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
19478 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
19480 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
19481 P8V_BUILTIN_VEC_NEG.
19483 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
19485 * config/rl78/rl78.md (movdf): New define expand.
19487 2018-02-19 Martin Liska <mliska@suse.cz>
19490 * doc/invoke.texi: Fix typo.
19491 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
19493 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
19495 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
19496 handle rs6000_single_float and rs6000_double_float specially for
19499 2018-02-16 Jeff Law <law@redhat.com>
19501 * config/rx/rx.c (add_pop_cfi_notes): New function.;
19502 (pop_regs): Use it.
19504 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19507 * ipa-inline.c (inline_small_functions): Fix a typo.
19509 2018-02-16 Nathan Sidwell <nathan@acm.org>
19511 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
19513 2018-02-16 Carl Love <cel@us.ibm.com>
19515 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
19516 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
19517 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
19518 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
19519 expansion to P8V_BUILTIN_VEC_FLOAT2.
19521 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
19523 PR rtl-optimization/70023
19524 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
19525 src_regno into account.
19527 2018-02-16 Carl Love <cel@us.ibm.com>
19529 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
19530 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
19531 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
19532 * config/rs6000/rs6000.c: Remove case statements for
19533 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
19534 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
19535 and P9V_BUILTIN_VEC_VINSERT4B.
19536 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
19537 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
19538 * config/rs6000/vsx.md:
19539 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
19542 2018-02-16 Carl Love <cel@us.ibm.com>
19544 * config/rs6000/altivec.h: Add builtin names vec_extract4b
19546 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
19548 * config/rs6000/rs6000-c.c: Add the definitions for
19549 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
19550 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
19551 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
19552 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
19553 definition for insert4b and define insn *insert3b_internal.
19554 * doc/extend.texi: Add documentation for vec_extract4b.
19556 2018-02-16 Nathan Sidwell <nathan@acm.org>
19558 * doc/extend.texi (Backwards Compatibility): Mention friend
19559 injection. Note for-scope is deprecated.
19560 * doc/invoke.texi (-ffriend-injection): Deprecate.
19562 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
19564 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
19565 that moved to I2, also allow destinations that are a paradoxical
19566 subreg (instead of a normal reg).
19568 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
19571 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
19574 2018-02-16 Richard Biener <rguenther@suse.de>
19576 PR tree-optimization/84037
19577 PR tree-optimization/84016
19579 * config/i386/i386.c (ix86_builtin_vectorization_cost):
19580 Adjust vec_construct for the fact we need additional higher latency
19581 128bit inserts for AVX256 and AVX512 vector builds.
19582 (ix86_add_stmt_cost): Scale vector construction cost for
19585 2018-02-16 Richard Biener <rguenther@suse.de>
19587 PR tree-optimization/84417
19588 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
19589 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
19590 (non_rewritable_lvalue_p): Likewise, use poly-ints.
19592 2018-02-16 Martin Liska <mliska@suse.cz>
19595 * internal-fn.def (ASAN_CHECK): Set proper flags.
19596 (ASAN_MARK): Likewise.
19598 2018-02-16 Julia Koval <julia.koval@intel.com>
19600 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
19601 from PTA_CANNONLAKE.
19603 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19606 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19607 Use ++iter rather than iter++ for std::list iterators.
19608 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
19609 defer deleting them until all nodes in the forest are processed. Do
19610 free even leaf nodes. Change to_process into auto_vec.
19613 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19614 * vec.h (vec_default_construct): Use memset instead of placement new
19615 if BROKEN_VALUE_INITIALIZATION is defined.
19616 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19617 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19620 PR rtl-optimization/83723
19621 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19622 * lra.c (lra_substitute_pseudo): Likewise. If true, use
19623 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
19625 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19627 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19629 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
19631 PR rtl-optimization/81443
19632 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19633 from inner REGs to paradoxical SUBREGs.
19635 2018-02-16 Richard Biener <rguenther@suse.de>
19637 PR tree-optimization/84399
19638 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19639 For operands we can analyze at their definition make sure we can
19640 analyze them at each use as well.
19642 2018-02-16 Richard Biener <rguenther@suse.de>
19644 PR tree-optimization/84190
19645 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19646 volatile accesses if the decl isn't volatile.
19648 2018-02-15 Jason Merrill <jason@redhat.com>
19650 PR c++/84314 - ICE with templates and fastcall attribute.
19651 * attribs.c (build_type_attribute_qual_variant): Don't clobber
19652 TYPE_CANONICAL on an existing type.
19654 2018-02-15 Jakub Jelinek <jakub@redhat.com>
19656 PR tree-optimization/84383
19657 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19658 dstoff nor call operand_equal_p if dstbase is NULL.
19660 PR tree-optimization/84334
19661 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19662 also a CONSTANT_CLASS_P, punt.
19664 2018-02-14 Jim Wilson <jimw@sifive.com>
19666 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19667 first SMALL_OPERAND check. New local min_second_step. Move assert
19668 to where locals are set. Add TARGET_RVC support.
19669 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19671 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
19673 * doc/invoke.texi: Correct -Wformat-overflow code sample.
19675 2018-02-14 Martin Sebor <msebor@redhat.com>
19677 PR tree-optimization/83698
19678 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19679 arrays constrain the offset range to their bounds.
19680 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19681 (builtin_access::overlap): Avoid setting the size of overlap if it's
19683 (maybe_diag_overlap): Also consider arrays when deciding what values
19684 of offsets to include in diagnostics.
19686 2018-02-14 Martin Sebor <msebor@redhat.com>
19689 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19690 that correspond to the kind of a declaration.
19692 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
19695 * config/pa/pa.md: Load address of PIC label using the linkage table
19696 if the label is nonlocal.
19698 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19700 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19701 warning message if user requests -maltivec=be.
19702 * doc/invoke.texi: Document deprecation of -maltivec=be.
19704 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
19707 * config/rs6000/rs6000-c.c: Update definitions for
19708 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19709 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19711 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19714 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19715 add _get_ssp intrinsics. Remove argument from
19716 __builtin_ia32_rdssp[d|q].
19717 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19718 * config/i386/i386-builtin.def: Remove argument from
19719 __builtin_ia32_rdssp[d|q].
19720 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19721 ix86_expand_special_args_builtin for _rdssp[d|q].
19722 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19723 Clear register before usage.
19724 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19725 Add documentation for new _get_ssp and _inc_ssp intrinsics.
19727 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
19729 PR tree-optimization/84357
19730 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19731 operand 1 of an ARRAY_REF too.
19733 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
19736 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19737 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19739 (set_of_reg): New struct.
19740 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19741 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19742 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19744 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19745 Split into bitclr, bitset, bitinvert patterns if appropriate.
19746 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19747 use rx_fuse_in_memory_bitop.
19748 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19749 to named insn, correct maximum insn length.
19751 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
19754 * machmode.def: Define a complex mode for PARTIAL_INT.
19755 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19757 * doc/rtl.texi: Document CSPImode.
19758 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19760 (msp430_hard_regno_nregs_with_padding): Likewise.
19762 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
19765 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19767 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
19769 PR rtl-optimization/84169
19770 * combine.c (try_combine): New variable split_i2i3. Set it to true if
19771 we generated a parallel as new i3 and we split that to new i2 and i3
19772 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
19773 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
19774 those to i2, not i1. Partially rewrite this scan code.
19776 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19779 * stor-layout.c (place_field): For variable length fields, adjust
19780 offset_align afterwards not just based on the field's alignment,
19781 but also on the size.
19783 PR middle-end/84309
19784 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19785 of exps and logs in the use_exp2 case.
19787 2018-02-13 Jeff Law <law@redhat.com>
19789 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19790 entry for "vector".
19792 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19795 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
19799 * common.opt (gas-loc-support, gas-locview-support): New.
19800 (ginline-points, ginternal-reset-location-views): New.
19801 * doc/invoke.texi: Document them. Use @itemx where intended.
19802 (gvariable-location-views): Adjust.
19803 * target.def (reset_location_view): New.
19804 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19805 (TARGET_RESET_LOCATION_VIEW): New.
19806 * doc/tm.texi: Rebuilt.
19807 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19808 (dwarf2out_default_as_locview_support): New.
19809 (output_asm_line_debug_info): Use option variables.
19810 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19811 (output_loc_list): Likewise.
19812 (add_high_low_attributes): Check option variables.
19813 Don't output entry view attribute in strict mode.
19814 (gen_inlined_subroutine_die): Check option variables.
19815 (dwarf2out_inline_entry): Likewise.
19816 (init_sections_and_labels): Likewise.
19817 (dwarf2out_early_finish): Likewise.
19818 (maybe_reset_location_view): New, from...
19819 (dwarf2out_var_location): ... here. Call it.
19820 * debug.h (dwarf2out_default_as_loc_support): Declare.
19821 (dwarf2out_default_as_locview_support): Declare.
19822 * hooks.c (hook_int_rtx_insn_0): New.
19823 * hooks.h (hook_int_rtx_insn_0): Declare.
19824 * toplev.c (process_options): Take -gas-loc-support and
19825 -gas-locview-support from dwarf2out. Enable
19826 -gvariable-location-views by default only with locview
19827 assembler support. Enable -ginternal-reset-location-views by
19828 default only if the target defines the corresponding hook.
19829 Enable -ginline-points by default if location views are
19830 enabled; force it disabled if statement frontiers are
19832 * tree-inline.c (expand_call_inline): Check option variables.
19833 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19835 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
19837 PR tree-optimization/84321
19838 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19839 handling. Also check whether the anti-range contains any values
19840 that satisfy the mask; switch to a VR_RANGE if not.
19842 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
19845 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19847 2018-02-13 Martin Jambor <mjambor@suse.cz>
19850 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19851 of call statements, also set location of a load to a temporary.
19853 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
19855 * config/rl78/rl78.c (add_vector_labels): New function.
19856 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19857 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19858 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19859 which checks that no arguments are passed.
19860 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19861 * doc/extend.texi: Documentation for the new attribute.
19863 2018-02-13 Andreas Schwab <schwab@suse.de>
19865 * config/riscv/linux.h (CPP_SPEC): Define.
19867 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19870 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19871 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19872 OPTION_MASK_ISA_AES as first argument to def_builtin_const
19873 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19874 instead of OPTION_MASK_ISA_PCLMUL as first argument to
19875 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19876 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19877 temporarily for AES and PCLMUL builtins.
19879 PR tree-optimization/84339
19880 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19881 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19884 PR middle-end/84309
19885 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19886 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19887 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19889 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19891 * omp-simd-clone.h: New file.
19892 * omp-simd-clone.c: Include omp-simd-clone.h.
19893 (expand_simd_clones): No longer static.
19894 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19895 cgraph.h and omp-simd-clone.h.
19896 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19897 (vect_recog_widen_shift_pattern): Formatting fix.
19898 (vect_pattern_recog_1): Don't check optab for calls.
19901 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19902 operands[2] into a REG before using gen_lowpart on it.
19904 2018-02-12 Jeff Law <law@redhat.com>
19907 * config/sh/sh.c (find_barrier): Consider a sibling call
19910 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19911 successfully back substituting a reg.
19913 2018-02-12 Richard Biener <rguenther@suse.de>
19915 PR tree-optimization/84037
19916 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19917 parameter, move visited init to caller.
19918 (vect_slp_analyze_operations): Separate cost from validity
19919 check, initialize visited once for all instances.
19920 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19922 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19924 (vect_model_promotion_demotion_cost): Likewise.
19925 (vectorizable_bswap): Guard cost modeling with !slp_node
19926 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19928 (vectorizable_call): Likewise.
19929 (vectorizable_conversion): Likewise.
19930 (vectorizable_assignment): Likewise.
19931 (vectorizable_shift): Likewise.
19932 (vectorizable_operation): Likewise.
19933 (vectorizable_store): Likewise.
19934 (vectorizable_load): Likewise.
19935 (vectorizable_condition): Likewise.
19936 (vectorizable_comparison): Likewise.
19938 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19941 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19942 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19943 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19945 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19947 PR middle-end/83665
19948 * params.def (inline-min-speedup): Increase from 8 to 15.
19949 (max-inline-insns-auto): Decrease from 40 to 30.
19950 * ipa-split.c (consider_split): Add some buffer for function to
19951 be considered inlining candidate.
19952 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19955 2018-02-12 Richard Biener <rguenther@suse.de>
19957 PR tree-optimization/84037
19958 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19959 matched stmts if we cannot swap the non-matched ones.
19961 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19963 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19964 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19965 _mm_maskz_scalef_round_ss): New intrinsics.
19966 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19967 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19968 __builtin_ia32_scalefss_round): Remove.
19969 (__builtin_ia32_scalefsd_mask_round,
19970 __builtin_ia32_scalefss_mask_round): New intrinsics.
19971 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19972 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19973 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19974 "<round_constraint>")): Changed to ...
19975 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19976 "<round_scalar_constraint>")): ... this.
19977 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19978 %0, %1, %2<round_op3>}"): Changed to ...
19979 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19980 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19981 %2<round_scalar_mask_op3>}"): ... this.
19982 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19984 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19986 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19987 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19988 (_mm_maskz_sqrt_round_ss): New intrinsics.
19989 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19990 (__builtin_ia32_sqrtsd_mask_round)
19991 (__builtin_ia32_sqrtss_mask_round): New builtins.
19992 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19993 (__builtin_ia32_sqrtss_round): Remove.
19994 (__builtin_ia32_sqrtsd_mask_round)
19995 (__builtin_ia32_sqrtss_mask_round): New builtins.
19996 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19997 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19998 ((match_operand:VF_128 1 "vector_operand"
19999 "xBm,<round_constraint>")): Changed to ...
20000 ((match_operand:VF_128 1 "vector_operand"
20001 "xBm,<round_scalar_constraint>")): ... this.
20002 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
20003 %0, %2, %<iptr>1<round_op3>}): Changed to ...
20004 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
20005 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
20006 %<iptr>1<round_scalar_mask_op3>}): ... this.
20007 ((set_attr "prefix" "<round_prefix>")): Changed to ...
20008 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
20010 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
20013 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
20014 Cast vec_cmpeq result to correct type.
20015 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
20016 Cast vec_cmpgt result to correct type.
20018 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
20020 * final.c (final_scan_insn_1): Renamed from...
20021 (final_scan_insn): ... this. New wrapper, to recover
20022 seen from the outermost call in recursive ones.
20023 * config/sparc/sparc.c (output_return): Drop seen from call.
20024 (output_sibcall): Likewise.
20025 * config/visium/visium.c (output_branch): Likewise.
20027 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
20029 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
20032 2018-02-10 Alan Modra <amodra@gmail.com>
20035 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
20036 Specify LR as an input.
20038 2018-02-10 Jakub Jelinek <jakub@redhat.com>
20041 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
20042 remove_member_access_dummy_vars): New functions.
20043 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
20044 lower_omp_1, execute_lower_omp): Use them.
20046 PR rtl-optimization/84308
20047 * shrink-wrap.c (spread_components): Release todo vector.
20049 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
20051 PR rtl-optimization/57193
20052 * ira-color.c (struct allocno_color_data): Add member
20053 conflict_allocno_hard_prefs.
20054 (update_conflict_allocno_hard_prefs): New.
20055 (bucket_allocno_compare_func): Add a preference based on
20056 conflict_allocno_hard_prefs.
20057 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
20058 (color_allocnos): Remove a dead code. Initiate
20059 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
20061 2018-02-09 Jakub Jelinek <jakub@redhat.com>
20064 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
20065 constraint from =wa to wa. Avoid a subreg on the output operand,
20066 instead use a pseudo and subreg it in a move.
20067 (p9_xxbrd_<mode>): Changed to ...
20068 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
20069 (p9_xxbrd_v2df): New expander.
20070 (p9_xxbrw_<mode>): Changed to ...
20071 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
20072 (p9_xxbrw_v4sf): New expander.
20074 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
20076 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
20078 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
20081 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
20082 multiply in 32-bit mode.
20083 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
20084 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
20087 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
20089 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
20090 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
20091 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
20092 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
20094 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
20097 * dwarf2out.c (is_trivial_indirect_ref): New function.
20098 (dwarf2out_late_global_decl): Do not generate a location
20099 attribute for variables that have a non-trivial DECL_VALUE_EXPR
20100 and that are not defined in the current unit.
20102 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
20104 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
20105 instead of a libcall for UNORDERED.
20107 2018-02-09 Tamar Christina <tamar.christina@arm.com>
20110 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
20111 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
20113 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20116 * config/s390/s390.c (s390_set_current_function): Invoke
20117 s390_indirect_branch_settings also if fndecl didn't change.
20119 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
20121 * config/rs6000/rs6000.md (blockage): Set length to zero.
20123 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
20125 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
20127 2018-02-09 Jakub Jelinek <jakub@redhat.com>
20130 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
20131 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
20135 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
20136 PARALLEL incoming that failed vt_get_decl_and_offset check.
20138 PR middle-end/84237
20139 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
20140 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
20142 (get_variable_section): For decls in named .bss* sections pass true as
20143 second argument to bss_initializer_p.
20145 2018-02-09 Marek Polacek <polacek@redhat.com>
20146 Jakub Jelinek <jakub@redhat.com>
20149 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
20150 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
20151 Sync some changes from cxx_fold_indirect_ref.
20153 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
20155 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
20157 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
20158 (BLOCK_INLINE_ENTRY_LABEL): New.
20159 (dwarf2out_var_location): Disregard inline entry markers.
20160 (inline_entry_data): New struct.
20161 (inline_entry_data_hasher): New hashtable type.
20162 (inline_entry_data_hasher::hash): New.
20163 (inline_entry_data_hasher::equal): New.
20164 (inline_entry_data_table): New variable.
20165 (add_high_low_attributes): Add DW_AT_entry_pc and
20166 DW_AT_GNU_entry_view attributes if a pending entry is found
20167 in inline_entry_data_table. Add old entry_pc attribute only
20168 if debug nonbinding markers are disabled.
20169 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
20170 markers are enabled.
20171 (block_within_block_p, dwarf2out_inline_entry): New.
20172 (dwarf2out_finish): Check that no entries remained in
20173 inline_entry_data_table.
20174 * final.c (reemit_insn_block_notes): Handle inline entry notes.
20175 (final_scan_insn, notice_source_line): Likewise.
20176 (rest_of_clean_state): Skip inline entry markers.
20177 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
20179 * gimple.c (gimple_build_debug_inline_entry): New.
20180 * gimple.h (enum gimple_debug_subcode): Add
20181 GIMPLE_DEBUG_INLINE_ENTRY.
20182 (gimple_build_debug_inline_entry): Declare.
20183 (gimple_debug_inline_entry_p): New.
20184 (gimple_debug_nonbind_marker_p): Adjust.
20185 * insn-notes.def (INLINE_ENTRY): New.
20186 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
20187 inline entry marker notes.
20188 (print_insn): Likewise.
20189 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
20190 (INSN_DEBUG_MARKER_KIND): Likewise.
20191 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
20192 * tree-inline.c (expand_call_inline): Build and insert
20193 debug_inline_entry stmt.
20194 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
20195 inline entry blocks early, if nonbind markers are enabled.
20196 (dump_scope_block): Dump fragment info.
20197 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
20198 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
20199 (gimple_build_debug_inline_entry): New.
20200 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
20201 Enable/disable inline entry points too.
20202 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
20203 (DEBUG_INSN): Describe inline entry markers.
20205 * common.opt (gvariable-location-views): New.
20206 (gvariable-location-views=incompat5): New.
20207 * config.in: Rebuilt.
20208 * configure: Rebuilt.
20209 * configure.ac: Test assembler for view support.
20210 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
20211 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
20212 * dwarf2out.c (var_loc_view): New typedef.
20213 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
20214 (dwarf2out_locviews_in_attribute): New.
20215 (dwarf2out_locviews_in_loclist): New.
20216 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
20217 (enum dw_line_info_opcode): Add LI_adv_address.
20218 (struct dw_line_info_table): Add view.
20219 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
20220 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
20221 (zero_view_p): New variable.
20222 (ZERO_VIEW_P): New macro.
20223 (output_asm_line_debug_info): New.
20224 (struct var_loc_node): Add view.
20225 (add_AT_view_list, AT_loc_list): New.
20226 (add_var_loc_to_decl): Add view param. Test it against last.
20227 (new_loc_list): Add view params. Record them.
20228 (AT_loc_list_ptr): Handle loc and view lists.
20229 (view_list_to_loc_list_val_node): New.
20230 (print_dw_val): Handle dw_val_class_view_list.
20231 (size_of_die): Likewise.
20232 (value_format): Likewise.
20233 (loc_list_has_views): New.
20234 (gen_llsym): Set vl_symbol too.
20235 (maybe_gen_llsym, skip_loc_list_entry): New.
20236 (dwarf2out_maybe_output_loclist_view_pair): New.
20237 (output_loc_list): Output view list or entries too.
20238 (output_view_list_offset): New.
20239 (output_die): Handle dw_val_class_view_list.
20240 (output_dwarf_version): New.
20241 (output_compilation_unit_header): Use it.
20242 (output_skeleton_debug_sections): Likewise.
20243 (output_rnglists, output_line_info): Likewise.
20244 (output_pubnames, output_aranges): Update version comments.
20245 (output_one_line_info_table): Output view numbers in asm comments.
20246 (dw_loc_list): Determine current endview, pass it to new_loc_list.
20247 Call maybe_gen_llsym.
20248 (loc_list_from_tree_1): Adjust.
20249 (add_AT_location_description): Create view list attribute if
20250 needed, check it's absent otherwise.
20251 (convert_cfa_to_fb_loc_list): Adjust.
20252 (maybe_emit_file): Call output_asm_line_debug_info for test.
20253 (dwarf2out_var_location): Reset views as needed. Precompute
20254 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
20255 attribute. Set view.
20256 (new_line_info_table): Reset next view.
20257 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
20258 (dwarf2out_source_line): Likewise. Output view resets and labels to
20259 the assembler, or select appropriate line info opcodes.
20260 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
20261 (optimize_string_length): Catch it. Adjust.
20262 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
20263 dw_val_class_view_list, and remove it if no longer needed.
20264 (hash_loc_list): Hash view numbers.
20265 (loc_list_hasher::equal): Compare them.
20266 (optimize_location_lists): Check whether a view list symbol is
20267 needed, and whether the locview attribute is present, and
20268 whether they match. Remove the locview attribute if no longer
20270 (index_location_lists): Call skip_loc_list_entry for test.
20271 (dwarf2out_finish): Call output_asm_line_debug_info for test.
20272 Use output_dwarf_version.
20273 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
20274 (struct dw_val_node): Add val_view_list.
20275 * final.c (SEEN_NEXT_VIEW): New.
20276 (set_next_view_needed): New.
20277 (clear_next_view_needed): New.
20278 (maybe_output_next_view): New.
20279 (final_start_function): Rename to...
20280 (final_start_function_1): ... this. Take pointer to FIRST,
20281 add SEEN parameter. Emit param bindings in the initial view.
20282 (final_start_function): Reintroduce SEEN-less interface.
20283 (final): Rename to...
20284 (final_1): ... this. Take SEEN parameter. Output final pending
20285 next view at the end.
20286 (final): Reintroduce seen-less interface.
20287 (final_scan_insn): Output pending next view before switching
20288 sections or ending a block. Mark the next view as needed when
20289 outputting variable locations. Notify debug backend of section
20290 changes, and of location view changes.
20291 (rest_of_handle_final): Adjust.
20292 * toplev.c (process_options): Autodetect value for debug variable
20293 location views option. Warn on incompat5 without -gdwarf-5.
20294 * doc/invoke.texi (gvariable-location-views): New.
20295 (gvariable-location-views=incompat5): New.
20296 (gno-variable-location-views): New.
20298 2018-02-08 David Malcolm <dmalcolm@redhat.com>
20300 PR tree-optimization/84136
20301 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
20302 that the result of find_edge is non-NULL.
20304 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
20307 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
20308 storing integer register in SImode. Fix cost of 256 and 512
20309 byte aligned SSE register store.
20311 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
20313 * config/i386/i386.c (ix86_multiplication_cost): Fix
20314 multiplication cost for TARGET_AVX512DQ.
20316 2018-02-08 Marek Polacek <polacek@redhat.com>
20318 PR tree-optimization/84238
20319 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
20322 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
20324 PR tree-optimization/84265
20325 * tree-vect-stmts.c (vectorizable_store): Don't treat
20326 VMAT_CONTIGUOUS accesses as grouped.
20327 (vectorizable_load): Likewise.
20329 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
20331 PR tree-optimization/81635
20332 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
20333 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
20334 (test_round_for_mask): New functions.
20335 (wide_int_cc_tests): Call test_round_for_mask.
20336 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
20337 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
20338 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
20339 range returned by get_range_info.
20341 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
20344 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
20345 * symtab.c: Include builtins.h
20346 (symtab_node::output_to_lto_symbol_table_p): Move here
20347 from lto-streamer-out.c:output_symbol_p.
20348 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
20349 (output_symbol_p): Move all logic to symtab.c
20350 (produce_symtab): Update.
20352 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20354 * config/s390/s390-opts.h (enum indirect_branch): Define.
20355 * config/s390/s390-protos.h (s390_return_addr_from_memory)
20356 (s390_indirect_branch_via_thunk)
20357 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
20358 (enum s390_indirect_branch_type): Define.
20359 * config/s390/s390.c (struct s390_frame_layout, struct
20360 machine_function): Remove.
20361 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
20362 (indirect_branch_table_label_no, indirect_branch_table_name):
20364 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
20365 (enum s390_indirect_branch_option): Define.
20366 (s390_return_addr_from_memory): New function.
20367 (s390_handle_string_attribute): New function.
20368 (s390_attribute_table): Add new attribute handler.
20369 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
20370 (s390_indirect_branch_via_thunk): New function.
20371 (s390_indirect_branch_via_inline_thunk): New function.
20372 (s390_function_ok_for_sibcall): When jumping via thunk disallow
20373 sibling call optimization for non z10 compiles.
20374 (s390_emit_call): Force indirect branch target to be a single
20375 register. Add r1 clobber for non-z10 compiles.
20376 (s390_emit_epilogue): Emit return jump via return_use expander.
20377 (s390_reorg): Handle JUMP_INSNs as execute targets.
20378 (s390_option_override_internal): Perform validity checks for the
20379 new command line options.
20380 (s390_indirect_branch_attrvalue): New function.
20381 (s390_indirect_branch_settings): New function.
20382 (s390_set_current_function): Invoke s390_indirect_branch_settings.
20383 (s390_output_indirect_thunk_function): New function.
20384 (s390_code_end): Implement target hook.
20385 (s390_case_values_threshold): Implement target hook.
20386 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
20388 * config/s390/s390.h (struct s390_frame_layout)
20389 (struct machine_function): Move here from s390.c.
20390 (TARGET_INDIRECT_BRANCH_NOBP_RET)
20391 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
20392 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
20393 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
20394 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
20395 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
20396 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
20397 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
20398 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
20399 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
20400 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
20401 (mnemonic attribute): Add values which aren't recognized
20403 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
20404 pattern for branch conversion. Fix mnemonic attribute.
20405 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
20406 indirect branch via thunk if requested.
20407 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
20408 ("*indirect_jump"): Disable for branch conversion using out of
20410 ("indirect_jump_via_thunk<mode>_z10")
20411 ("indirect_jump_via_thunk<mode>")
20412 ("indirect_jump_via_inlinethunk<mode>_z10")
20413 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
20414 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
20415 ("casesi_jump_via_inlinethunk<mode>_z10")
20416 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
20417 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
20418 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
20419 ("*indirect2_jump"): Disable for branch conversion.
20420 ("casesi_jump"): Turn into expander and expand patterns for branch
20422 ("return_use"): New expander.
20423 ("*return"): Emit return via thunk and rename it to ...
20424 ("*return<mode>"): ... this one.
20425 * config/s390/s390.opt: Add new options and and enum for the
20428 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
20430 * lra-constraints.c (match_reload): Unconditionally use
20431 gen_lowpart_SUBREG, rather than selecting between that
20432 and equivalent gen_rtx_SUBREG code.
20434 2018-02-08 Richard Biener <rguenther@suse.de>
20436 PR tree-optimization/84233
20437 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
20438 changed flag instead of boguously re-using phi_inserted.
20440 2018-02-08 Martin Jambor <mjambor@suse.cz>
20442 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
20443 static local variables.
20445 2018-02-08 Richard Biener <rguenther@suse.de>
20447 PR tree-optimization/84278
20448 * tree-vect-stmts.c (vectorizable_store): When looking for
20449 smaller vector types to perform grouped strided loads/stores
20450 make sure the mode is supported by the target.
20451 (vectorizable_load): Likewise.
20453 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20455 * config/aarch64/aarch64.c (aarch64_components_for_bb):
20456 Increase LDP/STP opportunities by adding adjacent callee-saves.
20458 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20460 PR rtl-optimization/84068
20461 PR rtl-optimization/83459
20462 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
20464 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
20466 PR tree-optimization/84224
20467 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
20468 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
20469 non-zero arguments.
20471 2018-02-07 Iain Sandoe <iain@codesourcery.com>
20474 * config/rs6000/altivec.md (*restore_world): Remove LR use.
20475 * config/rs6000/predicates.md (restore_world_operation): Adjust op
20476 count, remove one USE.
20478 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
20480 * doc/install.texi (Configuration): Document the
20481 --with-long-double-format={ibm,ieee} PowerPC configuration
20485 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
20486 Convert from define_expand to be define_insn_and_split. Rework
20487 float/double/_Float128 conversions to QI/HI/SImode to work with
20488 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
20489 conversions to QI/HImode types did a store and then a load to
20490 truncate the value. For conversions to VSX registers, don't split
20491 the insn, instead emit the code directly. Use the code iterator
20492 any_fix to combine signed and unsigned conversions.
20493 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
20494 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
20495 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20496 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
20497 (fix_<mode>di2_hw): Likewise.
20498 (fixuns_<mode>di2_hw): Likewise.
20499 (fix_<mode>si2_hw): Likewise.
20500 (fixuns_<mode>si2_hw): Likewise.
20501 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
20502 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20503 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
20504 fix<uns>_trunc<SFDF:mode>si2_p8.
20505 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
20506 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20507 (fix<uns>_<mode>_mem): Likewise.
20508 (fctiw<u>z_<mode>_mem): Likewise.
20509 (fix<uns>_<mode>_mem): Likewise.
20510 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
20511 the register allocator from doing a direct move to the GPRs to do
20512 a store, and instead use the ISA 3.0 store byte/half-word from
20513 vector register instruction. For IEEE 128-bit floating point,
20514 also optimize stores of 32-bit ints.
20515 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
20517 2018-02-07 Alan Hayward <alan.hayward@arm.com>
20519 * genextract.c (push_pathstr_operand): New function to support
20521 (walk_rtx): Call push_pathstr_operand.
20522 (print_path): Support [a-zA-Z].
20524 2018-02-07 Richard Biener <rguenther@suse.de>
20526 PR tree-optimization/84037
20527 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
20528 (cse_and_gimplify_to_preheader): Declare.
20529 (vect_get_place_in_interleaving_chain): Likewise.
20530 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20532 (_loop_vec_info::~_loop_vec_info): Delete it.
20533 (cse_and_gimplify_to_preheader): New function.
20534 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
20535 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
20536 (vectorizable_load): Likewise. For grouped stores always base
20537 the IV on the first element.
20538 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
20539 condition before gimplifying.
20541 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20543 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
20544 *DIV_EXPR and *MOD_EXPR.
20546 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
20549 * config/i386/i386.c (ix86_option_override_internal): Mask out
20550 the CF_SET bit when checking -fcf-protection.
20552 2018-02-07 Tom de Vries <tom@codesourcery.com>
20555 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
20558 2018-02-07 Richard Biener <rguenther@suse.de>
20560 PR tree-optimization/84204
20561 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
20564 PR tree-optimization/84205
20565 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
20566 special-case isl_ast_op_zdiv_r.
20568 PR tree-optimization/84223
20569 * graphite-scop-detection.c (gather_bbs::before_dom_children):
20570 Only add conditions from within the region.
20571 (gather_bbs::after_dom_children): Adjust.
20573 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
20576 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
20577 * config/avr/avr.md: Only post-reload split REG-REG moves if
20578 either register is GENERAL_REG_P.
20580 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20582 PR tree-optimization/84235
20583 * tree-ssa-scopedtables.c
20584 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
20585 if the subtraction is performed in floating point type where NaNs are
20586 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
20587 build 1. Formatting fix.
20589 2018-02-06 Jakub Jelinek <jakub@redhat.com>
20592 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
20593 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
20594 and skip it regardless of bb boundaries. Use CALL_P macro,
20595 don't test INSN_P (insn) together with CALL_P or JUMP_P check
20596 unnecessarily, formatting fix.
20598 2018-02-06 Michael Collison <michael.collison@arm.com>
20600 * config/arm/thumb2.md:
20601 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
20602 (*thumb_mov_notscc): Ditto.
20604 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
20607 * config/rs6000/rs6000.md (su code attribute): Use "u" for
20608 unsigned_fix, not "s".
20610 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20612 * configure.ac (gcc_fn_eh_frame_ro): New function.
20613 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20614 correct .eh_frame permissions.
20615 * configure: Regenerate.
20617 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
20619 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20620 irrelevant options.
20622 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20624 * config/rs6000/rs6000.c (rs6000_option_override_internal):
20625 Display warning message for -mno-speculate-indirect-jumps.
20627 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
20629 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20631 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20633 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
20635 PR tree-optimization/84225
20636 * tree-eh.c (find_trapping_overflow): Only call
20637 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20639 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20642 * config/i386/i386.c: Reimplement the check of possible options
20643 -mibt/-mshstk conbination. Change error messages.
20644 * doc/invoke.texi: Fix a typo: remove extra '='.
20646 2018-02-06 Marek Polacek <polacek@redhat.com>
20648 PR tree-optimization/84228
20649 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20651 2018-02-06 Tamar Christina <tamar.christina@arm.com>
20654 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20655 emitted arch directives.
20656 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20657 __ARM_FEATURE_COPROC before changing architectures.
20659 2018-02-06 Richard Biener <rguenther@suse.de>
20661 * config/i386/i386.c (print_reg): Fix typo.
20662 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20664 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
20666 * configure: Regenerate.
20668 2018-02-05 Martin Sebor <msebor@redhat.com>
20670 PR tree-optimization/83369
20671 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20674 2018-02-05 Martin Liska <mliska@suse.cz>
20676 * doc/invoke.texi: Cherry-pick upstream r323995.
20678 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
20680 * ira.c (ira_init_register_move_cost): Adjust comment.
20682 2018-02-05 Martin Liska <mliska@suse.cz>
20684 PR gcov-profile/84137
20685 * doc/gcov.texi: Fix typo in documentation.
20687 2018-02-05 Martin Liska <mliska@suse.cz>
20689 PR gcov-profile/83879
20690 * doc/gcov.texi: Document necessity of --dynamic-list-data when
20691 using dlopen functionality.
20693 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
20695 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20696 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20697 _mm_maskz_range_ss, _mm_mask_range_round_ss,
20698 _mm_maskz_range_round_ss): New intrinsics.
20699 (__builtin_ia32_rangesd128_round)
20700 (__builtin_ia32_rangess128_round): Remove.
20701 (__builtin_ia32_rangesd128_mask_round,
20702 __builtin_ia32_rangess128_mask_round): New builtins.
20703 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20704 __builtin_ia32_rangess128_round): Remove.
20705 (__builtin_ia32_rangesd128_mask_round,
20706 __builtin_ia32_rangess128_mask_round): New builtins.
20707 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20708 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20709 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20710 "<round_saeonly_constraint>")): Changed to ...
20711 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20712 "<round_saeonly_scalar_constraint>")): ... this.
20713 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20714 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20715 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20716 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20717 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20719 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
20721 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20723 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20724 Remove all values except native, 8540 and 8548.
20726 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
20728 * config/i386/i386.c (ix86_output_function_return): Pass
20729 INVALID_REGNUM, instead of -1, as invalid register number to
20730 indirect_thunk_name and output_indirect_thunk.
20732 2018-02-02 Julia Koval <julia.koval@intel.com>
20734 * config.gcc: Add -march=icelake.
20735 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20736 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20737 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20738 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20739 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20740 (processor_target_table): Add icelake.
20741 (ix86_option_override_internal): Handle new PTAs.
20742 (get_builtin_code_for_version): Handle icelake.
20743 (M_INTEL_COREI7_ICELAKE): New.
20744 (fold_builtin_cpu): Handle icelake.
20745 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20746 * doc/invoke.texi: Add -march=icelake.
20748 2018-02-02 Julia Koval <julia.koval@intel.com>
20750 * config/i386/i386.c (ix86_option_override_internal): Change flags type
20751 to wide_int_bitmask.
20752 * wide-int-bitmask.h: New.
20754 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20757 * config/i386/i386.md: Replace Pmode with word_mode in
20758 builtin_setjmp_setup and builtin_longjmp to support x32.
20760 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
20764 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20766 (rs6000_supported_cpu_names): New static variable.
20767 (linux_cpu_translation_table): Likewise.
20768 (elf_platform) <cpu>: Define new static variable and use it.
20769 Translate kernel AT_PLATFORM name to canonical name if needed.
20770 Error if platform name is unknown.
20772 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
20775 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20777 2018-02-01 Jeff Law <law@redhat.com>
20780 * config/i386/i386.c (release_scratch_register_on_entry): Add new
20781 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
20782 the scratch if RELEASE_VIA_POP is false.
20783 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20784 If we have to save a temporary register, decrement SIZE appropriately.
20785 Pass new arguments to release_scratch_register_on_entry.
20786 (ix86_adjust_stack_and_probe): Likewise.
20787 (ix86_emit_probe_stack_range): Pass new arguments to
20788 release_scratch_register_on_entry.
20790 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
20792 PR rtl-optimization/84157
20793 * combine.c (change_zero_ext): Use REG_P predicate in
20794 front of HARD_REGISTER_P predicate.
20796 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
20798 * config/avr/avr.c (avr_option_override): Move disabling of
20799 -fdelete-null-pointer-checks to...
20800 * common/config/avr/avr-common.c (avr_option_optimization_table):
20803 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20805 PR tree-optimization/81635
20806 * tree-data-ref.c (split_constant_offset_1): For types that
20807 wrap on overflow, try to use range info to prove that wrapping
20810 2018-02-01 Renlin Li <renlin.li@arm.com>
20813 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20814 TAILCALL_ADDR_REGS.
20815 (aarch64_register_move_cost): Likewise.
20816 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20817 TAILCALL_ADDR_REGS.
20818 (REG_CLASS_NAMES): Likewise.
20819 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20820 TAILCALL_ADDR_REGS. Remove IP registers.
20821 * config/aarch64/aarch64.md (Ucs): Update register constraint.
20823 2018-02-01 Richard Biener <rguenther@suse.de>
20825 * domwalk.h (dom_walker::dom_walker): Add additional constructor
20826 for specifying RPO order and allow NULL for that.
20827 * domwalk.c (dom_walker::dom_walker): Likewise.
20828 (dom_walker::walk): Handle NULL RPO order.
20829 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20831 (rewrite_update_dom_walker): Likewise.
20832 (mark_def_dom_walker): Likewise.
20834 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20836 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20837 (aarch64_maybe_expand_sve_subreg_move): Declare.
20838 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20839 * config/aarch64/predicates.md (aarch64_any_register_operand): New
20841 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20842 that are semantically a reverse operation.
20843 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20844 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20845 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20847 (aarch64_can_change_mode_class): For big-endian, forbid changes
20848 between two SVE modes if they have different element sizes.
20850 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20852 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20853 the TImode handling for big-endian targets.
20855 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20857 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20858 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
20860 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20861 Remove BSWAP handing for big-endian targets and use the form of
20862 LD1RQ appropariate for the mode.
20864 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20866 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20867 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20868 duplicated element.
20870 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20873 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20874 check for operands that need to go through aarch64_sve_reload_be.
20876 2018-02-01 Jakub Jelinek <jakub@redhat.com>
20878 PR tree-optimization/81661
20879 PR tree-optimization/84117
20880 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20881 * tree-eh.c: Include gimplify.h.
20882 (find_trapping_overflow, replace_trapping_overflow,
20883 rewrite_to_non_trapping_overflow): New functions.
20884 * tree-vect-loop.c: Include tree-eh.h.
20885 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20886 * tree-data-ref.c: Include tree-eh.h.
20887 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20889 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
20891 PR rtl-optimization/84123
20892 * combine.c (change_zero_ext): Check if hard register satisfies
20893 can_change_dest_mode before calling gen_lowpart_SUBREG.
20895 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
20898 * ira.c (ira_init_register_move_cost): Remove assert.
20900 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20902 PR rtl-optimization/84071
20903 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20904 * doc/tm.texi: Regenerate.
20906 2018-01-31 Richard Biener <rguenther@suse.de>
20908 PR tree-optimization/84132
20909 * tree-data-ref.c (analyze_miv_subscript): Properly
20910 check whether evolution_function_is_affine_multivariate_p
20911 before calling gcd_of_steps_may_divide_p.
20913 2018-01-31 Julia Koval <julia.koval@intel.com>
20916 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20917 * config/i386/i386.md (rdpid_rex64) New.
20918 (rdpid): Make 32bit only.
20920 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20923 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20924 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20926 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20929 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20931 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20933 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20935 PR rtl-optimization/84071
20936 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20937 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20939 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20941 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20942 (arc_attribute_table): Add 'aux' attribute.
20943 (arc_in_small_data_p): Consider aux like variables.
20944 (arc_is_aux_reg_p): New function.
20945 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20946 (arc_get_aux_arg): New function.
20947 (prepare_move_operands): Handle aux-register access.
20948 (arc_handle_aux_attribute): New function.
20949 * doc/extend.texi (ARC Variable attributes): Add subsection.
20951 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20953 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20954 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20955 (arc_attribute_table): Add 'uncached' attribute.
20956 (arc_print_operand): Print '.di' flag for uncached memory
20958 (arc_in_small_data_p): Do not consider for small data the uncached
20960 (arc_is_uncached_mem_p): New function.
20961 * config/arc/predicates.md (compact_store_memory_operand): Check
20962 for uncached memory accesses.
20963 (nonvol_nonimm_operand): Likewise.
20964 * doc/extend.texi (ARC Type Attribute): New subsection.
20966 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20969 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20970 falign-loops=): Add Optimization flag.
20972 2018-01-30 Jeff Law <law@redhat.com>
20975 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20976 INT_REGISTERS_SAVED. Check it prior to calling
20977 get_scratch_register_on_entry.
20978 (ix86_adjust_stack_and_probe): Similarly.
20979 (ix86_emit_probe_stack_range): Similarly.
20980 (ix86_expand_prologue): Corresponding changes.
20982 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20985 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20986 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20988 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20991 * lra-constraints.c (curr_insn_transform): Process AND in the
20994 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20996 PR rtl-optimization/83986
20997 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20998 dependence against last_pending_memory_flush in addition to
20999 pending_jump_insns.
21001 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
21003 PR tree-optimization/81611
21004 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
21007 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21010 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
21013 2018-01-30 Richard Biener <rguenther@suse.de>
21014 Jakub Jelinek <jakub@redhat.com>
21016 PR tree-optimization/84111
21017 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
21018 inner loops added during recursion, as they don't have up-to-date
21021 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
21024 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
21025 (can_inline_edge_by_limits_p): ... here.
21026 (can_early_inline_edge_p, check_callers,
21027 update_caller_keys, update_callee_keys, recursive_inlining,
21028 add_new_edges_to_heap, speculation_useful_p,
21029 inline_small_functions,
21030 inline_small_functions, flatten_function,
21031 inline_to_all_callers_1): Update.
21033 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
21035 * profile-count.c (profile_count::combine_with_ipa_count): Handle
21038 2018-01-30 Richard Biener <rguenther@suse.de>
21040 PR tree-optimization/83008
21041 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
21042 invariant and constant vector uses in stmts when they need
21043 more than one stmt.
21045 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21048 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
21049 * configure: Regenerate.
21051 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
21053 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
21055 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
21056 Use gen_rtx_REG rather than gen_lowpart.
21058 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
21060 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
21061 rather than 0 when creating partial subregs.
21063 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
21065 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
21068 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
21071 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
21072 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
21073 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
21074 flags. This restores the settings used before the 2017-07-24.
21075 Turning off pre increment/decrement/modify allows IVOPTS to
21076 optimize DF/SF loops where the index is an int.
21078 2018-01-29 Richard Biener <rguenther@suse.de>
21079 Kelvin Nilsen <kelvin@gcc.gnu.org>
21082 * tree-vect-stmts.c (vectorizable_call): Don't call
21083 targetm.vectorize_builtin_md_vectorized_function if callee is
21086 2018-01-22 Carl Love <cel@us.ibm.com>
21088 * doc/extend.tex: Fix typo in second arg in
21089 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
21091 2018-01-29 Richard Biener <rguenther@suse.de>
21093 PR tree-optimization/84086
21094 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
21095 (flush_ssaname_freelist): When SSA names were released reset
21096 the SCEV hash table.
21098 2018-01-29 Richard Biener <rguenther@suse.de>
21100 PR tree-optimization/84057
21101 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
21102 removed paths when removing edges.
21104 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
21106 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
21107 -mfunction-return=@var{choice}.
21109 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
21111 PR diagnostic/84034
21112 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
21113 Handle CR like TAB.
21114 (layout::print_source_line): Likewise.
21115 (test_get_line_width_without_trailing_whitespace): Add test cases.
21117 2018-01-27 Jakub Jelinek <jakub@redhat.com>
21119 PR middle-end/84040
21120 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
21123 2018-01-26 Jim Wilson <jimw@sifive.com>
21125 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
21127 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
21130 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21132 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
21133 and CMP + SUB-immediate -> SUBS.
21135 2018-01-26 Martin Sebor <msebor@redhat.com>
21137 PR tree-optimization/83896
21138 * tree-ssa-strlen.c (get_string_len): Rename...
21139 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
21140 Avoid assuming length is constant.
21141 (handle_char_store): Use HOST_WIDE_INT for string length.
21143 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
21146 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
21147 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
21149 2018-01-26 Richard Biener <rguenther@suse.de>
21151 PR rtl-optimization/84003
21152 * dse.c (record_store): Only record redundant stores when
21153 the earlier store aliases at least all accesses the later one does.
21155 2018-01-26 Jakub Jelinek <jakub@redhat.com>
21157 PR rtl-optimization/83985
21158 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
21159 REG_CFA_RESTORE insns.
21160 (delete_unmarked_insns): Don't ignore separate shrink wrapping
21161 REG_CFA_RESTORE insns here.
21164 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
21165 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
21167 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
21169 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
21170 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
21171 (arc_init): Likewise.
21172 (arc_override_options): Likewise.
21173 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
21175 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
21177 * config/arc/arc.h (TARGET_DBNZ): Define.
21178 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
21179 properly set the tune attribute.
21180 (dbnz): Use TARGET_DBNZ guard.
21181 * config/arc/arc.opt (mtune): Add core3 option.
21183 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
21185 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
21186 recognize new pic like addresses.
21187 (arc_delegitimize_address): Clean up.
21189 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
21191 * config/arc/arc-arches.def: Option mrf16 valid for all
21193 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
21194 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
21195 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
21196 * config/arc/arc-tables.opt: Regenerate.
21197 * config/arc/arc.c (arc_conditional_register_usage): Handle
21198 reduced register file case.
21199 (arc_file_start): Set must have build attributes.
21200 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
21201 mrf16 option value.
21202 * config/arc/arc.opt (mrf16): Add new option.
21203 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
21204 * config/arc/genmultilib.awk: Handle new mrf16 option.
21205 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
21206 * config/arc/t-multilib: Regenerate.
21207 * doc/invoke.texi (ARC Options): Document mrf16 option.
21209 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
21211 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
21212 * config/arc/arc.c (arc_handle_secure_attribute): New function.
21213 (arc_attribute_table): Add 'secure_call' attribute.
21214 (arc_print_operand): Print secure call operand.
21215 (arc_function_ok_for_sibcall): Don't optimize tail calls when
21217 (arc_is_secure_call_p): New function. * config/arc/arc.md
21218 (call_i): Add support for sjli instruction.
21219 (call_value_i): Likewise.
21220 * config/arc/constraints.md (Csc): New constraint.
21222 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
21223 John Eric Martin <John.Martin@emmicro-us.com>
21225 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
21226 * config/arc/arc.c (_arc_jli_section): New struct.
21227 (arc_jli_section): New type.
21228 (rc_jli_sections): New static variable.
21229 (arc_handle_jli_attribute): New function.
21230 (arc_attribute_table): Add jli_always and jli_fixed attribute.
21231 (arc_file_end): New function.
21232 (TARGET_ASM_FILE_END): Define.
21233 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
21234 (arc_add_jli_section): New function.
21235 (jli_call_scan): Likewise.
21236 (arc_reorg): Call jli_call_scan.
21237 (arc_output_addsi): Remove 'S' from printing asm operand.
21238 (arc_is_jli_call_p): New function.
21239 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
21241 (movhi_insn): Likewise.
21242 (movsi_insn): Likewise.
21243 (movsi_set_cc_insn): Likewise.
21244 (loadqi_update): Likewise.
21245 (load_zeroextendqisi_update): Likewise.
21246 (load_signextendqisi_update): Likewise.
21247 (loadhi_update): Likewise.
21248 (load_zeroextendhisi_update): Likewise.
21249 (load_signextendhisi_update): Likewise.
21250 (loadsi_update): Likewise.
21251 (loadsf_update): Likewise.
21252 (movsicc_insn): Likewise.
21253 (bset_insn): Likewise.
21254 (bxor_insn): Likewise.
21255 (bclr_insn): Likewise.
21256 (bmsk_insn): Likewise.
21257 (bicsi3_insn): Likewise.
21258 (cmpsi_cc_c_insn): Likewise.
21259 (movsi_ne): Likewise.
21260 (movsi_cond_exec): Likewise.
21261 (clrsbsi2): Likewise.
21262 (norm_f): Likewise.
21272 (call_i): Remove 'S' asm letter, add jli instruction.
21273 (call_value_i): Likewise.
21274 * config/arc/arc.op (mjli-always): New option.
21275 * config/arc/constraints.md (Cji): New constraint.
21276 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
21278 (subsf3_fpx): Likewise.
21279 (mulsf3_fpx): Likewise.
21280 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
21282 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
21283 function attrbutes.
21284 * doc/invoke.texi (ARC): Document mjli-always option.
21286 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
21288 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
21289 avoid addition with 0 and use incw and decw where possible.
21291 2018-01-26 Richard Biener <rguenther@suse.de>
21293 PR tree-optimization/81082
21294 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
21295 association if it requires casting to unsigned.
21296 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
21297 from fold_plusminus_mult_expr to catch important cases late when
21298 range info is available.
21300 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21302 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
21303 * configure.ac (hidden_linkonce): New test.
21304 * configure: Regenerate.
21305 * config.in: Regenerate.
21307 2018-01-26 Julia Koval <julia.koval@intel.com>
21309 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
21310 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
21311 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
21312 _mm_mask_bitshuffle_epi64_mask): Fix type.
21313 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
21314 USI_FTYPE_V4DI_V4DI_USI): Remove.
21315 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
21316 __builtin_ia32_vpshufbitqmb256_mask,
21317 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
21318 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
21319 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
21321 2018-01-26 Alan Modra <amodra@gmail.com>
21324 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
21325 UNSPEC_VBPERMQ. Sort other unspecs.
21327 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
21329 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
21331 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
21333 PR middle-end/83055
21334 * predict.c (drop_profile): Do not push/pop cfun; update also
21336 (handle_missing_profiles): Fix logic looking for zero profiles.
21338 2018-01-25 Jakub Jelinek <jakub@redhat.com>
21340 PR middle-end/83977
21341 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
21342 on functions with #pragma omp declare simd or functions with simd
21344 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
21345 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
21346 Remove trailing \n from warning_at calls.
21348 2018-01-25 Tom de Vries <tom@codesourcery.com>
21351 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21352 for neutered workers.
21354 2018-01-24 Joseph Myers <joseph@codesourcery.com>
21357 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
21358 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
21360 2018-01-24 Jeff Law <law@redhat.com>
21363 * i386.c (get_probe_interval): Move to earlier point.
21364 (ix86_compute_frame_layout): If -fstack-clash-protection and
21365 the frame is larger than the probe interval, then use pushes
21366 to save registers rather than reg->mem moves.
21367 (ix86_expand_prologue): Remove conditional for int_registers_saved
21370 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
21373 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
21374 min/max for never referenced object.
21376 2018-01-24 Jakub Jelinek <jakub@redhat.com>
21378 PR middle-end/83977
21379 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
21381 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
21382 attributes from DECL_ATTRIBUTES (decl) without affecting
21383 DECL_ATTRIBUTES (current_function_decl).
21384 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
21385 functions with non-NULL DECL_ABSTRACT_ORIGIN.
21387 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
21389 PR tree-optimization/83979
21390 * fold-const.c (fold_comparison): Use constant_boolean_node
21391 instead of boolean_{true,false}_node.
21393 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
21395 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
21398 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21400 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21401 Simplify the clause that sets the length attribute.
21402 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21403 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
21404 clause that sets the length attribute.
21405 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21407 2018-01-24 Tom de Vries <tom@codesourcery.com>
21410 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
21411 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
21412 Add strict parameter.
21413 (prevent_branch_around_nothing): Insert dummy insn between branch to
21414 label and label with no ptx insn inbetween.
21415 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
21417 2018-01-24 Tom de Vries <tom@codesourcery.com>
21420 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21421 for neutered threads in warp.
21422 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
21424 2018-01-24 Richard Biener <rguenther@suse.de>
21426 PR tree-optimization/83176
21427 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
21430 2018-01-24 Richard Biener <rguenther@suse.de>
21432 PR tree-optimization/82819
21433 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
21434 code generating pluses that are no-ops in the target precision.
21436 2018-01-24 Richard Biener <rguenther@suse.de>
21438 PR middle-end/84000
21439 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
21441 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21443 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
21444 to merge probabilities.
21445 * predict.c (probably_never_executed): Also mark as cold functions
21446 with global 0 profile and guessed local profile.
21447 * profile-count.c (profile_probability::combine_with_count): New
21449 * profile-count.h (profile_probability::operator*,
21450 profile_probability::operator*=, profile_probability::operator/,
21451 profile_probability::operator/=): Reduce precision to adjusted
21452 and set value to guessed on contradictory divisions.
21453 (profile_probability::combine_with_freq): Remove.
21454 (profile_probability::combine_wiht_count): Declare.
21455 (profile_count::force_nonzero):: Set to adjusted.
21456 (profile_count::probability_in):: Set quality to adjusted.
21457 * tree-ssa-tail-merge.c (replace_block_by): Use
21458 combine_with_count.
21460 2018-01-23 Andrew Waterman <andrew@sifive.com>
21461 Jim Wilson <jimw@sifive.com>
21463 * config/riscv/riscv.c (riscv_stack_boundary): New.
21464 (riscv_option_override): Set riscv_stack_boundary. Handle
21465 riscv_preferred_stack_boundary_arg.
21466 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
21467 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
21468 (STACK_BOUNDARY): Set to riscv_stack_boundary.
21469 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
21470 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
21471 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
21473 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
21476 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
21477 of struct ix86_frame.
21478 (ix86_expand_epilogue): Likewise. Add a local variable for
21479 the reg_save_offset field in struct ix86_frame.
21481 2018-01-23 Bin Cheng <bin.cheng@arm.com>
21483 PR tree-optimization/82604
21484 * tree-loop-distribution.c (enum partition_kind): New enum item
21485 PKIND_PARTIAL_MEMSET.
21486 (partition_builtin_p): Support above new enum item.
21487 (generate_code_for_partition): Ditto.
21488 (compute_access_range): Differentiate cases that equality can be
21489 proven at all loops, the innermost loops or no loops.
21490 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
21491 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
21492 (finalize_partitions, distribute_loop): Don't fuse partition of
21493 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
21494 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
21495 parloop is enabled.
21497 2018-01-23 Martin Liska <mliska@suse.cz>
21499 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
21500 order to ignore the predictor.
21501 (PRED_POLYMORPHIC_CALL): Likewise.
21502 (PRED_RECURSIVE_CALL): Likewise.
21504 2018-01-23 Martin Liska <mliska@suse.cz>
21506 * tree-profile.c (tree_profiling): Print function header to
21507 aware reader which function we are working on.
21508 * value-prof.c (gimple_find_values_to_profile): Do not print
21509 not interesting value histograms.
21511 2018-01-23 Martin Liska <mliska@suse.cz>
21513 * profile-count.h (enum profile_quality): Add
21514 profile_uninitialized as the first value. Do not number values
21515 as they are zero based.
21516 (profile_count::verify): Update sanity check.
21517 (profile_probability::verify): Likewise.
21519 2018-01-23 Nathan Sidwell <nathan@acm.org>
21521 * doc/invoke.texi (ffor-scope): Deprecate.
21523 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21525 PR tree-optimization/83510
21526 * domwalk.c (set_all_edges_as_executable): New function.
21527 (dom_walker::dom_walker): Convert bool param
21528 "skip_unreachable_blocks" to enum reachability. Move setup of
21529 edge flags to set_all_edges_as_executable and only do it when
21530 reachability is REACHABLE_BLOCKS.
21531 * domwalk.h (enum dom_walker::reachability): New enum.
21532 (dom_walker::dom_walker): Convert bool param
21533 "skip_unreachable_blocks" to enum reachability.
21534 (set_all_edges_as_executable): New decl.
21535 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
21536 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
21538 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
21539 but converting true to REACHABLE_BLOCKS.
21540 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
21542 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
21543 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
21544 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
21546 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
21547 if check_all_array_refs will be called.
21549 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21551 * tree.c (selftest::test_location_wrappers): Add more test
21554 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21556 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
21557 (selftest::test_bit_in_range): Likewise.
21559 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21562 * doc/sourcebuild.texi (vect_float): Say that the selector
21563 only describes the situation when -funsafe-math-optimizations is on.
21564 (vect_float_strict): Document.
21566 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21568 PR tree-optimization/83965
21569 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
21570 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
21571 instead of checking only for a reduction.
21572 (vect_recog_widen_sum_pattern): Likewise.
21574 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21576 * predict.c (probably_never_executed): Only use precise profile info.
21577 (compute_function_frequency): Skip after inlining hack since we now
21578 have quality checking.
21580 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21582 * profile-count.h (profile_probability::very_unlikely,
21583 profile_probability::unlikely, profile_probability::even): Set
21584 precision to guessed.
21586 2018-01-23 Richard Biener <rguenther@suse.de>
21588 PR tree-optimization/83963
21589 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
21590 Properly terminate dominator walk when crossing the exit edge not
21591 when visiting its source block.
21593 2018-01-23 Jakub Jelinek <jakub@redhat.com>
21596 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
21597 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
21599 2018-01-22 Jakub Jelinek <jakub@redhat.com>
21601 PR tree-optimization/83957
21602 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
21603 semicolon after for body surrounded by braces.
21605 PR tree-optimization/83081
21606 * profile-count.h (profile_probability::split): New method.
21607 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21608 Use profile_probability::split.
21609 (do_compare_rtx_and_jump): Fix adjustment of probabilities
21610 when splitting a single conditional jump into 2.
21612 2018-01-22 David Malcolm <dmalcolm@redhat.com>
21614 PR tree-optimization/69452
21615 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21618 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21620 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21621 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21622 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21624 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21626 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21628 * config/rl78/rl78.md (movdi): New define_expand.
21629 * config/rl78/rl78.c (rl78_split_movdi): New function.
21631 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
21634 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21636 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21637 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21638 128-bit to produce an UNSPEC move to get the double word with the
21639 signbit and then a shift directly to do signbit.
21640 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21641 implementation with a new version that just does either a direct
21642 move or a regular move. Move memory interface to separate insns.
21643 Move insns so they are next to the expander.
21644 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21645 with signbit move. Split big and little endian case.
21646 (signbit<mode>2_dm_mem_le): Likewise.
21647 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21648 (signbit<mode>2_dm2): Likewise.
21650 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21652 * config/rl78/rl78.md (anddi3): New define_expand.
21654 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21656 * config/rl78/rl78.md (umindi3): New define_expand.
21658 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21660 * config/rl78/rl78.md (smindi3): New define_expand.
21662 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21664 * config/rl78/rl78.md (smaxdi3): New define_expand.
21666 2018-01-22 Carl Love <cel@us.ibm.com>
21668 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21669 LVX_V1TI): Add macro expansion.
21670 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21671 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21672 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21673 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21674 Change check to determine if the instruction is a byte reversing
21675 entry. Fix typo in comment.
21676 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21677 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21678 Add def_builtin calls for new builtins.
21679 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21680 Add define_insn expansion.
21682 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21684 * config/rl78/rl78.md (umaxdi3): New define_expand.
21686 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21688 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21689 for non-QImode registers.
21691 2018-01-22 Richard Biener <rguenther@suse.de>
21693 PR tree-optimization/83963
21694 * graphite-scop-detection.c (scop_detection::get_sese): Delay
21695 including the loop exit block.
21696 (scop_detection::merge_sese): Likewise.
21697 (scop_detection::add_scop): Do it here instead.
21699 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21701 * doc/sourcebuild.texi (arm_softfloat): Document.
21703 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
21706 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21707 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21708 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21710 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21711 David Edelsohn <dje.gcc@gmail.com>
21714 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21715 Change "crset eq" to "crset 2".
21716 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21717 (*call_indirect_aix<mode>_nospec): Likewise.
21718 (*call_value_indirect_aix<mode>_nospec): Likewise.
21719 (*call_indirect_elfv2<mode>_nospec): Likewise.
21720 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21721 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21722 change assembly output from . to $.
21723 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21724 (indirect_jump<mode>_nospec): Change assembly output from . to $.
21725 (*tablejump<mode>_internal1_nospec): Likewise.
21727 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
21730 * config/sh/sh_optimize_sett_clrt.cc:
21731 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21733 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
21735 PR tree-optimization/83940
21736 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21737 offset_dt to vect_constant_def rather than vect_unknown_def_type.
21738 (vect_check_load_store_mask): Add a mask_dt_out parameter and
21739 use it to pass back the definition type.
21740 (vect_check_store_rhs): Likewise rhs_dt_out.
21741 (vect_build_gather_load_calls): Add a mask_dt argument and use
21742 it instead of a call to vect_is_simple_use.
21743 (vectorizable_store): Update calls to vect_check_load_store_mask
21744 and vect_check_store_rhs. Use the dt returned by the latter instead
21745 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
21746 instead of calls to vect_is_simple_use. Pass the scalar rather
21747 than the vector operand to vect_is_simple_use when handling
21748 second and subsequent copies of an rhs value.
21749 (vectorizable_load): Update calls to vect_check_load_store_mask
21750 and vect_build_gather_load_calls. Use the cached mask_dt and
21751 gs_info.offset_dt instead of calls to vect_is_simple_use.
21753 2018-01-20 Jakub Jelinek <jakub@redhat.com>
21755 PR middle-end/83945
21756 * tree-emutls.c: Include gimplify.h.
21757 (lower_emutls_2): New function.
21758 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21759 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21760 it before further processing.
21763 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21764 UINTVAL (trueop1) instead of INTVAL (op1).
21766 2018-01-19 Jakub Jelinek <jakub@redhat.com>
21770 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21771 INCOMING_FRAME_SP_OFFSET if not defined.
21772 (scan_trace): Add ENTRY argument. If true and
21773 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21774 emit a note to adjust the CFA offset.
21775 (create_cfi_notes): Adjust scan_trace callers.
21776 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21777 INCOMING_FRAME_SP_OFFSET in the CIE.
21778 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21779 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21781 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21782 * doc/tm.texi: Regenerated.
21784 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21786 PR rtl-optimization/83147
21787 * lra-constraints.c (remove_inheritance_pseudos): Use
21788 lra_substitute_pseudo_within_insn.
21790 2018-01-19 Tom de Vries <tom@codesourcery.com>
21791 Cesar Philippidis <cesar@codesourcery.com>
21794 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21796 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
21799 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21800 spaces for function labels.
21802 2018-01-19 Martin Liska <mliska@suse.cz>
21804 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21805 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21806 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21807 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21808 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21809 (PRED_CONST_RETURN): Change from 69 to 65.
21810 (PRED_NULL_RETURN): Change from 91 to 71.
21811 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21812 (PRED_LOOP_GUARD): Change from 66 to 73.
21814 2018-01-19 Martin Liska <mliska@suse.cz>
21816 * predict.c (predict_insn_def): Add new assert.
21817 (struct branch_predictor): Change type to signed integer.
21818 (test_prediction_value_range): Amend test to cover
21819 PROB_UNINITIALIZED.
21820 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21821 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21822 (PRED_LOOP_ITERATIONS_MAX): Likewise.
21823 (PRED_LOOP_IV_COMPARE): Likewise.
21824 * predict.h (PROB_UNINITIALIZED): Define new constant.
21826 2018-01-19 Martin Liska <mliska@suse.cz>
21828 * predict.c (dump_prediction): Add new format for
21829 analyze_brprob.py script which is enabled with -details
21831 * profile-count.h (precise_p): New function.
21833 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21835 PR tree-optimization/83922
21836 * tree-vect-loop.c (vect_verify_full_masking): Return false if
21837 there are no statements that need masking.
21838 (vect_active_double_reduction_p): New function.
21839 (vect_analyze_loop_operations): Use it when handling phis that
21840 are not in the loop header.
21842 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21844 PR tree-optimization/83914
21845 * tree-vect-loop.c (vectorizable_induction): Don't convert
21846 init_expr or apply the peeling adjustment for inductions
21847 that are nested within the vectorized loop.
21849 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21851 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21854 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21858 * function.h (gimplify_parameters): Add gimple_seq * argument.
21859 * function.c: Include gimple.h and options.h.
21860 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21861 for the added local temporaries if needed.
21862 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21863 if there are any parameter cleanups, wrap whole body into a
21864 try/finally with the cleanups.
21866 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
21869 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21870 Use GET_MODE_CLASS for scalar floating point.
21872 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21876 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21877 Fix call of call_cgraph_insertion_hooks.
21879 2018-01-18 Martin Sebor <msebor@redhat.com>
21881 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21883 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21886 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21889 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
21892 * common.opt: (-ffile-prefix-map): New option.
21893 * opts.c (common_handle_option): Defer it.
21894 * opts-global.c (handle_common_deferred_options): Handle it.
21895 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21896 * file-prefix-map.h: New file.
21897 (remap_debug_filename, add_debug_prefix_map): ...here.
21898 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21899 * final.c (debug_prefix_map, add_debug_prefix_map
21900 remap_debug_filename): Move to...
21901 * file-prefix-map.c: New file.
21902 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21903 generalize, get rid of alloca(), use strrchr() instead of strchr().
21904 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21905 Implement in terms of add_prefix_map().
21906 (remap_macro_filename, remap_debug_filename): Implement in term of
21908 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21909 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21910 * dbxout.c: Include file-prefix-map.h.
21911 * varasm.c: Likewise.
21912 * vmsdbgout.c: Likewise.
21913 * xcoffout.c: Likewise.
21914 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21915 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21916 * doc/invoke.texi (-ffile-prefix-map): Document.
21917 (-fdebug-prefix-map): Update description.
21919 2018-01-18 Martin Liska <mliska@suse.cz>
21921 * config/i386/i386.c (indirect_thunk_name): Document that also
21923 (output_indirect_thunk): Document why both instructions
21924 (pause and lfence) are generated.
21926 2018-01-18 Richard Biener <rguenther@suse.de>
21928 PR tree-optimization/83887
21929 * graphite-scop-detection.c
21930 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21931 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21932 (scop_detection::merge_sese): Re-implement with a flood-fill
21933 algorithm that properly finds a SESE region if it exists.
21935 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21938 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21939 pointer_diff optimizations use view_convert instead of convert.
21941 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21943 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21944 Generate different code for -mno-speculate-indirect-jumps.
21945 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21946 (*call_indirect_aix<mode>): Disable for
21947 -mno-speculate-indirect-jumps.
21948 (*call_indirect_aix<mode>_nospec): New define_insn.
21949 (*call_value_indirect_aix<mode>): Disable for
21950 -mno-speculate-indirect-jumps.
21951 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21952 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21953 -mno-speculate-indirect-jumps.
21954 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21956 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21958 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21959 long double type, set the flags for noting the default long double
21960 type, even if we don't pass or return a long double type.
21962 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21965 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21968 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21970 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21971 support for merge[hl].
21972 (fold_mergehl_helper): New helper function.
21973 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21974 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21975 (altivec_vmrglw_direct): Add xxmrglw insn.
21977 2018-01-17 Andrew Waterman <andrew@sifive.com>
21979 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21980 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21982 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21985 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21986 call the lto_location_cache before reading the
21987 DECL_SOURCE_LOCATION of the types.
21989 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21990 Richard Sandiford <richard.sandiford@linaro.org>
21992 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21993 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21994 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21995 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21996 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21998 * config/aarch64/constraints.md (aarch64_movti_operand):
22000 * config/aarch64/predicates.md (Uti): Add new constraint.
22002 2018-01-17 Carl Love <cel@us.ibm.com>
22004 * config/rs6000/vsx.md (define_expand xl_len_r,
22005 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
22006 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
22008 (define_expand, define_insn): Move the shift left from the
22009 define_insn to the define_expand for lxvl and stxvl instructions.
22010 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
22011 and XL_LEN_R definitions to PURE.
22013 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
22015 * config/i386/i386.c (indirect_thunk_name): Declare regno
22016 as unsigned int. Compare regno with INVALID_REGNUM.
22017 (output_indirect_thunk): Ditto.
22018 (output_indirect_thunk_function): Ditto.
22019 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
22020 in the call to output_indirect_thunk_function.
22022 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
22024 PR middle-end/83884
22025 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
22026 rather than the size of inner_type to determine the stack slot size
22027 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
22029 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
22032 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
22035 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
22037 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
22038 endian Linux systems to optionally enable multilibs for selecting
22039 the long double type if the user configured an explicit type.
22040 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
22041 have no long double multilibs if not defined.
22042 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
22043 warn if the user used -mabi={ieee,ibm}longdouble and we built
22044 multilibs for long double.
22045 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
22046 appropriate multilib option.
22047 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
22049 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
22050 for building long double multilibs.
22051 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
22053 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
22055 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
22058 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
22060 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
22063 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
22066 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
22069 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
22071 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
22072 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
22074 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
22076 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
22077 different rtl trees depending on TARGET_64BIT.
22078 (rs6000_gen_lvx): Likewise.
22080 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
22082 * config/visium/visium.md (nop): Tweak comment.
22083 (hazard_nop): Likewise.
22085 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22087 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
22088 -mspeculate-indirect-jumps.
22089 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
22090 for -mno-speculate-indirect-jumps.
22091 (*call_indirect_elfv2<mode>_nospec): New define_insn.
22092 (*call_value_indirect_elfv2<mode>): Disable for
22093 -mno-speculate-indirect-jumps.
22094 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
22095 (indirect_jump): Emit different RTL for
22096 -mno-speculate-indirect-jumps.
22097 (*indirect_jump<mode>): Disable for
22098 -mno-speculate-indirect-jumps.
22099 (*indirect_jump<mode>_nospec): New define_insn.
22100 (tablejump): Emit different RTL for
22101 -mno-speculate-indirect-jumps.
22102 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
22103 (tablejumpsi_nospec): New define_expand.
22104 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
22105 (tablejumpdi_nospec): New define_expand.
22106 (*tablejump<mode>_internal1): Disable for
22107 -mno-speculate-indirect-jumps.
22108 (*tablejump<mode>_internal1_nospec): New define_insn.
22109 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
22112 2018-01-16 Artyom Skrobov tyomitch@gmail.com
22114 * caller-save.c (insert_save): Drop unnecessary parameter. All
22117 2018-01-16 Jakub Jelinek <jakub@redhat.com>
22118 Richard Biener <rguenth@suse.de>
22121 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
22122 return early, inline manually is_gimple_sizepos. Make sure if we
22123 call gimplify_expr we don't end up with a gimple constant.
22124 * tree.c (variably_modified_type_p): Don't return true for
22125 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
22126 * gimplify.h (is_gimple_sizepos): Remove.
22128 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
22130 PR tree-optimization/83857
22131 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
22132 vectorizable_live_operation for pure SLP statements.
22133 (vectorizable_live_operation): Handle PHIs.
22135 2018-01-16 Richard Biener <rguenther@suse.de>
22137 PR tree-optimization/83867
22138 * tree-vect-stmts.c (vect_transform_stmt): Precompute
22139 nested_in_vect_loop_p since the scalar stmt may get invalidated.
22141 2018-01-16 Jakub Jelinek <jakub@redhat.com>
22144 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
22145 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
22146 If off is not INTEGER_CST, issue a may not be aligned warning
22147 rather than isn't aligned. Use isn%'t rather than isn't.
22148 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
22150 <case MULT_EXPR>: Improve the case when bottom and one of the
22151 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
22152 operand, in that case check if the other operand is multiple of
22153 bottom divided by the INTEGER_CST operand.
22155 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
22158 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
22159 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
22160 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
22161 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
22162 * config/pa/pa.c (pa_function_arg_advance): Likewise.
22163 (pa_function_arg, pa_arg_partial_bytes): Likewise.
22164 (pa_function_arg_size): New function.
22166 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
22168 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
22169 in a separate statement.
22171 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
22173 PR tree-optimization/83847
22174 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
22175 group gathers and scatters.
22177 2018-01-16 Jakub Jelinek <jakub@redhat.com>
22179 PR rtl-optimization/86620
22180 * params.def (max-sched-ready-insns): Bump minimum value to 1.
22182 PR rtl-optimization/83213
22183 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
22184 to last if both are JUMP_INSNs.
22186 PR tree-optimization/83843
22187 * gimple-ssa-store-merging.c
22188 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
22189 store_immediate_info for bswap/nop orig_stores.
22191 2018-01-15 Andrew Waterman <andrew@sifive.com>
22193 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
22195 <UDIV>: Increase cost if !TARGET_DIV.
22197 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
22199 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
22200 (define_attr "cr_logical_3op"): New.
22201 (cceq_ior_compare): Adjust.
22202 (cceq_ior_compare_complement): Adjust.
22203 (*cceq_rev_compare): Adjust.
22204 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
22205 (is_cracked_insn): Adjust.
22206 (insn_must_be_first_in_group): Adjust.
22207 * config/rs6000/40x.md: Adjust.
22208 * config/rs6000/440.md: Adjust.
22209 * config/rs6000/476.md: Adjust.
22210 * config/rs6000/601.md: Adjust.
22211 * config/rs6000/603.md: Adjust.
22212 * config/rs6000/6xx.md: Adjust.
22213 * config/rs6000/7450.md: Adjust.
22214 * config/rs6000/7xx.md: Adjust.
22215 * config/rs6000/8540.md: Adjust.
22216 * config/rs6000/cell.md: Adjust.
22217 * config/rs6000/e300c2c3.md: Adjust.
22218 * config/rs6000/e500mc.md: Adjust.
22219 * config/rs6000/e500mc64.md: Adjust.
22220 * config/rs6000/e5500.md: Adjust.
22221 * config/rs6000/e6500.md: Adjust.
22222 * config/rs6000/mpc.md: Adjust.
22223 * config/rs6000/power4.md: Adjust.
22224 * config/rs6000/power5.md: Adjust.
22225 * config/rs6000/power6.md: Adjust.
22226 * config/rs6000/power7.md: Adjust.
22227 * config/rs6000/power8.md: Adjust.
22228 * config/rs6000/power9.md: Adjust.
22229 * config/rs6000/rs64.md: Adjust.
22230 * config/rs6000/titan.md: Adjust.
22232 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
22234 * config/i386/predicates.md (indirect_branch_operand): Rewrite
22235 ix86_indirect_branch_register logic.
22237 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
22239 * config/i386/constraints.md (Bs): Update
22240 ix86_indirect_branch_register check. Don't check
22241 ix86_indirect_branch_register with GOT_memory_operand.
22243 * config/i386/predicates.md (GOT_memory_operand): Don't check
22244 ix86_indirect_branch_register here.
22245 (GOT32_symbol_operand): Likewise.
22247 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
22249 * config/i386/predicates.md (constant_call_address_operand):
22250 Rewrite ix86_indirect_branch_register logic.
22251 (sibcall_insn_operand): Likewise.
22253 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
22255 * config/i386/constraints.md (Bs): Replace
22256 ix86_indirect_branch_thunk_register with
22257 ix86_indirect_branch_register.
22259 * config/i386/i386.md (indirect_jump): Likewise.
22260 (tablejump): Likewise.
22261 (*sibcall_memory): Likewise.
22262 (*sibcall_value_memory): Likewise.
22263 Peepholes of indirect call and jump via memory: Likewise.
22264 * config/i386/i386.opt: Likewise.
22265 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22266 (GOT_memory_operand): Likewise.
22267 (call_insn_operand): Likewise.
22268 (sibcall_insn_operand): Likewise.
22269 (GOT32_symbol_operand): Likewise.
22271 2018-01-15 Jakub Jelinek <jakub@redhat.com>
22273 PR middle-end/83837
22274 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
22275 type rather than type addr's type points to.
22276 (expand_omp_atomic_mutex): Likewise.
22277 (expand_omp_atomic): Likewise.
22279 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
22282 * config/i386/i386.c (output_indirect_thunk_function): Use
22283 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
22284 for __x86_return_thunk.
22286 2018-01-15 Richard Biener <rguenther@suse.de>
22288 PR middle-end/83850
22289 * expmed.c (extract_bit_field_1): Fix typo.
22291 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22294 * config/arm/iterators.md (VF): New mode iterator.
22295 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
22296 Remove integer-related logic from pattern.
22297 (neon_vabd<mode>_3): Likewise.
22299 2018-01-15 Jakub Jelinek <jakub@redhat.com>
22301 PR middle-end/82694
22302 * common.opt (fstrict-overflow): No longer an alias.
22303 (fwrapv-pointer): New option.
22304 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
22305 also for pointer types based on flag_wrapv_pointer.
22306 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
22307 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
22308 opts->x_flag_wrapv got set.
22309 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
22310 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
22311 POINTER_TYPE_OVERFLOW_UNDEFINED.
22312 * match.pd: Likewise in address comparison pattern.
22313 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
22315 2018-01-15 Richard Biener <rguenther@suse.de>
22318 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
22319 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
22320 Reset type names to their identifier if their TYPE_DECL doesn't
22321 have linkage (and thus is used for ODR and devirt).
22322 (save_debug_info_for_decl): Remove.
22323 (save_debug_info_for_type): Likewise.
22324 (add_tree_to_fld_list): Adjust.
22325 * tree-pretty-print.c (dump_generic_node): Make dumping of
22326 type names more robust.
22328 2018-01-15 Richard Biener <rguenther@suse.de>
22330 * BASE-VER: Bump to 8.0.1.
22332 2018-01-14 Martin Sebor <msebor@redhat.com>
22335 * builtins.c (check_access): Avoid warning when the no-warning bit
22338 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
22340 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
22341 * ira-color (allocno_hard_regs_compare): Likewise.
22343 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
22346 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
22347 Use .pushsection/.popsection.
22349 2018-01-14 Martin Sebor <msebor@redhat.com>
22352 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
22354 2018-01-14 Jakub Jelinek <jakub@redhat.com>
22356 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
22357 entry from extra_headers.
22358 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
22359 extra_headers, make the list bitwise identical to the i?86-*-* one.
22361 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22363 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
22364 -mcmodel=large with -mindirect-branch=thunk,
22365 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
22366 -mfunction-return=thunk-extern.
22367 * doc/invoke.texi: Document -mcmodel=large is incompatible with
22368 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
22369 -mfunction-return=thunk and -mfunction-return=thunk-extern.
22371 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22373 * config/i386/i386.c (print_reg): Print the name of the full
22374 integer register without '%'.
22375 (ix86_print_operand): Handle 'V'.
22376 * doc/extend.texi: Document 'V' modifier.
22378 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22380 * config/i386/constraints.md (Bs): Disallow memory operand for
22381 -mindirect-branch-register.
22383 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22384 (GOT_memory_operand): Likewise.
22385 (call_insn_operand): Likewise.
22386 (sibcall_insn_operand): Likewise.
22387 (GOT32_symbol_operand): Likewise.
22388 * config/i386/i386.md (indirect_jump): Call convert_memory_address
22389 for -mindirect-branch-register.
22390 (tablejump): Likewise.
22391 (*sibcall_memory): Likewise.
22392 (*sibcall_value_memory): Likewise.
22393 Disallow peepholes of indirect call and jump via memory for
22394 -mindirect-branch-register.
22395 (*call_pop): Replace m with Bw.
22396 (*call_value_pop): Likewise.
22397 (*sibcall_pop_memory): Replace m with Bs.
22398 * config/i386/i386.opt (mindirect-branch-register): New option.
22399 * doc/invoke.texi: Document -mindirect-branch-register option.
22401 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22403 * config/i386/i386-protos.h (ix86_output_function_return): New.
22404 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
22405 set function_return_type.
22406 (indirect_thunk_name): Add ret_p to indicate thunk for function
22408 (output_indirect_thunk_function): Pass false to
22409 indirect_thunk_name.
22410 (ix86_output_indirect_branch_via_reg): Likewise.
22411 (ix86_output_indirect_branch_via_push): Likewise.
22412 (output_indirect_thunk_function): Create alias for function
22413 return thunk if regno < 0.
22414 (ix86_output_function_return): New function.
22415 (ix86_handle_fndecl_attribute): Handle function_return.
22416 (ix86_attribute_table): Add function_return.
22417 * config/i386/i386.h (machine_function): Add
22418 function_return_type.
22419 * config/i386/i386.md (simple_return_internal): Use
22420 ix86_output_function_return.
22421 (simple_return_internal_long): Likewise.
22422 * config/i386/i386.opt (mfunction-return=): New option.
22423 (indirect_branch): Mention -mfunction-return=.
22424 * doc/extend.texi: Document function_return function attribute.
22425 * doc/invoke.texi: Document -mfunction-return= option.
22427 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22429 * config/i386/i386-opts.h (indirect_branch): New.
22430 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
22431 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
22432 with local indirect jump when converting indirect call and jump.
22433 (ix86_set_indirect_branch_type): New.
22434 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
22435 (indirectlabelno): New.
22436 (indirect_thunk_needed): Likewise.
22437 (indirect_thunk_bnd_needed): Likewise.
22438 (indirect_thunks_used): Likewise.
22439 (indirect_thunks_bnd_used): Likewise.
22440 (INDIRECT_LABEL): Likewise.
22441 (indirect_thunk_name): Likewise.
22442 (output_indirect_thunk): Likewise.
22443 (output_indirect_thunk_function): Likewise.
22444 (ix86_output_indirect_branch_via_reg): Likewise.
22445 (ix86_output_indirect_branch_via_push): Likewise.
22446 (ix86_output_indirect_branch): Likewise.
22447 (ix86_output_indirect_jmp): Likewise.
22448 (ix86_code_end): Call output_indirect_thunk_function if needed.
22449 (ix86_output_call_insn): Call ix86_output_indirect_branch if
22451 (ix86_handle_fndecl_attribute): Handle indirect_branch.
22452 (ix86_attribute_table): Add indirect_branch.
22453 * config/i386/i386.h (machine_function): Add indirect_branch_type
22454 and has_local_indirect_jump.
22455 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
22457 (tablejump): Likewise.
22458 (*indirect_jump): Use ix86_output_indirect_jmp.
22459 (*tablejump_1): Likewise.
22460 (simple_return_indirect_internal): Likewise.
22461 * config/i386/i386.opt (mindirect-branch=): New option.
22462 (indirect_branch): New.
22465 (thunk-inline): Likewise.
22466 (thunk-extern): Likewise.
22467 * doc/extend.texi: Document indirect_branch function attribute.
22468 * doc/invoke.texi: Document -mindirect-branch= option.
22470 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
22473 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
22475 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
22477 * ipa-inline.c (want_inline_small_function_p): Return false if
22478 inlining has already failed with CIF_FINAL_ERROR.
22479 (update_caller_keys): Call want_inline_small_function_p before
22481 (update_callee_keys): Likewise.
22483 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22485 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
22487 (rs6000_quadword_masked_address_p): Likewise.
22488 (quad_aligned_load_p): Likewise.
22489 (quad_aligned_store_p): Likewise.
22490 (const_load_sequence_p): Add comment to describe the outer-most loop.
22491 (mimic_memory_attributes_and_flags): New function.
22492 (rs6000_gen_stvx): Likewise.
22493 (replace_swapped_aligned_store): Likewise.
22494 (rs6000_gen_lvx): Likewise.
22495 (replace_swapped_aligned_load): Likewise.
22496 (replace_swapped_load_constant): Capitalize argument name in
22497 comment describing this function.
22498 (rs6000_analyze_swaps): Add a third pass to search for vector loads
22499 and stores that access quad-word aligned addresses and replace
22500 with stvx or lvx instructions when appropriate.
22501 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
22502 New function prototype.
22503 (rs6000_quadword_masked_address_p): Likewise.
22504 (rs6000_gen_lvx): Likewise.
22505 (rs6000_gen_stvx): Likewise.
22506 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
22507 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
22508 when memory address is aligned.
22509 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
22510 this split to select lvx instruction when memory address is aligned.
22511 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
22512 instruction when memory address is aligned.
22513 (*vsx_le_perm_load_v16qi): Likewise.
22514 (four unnamed splitters): Modify to select the stvx instruction
22515 when memory is aligned.
22517 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
22519 * predict.c (determine_unlikely_bbs): Handle correctly BBs
22520 which appears in the queue multiple times.
22522 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22523 Alan Hayward <alan.hayward@arm.com>
22524 David Sherwood <david.sherwood@arm.com>
22526 * tree-vectorizer.h (vec_lower_bound): New structure.
22527 (_loop_vec_info): Add check_nonzero and lower_bounds.
22528 (LOOP_VINFO_CHECK_NONZERO): New macro.
22529 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
22530 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
22531 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
22532 fields. Make seg_len the distance travelled, not including the
22534 (dr_direction_indicator): Declare.
22535 (dr_zero_step_indicator): Likewise.
22536 (dr_known_forward_stride_p): Likewise.
22537 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
22539 (runtime_alias_check_p): Allow runtime alias checks with
22541 (operator ==): Compare access_size and align.
22542 (prune_runtime_alias_test_list): Rework for new distinction between
22543 the access_size and seg_len.
22544 (create_intersect_range_checks_index): Likewise. Cope with polynomial
22546 (get_segment_min_max): New function.
22547 (create_intersect_range_checks): Use it.
22548 (dr_step_indicator): New function.
22549 (dr_direction_indicator): Likewise.
22550 (dr_zero_step_indicator): Likewise.
22551 (dr_known_forward_stride_p): Likewise.
22552 * tree-loop-distribution.c (data_ref_segment_size): Return
22553 DR_STEP * (niters - 1).
22554 (compute_alias_check_pairs): Update call to the dr_with_seg_len
22556 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
22557 (vect_preserves_scalar_order_p): New function, split out from...
22558 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
22559 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
22560 (vect_vfa_access_size): New function.
22561 (vect_vfa_align): Likewise.
22562 (vect_compile_time_alias): Take access_size_a and access_b arguments.
22563 (dump_lower_bound): New function.
22564 (vect_check_lower_bound): Likewise.
22565 (vect_small_gap_p): Likewise.
22566 (vectorizable_with_step_bound_p): Likewise.
22567 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
22568 depencies if the vectorization factor is 1. Convert the checks
22569 for nonzero steps into checks on the bounds of DR_STEP. Try using
22570 a bunds check for variable steps if the minimum required step is
22571 relatively small. Update calls to the dr_with_seg_len
22572 constructor and to vect_compile_time_alias.
22573 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
22575 (vect_loop_versioning): Call it.
22576 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
22578 (vect_estimate_min_profitable_iters): Account for any bounds checks.
22580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22581 Alan Hayward <alan.hayward@arm.com>
22582 David Sherwood <david.sherwood@arm.com>
22584 * doc/sourcebuild.texi (vect_scatter_store): Document.
22585 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
22587 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
22589 * genopinit.c (main): Add supports_vec_scatter_store and
22590 supports_vec_scatter_store_cached to target_optabs.
22591 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
22592 IFN_MASK_SCATTER_STORE.
22593 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
22595 * internal-fn.h (internal_store_fn_p): Declare.
22596 (internal_fn_stored_value_index): Likewise.
22597 * internal-fn.c (scatter_store_direct): New macro.
22598 (expand_scatter_store_optab_fn): New function.
22599 (direct_scatter_store_optab_supported_p): New macro.
22600 (internal_store_fn_p): New function.
22601 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
22602 IFN_MASK_SCATTER_STORE.
22603 (internal_fn_mask_index): Likewise.
22604 (internal_fn_stored_value_index): New function.
22605 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22606 for scatter stores.
22607 * optabs-query.h (supports_vec_scatter_store_p): Declare.
22608 * optabs-query.c (supports_vec_scatter_store_p): New function.
22609 * tree-vectorizer.h (vect_get_store_rhs): Declare.
22610 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22611 true for scatter stores.
22612 (vect_gather_scatter_fn_p): Handle scatter stores too.
22613 (vect_check_gather_scatter): Consider using scatter stores if
22614 supports_vec_scatter_store_p.
22615 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22616 scatter stores too.
22617 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22618 internal_fn_stored_value_index.
22619 (check_load_store_masking): Handle scatter stores too.
22620 (vect_get_store_rhs): Make public.
22621 (vectorizable_call): Use internal_store_fn_p.
22622 (vectorizable_store): Handle scatter store internal functions.
22623 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22624 when deciding whether the end of the group has been reached.
22625 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22626 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22627 (mask_scatter_store<mode>): New insns.
22629 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22630 Alan Hayward <alan.hayward@arm.com>
22631 David Sherwood <david.sherwood@arm.com>
22633 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22634 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22635 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22637 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22638 Use vect_truncate_gather_scatter_offset if we can't treat the
22639 operation as a normal gather load or scatter store.
22640 (get_group_load_store_type): Take the gather_scatter_info
22641 as argument. Try using a gather load or scatter store for
22642 single-element groups.
22643 (get_load_store_type): Update calls to get_group_load_store_type
22644 and vect_use_strided_gather_scatters_p.
22646 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22647 Alan Hayward <alan.hayward@arm.com>
22648 David Sherwood <david.sherwood@arm.com>
22650 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22651 optional tree argument.
22652 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22654 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22655 but continue to use the current value as a fallback.
22656 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22657 to compare the updates.
22658 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22659 (get_load_store_type): Use it when handling a strided access.
22660 (vect_get_strided_load_store_ops): New function.
22661 (vect_get_data_ptr_increment): Likewise.
22662 (vectorizable_load): Handle strided gather loads. Always pass
22663 a step to vect_create_data_ref_ptr and bump_vector_ptr.
22665 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22666 Alan Hayward <alan.hayward@arm.com>
22667 David Sherwood <david.sherwood@arm.com>
22669 * doc/md.texi (gather_load@var{m}): Document.
22670 (mask_gather_load@var{m}): Likewise.
22671 * genopinit.c (main): Add supports_vec_gather_load and
22672 supports_vec_gather_load_cached to target_optabs.
22673 * optabs-tree.c (init_tree_optimization_optabs): Use
22674 ggc_cleared_alloc to allocate target_optabs.
22675 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22676 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22678 * internal-fn.h (internal_load_fn_p): Declare.
22679 (internal_gather_scatter_fn_p): Likewise.
22680 (internal_fn_mask_index): Likewise.
22681 (internal_gather_scatter_fn_supported_p): Likewise.
22682 * internal-fn.c (gather_load_direct): New macro.
22683 (expand_gather_load_optab_fn): New function.
22684 (direct_gather_load_optab_supported_p): New macro.
22685 (direct_internal_fn_optab): New function.
22686 (internal_load_fn_p): Likewise.
22687 (internal_gather_scatter_fn_p): Likewise.
22688 (internal_fn_mask_index): Likewise.
22689 (internal_gather_scatter_fn_supported_p): Likewise.
22690 * optabs-query.c (supports_at_least_one_mode_p): New function.
22691 (supports_vec_gather_load_p): Likewise.
22692 * optabs-query.h (supports_vec_gather_load_p): Declare.
22693 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22694 and memory_type field.
22695 (NUM_PATTERNS): Bump to 15.
22696 * tree-vect-data-refs.c: Include internal-fn.h.
22697 (vect_gather_scatter_fn_p): New function.
22698 (vect_describe_gather_scatter_call): Likewise.
22699 (vect_check_gather_scatter): Try using internal functions for
22700 gather loads. Recognize existing calls to a gather load function.
22701 (vect_analyze_data_refs): Consider using gather loads if
22702 supports_vec_gather_load_p.
22703 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22704 (vect_get_gather_scatter_offset_type): Likewise.
22705 (vect_convert_mask_for_vectype): Likewise.
22706 (vect_add_conversion_to_patterm): Likewise.
22707 (vect_try_gather_scatter_pattern): Likewise.
22708 (vect_recog_gather_scatter_pattern): New pattern recognizer.
22709 (vect_vect_recog_func_ptrs): Add it.
22710 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22711 internal_fn_mask_index and internal_gather_scatter_fn_p.
22712 (check_load_store_masking): Take the gather_scatter_info as an
22713 argument and handle gather loads.
22714 (vect_get_gather_scatter_ops): New function.
22715 (vectorizable_call): Check internal_load_fn_p.
22716 (vectorizable_load): Likewise. Handle gather load internal
22718 (vectorizable_store): Update call to check_load_store_masking.
22719 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22720 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22721 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22722 (aarch64_gather_scale_operand_d): New predicates.
22723 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22724 (mask_gather_load<mode>): New insns.
22726 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22727 Alan Hayward <alan.hayward@arm.com>
22728 David Sherwood <david.sherwood@arm.com>
22730 * optabs.def (fold_left_plus_optab): New optab.
22731 * doc/md.texi (fold_left_plus_@var{m}): Document.
22732 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22733 * internal-fn.c (fold_left_direct): Define.
22734 (expand_fold_left_optab_fn): Likewise.
22735 (direct_fold_left_optab_supported_p): Likewise.
22736 * fold-const-call.c (fold_const_fold_left): New function.
22737 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22738 * tree-parloops.c (valid_reduction_p): New function.
22739 (gather_scalar_reductions): Use it.
22740 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22741 (vect_finish_replace_stmt): Declare.
22742 * tree-vect-loop.c (fold_left_reduction_fn): New function.
22743 (needs_fold_left_reduction_p): New function, split out from...
22744 (vect_is_simple_reduction): ...here. Accept reductions that
22745 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22746 (vect_force_simple_reduction): Also store the reduction type in
22747 the assignment's STMT_VINFO_REDUC_TYPE.
22748 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22749 (merge_with_identity): New function.
22750 (vect_expand_fold_left): Likewise.
22751 (vectorize_fold_left_reduction): Likewise.
22752 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
22753 scalar phi in place for it. Check for target support and reject
22754 cases that would reassociate the operation. Defer the transform
22755 phase to vectorize_fold_left_reduction.
22756 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22757 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22758 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22762 * tree-if-conv.c (predicate_mem_writes): Remove redundant
22763 call to ifc_temp_var.
22765 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22766 Alan Hayward <alan.hayward@arm.com>
22767 David Sherwood <david.sherwood@arm.com>
22769 * target.def (legitimize_address_displacement): Take the original
22770 offset as a poly_int.
22771 * targhooks.h (default_legitimize_address_displacement): Update
22773 * targhooks.c (default_legitimize_address_displacement): Likewise.
22774 * doc/tm.texi: Regenerate.
22775 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22776 as an argument, moving assert of ad->disp == ad->disp_term to...
22777 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
22778 Try calling targetm.legitimize_address_displacement before expanding
22779 the address rather than afterwards, and adjust for the new interface.
22780 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22781 Match the new hook interface. Handle SVE addresses.
22782 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22783 new hook interface.
22785 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22787 * Makefile.in (OBJS): Add early-remat.o.
22788 * target.def (select_early_remat_modes): New hook.
22789 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22790 * doc/tm.texi: Regenerate.
22791 * targhooks.h (default_select_early_remat_modes): Declare.
22792 * targhooks.c (default_select_early_remat_modes): New function.
22793 * timevar.def (TV_EARLY_REMAT): New timevar.
22794 * passes.def (pass_early_remat): New pass.
22795 * tree-pass.h (make_pass_early_remat): Declare.
22796 * early-remat.c: New file.
22797 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22799 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22801 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22802 Alan Hayward <alan.hayward@arm.com>
22803 David Sherwood <david.sherwood@arm.com>
22805 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22806 vfm1 with a bound_epilog parameter.
22807 (vect_do_peeling): Update calls accordingly, and move the prologue
22808 call earlier in the function. Treat the base bound_epilog as 0 for
22809 fully-masked loops and retain vf - 1 for other loops. Add 1 to
22810 this base when peeling for gaps.
22811 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22812 with fully-masked loops.
22813 (vect_estimate_min_profitable_iters): Handle the single peeled
22814 iteration in that case.
22816 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22817 Alan Hayward <alan.hayward@arm.com>
22818 David Sherwood <david.sherwood@arm.com>
22820 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22821 single-element interleaving even if the size is not a power of 2.
22822 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22823 accesses for single-element interleaving if the group size is
22826 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22827 Alan Hayward <alan.hayward@arm.com>
22828 David Sherwood <david.sherwood@arm.com>
22830 * doc/md.texi (fold_extract_last_@var{m}): Document.
22831 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22832 * optabs.def (fold_extract_last_optab): New optab.
22833 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22834 * internal-fn.c (fold_extract_direct): New macro.
22835 (expand_fold_extract_optab_fn): Likewise.
22836 (direct_fold_extract_optab_supported_p): Likewise.
22837 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22838 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22839 EXTRACT_LAST_REDUCTION.
22840 (get_initial_def_for_reduction): Do not create an initial vector
22841 for EXTRACT_LAST_REDUCTION reductions.
22842 (vectorizable_reduction): Leave the scalar phi in place for
22843 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
22844 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
22845 epilogue code for EXTRACT_LAST_REDUCTION and defer the
22846 transform phase to vectorizable_condition.
22847 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22849 (vect_finish_stmt_generation): ...here.
22850 (vect_finish_replace_stmt): New function.
22851 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22852 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22854 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22856 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22857 Alan Hayward <alan.hayward@arm.com>
22858 David Sherwood <david.sherwood@arm.com>
22860 * doc/md.texi (extract_last_@var{m}): Document.
22861 * optabs.def (extract_last_optab): New optab.
22862 * internal-fn.def (EXTRACT_LAST): New internal function.
22863 * internal-fn.c (cond_unary_direct): New macro.
22864 (expand_cond_unary_optab_fn): Likewise.
22865 (direct_cond_unary_optab_supported_p): Likewise.
22866 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22867 loops using EXTRACT_LAST.
22868 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22869 (extract_last_<mode>): ...this optab.
22870 (vec_extract<mode><Vel>): Update accordingly.
22872 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22873 Alan Hayward <alan.hayward@arm.com>
22874 David Sherwood <david.sherwood@arm.com>
22876 * target.def (empty_mask_is_expensive): New hook.
22877 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22878 * doc/tm.texi: Regenerate.
22879 * targhooks.h (default_empty_mask_is_expensive): Declare.
22880 * targhooks.c (default_empty_mask_is_expensive): New function.
22881 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22882 if the target says that empty masks are expensive.
22883 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22885 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22887 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22888 Alan Hayward <alan.hayward@arm.com>
22889 David Sherwood <david.sherwood@arm.com>
22891 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22892 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22893 (vect_use_loop_mask_for_alignment_p): New function.
22894 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22895 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22896 niters_skip argument. Make sure that the first niters_skip elements
22897 of the first iteration are inactive.
22898 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22899 Update call to vect_set_loop_masks_directly.
22900 (get_misalign_in_elems): New function, split out from...
22901 (vect_gen_prolog_loop_niters): ...here.
22902 (vect_update_init_of_dr): Take a code argument that specifies whether
22903 the adjustment should be added or subtracted.
22904 (vect_update_init_of_drs): Likewise.
22905 (vect_prepare_for_masked_peels): New function.
22906 (vect_do_peeling): Skip prologue peeling if we're using a mask
22907 instead. Update call to vect_update_inits_of_drs.
22908 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22910 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22911 alignment. Do not include the number of peeled iterations in
22912 the minimum threshold in that case.
22913 (vectorizable_induction): Adjust the start value down by
22914 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22915 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22916 Take the number of skipped iterations into account when calculating
22918 * tree-vect-stmts.c (vect_gen_while_not): New function.
22920 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22921 Alan Hayward <alan.hayward@arm.com>
22922 David Sherwood <david.sherwood@arm.com>
22924 * doc/sourcebuild.texi (vect_fully_masked): Document.
22925 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22926 default value to 0.
22927 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22929 (vect_analyze_loop_2): ...here. Don't check the vectorization
22930 factor against the number of loop iterations if the loop is
22933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22934 Alan Hayward <alan.hayward@arm.com>
22935 David Sherwood <david.sherwood@arm.com>
22937 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22938 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22939 (dump_groups): Update accordingly.
22940 (iv_use::mem_type): New member variable.
22941 (address_p): New function.
22942 (record_use): Add a mem_type argument and initialize the new
22944 (record_group_use): Add a mem_type argument. Use address_p.
22945 Remove obsolete null checks of base_object. Update call to record_use.
22946 (find_interesting_uses_op): Update call to record_group_use.
22947 (find_interesting_uses_cond): Likewise.
22948 (find_interesting_uses_address): Likewise.
22949 (get_mem_type_for_internal_fn): New function.
22950 (find_address_like_use): Likewise.
22951 (find_interesting_uses_stmt): Try find_address_like_use before
22952 calling find_interesting_uses_op.
22953 (addr_offset_valid_p): Use the iv mem_type field as the type
22954 of the addressed memory.
22955 (add_autoinc_candidates): Likewise.
22956 (get_address_cost): Likewise.
22957 (split_small_address_groups_p): Use address_p.
22958 (split_address_groups): Likewise.
22959 (add_iv_candidate_for_use): Likewise.
22960 (autoinc_possible_for_pair): Likewise.
22961 (rewrite_groups): Likewise.
22962 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22963 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22964 (get_alias_ptr_type_for_ptr_address): New function.
22965 (rewrite_use_address): Rewrite address uses in calls that were
22966 identified by find_address_like_use.
22968 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22969 Alan Hayward <alan.hayward@arm.com>
22970 David Sherwood <david.sherwood@arm.com>
22972 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22974 * gimple-expr.h (is_gimple_addressable: Likewise.
22975 * gimple-expr.c (is_gimple_address): Likewise.
22976 * internal-fn.c (expand_call_mem_ref): New function.
22977 (expand_mask_load_optab_fn): Use it.
22978 (expand_mask_store_optab_fn): Likewise.
22980 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22981 Alan Hayward <alan.hayward@arm.com>
22982 David Sherwood <david.sherwood@arm.com>
22984 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22985 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22986 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22987 (cond_umax@var{mode}): Document.
22988 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22989 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22990 (cond_umin_optab, cond_umax_optab): New optabs.
22991 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22992 (COND_IOR, COND_XOR): New internal functions.
22993 * internal-fn.h (get_conditional_internal_fn): Declare.
22994 * internal-fn.c (cond_binary_direct): New macro.
22995 (expand_cond_binary_optab_fn): Likewise.
22996 (direct_cond_binary_optab_supported_p): Likewise.
22997 (get_conditional_internal_fn): New function.
22998 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22999 Cope with reduction statements that are vectorized as calls rather
23001 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
23002 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
23003 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
23004 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
23005 (UNSPEC_COND_EOR): New unspecs.
23006 (optab): Add mappings for them.
23007 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
23008 (sve_int_op, sve_fp_op): New int attributes.
23010 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23011 Alan Hayward <alan.hayward@arm.com>
23012 David Sherwood <david.sherwood@arm.com>
23014 * optabs.def (while_ult_optab): New optab.
23015 * doc/md.texi (while_ult@var{m}@var{n}): Document.
23016 * internal-fn.def (WHILE_ULT): New internal function.
23017 * internal-fn.h (direct_internal_fn_supported_p): New override
23018 that takes two types as argument.
23019 * internal-fn.c (while_direct): New macro.
23020 (expand_while_optab_fn): New function.
23021 (convert_optab_supported_p): Likewise.
23022 (direct_while_optab_supported_p): New macro.
23023 * wide-int.h (wi::udiv_ceil): New function.
23024 * tree-vectorizer.h (rgroup_masks): New structure.
23025 (vec_loop_masks): New typedef.
23026 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
23027 and fully_masked_p.
23028 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
23029 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
23030 (vect_max_vf): New function.
23031 (slpeel_make_loop_iterate_ntimes): Delete.
23032 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
23033 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
23034 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
23035 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
23036 internal-fn.h, stor-layout.h and optabs-query.h.
23037 (vect_set_loop_mask): New function.
23038 (add_preheader_seq): Likewise.
23039 (add_header_seq): Likewise.
23040 (interleave_supported_p): Likewise.
23041 (vect_maybe_permute_loop_masks): Likewise.
23042 (vect_set_loop_masks_directly): Likewise.
23043 (vect_set_loop_condition_masked): Likewise.
23044 (vect_set_loop_condition_unmasked): New function, split out from
23045 slpeel_make_loop_iterate_ntimes.
23046 (slpeel_make_loop_iterate_ntimes): Rename to..
23047 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
23048 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
23049 (vect_do_peeling): Update call accordingly.
23050 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
23052 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23053 mask_compare_type, can_fully_mask_p and fully_masked_p.
23054 (release_vec_loop_masks): New function.
23055 (_loop_vec_info): Use it to free the loop masks.
23056 (can_produce_all_loop_masks_p): New function.
23057 (vect_get_max_nscalars_per_iter): Likewise.
23058 (vect_verify_full_masking): Likewise.
23059 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
23060 retries, and free the mask rgroups before retrying. Check loop-wide
23061 reasons for disallowing fully-masked loops. Make the final decision
23062 about whether use a fully-masked loop or not.
23063 (vect_estimate_min_profitable_iters): Do not assume that peeling
23064 for the number of iterations will be needed for fully-masked loops.
23065 (vectorizable_reduction): Disable fully-masked loops.
23066 (vectorizable_live_operation): Likewise.
23067 (vect_halve_mask_nunits): New function.
23068 (vect_double_mask_nunits): Likewise.
23069 (vect_record_loop_mask): Likewise.
23070 (vect_get_loop_mask): Likewise.
23071 (vect_transform_loop): Handle the case in which the final loop
23072 iteration might handle a partial vector. Call vect_set_loop_condition
23073 instead of slpeel_make_loop_iterate_ntimes.
23074 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
23075 (check_load_store_masking): New function.
23076 (prepare_load_store_mask): Likewise.
23077 (vectorizable_store): Handle fully-masked loops.
23078 (vectorizable_load): Likewise.
23079 (supportable_widening_operation): Use vect_halve_mask_nunits for
23081 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
23082 (vect_gen_while): New function.
23083 * config/aarch64/aarch64.md (umax<mode>3): New expander.
23084 (aarch64_uqdec<mode>): New insn.
23086 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23087 Alan Hayward <alan.hayward@arm.com>
23088 David Sherwood <david.sherwood@arm.com>
23090 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
23091 (reduc_xor_scal_optab): New optabs.
23092 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
23093 (reduc_xor_scal_@var{m}): Document.
23094 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
23095 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
23096 internal functions.
23097 * fold-const-call.c (fold_const_call): Handle them.
23098 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
23099 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
23100 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
23101 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
23102 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
23103 (UNSPEC_XORV): New unspecs.
23104 (optab): Add entries for them.
23105 (BITWISEV): New int iterator.
23106 (bit_reduc_op): New int attributes.
23108 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23109 Alan Hayward <alan.hayward@arm.com>
23110 David Sherwood <david.sherwood@arm.com>
23112 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
23113 * internal-fn.def (VEC_SHL_INSERT): New internal function.
23114 * optabs.def (vec_shl_insert_optab): New optab.
23115 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
23116 (duplicate_and_interleave): Likewise.
23117 * tree-vect-loop.c: Include internal-fn.h.
23118 (neutral_op_for_slp_reduction): New function, split out from
23119 get_initial_defs_for_reduction.
23120 (get_initial_def_for_reduction): Handle option 2 for variable-length
23121 vectors by loading the neutral value into a vector and then shifting
23122 the initial value into element 0.
23123 (get_initial_defs_for_reduction): Replace the code argument with
23124 the neutral value calculated by neutral_op_for_slp_reduction.
23125 Use gimple_build_vector for constant-length vectors.
23126 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
23127 but the first group_size elements have a neutral value.
23128 Use duplicate_and_interleave otherwise.
23129 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
23130 Update call to get_initial_defs_for_reduction. Handle SLP
23131 reductions for variable-length vectors by creating one vector
23132 result for each scalar result, with the elements associated
23133 with other scalar results stubbed out with the neutral value.
23134 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
23135 Require IFN_VEC_SHL_INSERT for double reductions on
23136 variable-length vectors, or SLP reductions that have
23137 a neutral value. Require can_duplicate_and_interleave_p
23138 support for variable-length unchained SLP reductions if there
23139 is no neutral value, such as for MIN/MAX reductions. Also require
23140 the number of vector elements to be a multiple of the number of
23141 SLP statements when doing variable-length unchained SLP reductions.
23142 Update call to vect_create_epilog_for_reduction.
23143 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
23144 and remove initial values.
23145 (duplicate_and_interleave): Make public.
23146 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
23147 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
23149 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23150 Alan Hayward <alan.hayward@arm.com>
23151 David Sherwood <david.sherwood@arm.com>
23153 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
23154 (can_duplicate_and_interleave_p): New function.
23155 (vect_get_and_check_slp_defs): Take the vector of statements
23156 rather than just the current one. Remove excess parentheses.
23157 Restriction rejectinon of vect_constant_def and vect_external_def
23158 for variable-length vectors to boolean types, or types for which
23159 can_duplicate_and_interleave_p is false.
23160 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
23161 (duplicate_and_interleave): New function.
23162 (vect_get_constant_vectors): Use gimple_build_vector for
23163 constant-length vectors and suitable variable-length constant
23164 vectors. Use duplicate_and_interleave for other variable-length
23165 vectors. Don't defer the update when inserting new statements.
23167 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23168 Alan Hayward <alan.hayward@arm.com>
23169 David Sherwood <david.sherwood@arm.com>
23171 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
23172 min_profitable_iters doesn't go negative.
23174 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23175 Alan Hayward <alan.hayward@arm.com>
23176 David Sherwood <david.sherwood@arm.com>
23178 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
23179 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
23180 * optabs.def (vec_mask_load_lanes_optab): New optab.
23181 (vec_mask_store_lanes_optab): Likewise.
23182 * internal-fn.def (MASK_LOAD_LANES): New internal function.
23183 (MASK_STORE_LANES): Likewise.
23184 * internal-fn.c (mask_load_lanes_direct): New macro.
23185 (mask_store_lanes_direct): Likewise.
23186 (expand_mask_load_optab_fn): Handle masked operations.
23187 (expand_mask_load_lanes_optab_fn): New macro.
23188 (expand_mask_store_optab_fn): Handle masked operations.
23189 (expand_mask_store_lanes_optab_fn): New macro.
23190 (direct_mask_load_lanes_optab_supported_p): Likewise.
23191 (direct_mask_store_lanes_optab_supported_p): Likewise.
23192 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
23194 (vect_load_lanes_supported): Likewise.
23195 * tree-vect-data-refs.c (strip_conversion): New function.
23196 (can_group_stmts_p): Likewise.
23197 (vect_analyze_data_ref_accesses): Use it instead of checking
23198 for a pair of assignments.
23199 (vect_store_lanes_supported): Take a masked_p parameter.
23200 (vect_load_lanes_supported): Likewise.
23201 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
23202 vect_store_lanes_supported and vect_load_lanes_supported.
23203 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
23204 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
23205 parameter. Don't allow gaps for masked accesses.
23206 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
23207 and vect_load_lanes_supported.
23208 (get_load_store_type): Take a masked_p parameter and update
23209 call to get_group_load_store_type.
23210 (vectorizable_store): Update call to get_load_store_type.
23211 Handle IFN_MASK_STORE_LANES.
23212 (vectorizable_load): Update call to get_load_store_type.
23213 Handle IFN_MASK_LOAD_LANES.
23215 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23216 Alan Hayward <alan.hayward@arm.com>
23217 David Sherwood <david.sherwood@arm.com>
23219 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
23221 * config/aarch64/aarch64-protos.h
23222 (aarch64_sve_struct_memory_operand_p): Declare.
23223 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
23224 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
23225 (VPRED, vpred): Handle SVE structure modes.
23226 * config/aarch64/constraints.md (Utx): New constraint.
23227 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
23228 (aarch64_sve_struct_nonimmediate_operand): New predicates.
23229 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
23230 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
23231 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
23232 structure modes. Split into pieces after RA.
23233 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
23234 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
23236 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
23237 SVE structure modes.
23238 (aarch64_classify_address): Likewise.
23239 (sizetochar): Move earlier in file.
23240 (aarch64_print_operand): Handle SVE register lists.
23241 (aarch64_array_mode): New function.
23242 (aarch64_sve_struct_memory_operand_p): Likewise.
23243 (TARGET_ARRAY_MODE): Redefine.
23245 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23246 Alan Hayward <alan.hayward@arm.com>
23247 David Sherwood <david.sherwood@arm.com>
23249 * target.def (array_mode): New target hook.
23250 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
23251 * doc/tm.texi: Regenerate.
23252 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
23253 * hooks.c (hook_optmode_mode_uhwi_none): New function.
23254 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
23255 targetm.array_mode.
23256 * stor-layout.c (mode_for_array): Likewise. Support polynomial
23259 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23260 Alan Hayward <alan.hayward@arm.com>
23261 David Sherwood <david.sherwood@arm.com>
23263 * fold-const.c (fold_binary_loc): Check the argument types
23264 rather than the result type when testing for a vector operation.
23266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23268 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
23269 * doc/tm.texi: Regenerate.
23271 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23272 Alan Hayward <alan.hayward@arm.com>
23273 David Sherwood <david.sherwood@arm.com>
23275 * doc/invoke.texi (-msve-vector-bits=): Document new option.
23276 (sve): Document new AArch64 extension.
23277 * doc/md.texi (w): Extend the description of the AArch64
23278 constraint to include SVE vectors.
23279 (Upl, Upa): Document new AArch64 predicate constraints.
23280 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
23282 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
23283 (msve-vector-bits=): New option.
23284 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
23285 SVE when these are disabled.
23286 (sve): New extension.
23287 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
23288 modes. Adjust their number of units based on aarch64_sve_vg.
23289 (MAX_BITSIZE_MODE_ANY_MODE): Define.
23290 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
23291 aarch64_addr_query_type.
23292 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
23293 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
23294 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
23295 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
23296 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
23297 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
23298 (aarch64_simd_imm_zero_p): Delete.
23299 (aarch64_check_zero_based_sve_index_immediate): Declare.
23300 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23301 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23302 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23303 (aarch64_sve_float_mul_immediate_p): Likewise.
23304 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23305 rather than an rtx.
23306 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
23307 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
23308 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
23309 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
23310 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
23311 (aarch64_regmode_natural_size): Likewise.
23312 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
23313 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
23315 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
23316 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
23317 for VG and the SVE predicate registers.
23318 (V_ALIASES): Add a "z"-prefixed alias.
23319 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
23320 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
23321 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
23322 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
23323 (REG_CLASS_NAMES): Add entries for them.
23324 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
23325 and the predicate registers.
23326 (aarch64_sve_vg): Declare.
23327 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
23328 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
23329 (REGMODE_NATURAL_SIZE): Define.
23330 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
23332 * config/aarch64/aarch64.c: Include cfgrtl.h.
23333 (simd_immediate_info): Add a constructor for series vectors,
23334 and an associated step field.
23335 (aarch64_sve_vg): New variable.
23336 (aarch64_dbx_register_number): Handle VG and the predicate registers.
23337 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
23338 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
23339 (VEC_ANY_DATA, VEC_STRUCT): New constants.
23340 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
23341 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
23342 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
23343 (aarch64_get_mask_mode): New functions.
23344 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
23345 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
23346 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
23347 predicate modes and predicate registers. Explicitly restrict
23348 GPRs to modes of 16 bytes or smaller. Only allow FP registers
23349 to store a vector mode if it is recognized by
23350 aarch64_classify_vector_mode.
23351 (aarch64_regmode_natural_size): New function.
23352 (aarch64_hard_regno_caller_save_mode): Return the original mode
23354 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
23355 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
23356 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
23357 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
23359 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
23360 does not overlap dest if the function is frame-related. Handle
23362 (aarch64_split_add_offset): New function.
23363 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
23364 them aarch64_add_offset.
23365 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
23366 and update call to aarch64_sub_sp.
23367 (aarch64_add_cfa_expression): New function.
23368 (aarch64_expand_prologue): Pass extra temporary registers to the
23369 functions above. Handle the case in which we need to emit new
23370 DW_CFA_expressions for registers that were originally saved
23371 relative to the stack pointer, but now have to be expressed
23372 relative to the frame pointer.
23373 (aarch64_output_mi_thunk): Pass extra temporary registers to the
23375 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
23376 IP0 and IP1 values for SVE frames.
23377 (aarch64_expand_vec_series): New function.
23378 (aarch64_expand_sve_widened_duplicate): Likewise.
23379 (aarch64_expand_sve_const_vector): Likewise.
23380 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
23381 Handle SVE constants. Use emit_move_insn to move a force_const_mem
23382 into the register, rather than emitting a SET directly.
23383 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
23384 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
23385 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
23386 (offset_9bit_signed_scaled_p): New functions.
23387 (aarch64_replicate_bitmask_imm): New function.
23388 (aarch64_bitmask_imm): Use it.
23389 (aarch64_cannot_force_const_mem): Reject expressions involving
23390 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
23391 (aarch64_classify_index): Handle SVE indices, by requiring
23392 a plain register index with a scale that matches the element size.
23393 (aarch64_classify_address): Handle SVE addresses. Assert that
23394 the mode of the address is VOIDmode or an integer mode.
23395 Update call to aarch64_classify_symbol.
23396 (aarch64_classify_symbolic_expression): Update call to
23397 aarch64_classify_symbol.
23398 (aarch64_const_vec_all_in_range_p): New function.
23399 (aarch64_print_vector_float_operand): Likewise.
23400 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
23401 "vN" for FP registers with SVE modes. Handle (const ...) vectors
23402 and the FP immediates 1.0 and 0.5.
23403 (aarch64_print_address_internal): Handle SVE addresses.
23404 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
23405 (aarch64_regno_regclass): Handle predicate registers.
23406 (aarch64_secondary_reload): Handle big-endian reloads of SVE
23408 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
23409 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
23410 (aarch64_convert_sve_vector_bits): New function.
23411 (aarch64_override_options): Use it to handle -msve-vector-bits=.
23412 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23413 rather than an rtx.
23414 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
23415 Handle SVE vector and predicate modes. Accept VL-based constants
23416 that need only one temporary register, and VL offsets that require
23417 no temporary registers.
23418 (aarch64_conditional_register_usage): Mark the predicate registers
23419 as fixed if SVE isn't available.
23420 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
23421 Return true for SVE vector and predicate modes.
23422 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
23423 rather than an unsigned int. Handle SVE modes.
23424 (aarch64_preferred_simd_mode): Update call accordingly. Handle
23426 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
23428 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23429 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23430 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23431 (aarch64_sve_float_mul_immediate_p): New functions.
23432 (aarch64_sve_valid_immediate): New function.
23433 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
23434 Explicitly reject structure modes. Check for INDEX constants.
23435 Handle PTRUE and PFALSE constants.
23436 (aarch64_check_zero_based_sve_index_immediate): New function.
23437 (aarch64_simd_imm_zero_p): Delete.
23438 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
23439 vector modes. Accept constants in the range of CNT[BHWD].
23440 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
23441 ask for an Advanced SIMD mode.
23442 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
23443 (aarch64_simd_vector_alignment): Handle SVE predicates.
23444 (aarch64_vectorize_preferred_vector_alignment): New function.
23445 (aarch64_simd_vector_alignment_reachable): Use it instead of
23447 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
23448 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
23450 (MAX_VECT_LEN): Delete.
23451 (expand_vec_perm_d): Add a vec_flags field.
23452 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
23453 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
23454 (aarch64_evpc_ext): Don't apply a big-endian lane correction
23456 (aarch64_evpc_rev): Rename to...
23457 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
23458 (aarch64_evpc_rev_global): New function.
23459 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
23460 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
23462 (aarch64_evpc_sve_tbl): New function.
23463 (aarch64_expand_vec_perm_const_1): Update after rename of
23464 aarch64_evpc_rev. Handle SVE permutes too, trying
23465 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
23466 than aarch64_evpc_tbl.
23467 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
23468 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
23469 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
23470 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
23471 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
23472 (aarch64_expand_sve_vcond): New functions.
23473 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
23474 of aarch64_vector_mode_p.
23475 (aarch64_dwarf_poly_indeterminate_value): New function.
23476 (aarch64_compute_pressure_classes): Likewise.
23477 (aarch64_can_change_mode_class): Likewise.
23478 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
23479 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
23480 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
23481 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
23482 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
23483 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
23484 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
23485 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
23487 (Dn, Dl, Dr): Accept const as well as const_vector.
23488 (Dz): Likewise. Compare against CONST0_RTX.
23489 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
23490 of "vector" where appropriate.
23491 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
23492 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
23493 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
23494 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
23495 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
23496 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
23497 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
23498 (v_int_equiv): Extend to SVE modes.
23499 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
23501 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
23502 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
23503 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
23504 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
23505 (SVE_COND_FP_CMP): New int iterators.
23506 (perm_hilo): Handle the new unpack unspecs.
23507 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
23509 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
23510 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
23511 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
23512 (aarch64_equality_operator, aarch64_constant_vector_operand)
23513 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
23514 (aarch64_sve_nonimmediate_operand): Likewise.
23515 (aarch64_sve_general_operand): Likewise.
23516 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
23517 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
23518 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
23519 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
23520 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
23521 (aarch64_sve_float_arith_immediate): Likewise.
23522 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
23523 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
23524 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
23525 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
23526 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
23527 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
23528 (aarch64_sve_float_arith_operand): Likewise.
23529 (aarch64_sve_float_arith_with_sub_operand): Likewise.
23530 (aarch64_sve_float_mul_operand): Likewise.
23531 (aarch64_sve_vec_perm_operand): Likewise.
23532 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
23533 (aarch64_mov_operand): Accept const_poly_int and const_vector.
23534 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
23535 as well as const_vector.
23536 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
23537 in file. Use CONST0_RTX and CONSTM1_RTX.
23538 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
23539 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
23540 Use aarch64_simd_imm_zero.
23541 * config/aarch64/aarch64-sve.md: New file.
23542 * config/aarch64/aarch64.md: Include it.
23543 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
23544 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
23545 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
23546 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
23547 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
23548 (sve): New attribute.
23549 (enabled): Disable instructions with the sve attribute unless
23551 (movqi, movhi): Pass CONST_POLY_INT operaneds through
23552 aarch64_expand_mov_immediate.
23553 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
23554 CNT[BHSD] immediates.
23555 (movti): Split CONST_POLY_INT moves into two halves.
23556 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
23557 Split additions that need a temporary here if the destination
23558 is the stack pointer.
23559 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
23560 (*add<mode>3_poly_1): New instruction.
23561 (set_clobber_cc): New expander.
23563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23565 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
23566 parameter and use it instead of GET_MODE_SIZE (innermode). Use
23567 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
23568 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
23569 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
23570 Change innermode from fixed_mode_size to machine_mode.
23571 (simplify_subreg): Update call accordingly. Handle a constant-sized
23572 subreg of a variable-length CONST_VECTOR.
23574 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23575 Alan Hayward <alan.hayward@arm.com>
23576 David Sherwood <david.sherwood@arm.com>
23578 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
23579 (add_offset_to_base): New function, split out from...
23580 (create_mem_ref): ...here. When handling a scale other than 1,
23581 check first whether the address is valid without the offset.
23582 Add it into the base if so, leaving the index and scale as-is.
23584 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23587 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
23588 fold_for_warn before checking if arg2 is INTEGER_CST.
23590 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
23592 * config/rs6000/predicates.md (load_multiple_operation): Delete.
23593 (store_multiple_operation): Delete.
23594 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
23595 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
23596 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
23597 guarded by TARGET_STRING.
23598 (rs6000_output_load_multiple): Delete.
23599 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23600 OPTION_MASK_STRING / TARGET_STRING handling.
23601 (print_operand) <'N', 'O'>: Add comment that these are unused now.
23602 (const rs6000_opt_masks) <"string">: Change mask to 0.
23603 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
23604 (MASK_STRING): Delete.
23605 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23607 (load_multiple): Delete.
23614 (store_multiple): Delete.
23621 (movmemsi_8reg): Delete.
23622 (corresponding unnamed define_insn): Delete.
23623 (movmemsi_6reg): Delete.
23624 (corresponding unnamed define_insn): Delete.
23625 (movmemsi_4reg): Delete.
23626 (corresponding unnamed define_insn): Delete.
23627 (movmemsi_2reg): Delete.
23628 (corresponding unnamed define_insn): Delete.
23629 (movmemsi_1reg): Delete.
23630 (corresponding unnamed define_insn): Delete.
23631 * config/rs6000/rs6000.opt (mno-string): New.
23632 (mstring): Replace by deprecation warning stub.
23633 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23635 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23637 * regrename.c (regrename_do_replace): If replacing the same
23638 reg multiple times, try to reuse last created gen_raw_REG.
23641 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23642 main to workaround a bug in GDB.
23644 2018-01-12 Tom de Vries <tom@codesourcery.com>
23647 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23649 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
23651 PR rtl-optimization/80481
23652 * ira-color.c (get_cap_member): New function.
23653 (allocnos_conflict_by_live_ranges_p): Use it.
23654 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23655 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23657 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
23660 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23661 (*saddl_se_1): Ditto.
23662 (*ssubsi_1): Ditto.
23663 (*ssubl_se_1): Ditto.
23665 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23667 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23668 rather than wi::to_widest for DR_INITs.
23669 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23670 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23671 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23673 (vect_analyze_group_access_1): Note that here.
23675 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23677 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23678 polynomial type sizes.
23680 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23682 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23683 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23684 (gimple_add_tmp_var): Likewise.
23686 2018-01-12 Martin Liska <mliska@suse.cz>
23688 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23689 (gimple_alloc_sizes): Likewise.
23690 (dump_gimple_statistics): Use PRIu64 in printf format.
23691 * gimple.h: Change uint64_t to int.
23693 2018-01-12 Martin Liska <mliska@suse.cz>
23695 * tree-core.h: Use uint64_t instead of int.
23696 * tree.c (tree_node_counts): Likewise.
23697 (tree_node_sizes): Likewise.
23698 (dump_tree_statistics): Use PRIu64 in printf format.
23700 2018-01-12 Martin Liska <mliska@suse.cz>
23702 * Makefile.in: As qsort_chk is implemented in vec.c, add
23703 vec.o to linkage of gencfn-macros.
23704 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23705 passing the info to record_node_allocation_statistics.
23706 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23708 * ggc-common.c (struct ggc_usage): Add operator== and use
23709 it in operator< and compare function.
23710 * mem-stats.h (struct mem_usage): Likewise.
23711 * vec.c (struct vec_usage): Remove operator< and compare
23712 function. Can be simply inherited.
23714 2018-01-12 Martin Jambor <mjambor@suse.cz>
23717 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23718 * tree-ssa-math-opts.c: Include domwalk.h.
23719 (convert_mult_to_fma_1): New function.
23720 (fma_transformation_info): New type.
23721 (fma_deferring_state): Likewise.
23722 (cancel_fma_deferring): New function.
23723 (result_of_phi): Likewise.
23724 (last_fma_candidate_feeds_initial_phi): Likewise.
23725 (convert_mult_to_fma): Added deferring logic, split actual
23726 transformation to convert_mult_to_fma_1.
23727 (math_opts_dom_walker): New type.
23728 (math_opts_dom_walker::after_dom_children): New method, body moved
23729 here from pass_optimize_widening_mul::execute, added deferring logic
23731 (pass_optimize_widening_mul::execute): Moved most of code to
23732 math_opts_dom_walker::after_dom_children.
23733 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23734 * config/i386/i386.c (ix86_option_override_internal): Added
23735 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23737 2018-01-12 Richard Biener <rguenther@suse.de>
23740 * dwarf2out.c (gen_variable_die): Do not reset old_die for
23741 inline instance vars.
23743 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
23746 * config/rx/rx.c (rx_is_restricted_memory_address):
23747 Handle SUBREG case.
23749 2018-01-12 Richard Biener <rguenther@suse.de>
23751 PR tree-optimization/80846
23752 * target.def (split_reduction): New target hook.
23753 * targhooks.c (default_split_reduction): New function.
23754 * targhooks.h (default_split_reduction): Declare.
23755 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23756 target requests first reduce vectors by combining low and high
23758 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23759 (get_vectype_for_scalar_type_and_size): Export.
23760 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23761 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23762 * doc/tm.texi: Regenerate.
23763 * config/i386/i386.c (ix86_split_reduction): Implement
23764 TARGET_VECTORIZE_SPLIT_REDUCTION.
23766 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23769 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23770 in PIC mode except for TARGET_VXWORKS_RTP.
23771 * config/sparc/sparc.c: Include cfgrtl.h.
23772 (TARGET_INIT_PIC_REG): Define.
23773 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23774 (sparc_pic_register_p): New predicate.
23775 (sparc_legitimate_address_p): Use it.
23776 (sparc_legitimize_pic_address): Likewise.
23777 (sparc_delegitimize_address): Likewise.
23778 (sparc_mode_dependent_address_p): Likewise.
23779 (gen_load_pcrel_sym): Remove 4th parameter.
23780 (load_got_register): Adjust call to above. Remove obsolete stuff.
23781 (sparc_expand_prologue): Do not call load_got_register here.
23782 (sparc_flat_expand_prologue): Likewise.
23783 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23784 (sparc_use_pseudo_pic_reg): New function.
23785 (sparc_init_pic_reg): Likewise.
23786 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23787 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23789 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
23791 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23792 Add item for branch_cost.
23794 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23796 PR rtl-optimization/83565
23797 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23798 not extend the result to a larger mode for rotate operations.
23799 (num_sign_bit_copies1): Likewise.
23801 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23804 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23806 Use values-Xc.o for -pedantic.
23807 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23809 2018-01-12 Martin Liska <mliska@suse.cz>
23812 * ipa-devirt.c (final_warning_record::grow_type_warnings):
23814 (possible_polymorphic_call_targets): Use it.
23815 (ipa_devirt): Likewise.
23817 2018-01-12 Martin Liska <mliska@suse.cz>
23819 * profile-count.h (enum profile_quality): Use 0 as invalid
23820 enum value of profile_quality.
23822 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
23824 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23825 -mext-string options.
23827 2018-01-12 Richard Biener <rguenther@suse.de>
23829 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23830 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23831 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23833 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23835 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23837 * configure.ac (--with-long-double-format): Add support for the
23838 configuration option to change the default long double format on
23840 * config.gcc (powerpc*-linux*-*): Likewise.
23841 * configure: Regenerate.
23842 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23843 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23844 used without modification.
23846 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23848 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23849 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23850 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23851 MISC_BUILTIN_SPEC_BARRIER.
23852 (rs6000_init_builtins): Likewise.
23853 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23855 (speculation_barrier): New define_insn.
23856 * doc/extend.texi: Document __builtin_speculation_barrier.
23858 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23861 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23862 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23863 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23865 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
23866 integral modes instead of "ss" and "sd".
23867 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23868 vectors with 32-bit and 64-bit elements.
23869 (vecdupssescalarmodesuffix): New mode attribute.
23870 (vec_dup<mode>): Use it.
23872 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
23875 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23876 frame if argument is passed on stack.
23878 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23881 * ree.c (combine_reaching_defs): Optimize also
23882 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23883 reg2=any_extend(exp); reg1=reg2;, formatting fix.
23885 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23887 PR middle-end/83189
23888 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23890 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23892 PR middle-end/83718
23893 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23894 after they are computed.
23896 2018-01-11 Bin Cheng <bin.cheng@arm.com>
23898 PR tree-optimization/83695
23899 * gimple-loop-linterchange.cc
23900 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23901 reset cached scev information after interchange.
23902 (pass_linterchange::execute): Remove call to scev_reset_htab.
23904 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23906 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23907 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23908 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23909 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23910 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23911 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23912 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23913 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23914 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23915 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23916 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23917 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23918 (V_lane_reg): Likewise.
23919 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23921 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23922 (vfmal_lane_low<mode>_intrinsic,
23923 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23924 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23925 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23926 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23927 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23928 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23930 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23932 * config/arm/arm-cpus.in (fp16fml): New feature.
23933 (ALL_SIMD): Add fp16fml.
23934 (armv8.2-a): Add fp16fml as an option.
23935 (armv8.3-a): Likewise.
23936 (armv8.4-a): Add fp16fml as part of fp16.
23937 * config/arm/arm.h (TARGET_FP16FML): Define.
23938 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23940 * config/arm/arm-modes.def (V2HF): Define.
23941 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23942 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23943 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23944 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23945 vfmsl_low, vfmsl_high): New set of builtins.
23946 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23947 (vfml_op): New code attribute.
23948 (VFMLHALVES): New int iterator.
23949 (VFML, VFMLSEL): New mode attributes.
23950 (V_reg): Define mapping for V2HF.
23951 (V_hi, V_lo): New mode attributes.
23952 (VF_constraint): Likewise.
23953 (vfml_half, vfml_half_selector): New int attributes.
23954 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23956 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23957 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23959 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23960 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23961 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23962 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23964 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23965 Document new effective target and option set.
23967 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23969 * config/arm/arm-cpus.in (armv8_4): New feature.
23970 (ARMv8_4a): New fgroup.
23971 (armv8.4-a): New arch.
23972 * config/arm/arm-tables.opt: Regenerate.
23973 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23974 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23975 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23976 Add matching rules for -march=armv8.4-a and extensions.
23977 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23979 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23982 * config/rx/rx.md (BW): New mode attribute.
23983 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23985 2018-01-11 Richard Biener <rguenther@suse.de>
23987 PR tree-optimization/83435
23988 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23989 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23990 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23992 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23993 Alan Hayward <alan.hayward@arm.com>
23994 David Sherwood <david.sherwood@arm.com>
23996 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23998 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23999 (aarch64_print_address_internal): Use it to check for a zero offset.
24001 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
24002 Alan Hayward <alan.hayward@arm.com>
24003 David Sherwood <david.sherwood@arm.com>
24005 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
24006 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
24007 Return a poly_int64 rather than a HOST_WIDE_INT.
24008 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
24009 rather than a HOST_WIDE_INT.
24010 * config/aarch64/aarch64.h (aarch64_frame): Protect with
24011 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
24012 hard_fp_offset, frame_size, initial_adjust, callee_offset and
24013 final_offset from HOST_WIDE_INT to poly_int64.
24014 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
24015 to_constant when getting the number of units in an Advanced SIMD
24017 (aarch64_builtin_vectorized_function): Check for a constant number
24019 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
24021 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
24022 attribute instead of GET_MODE_NUNITS.
24023 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
24024 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
24025 GET_MODE_SIZE for fixed-size registers.
24026 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
24027 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
24028 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
24029 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
24030 (aarch64_print_operand, aarch64_print_address_internal)
24031 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
24032 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
24033 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
24034 Handle polynomial GET_MODE_SIZE.
24035 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
24036 wider than SImode without modification.
24037 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
24038 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
24039 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
24040 passing and returning SVE modes.
24041 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
24042 rather than GEN_INT.
24043 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
24044 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
24045 (aarch64_allocate_and_probe_stack_space): Likewise.
24046 (aarch64_layout_frame): Cope with polynomial offsets.
24047 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
24048 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
24049 polynomial offsets.
24050 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
24051 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
24052 poly_int64 rather than a HOST_WIDE_INT.
24053 (aarch64_get_separate_components, aarch64_process_components)
24054 (aarch64_expand_prologue, aarch64_expand_epilogue)
24055 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
24056 (aarch64_anchor_offset): New function, split out from...
24057 (aarch64_legitimize_address): ...here.
24058 (aarch64_builtin_vectorization_cost): Handle polynomial
24059 TYPE_VECTOR_SUBPARTS.
24060 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
24062 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
24063 number of elements from the PARALLEL rather than the mode.
24064 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
24065 rather than GET_MODE_BITSIZE.
24066 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
24067 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
24068 (aarch64_expand_vec_perm_const_1): Handle polynomial
24069 d->perm.length () and d->perm elements.
24070 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
24071 Apply to_constant to d->perm elements.
24072 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
24073 polynomial CONST_VECTOR_NUNITS.
24074 (aarch64_move_pointer): Take amount as a poly_int64 rather
24076 (aarch64_progress_pointer): Avoid temporary variable.
24077 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
24078 the mode attribute instead of GET_MODE.
24080 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
24081 Alan Hayward <alan.hayward@arm.com>
24082 David Sherwood <david.sherwood@arm.com>
24084 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
24085 x exists before using it.
24086 (aarch64_add_constant_internal): Rename to...
24087 (aarch64_add_offset_1): ...this. Replace regnum with separate
24088 src and dest rtxes. Handle the case in which they're different,
24089 including when the offset is zero. Replace scratchreg with an rtx.
24090 Use 2 additions if there is no spare register into which we can
24091 move a 16-bit constant.
24092 (aarch64_add_constant): Delete.
24093 (aarch64_add_offset): Replace reg with separate src and dest
24094 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
24095 Use aarch64_add_offset_1.
24096 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
24097 an rtx rather than an int. Take the delta as a poly_int64
24098 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
24099 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
24100 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
24101 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
24102 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
24103 and aarch64_add_sp.
24104 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
24105 aarch64_add_constant.
24107 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
24109 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
24110 Use scalar_float_mode.
24112 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
24114 * config/aarch64/aarch64-simd.md
24115 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
24116 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
24117 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
24118 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
24119 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
24120 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
24121 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
24122 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
24123 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
24124 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
24126 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24129 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
24130 targ_options->x_arm_arch_string is non NULL.
24132 2018-01-11 Tamar Christina <tamar.christina@arm.com>
24134 * config/aarch64/aarch64.h
24135 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
24137 2018-01-11 Sudakshina Das <sudi.das@arm.com>
24140 * expmed.c (emit_store_flag_force): Swap if const op0
24141 and change VOIDmode to mode of op0.
24143 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
24145 PR rtl-optimization/83761
24146 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
24147 than bytes to mode_for_size.
24149 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
24151 PR middle-end/83189
24152 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
24153 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
24156 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
24158 PR middle-end/83575
24159 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
24160 when in layout mode.
24161 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
24162 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
24165 2018-01-10 Michael Collison <michael.collison@arm.com>
24167 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
24168 * config/aarch64/aarch64-option-extension.def: Add
24169 AARCH64_OPT_EXTENSION of 'fp16fml'.
24170 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24171 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
24172 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
24173 * config/aarch64/constraints.md (Ui7): New constraint.
24174 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
24175 (VFMLA_SEL_W): Ditto.
24178 (VFMLA16_LOW): New int iterator.
24179 (VFMLA16_HIGH): Ditto.
24180 (UNSPEC_FMLAL): New unspec.
24181 (UNSPEC_FMLSL): Ditto.
24182 (UNSPEC_FMLAL2): Ditto.
24183 (UNSPEC_FMLSL2): Ditto.
24184 (f16mac): New code attribute.
24185 * config/aarch64/aarch64-simd-builtins.def
24186 (aarch64_fmlal_lowv2sf): Ditto.
24187 (aarch64_fmlsl_lowv2sf): Ditto.
24188 (aarch64_fmlalq_lowv4sf): Ditto.
24189 (aarch64_fmlslq_lowv4sf): Ditto.
24190 (aarch64_fmlal_highv2sf): Ditto.
24191 (aarch64_fmlsl_highv2sf): Ditto.
24192 (aarch64_fmlalq_highv4sf): Ditto.
24193 (aarch64_fmlslq_highv4sf): Ditto.
24194 (aarch64_fmlal_lane_lowv2sf): Ditto.
24195 (aarch64_fmlsl_lane_lowv2sf): Ditto.
24196 (aarch64_fmlal_laneq_lowv2sf): Ditto.
24197 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
24198 (aarch64_fmlalq_lane_lowv4sf): Ditto.
24199 (aarch64_fmlsl_lane_lowv4sf): Ditto.
24200 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
24201 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
24202 (aarch64_fmlal_lane_highv2sf): Ditto.
24203 (aarch64_fmlsl_lane_highv2sf): Ditto.
24204 (aarch64_fmlal_laneq_highv2sf): Ditto.
24205 (aarch64_fmlsl_laneq_highv2sf): Ditto.
24206 (aarch64_fmlalq_lane_highv4sf): Ditto.
24207 (aarch64_fmlsl_lane_highv4sf): Ditto.
24208 (aarch64_fmlalq_laneq_highv4sf): Ditto.
24209 (aarch64_fmlsl_laneq_highv4sf): Ditto.
24210 * config/aarch64/aarch64-simd.md:
24211 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
24212 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24213 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
24214 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24215 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
24216 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
24217 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
24218 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
24219 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
24220 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
24221 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
24222 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
24223 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
24224 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
24225 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
24226 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
24227 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
24228 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
24229 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
24230 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
24231 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
24232 (vfmlsl_low_u32): Ditto.
24233 (vfmlalq_low_u32): Ditto.
24234 (vfmlslq_low_u32): Ditto.
24235 (vfmlal_high_u32): Ditto.
24236 (vfmlsl_high_u32): Ditto.
24237 (vfmlalq_high_u32): Ditto.
24238 (vfmlslq_high_u32): Ditto.
24239 (vfmlal_lane_low_u32): Ditto.
24240 (vfmlsl_lane_low_u32): Ditto.
24241 (vfmlal_laneq_low_u32): Ditto.
24242 (vfmlsl_laneq_low_u32): Ditto.
24243 (vfmlalq_lane_low_u32): Ditto.
24244 (vfmlslq_lane_low_u32): Ditto.
24245 (vfmlalq_laneq_low_u32): Ditto.
24246 (vfmlslq_laneq_low_u32): Ditto.
24247 (vfmlal_lane_high_u32): Ditto.
24248 (vfmlsl_lane_high_u32): Ditto.
24249 (vfmlal_laneq_high_u32): Ditto.
24250 (vfmlsl_laneq_high_u32): Ditto.
24251 (vfmlalq_lane_high_u32): Ditto.
24252 (vfmlslq_lane_high_u32): Ditto.
24253 (vfmlalq_laneq_high_u32): Ditto.
24254 (vfmlslq_laneq_high_u32): Ditto.
24255 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
24256 (AARCH64_FL_FOR_ARCH8_4): New.
24257 (AARCH64_ISA_F16FML): New ISA flag.
24258 (TARGET_F16FML): New feature flag for fp16fml.
24259 (doc/invoke.texi): Document new fp16fml option.
24261 2018-01-10 Michael Collison <michael.collison@arm.com>
24263 * config/aarch64/aarch64-builtins.c:
24264 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
24265 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24266 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
24267 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
24268 (AARCH64_ISA_SHA3): New ISA flag.
24269 (TARGET_SHA3): New feature flag for sha3.
24270 * config/aarch64/iterators.md (sha512_op): New int attribute.
24271 (CRYPTO_SHA512): New int iterator.
24272 (UNSPEC_SHA512H): New unspec.
24273 (UNSPEC_SHA512H2): Ditto.
24274 (UNSPEC_SHA512SU0): Ditto.
24275 (UNSPEC_SHA512SU1): Ditto.
24276 * config/aarch64/aarch64-simd-builtins.def
24277 (aarch64_crypto_sha512hqv2di): New builtin.
24278 (aarch64_crypto_sha512h2qv2di): Ditto.
24279 (aarch64_crypto_sha512su0qv2di): Ditto.
24280 (aarch64_crypto_sha512su1qv2di): Ditto.
24281 (aarch64_eor3qv8hi): Ditto.
24282 (aarch64_rax1qv2di): Ditto.
24283 (aarch64_xarqv2di): Ditto.
24284 (aarch64_bcaxqv8hi): Ditto.
24285 * config/aarch64/aarch64-simd.md:
24286 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
24287 (aarch64_crypto_sha512su0qv2di): Ditto.
24288 (aarch64_crypto_sha512su1qv2di): Ditto.
24289 (aarch64_eor3qv8hi): Ditto.
24290 (aarch64_rax1qv2di): Ditto.
24291 (aarch64_xarqv2di): Ditto.
24292 (aarch64_bcaxqv8hi): Ditto.
24293 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
24294 (vsha512h2q_u64): Ditto.
24295 (vsha512su0q_u64): Ditto.
24296 (vsha512su1q_u64): Ditto.
24297 (veor3q_u16): Ditto.
24298 (vrax1q_u64): Ditto.
24299 (vxarq_u64): Ditto.
24300 (vbcaxq_u16): Ditto.
24301 * config/arm/types.md (crypto_sha512): New type attribute.
24302 (crypto_sha3): Ditto.
24303 (doc/invoke.texi): Document new sha3 option.
24305 2018-01-10 Michael Collison <michael.collison@arm.com>
24307 * config/aarch64/aarch64-builtins.c:
24308 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
24309 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24310 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
24311 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
24312 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
24313 (AARCH64_ISA_SM4): New ISA flag.
24314 (TARGET_SM4): New feature flag for sm4.
24315 * config/aarch64/aarch64-simd-builtins.def
24316 (aarch64_sm3ss1qv4si): Ditto.
24317 (aarch64_sm3tt1aq4si): Ditto.
24318 (aarch64_sm3tt1bq4si): Ditto.
24319 (aarch64_sm3tt2aq4si): Ditto.
24320 (aarch64_sm3tt2bq4si): Ditto.
24321 (aarch64_sm3partw1qv4si): Ditto.
24322 (aarch64_sm3partw2qv4si): Ditto.
24323 (aarch64_sm4eqv4si): Ditto.
24324 (aarch64_sm4ekeyqv4si): Ditto.
24325 * config/aarch64/aarch64-simd.md:
24326 (aarch64_sm3ss1qv4si): Ditto.
24327 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
24328 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
24329 (aarch64_sm4eqv4si): Ditto.
24330 (aarch64_sm4ekeyqv4si): Ditto.
24331 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
24332 (sm3part_op): Ditto.
24333 (CRYPTO_SM3TT): Ditto.
24334 (CRYPTO_SM3PART): Ditto.
24335 (UNSPEC_SM3SS1): New unspec.
24336 (UNSPEC_SM3TT1A): Ditto.
24337 (UNSPEC_SM3TT1B): Ditto.
24338 (UNSPEC_SM3TT2A): Ditto.
24339 (UNSPEC_SM3TT2B): Ditto.
24340 (UNSPEC_SM3PARTW1): Ditto.
24341 (UNSPEC_SM3PARTW2): Ditto.
24342 (UNSPEC_SM4E): Ditto.
24343 (UNSPEC_SM4EKEY): Ditto.
24344 * config/aarch64/constraints.md (Ui2): New constraint.
24345 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
24346 * config/arm/types.md (crypto_sm3): New type attribute.
24347 (crypto_sm4): Ditto.
24348 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
24349 (vsm3tt1aq_u32): Ditto.
24350 (vsm3tt1bq_u32): Ditto.
24351 (vsm3tt2aq_u32): Ditto.
24352 (vsm3tt2bq_u32): Ditto.
24353 (vsm3partw1q_u32): Ditto.
24354 (vsm3partw2q_u32): Ditto.
24355 (vsm4eq_u32): Ditto.
24356 (vsm4ekeyq_u32): Ditto.
24357 (doc/invoke.texi): Document new sm4 option.
24359 2018-01-10 Michael Collison <michael.collison@arm.com>
24361 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
24362 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
24363 (AARCH64_FL_FOR_ARCH8_4): New.
24364 (AARCH64_FL_V8_4): New flag.
24365 (doc/invoke.texi): Document new armv8.4-a option.
24367 2018-01-10 Michael Collison <michael.collison@arm.com>
24369 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24370 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
24371 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
24372 * config/aarch64/aarch64-option-extension.def: Add
24373 AARCH64_OPT_EXTENSION of 'sha2'.
24374 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
24375 (crypto): Disable sha2 and aes if crypto disabled.
24376 (crypto): Enable aes and sha2 if enabled.
24377 (simd): Disable sha2 and aes if simd disabled.
24378 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
24380 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
24381 (TARGET_SHA2): New feature flag for sha2.
24382 (TARGET_AES): New feature flag for aes.
24383 * config/aarch64/aarch64-simd.md:
24384 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
24385 conditional on TARGET_AES.
24386 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
24387 (aarch64_crypto_sha1hsi): Make pattern conditional
24389 (aarch64_crypto_sha1hv4si): Ditto.
24390 (aarch64_be_crypto_sha1hv4si): Ditto.
24391 (aarch64_crypto_sha1su1v4si): Ditto.
24392 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
24393 (aarch64_crypto_sha1su0v4si): Ditto.
24394 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
24395 (aarch64_crypto_sha256su0v4si): Ditto.
24396 (aarch64_crypto_sha256su1v4si): Ditto.
24397 (doc/invoke.texi): Document new aes and sha2 options.
24399 2018-01-10 Martin Sebor <msebor@redhat.com>
24401 PR tree-optimization/83781
24402 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
24405 2018-01-11 Martin Sebor <msebor@gmail.com>
24406 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24408 PR tree-optimization/83501
24409 PR tree-optimization/81703
24411 * tree-ssa-strlen.c (get_string_cst): Rename...
24412 (get_string_len): ...to this. Handle global constants.
24413 (handle_char_store): Adjust.
24415 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
24416 Jim Wilson <jimw@sifive.com>
24418 * config/riscv/riscv-protos.h (riscv_output_return): New.
24419 * config/riscv/riscv.c (struct machine_function): New naked_p field.
24420 (riscv_attribute_table, riscv_output_return),
24421 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
24422 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
24423 (riscv_compute_frame_info): Only compute frame->mask if not a naked
24425 (riscv_expand_prologue): Add early return for naked function.
24426 (riscv_expand_epilogue): Likewise.
24427 (riscv_function_ok_for_sibcall): Return false for naked function.
24428 (riscv_set_current_function): New.
24429 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
24430 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
24431 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
24432 * doc/extend.texi (RISC-V Function Attributes): New.
24434 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
24436 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
24437 check for 128-bit long double before checking TCmode.
24438 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
24439 128-bit long doubles before checking TFmode or TCmode.
24440 (FLOAT128_IBM_P): Likewise.
24442 2018-01-10 Martin Sebor <msebor@redhat.com>
24444 PR tree-optimization/83671
24445 * builtins.c (c_strlen): Unconditionally return zero for the empty
24447 Use -Warray-bounds for warnings.
24448 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
24449 for non-constant array indices with COMPONENT_REF, arrays of
24450 arrays, and pointers to arrays.
24451 (gimple_fold_builtin_strlen): Determine and set length range for
24452 non-constant character arrays.
24454 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
24456 PR middle-end/81897
24457 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
24460 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
24462 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
24464 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24467 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
24468 VECTOR_MEM_ALTIVEC_OR_VSX_P.
24469 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
24470 indexed_or_indirect_operand predicate.
24471 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
24472 (*vsx_le_perm_load_v8hi): Likewise.
24473 (*vsx_le_perm_load_v16qi): Likewise.
24474 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
24475 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
24476 (*vsx_le_perm_store_v8hi): Likewise.
24477 (*vsx_le_perm_store_v16qi): Likewise.
24478 (eight unnamed splitters): Likewise.
24480 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24482 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
24483 * config/rs6000/emmintrin.h: Likewise.
24484 * config/rs6000/mmintrin.h: Likewise.
24485 * config/rs6000/xmmintrin.h: Likewise.
24487 2018-01-10 David Malcolm <dmalcolm@redhat.com>
24490 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
24492 * tree.c (tree_nop_conversion): Return true for location wrapper
24494 (maybe_wrap_with_location): New function.
24495 (selftest::check_strip_nops): New function.
24496 (selftest::test_location_wrappers): New function.
24497 (selftest::tree_c_tests): Call it.
24498 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
24499 (maybe_wrap_with_location): New decl.
24500 (EXPR_LOCATION_WRAPPER_P): New macro.
24501 (location_wrapper_p): New inline function.
24502 (tree_strip_any_location_wrapper): New inline function.
24504 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
24507 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
24508 stack_realign_offset for the largest alignment of stack slot
24510 (ix86_find_max_used_stack_alignment): New function.
24511 (ix86_finalize_stack_frame_flags): Use it. Set
24512 max_used_stack_alignment if we don't realign stack.
24513 * config/i386/i386.h (machine_function): Add
24514 max_used_stack_alignment.
24516 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
24518 * config/arm/arm.opt (-mbranch-cost): New option.
24519 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
24522 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
24525 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
24526 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
24528 2018-01-10 Richard Biener <rguenther@suse.de>
24531 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
24532 early out so it also covers the case where we have a non-NULL
24535 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24537 PR tree-optimization/83753
24538 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
24539 for non-strided grouped accesses if the number of elements is 1.
24541 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
24544 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
24545 * i386.h (TARGET_USE_GATHER): Define.
24546 * x86-tune.def (X86_TUNE_USE_GATHER): New.
24548 2018-01-10 Martin Liska <mliska@suse.cz>
24551 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
24552 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
24554 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
24555 CLEANUP_NO_PARTITIONING is not set.
24557 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24559 * doc/rtl.texi: Remove documentation of (const ...) wrappers
24560 for vectors, as a partial revert of r254296.
24561 * rtl.h (const_vec_p): Delete.
24562 (const_vec_duplicate_p): Don't test for vector CONSTs.
24563 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
24564 * expmed.c (make_tree): Likewise.
24567 * common.md (E, F): Use CONSTANT_P instead of checking for
24569 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
24570 checking for CONST_VECTOR.
24572 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24574 PR middle-end/83575
24575 * predict.c (force_edge_cold): Handle in more sane way edges
24576 with no prediction.
24578 2018-01-09 Carl Love <cel@us.ibm.com>
24580 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
24582 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
24583 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
24584 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
24585 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
24586 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
24587 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
24588 * config/rs6000/rs6000-protos.h: Add extern defition for
24589 rs6000_generate_float2_double_code.
24590 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
24592 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
24593 (float2_v2df): Add define_expand.
24595 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
24598 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
24599 op_mode in the force_to_mode call.
24601 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24603 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
24604 instead of checking each element individually.
24605 (aarch64_evpc_uzp): Likewise.
24606 (aarch64_evpc_zip): Likewise.
24607 (aarch64_evpc_ext): Likewise.
24608 (aarch64_evpc_rev): Likewise.
24609 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24610 instead of checking each element individually. Return true without
24612 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24613 whether all selected elements come from the same input, instead of
24614 checking each element individually. Remove calls to gen_rtx_REG,
24615 start_sequence and end_sequence and instead assert that no rtl is
24618 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24620 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24621 order of HIGH and CONST checks.
24623 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24625 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24626 if the destination isn't an SSA_NAME.
24628 2018-01-09 Richard Biener <rguenther@suse.de>
24630 PR tree-optimization/83668
24631 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24633 (canonicalize_loop_form): ... here, renamed from ...
24634 (canonicalize_loop_closed_ssa_form): ... this and amended to
24635 swap successor edges for loop exit blocks to make us use
24636 the RPO order we need for initial schedule generation.
24638 2018-01-09 Joseph Myers <joseph@codesourcery.com>
24640 PR tree-optimization/64811
24641 * match.pd: When optimizing comparisons with Inf, avoid
24642 introducing or losing exceptions from comparisons with NaN.
24644 2018-01-09 Martin Liska <mliska@suse.cz>
24647 * asan.c (shadow_mem_size): Add gcc_assert.
24649 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
24651 Don't save registers in main().
24654 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24655 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24656 * config/avr/avr.c (avr_set_current_function): Don't error if
24657 naked, OS_task or OS_main are specified at the same time.
24658 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24660 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24662 * common/config/avr/avr-common.c (avr_option_optimization_table):
24663 Switch on -mmain-is-OS_task for optimizing compilations.
24665 2018-01-09 Richard Biener <rguenther@suse.de>
24667 PR tree-optimization/83572
24668 * graphite.c: Include cfganal.h.
24669 (graphite_transform_loops): Connect infinite loops to exit
24670 and remove fake edges at the end.
24672 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24674 * ipa-inline.c (edge_badness): Revert accidental checkin.
24676 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24679 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24680 symbols; not inline clones.
24682 2018-01-09 Jakub Jelinek <jakub@redhat.com>
24685 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24686 hard registers. Formatting fixes.
24688 PR preprocessor/83722
24689 * gcc.c (try_generate_repro): Pass
24690 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24691 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24694 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
24695 Kito Cheng <kito.cheng@gmail.com>
24697 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24698 (riscv_leaf_function_p): Delete.
24699 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24701 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24703 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24705 (do_ifelse): New function.
24706 (do_isel): New function.
24707 (do_sub3): New function.
24708 (do_add3): New function.
24709 (do_load_mask_compare): New function.
24710 (do_overlap_load_compare): New function.
24711 (expand_compare_loop): New function.
24712 (expand_block_compare): Call expand_compare_loop() when appropriate.
24713 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24714 option description.
24715 (-mblock-compare-inline-loop-limit): New option.
24717 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24720 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24721 Reverse order of second and third operands in first alternative.
24722 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24723 of first and second elements in UNSPEC_VPERMR vector.
24724 (altivec_expand_vec_perm_le): Likewise.
24726 2018-01-08 Jeff Law <law@redhat.com>
24728 PR rtl-optimizatin/81308
24729 * tree-switch-conversion.c (cfg_altered): New file scoped static.
24730 (process_switch): If group_case_labels makes a change, then set
24732 (pass_convert_switch::execute): If a switch is converted, then
24733 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
24735 PR rtl-optimization/81308
24736 * recog.c (split_all_insns): Conditionally cleanup the CFG after
24739 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
24741 PR target/83663 - Revert r255946
24742 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24743 generation for cases where splatting a value is not useful.
24744 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24745 across a vec_duplicate and a paradoxical subreg forming a vector
24746 mode to a vec_concat.
24748 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24750 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24751 -march=armv8.3-a variants.
24752 * config/arm/t-multilib: Likewise.
24753 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
24755 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24757 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24759 (cceq_ior_compare_complement): Give it a name so I can use it, and
24760 change boolean_or_operator predicate to boolean_operator so it can
24761 be used to generate a crand.
24762 (eqne): New code iterator.
24763 (bd/bd_neg): New code_attrs.
24764 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24765 a single define_insn.
24766 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24767 decrement (bdnzt/bdnzf/bdzt/bdzf).
24768 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24769 with the new names of the branch decrement patterns, and added the
24770 names of the branch decrement conditional patterns.
24772 2018-01-08 Richard Biener <rguenther@suse.de>
24774 PR tree-optimization/83563
24775 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24778 2018-01-08 Richard Biener <rguenther@suse.de>
24780 PR middle-end/83713
24781 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24783 2018-01-08 Richard Biener <rguenther@suse.de>
24785 PR tree-optimization/83685
24786 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24787 references to abnormals.
24789 2018-01-08 Richard Biener <rguenther@suse.de>
24792 * dwarf2out.c (output_indirect_strings): Handle empty
24793 skeleton_debug_str_hash.
24794 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24796 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24798 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24799 (emit_store_direct): Likewise.
24800 (arc_trampoline_adjust_address): Likewise.
24801 (arc_asm_trampoline_template): New function.
24802 (arc_initialize_trampoline): Use asm_trampoline_template.
24803 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24804 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24805 * config/arc/arc.md (flush_icache): Delete pattern.
24807 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24809 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24810 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24813 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24816 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24817 by not USED_FOR_TARGET.
24818 (make_pass_resolve_sw_modes): Likewise.
24820 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24822 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24825 2018-01-08 Richard Biener <rguenther@suse.de>
24827 PR middle-end/83580
24828 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24830 2018-01-08 Richard Biener <rguenther@suse.de>
24832 PR middle-end/83517
24833 * match.pd ((t * 2) / 2) -> t): Add missing :c.
24835 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
24837 PR middle-end/81897
24838 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24839 basic blocks with a small number of successors.
24840 (convert_control_dep_chain_into_preds): Improve handling of
24842 (dump_predicates): Split apart into...
24843 (dump_pred_chain): ...here...
24844 (dump_pred_info): ...and here.
24845 (can_one_predicate_be_invalidated_p): Add debugging printfs.
24846 (can_chain_union_be_invalidated_p): Improve check for invalidation
24848 (uninit_uses_cannot_happen): Avoid unnecessary if
24849 convert_control_dep_chain_into_preds yielded nothing.
24851 2018-01-06 Martin Sebor <msebor@redhat.com>
24853 PR tree-optimization/83640
24854 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24855 subtracting negative offset from size.
24856 (builtin_access::overlap): Adjust offset bounds of the access to fall
24857 within the size of the object if possible.
24859 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
24861 PR rtl-optimization/83699
24862 * expmed.c (extract_bit_field_1): Restrict the vector usage of
24863 extract_bit_field_as_subreg to cases in which the extracted
24864 value is also a vector.
24866 * lra-constraints.c (process_alt_operands): Test for the equivalence
24867 substitutions when detecting a possible reload cycle.
24869 2018-01-06 Jakub Jelinek <jakub@redhat.com>
24872 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24873 by default if flag_selective_schedling{,2}. Formatting fixes.
24875 PR rtl-optimization/83682
24876 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24877 if it has non-VECTOR_MODE element mode.
24878 (vec_duplicate_p): Likewise.
24880 PR middle-end/83694
24881 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24882 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24884 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24887 * config/i386/i386-builtin.def
24888 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24889 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24890 Require also OPTION_MASK_ISA_AVX512F in addition to
24891 OPTION_MASK_ISA_GFNI.
24892 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24893 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24894 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24895 to OPTION_MASK_ISA_GFNI.
24896 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24897 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24898 OPTION_MASK_ISA_AVX512BW.
24899 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24900 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24901 addition to OPTION_MASK_ISA_GFNI.
24902 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24903 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24904 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24905 to OPTION_MASK_ISA_GFNI.
24906 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24907 a requirement for all ISAs rather than any of them with a few
24909 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24911 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24912 bitmasks to be enabled with 3 exceptions, instead of requiring any
24913 enabled ISA with lots of exceptions.
24914 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24915 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24916 Change avx512bw in isa attribute to avx512f.
24917 * config/i386/sgxintrin.h: Add license boilerplate.
24918 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24919 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24920 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24921 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24923 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24924 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24925 temporarily sse2 rather than sse if not enabled already.
24928 * config/i386/sse.md (VI248_VLBW): Rename to ...
24929 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24930 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24931 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24932 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24933 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24934 mode iterator instead of VI248_VLBW.
24936 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24938 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24939 (record_modified): Skip clobbers; add debug output.
24940 (param_change_prob): Use sreal frequencies.
24942 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24944 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24945 punt for user-aligned variables.
24947 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24949 * tree-chrec.c (chrec_contains_symbols): Return true for
24952 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24955 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24956 of (x|y) == x for BICS pattern.
24958 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24960 PR tree-optimization/83605
24961 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24962 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24965 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24967 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24968 * config/epiphany/rtems.h: New file.
24970 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24971 Uros Bizjak <ubizjak@gmail.com>
24974 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24975 QIreg_operand instead of register_operand predicate.
24976 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24977 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24978 comments instead of -fmitigate[-_]rop.
24980 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24983 * cgraphunit.c (symbol_table::compile): Switch to text_section
24984 before calling assembly_start debug hook.
24985 * run-rtl-passes.c (run_rtl_passes): Likewise.
24988 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24990 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24991 range_int_cst_p rather than !symbolic_range_p before calling
24992 extract_range_from_multiplicative_op_1.
24994 2018-01-04 Jeff Law <law@redhat.com>
24996 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24997 redundant test in assertion.
24999 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
25001 * doc/rtl.texi: Document machine_mode wrapper classes.
25003 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
25005 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
25006 using tree_to_uhwi.
25008 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
25010 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
25011 the VEC_PERM_EXPR fold to fail.
25013 2018-01-04 Jakub Jelinek <jakub@redhat.com>
25016 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
25017 to switched_sections.
25019 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
25022 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
25023 test for d.testing.
25025 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
25028 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
25029 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
25031 2018-01-04 Jakub Jelinek <jakub@redhat.com>
25034 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
25035 is BLKmode and bitpos not zero or mode change is needed.
25037 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
25040 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
25043 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
25046 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
25047 instead of MULT rtx. Update all corresponding splitters.
25048 (*saddl_se): Ditto.
25049 (*ssub<modesuffix>): Ditto.
25050 (*ssubl_se): Ditto.
25051 (*cmp_sadd_di): Update split patterns.
25052 (*cmp_sadd_si): Ditto.
25053 (*cmp_sadd_sidi): Ditto.
25054 (*cmp_ssub_di): Ditto.
25055 (*cmp_ssub_si): Ditto.
25056 (*cmp_ssub_sidi): Ditto.
25057 * config/alpha/predicates.md (const23_operand): New predicate.
25058 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
25059 Look for ASHIFT, not MULT inner operand.
25060 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
25062 2018-01-04 Martin Liska <mliska@suse.cz>
25064 PR gcov-profile/83669
25065 * gcov.c (output_intermediate_file): Add version to intermediate
25067 * doc/gcov.texi: Document new field 'version' in intermediate
25068 file format. Fix location of '-k' option of gcov command.
25070 2018-01-04 Martin Liska <mliska@suse.cz>
25073 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
25075 2018-01-04 Jakub Jelinek <jakub@redhat.com>
25077 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
25079 2018-01-03 Martin Sebor <msebor@redhat.com>
25081 PR tree-optimization/83655
25082 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
25083 checking calls with invalid arguments.
25085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25087 * tree-vect-stmts.c (vect_get_store_rhs): New function.
25088 (vectorizable_mask_load_store): Delete.
25089 (vectorizable_call): Return false for masked loads and stores.
25090 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
25091 instead of gimple_assign_rhs1.
25092 (vectorizable_load): Handle IFN_MASK_LOAD.
25093 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
25095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25097 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
25099 (vectorizable_mask_load_store): ...here.
25100 (vectorizable_load): ...and here.
25102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25104 * tree-vect-stmts.c (vect_build_all_ones_mask)
25105 (vect_build_zero_merge_argument): New functions, split out from...
25106 (vectorizable_load): ...here.
25108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25110 * tree-vect-stmts.c (vect_check_store_rhs): New function,
25112 (vectorizable_mask_load_store): ...here.
25113 (vectorizable_store): ...and here.
25115 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25117 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
25119 (vectorizable_mask_load_store): ...here.
25121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25123 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
25124 (vect_model_store_cost): Take a vec_load_store_type instead of a
25126 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
25127 (vect_model_store_cost): Take a vec_load_store_type instead of a
25129 (vectorizable_mask_load_store): Update accordingly.
25130 (vectorizable_store): Likewise.
25131 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
25133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25135 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
25136 IFN_MASK_LOAD calls here rather than...
25137 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
25139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25140 Alan Hayward <alan.hayward@arm.com>
25141 David Sherwood <david.sherwood@arm.com>
25143 * expmed.c (extract_bit_field_1): For vector extracts,
25144 fall back to extract_bit_field_as_subreg if vec_extract
25147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25148 Alan Hayward <alan.hayward@arm.com>
25149 David Sherwood <david.sherwood@arm.com>
25151 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
25152 they are variable or constant sized.
25153 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
25154 slots for constant-sized data.
25156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25157 Alan Hayward <alan.hayward@arm.com>
25158 David Sherwood <david.sherwood@arm.com>
25160 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
25161 handling COND_EXPRs with boolean comparisons, try to find a better
25162 basis for the mask type than the boolean itself.
25164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25166 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
25167 is calculated and how it can be overridden.
25168 * genmodes.c (max_bitsize_mode_any_mode): New variable.
25169 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
25171 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
25174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25175 Alan Hayward <alan.hayward@arm.com>
25176 David Sherwood <david.sherwood@arm.com>
25178 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
25179 Remove the mode argument.
25180 (aarch64_simd_valid_immediate): Remove the mode and inverse
25182 * config/aarch64/iterators.md (bitsize): New iterator.
25183 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
25184 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
25185 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
25186 aarch64_simd_valid_immediate.
25187 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
25188 (aarch64_reg_or_bic_imm): Likewise.
25189 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
25190 with an insn_type enum and msl with a modifier_type enum.
25191 Replace element_width with a scalar_mode. Change the shift
25192 to unsigned int. Add constructors for scalar_float_mode and
25193 scalar_int_mode elements.
25194 (aarch64_vect_float_const_representable_p): Delete.
25195 (aarch64_can_const_movi_rtx_p)
25196 (aarch64_simd_scalar_immediate_valid_for_move)
25197 (aarch64_simd_make_constant): Update call to
25198 aarch64_simd_valid_immediate.
25199 (aarch64_advsimd_valid_immediate_hs): New function.
25200 (aarch64_advsimd_valid_immediate): Likewise.
25201 (aarch64_simd_valid_immediate): Remove mode and inverse
25202 arguments. Rewrite to use the above. Use const_vec_duplicate_p
25203 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
25204 and aarch64_float_const_representable_p on the result.
25205 (aarch64_output_simd_mov_immediate): Remove mode argument.
25206 Update call to aarch64_simd_valid_immediate and use of
25207 simd_immediate_info.
25208 (aarch64_output_scalar_simd_mov_immediate): Update call
25211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25212 Alan Hayward <alan.hayward@arm.com>
25213 David Sherwood <david.sherwood@arm.com>
25215 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
25216 (mode_nunits): Likewise CONST_MODE_NUNITS.
25217 * machmode.def (ADJUST_NUNITS): Document.
25218 * genmodes.c (mode_data::need_nunits_adj): New field.
25219 (blank_mode): Update accordingly.
25220 (adj_nunits): New variable.
25221 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
25223 (emit_mode_size_inline): Set need_bytesize_adj for all modes
25224 listed in adj_nunits.
25225 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
25226 listed in adj_nunits. Don't emit case statements for such modes.
25227 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
25228 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
25229 nothing if adj_nunits is nonnull.
25230 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
25231 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
25232 (emit_mode_fbit): Update use of print_maybe_const_decl.
25233 (emit_move_size): Likewise. Treat the array as non-const
25235 (emit_mode_adjustments): Handle adj_nunits.
25237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25239 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
25240 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
25241 (VECTOR_MODES): Use it.
25242 (make_vector_modes): Take the prefix as an argument.
25244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25245 Alan Hayward <alan.hayward@arm.com>
25246 David Sherwood <david.sherwood@arm.com>
25248 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
25249 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
25250 for MODE_VECTOR_BOOL.
25251 * machmode.def (VECTOR_BOOL_MODE): Document.
25252 * genmodes.c (VECTOR_BOOL_MODE): New macro.
25253 (make_vector_bool_mode): New function.
25254 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
25256 * lto-streamer-in.c (lto_input_mode_table): Likewise.
25257 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
25259 * stor-layout.c (int_mode_for_mode): Likewise.
25260 * tree.c (build_vector_type_for_mode): Likewise.
25261 * varasm.c (output_constant_pool_2): Likewise.
25262 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
25263 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
25264 for MODE_VECTOR_BOOL.
25265 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
25266 of mode class checks.
25267 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
25268 instead of a list of mode class checks.
25269 (expand_vector_scalar_condition): Likewise.
25270 (type_for_widest_vector_mode): Handle BImode as an inner mode.
25272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25273 Alan Hayward <alan.hayward@arm.com>
25274 David Sherwood <david.sherwood@arm.com>
25276 * machmode.h (mode_size): Change from unsigned short to
25278 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
25279 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25280 or if measurement_type is not polynomial.
25281 (fixed_size_mode::includes_p): Check for constant-sized modes.
25282 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
25283 return a poly_uint16 rather than an unsigned short.
25284 (emit_mode_size): Change the type of mode_size from unsigned short
25285 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
25286 (emit_mode_adjustments): Cope with polynomial vector sizes.
25287 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25289 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25291 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
25292 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
25293 * caller-save.c (setup_save_areas): Likewise.
25294 (replace_reg_with_saved_mem): Likewise.
25295 * calls.c (emit_library_call_value_1): Likewise.
25296 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
25297 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
25298 (gen_lowpart_for_combine): Likewise.
25299 * convert.c (convert_to_integer_1): Likewise.
25300 * cse.c (equiv_constant, cse_insn): Likewise.
25301 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
25302 (cselib_subst_to_values): Likewise.
25303 * dce.c (word_dce_process_block): Likewise.
25304 * df-problems.c (df_word_lr_mark_ref): Likewise.
25305 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
25306 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
25307 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
25308 (rtl_for_decl_location): Likewise.
25309 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
25310 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
25311 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
25312 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
25313 (expand_expr_real_1): Likewise.
25314 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
25315 (pad_below): Likewise.
25316 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25317 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
25318 * ira.c (get_subreg_tracking_sizes): Likewise.
25319 * ira-build.c (ira_create_allocno_objects): Likewise.
25320 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
25321 (ira_sort_regnos_for_alter_reg): Likewise.
25322 * ira-costs.c (record_operand_costs): Likewise.
25323 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
25324 (resolve_simple_move): Likewise.
25325 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
25326 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
25327 (lra_constraints): Likewise.
25328 (CONST_POOL_OK_P): Reject variable-sized modes.
25329 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
25330 (add_pseudo_to_slot, lra_spill): Likewise.
25331 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25332 * optabs-query.c (get_best_extraction_insn): Likewise.
25333 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25334 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
25335 (expand_mult_highpart, valid_multiword_target_p): Likewise.
25336 * recog.c (offsettable_address_addr_space_p): Likewise.
25337 * regcprop.c (maybe_mode_change): Likewise.
25338 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
25339 * regrename.c (build_def_use): Likewise.
25340 * regstat.c (dump_reg_info): Likewise.
25341 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
25342 (find_reloads, find_reloads_subreg_address): Likewise.
25343 * reload1.c (eliminate_regs_1): Likewise.
25344 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
25345 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
25346 (simplify_binary_operation_1, simplify_subreg): Likewise.
25347 * targhooks.c (default_function_arg_padding): Likewise.
25348 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
25349 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
25350 (verify_gimple_assign_ternary): Likewise.
25351 * tree-inline.c (estimate_move_cost): Likewise.
25352 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25353 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
25354 (get_address_cost_ainc): Likewise.
25355 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
25356 (vect_supportable_dr_alignment): Likewise.
25357 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25358 (vectorizable_reduction): Likewise.
25359 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
25360 (vectorizable_operation, vectorizable_load): Likewise.
25361 * tree.c (build_same_sized_truth_vector_type): Likewise.
25362 * valtrack.c (cleanup_auto_inc_dec): Likewise.
25363 * var-tracking.c (emit_note_insn_var_location): Likewise.
25364 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
25365 (ADDR_VEC_ALIGN): Likewise.
25367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25368 Alan Hayward <alan.hayward@arm.com>
25369 David Sherwood <david.sherwood@arm.com>
25371 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
25373 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25374 or if measurement_type is polynomial.
25375 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
25376 * combine.c (make_extraction): Likewise.
25377 * dse.c (find_shift_sequence): Likewise.
25378 * dwarf2out.c (mem_loc_descriptor): Likewise.
25379 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
25380 (extract_bit_field, extract_low_bits): Likewise.
25381 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
25382 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
25383 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
25384 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
25385 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25386 * reload.c (find_reloads): Likewise.
25387 * reload1.c (alter_reg): Likewise.
25388 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
25389 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
25390 * tree-if-conv.c (predicate_mem_writes): Likewise.
25391 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
25392 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
25393 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
25394 * valtrack.c (dead_debug_insert_temp): Likewise.
25395 * varasm.c (mergeable_constant_section): Likewise.
25396 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
25398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25399 Alan Hayward <alan.hayward@arm.com>
25400 David Sherwood <david.sherwood@arm.com>
25402 * expr.c (expand_assignment): Cope with polynomial mode sizes
25403 when assigning to a CONCAT.
25405 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25406 Alan Hayward <alan.hayward@arm.com>
25407 David Sherwood <david.sherwood@arm.com>
25409 * machmode.h (mode_precision): Change from unsigned short to
25411 (mode_to_precision): Return a poly_uint16 rather than an unsigned
25413 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
25414 or if measurement_type is not polynomial.
25415 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
25416 in which the mode is already known to be a scalar_int_mode.
25417 * genmodes.c (emit_mode_precision): Change the type of mode_precision
25418 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
25420 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25421 for GET_MODE_PRECISION.
25422 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25423 for GET_MODE_PRECISION.
25424 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
25426 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
25427 (expand_field_assignment, make_extraction): Likewise.
25428 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
25429 (get_last_value): Likewise.
25430 * convert.c (convert_to_integer_1): Likewise.
25431 * cse.c (cse_insn): Likewise.
25432 * expr.c (expand_expr_real_1): Likewise.
25433 * lra-constraints.c (simplify_operand_subreg): Likewise.
25434 * optabs-query.c (can_atomic_load_p): Likewise.
25435 * optabs.c (expand_atomic_load): Likewise.
25436 (expand_atomic_store): Likewise.
25437 * ree.c (combine_reaching_defs): Likewise.
25438 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
25439 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
25440 * tree.h (type_has_mode_precision_p): Likewise.
25441 * ubsan.c (instrument_si_overflow): Likewise.
25443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25444 Alan Hayward <alan.hayward@arm.com>
25445 David Sherwood <david.sherwood@arm.com>
25447 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
25448 polynomial numbers of units.
25449 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
25450 (valid_vector_subparts_p): New function.
25451 (build_vector_type): Remove temporary shim and take the number
25452 of units as a poly_uint64 rather than an int.
25453 (build_opaque_vector_type): Take the number of units as a
25454 poly_uint64 rather than an int.
25455 * tree.c (build_vector_from_ctor): Handle polynomial
25456 TYPE_VECTOR_SUBPARTS.
25457 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
25458 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
25459 (build_vector_from_val): If the number of units is variable,
25460 use build_vec_duplicate_cst for constant operands and
25461 VEC_DUPLICATE_EXPR otherwise.
25462 (make_vector_type): Remove temporary is_constant ().
25463 (build_vector_type, build_opaque_vector_type): Take the number of
25464 units as a poly_uint64 rather than an int.
25465 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
25467 * cfgexpand.c (expand_debug_expr): Likewise.
25468 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
25469 (store_constructor, expand_expr_real_1): Likewise.
25470 (const_scalar_mask_from_tree): Likewise.
25471 * fold-const-call.c (fold_const_reduction): Likewise.
25472 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
25473 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
25474 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
25475 (fold_relational_const): Likewise.
25476 (native_interpret_vector): Likewise. Change the size from an
25477 int to an unsigned int.
25478 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
25479 TYPE_VECTOR_SUBPARTS.
25480 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
25481 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
25482 duplicating a non-constant operand into a variable-length vector.
25483 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
25484 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
25485 * ipa-icf.c (sem_variable::equals): Likewise.
25486 * match.pd: Likewise.
25487 * omp-simd-clone.c (simd_clone_subparts): Likewise.
25488 * print-tree.c (print_node): Likewise.
25489 * stor-layout.c (layout_type): Likewise.
25490 * targhooks.c (default_builtin_vectorization_cost): Likewise.
25491 * tree-cfg.c (verify_gimple_comparison): Likewise.
25492 (verify_gimple_assign_binary): Likewise.
25493 (verify_gimple_assign_ternary): Likewise.
25494 (verify_gimple_assign_single): Likewise.
25495 * tree-pretty-print.c (dump_generic_node): Likewise.
25496 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25497 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
25498 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
25499 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
25500 (vect_shift_permute_load_chain): Likewise.
25501 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
25502 (expand_vector_condition, optimize_vector_constructor): Likewise.
25503 (lower_vec_perm, get_compute_type): Likewise.
25504 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25505 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
25506 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
25507 (vect_recog_mask_conversion_pattern): Likewise.
25508 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
25509 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
25510 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25511 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
25512 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
25513 (vectorizable_shift, vectorizable_operation, vectorizable_store)
25514 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
25515 (supportable_widening_operation): Likewise.
25516 (supportable_narrowing_operation): Likewise.
25517 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
25519 * varasm.c (output_constant): Likewise.
25521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25522 Alan Hayward <alan.hayward@arm.com>
25523 David Sherwood <david.sherwood@arm.com>
25525 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
25526 so that both the length == 3 and length != 3 cases set up their
25527 own permute vectors. Add comments explaining why we know the
25528 number of elements is constant.
25529 (vect_permute_load_chain): Likewise.
25531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25532 Alan Hayward <alan.hayward@arm.com>
25533 David Sherwood <david.sherwood@arm.com>
25535 * machmode.h (mode_nunits): Change from unsigned char to
25537 (ONLY_FIXED_SIZE_MODES): New macro.
25538 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
25539 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
25540 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
25542 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
25543 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
25544 or if measurement_type is not polynomial.
25545 * genmodes.c (ZERO_COEFFS): New macro.
25546 (emit_mode_nunits_inline): Make mode_nunits_inline return a
25548 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
25549 Use ZERO_COEFFS when emitting initializers.
25550 * data-streamer.h (bp_pack_poly_value): New function.
25551 (bp_unpack_poly_value): Likewise.
25552 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25553 for GET_MODE_NUNITS.
25554 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25555 for GET_MODE_NUNITS.
25556 * tree.c (make_vector_type): Remove temporary shim and make
25557 the real function take the number of units as a poly_uint64
25558 rather than an int.
25559 (build_vector_type_for_mode): Handle polynomial nunits.
25560 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
25561 * emit-rtl.c (const_vec_series_p_1): Likewise.
25562 (gen_rtx_CONST_VECTOR): Likewise.
25563 * fold-const.c (test_vec_duplicate_folding): Likewise.
25564 * genrecog.c (validate_pattern): Likewise.
25565 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
25566 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25567 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
25568 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
25569 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
25570 * rtlanal.c (subreg_get_info): Likewise.
25571 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25572 (vect_grouped_load_supported): Likewise.
25573 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
25574 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
25575 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
25576 (simplify_const_unary_operation, simplify_binary_operation_1)
25577 (simplify_const_binary_operation, simplify_ternary_operation)
25578 (test_vector_ops_duplicate, test_vector_ops): Likewise.
25579 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
25580 instead of CONST_VECTOR_NUNITS.
25581 * varasm.c (output_constant_pool_2): Likewise.
25582 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
25583 explicit-encoded elements in the XVEC for variable-length vectors.
25585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25587 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
25589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25590 Alan Hayward <alan.hayward@arm.com>
25591 David Sherwood <david.sherwood@arm.com>
25593 * coretypes.h (fixed_size_mode): Declare.
25594 (fixed_size_mode_pod): New typedef.
25595 * builtins.h (target_builtins::x_apply_args_mode)
25596 (target_builtins::x_apply_result_mode): Change type to
25597 fixed_size_mode_pod.
25598 * builtins.c (apply_args_size, apply_result_size, result_vector)
25599 (expand_builtin_apply_args_1, expand_builtin_apply)
25600 (expand_builtin_return): Update accordingly.
25602 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25604 * cse.c (hash_rtx_cb): Hash only the encoded elements.
25605 * cselib.c (cselib_hash_rtx): Likewise.
25606 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25607 CONST_VECTOR encoding.
25609 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25610 Jeff Law <law@redhat.com>
25613 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25614 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25615 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25616 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25619 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25620 explicitly probe *sp in a noreturn function if there were any callee
25621 register saves or frame pointer is needed.
25623 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25626 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25627 BLKmode for ternary, binary or unary expressions.
25630 * var-tracking.c (delete_vta_debug_insn): New inline function.
25631 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25632 insns from get_insns () to NULL instead of each bb separately.
25633 Use delete_vta_debug_insn. No longer static.
25634 (vt_debug_insns_local, variable_tracking_main_1): Adjust
25635 delete_vta_debug_insns callers.
25636 * rtl.h (delete_vta_debug_insns): Declare.
25637 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25638 instead of variable_tracking_main.
25640 2018-01-03 Martin Sebor <msebor@redhat.com>
25642 PR tree-optimization/83603
25643 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25644 arguments past the endof the argument list in functions declared
25645 without a prototype.
25646 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25647 Avoid checking when arguments are null.
25649 2018-01-03 Martin Sebor <msebor@redhat.com>
25652 * doc/extend.texi (attribute const): Fix a typo.
25653 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25654 issuing -Wsuggest-attribute for void functions.
25656 2018-01-03 Martin Sebor <msebor@redhat.com>
25658 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25659 offset_int::from instead of wide_int::to_shwi.
25660 (maybe_diag_overlap): Remove assertion.
25661 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25662 * gimple-ssa-sprintf.c (format_directive): Same.
25663 (parse_directive): Same.
25664 (sprintf_dom_walker::compute_format_length): Same.
25665 (try_substitute_return_value): Same.
25667 2018-01-03 Jeff Law <law@redhat.com>
25669 PR middle-end/83654
25670 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25671 non-constant residual for zero at runtime and avoid probing in
25672 that case. Reorganize code for trailing problem to mirror handling
25675 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25677 PR tree-optimization/83501
25678 * tree-ssa-strlen.c (get_string_cst): New.
25679 (handle_char_store): Call get_string_cst.
25681 2018-01-03 Martin Liska <mliska@suse.cz>
25683 PR tree-optimization/83593
25684 * tree-ssa-strlen.c: Include tree-cfg.h.
25685 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25686 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25687 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25689 (strlen_dom_walker::before_dom_children): Call
25690 gimple_purge_dead_eh_edges. Dump tranformation with details
25692 (strlen_dom_walker::before_dom_children): Update call by adding
25693 new argument cleanup_eh.
25694 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25696 2018-01-03 Martin Liska <mliska@suse.cz>
25699 * cif-code.def (VARIADIC_THUNK): New enum value.
25700 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25703 2018-01-03 Jan Beulich <jbeulich@suse.com>
25705 * sse.md (mov<mode>_internal): Tighten condition for when to use
25706 vmovdqu<ssescalarsize> for TI and OI modes.
25708 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25710 Update copyright years.
25712 2018-01-03 Martin Liska <mliska@suse.cz>
25715 * ipa-visibility.c (function_and_variable_visibility): Skip
25716 functions with noipa attribure.
25718 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25720 * gcc.c (process_command): Update copyright notice dates.
25721 * gcov-dump.c (print_version): Ditto.
25722 * gcov.c (print_version): Ditto.
25723 * gcov-tool.c (print_version): Ditto.
25724 * gengtype.c (create_file): Ditto.
25725 * doc/cpp.texi: Bump @copying's copyright year.
25726 * doc/cppinternals.texi: Ditto.
25727 * doc/gcc.texi: Ditto.
25728 * doc/gccint.texi: Ditto.
25729 * doc/gcov.texi: Ditto.
25730 * doc/install.texi: Ditto.
25731 * doc/invoke.texi: Ditto.
25733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25735 * vector-builder.h (vector_builder::m_full_nelts): Change from
25736 unsigned int to poly_uint64.
25737 (vector_builder::full_nelts): Update prototype accordingly.
25738 (vector_builder::new_vector): Likewise.
25739 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25740 (vector_builder::operator ==): Likewise.
25741 (vector_builder::finalize): Likewise.
25742 * int-vector-builder.h (int_vector_builder::int_vector_builder):
25743 Take the number of elements as a poly_uint64 rather than an
25745 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25746 from unsigned int to poly_uint64.
25747 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25748 (vec_perm_indices::new_vector): Likewise.
25749 (vec_perm_indices::length): Likewise.
25750 (vec_perm_indices::nelts_per_input): Likewise.
25751 (vec_perm_indices::input_nelts): Likewise.
25752 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25753 number of elements per input as a poly_uint64 rather than an
25754 unsigned int. Use the original encoding for variable-length
25755 vectors, rather than clamping each individual element.
25756 For the second and subsequent elements in each pattern,
25757 clamp the step and base before clamping their sum.
25758 (vec_perm_indices::series_p): Handle polynomial element counts.
25759 (vec_perm_indices::all_in_range_p): Likewise.
25760 (vec_perm_indices_to_tree): Likewise.
25761 (vec_perm_indices_to_rtx): Likewise.
25762 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25763 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25764 (tree_vector_builder::new_binary_operation): Handle polynomial
25765 element counts. Return false if we need to know the number
25766 of elements at compile time.
25767 * fold-const.c (fold_vec_perm): Punt if the number of elements
25768 isn't known at compile time.
25770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25772 * vec-perm-indices.h (vec_perm_builder): Change element type
25773 from HOST_WIDE_INT to poly_int64.
25774 (vec_perm_indices::element_type): Update accordingly.
25775 (vec_perm_indices::clamp): Handle polynomial element_types.
25776 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25777 (vec_perm_indices::all_in_range_p): Likewise.
25778 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25780 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25781 polynomial vec_perm_indices element types.
25782 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25783 * fold-const.c (fold_vec_perm): Likewise.
25784 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25785 * tree-vect-generic.c (lower_vec_perm): Likewise.
25786 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25787 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25788 element type to HOST_WIDE_INT.
25790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25791 Alan Hayward <alan.hayward@arm.com>
25792 David Sherwood <david.sherwood@arm.com>
25794 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25795 rather than an int. Use plus_constant.
25796 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25797 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25800 Alan Hayward <alan.hayward@arm.com>
25801 David Sherwood <david.sherwood@arm.com>
25803 * calls.c (emit_call_1, expand_call): Change struct_value_size from
25804 a HOST_WIDE_INT to a poly_int64.
25806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25807 Alan Hayward <alan.hayward@arm.com>
25808 David Sherwood <david.sherwood@arm.com>
25810 * calls.c (load_register_parameters): Cope with polynomial
25811 mode sizes. Require a constant size for BLKmode parameters
25812 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
25813 forces a parameter to be padded at the lsb end in order to
25814 fill a complete number of words, require the parameter size
25815 to be ordered wrt UNITS_PER_WORD.
25817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25818 Alan Hayward <alan.hayward@arm.com>
25819 David Sherwood <david.sherwood@arm.com>
25821 * reload1.c (spill_stack_slot_width): Change element type
25822 from unsigned int to poly_uint64_pod.
25823 (alter_reg): Treat mode sizes as polynomial.
25825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25826 Alan Hayward <alan.hayward@arm.com>
25827 David Sherwood <david.sherwood@arm.com>
25829 * reload.c (complex_word_subreg_p): New function.
25830 (reload_inner_reg_of_subreg, push_reload): Use it.
25832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25833 Alan Hayward <alan.hayward@arm.com>
25834 David Sherwood <david.sherwood@arm.com>
25836 * lra-constraints.c (process_alt_operands): Reject matched
25837 operands whose sizes aren't ordered.
25838 (match_reload): Refer to this check here.
25840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25841 Alan Hayward <alan.hayward@arm.com>
25842 David Sherwood <david.sherwood@arm.com>
25844 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25845 that the mode size is in the set {1, 2, 4, 8, 16}.
25847 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25848 Alan Hayward <alan.hayward@arm.com>
25849 David Sherwood <david.sherwood@arm.com>
25851 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25852 Use plus_constant instead of gen_rtx_PLUS.
25854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25855 Alan Hayward <alan.hayward@arm.com>
25856 David Sherwood <david.sherwood@arm.com>
25858 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25859 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25860 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25861 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25862 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25863 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25864 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25865 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25866 * config/i386/i386.c (ix86_push_rounding): ...this new function.
25867 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25869 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25870 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25871 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25872 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25873 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25874 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25875 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25876 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25877 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25878 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25880 * expr.c (emit_move_resolve_push): Treat the input and result
25881 of PUSH_ROUNDING as a poly_int64.
25882 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25883 (emit_push_insn): Likewise.
25884 * lra-eliminations.c (mark_not_eliminable): Likewise.
25885 * recog.c (push_operand): Likewise.
25886 * reload1.c (elimination_effects): Likewise.
25887 * rtlanal.c (nonzero_bits1): Likewise.
25888 * calls.c (store_one_arg): Likewise. Require the padding to be
25889 known at compile time.
25891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25892 Alan Hayward <alan.hayward@arm.com>
25893 David Sherwood <david.sherwood@arm.com>
25895 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25896 Use plus_constant instead of gen_rtx_PLUS.
25898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25899 Alan Hayward <alan.hayward@arm.com>
25900 David Sherwood <david.sherwood@arm.com>
25902 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25903 rather than an int.
25905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25906 Alan Hayward <alan.hayward@arm.com>
25907 David Sherwood <david.sherwood@arm.com>
25909 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25910 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25911 via stack temporaries. Treat the mode size as polynomial too.
25913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25914 Alan Hayward <alan.hayward@arm.com>
25915 David Sherwood <david.sherwood@arm.com>
25917 * expr.c (expand_expr_real_2): When handling conversions involving
25918 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25919 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25920 as a poly_uint64 too.
25922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25923 Alan Hayward <alan.hayward@arm.com>
25924 David Sherwood <david.sherwood@arm.com>
25926 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25929 Alan Hayward <alan.hayward@arm.com>
25930 David Sherwood <david.sherwood@arm.com>
25932 * combine.c (can_change_dest_mode): Handle polynomial
25933 REGMODE_NATURAL_SIZE.
25934 * expmed.c (store_bit_field_1): Likewise.
25935 * expr.c (store_constructor): Likewise.
25936 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25937 and polynomial REGMODE_NATURAL_SIZE.
25938 (gen_lowpart_common): Likewise.
25939 * reginfo.c (record_subregs_of_mode): Likewise.
25940 * rtlanal.c (read_modify_subreg_p): Likewise.
25942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25943 Alan Hayward <alan.hayward@arm.com>
25944 David Sherwood <david.sherwood@arm.com>
25946 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25947 numbers of elements.
25949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25950 Alan Hayward <alan.hayward@arm.com>
25951 David Sherwood <david.sherwood@arm.com>
25953 * match.pd: Cope with polynomial numbers of vector elements.
25955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25956 Alan Hayward <alan.hayward@arm.com>
25957 David Sherwood <david.sherwood@arm.com>
25959 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25960 in a POINTER_PLUS_EXPR.
25962 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25963 Alan Hayward <alan.hayward@arm.com>
25964 David Sherwood <david.sherwood@arm.com>
25966 * omp-simd-clone.c (simd_clone_subparts): New function.
25967 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25968 (ipa_simd_modify_function_body): Likewise.
25970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25971 Alan Hayward <alan.hayward@arm.com>
25972 David Sherwood <david.sherwood@arm.com>
25974 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25975 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25976 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25977 (expand_vector_condition, vector_element): Likewise.
25978 (subparts_gt): New function.
25979 (get_compute_type): Use subparts_gt.
25980 (count_type_subparts): Delete.
25981 (expand_vector_operations_1): Use subparts_gt instead of
25982 count_type_subparts.
25984 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25985 Alan Hayward <alan.hayward@arm.com>
25986 David Sherwood <david.sherwood@arm.com>
25988 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25989 (vect_compile_time_alias): ...this new function. Do the calculation
25990 on poly_ints rather than trees.
25991 (vect_prune_runtime_alias_test_list): Update call accordingly.
25993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25994 Alan Hayward <alan.hayward@arm.com>
25995 David Sherwood <david.sherwood@arm.com>
25997 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25999 (vect_schedule_slp_instance): Likewise.
26001 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26002 Alan Hayward <alan.hayward@arm.com>
26003 David Sherwood <david.sherwood@arm.com>
26005 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
26006 constant and extern definitions for variable-length vectors.
26007 (vect_get_constant_vectors): Note that the number of units
26008 is known to be constant.
26010 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26011 Alan Hayward <alan.hayward@arm.com>
26012 David Sherwood <david.sherwood@arm.com>
26014 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
26015 of units as polynomial. Choose between WIDE and NARROW based
26018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26019 Alan Hayward <alan.hayward@arm.com>
26020 David Sherwood <david.sherwood@arm.com>
26022 * tree-vect-stmts.c (simd_clone_subparts): New function.
26023 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
26025 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26026 Alan Hayward <alan.hayward@arm.com>
26027 David Sherwood <david.sherwood@arm.com>
26029 * tree-vect-stmts.c (vectorizable_call): Treat the number of
26030 vectors as polynomial. Use build_index_vector for
26031 IFN_GOMP_SIMD_LANE.
26033 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26034 Alan Hayward <alan.hayward@arm.com>
26035 David Sherwood <david.sherwood@arm.com>
26037 * tree-vect-stmts.c (get_load_store_type): Treat the number of
26038 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
26039 for variable-length vectors.
26040 (vectorizable_mask_load_store): Treat the number of units as
26041 polynomial, asserting that it is constant if the condition has
26042 already been enforced.
26043 (vectorizable_store, vectorizable_load): Likewise.
26045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26046 Alan Hayward <alan.hayward@arm.com>
26047 David Sherwood <david.sherwood@arm.com>
26049 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
26050 of units as polynomial. Punt if we can't tell at compile time
26051 which vector contains the final result.
26053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26054 Alan Hayward <alan.hayward@arm.com>
26055 David Sherwood <david.sherwood@arm.com>
26057 * tree-vect-loop.c (vectorizable_induction): Treat the number
26058 of units as polynomial. Punt on SLP inductions. Use an integer
26059 VEC_SERIES_EXPR for variable-length integer reductions. Use a
26060 cast of such a series for variable-length floating-point
26063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26064 Alan Hayward <alan.hayward@arm.com>
26065 David Sherwood <david.sherwood@arm.com>
26067 * tree.h (build_index_vector): Declare.
26068 * tree.c (build_index_vector): New function.
26069 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
26070 of units as polynomial, forcibly converting it to a constant if
26071 vectorizable_reduction has already enforced the condition.
26072 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
26073 to create a {1,2,3,...} vector.
26074 (vectorizable_reduction): Treat the number of units as polynomial.
26075 Choose vectype_in based on the largest scalar element size rather
26076 than the smallest number of units. Enforce the restrictions
26079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26080 Alan Hayward <alan.hayward@arm.com>
26081 David Sherwood <david.sherwood@arm.com>
26083 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
26084 number of units as polynomial.
26086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26087 Alan Hayward <alan.hayward@arm.com>
26088 David Sherwood <david.sherwood@arm.com>
26090 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
26091 * target.def (autovectorize_vector_sizes): Return the vector sizes
26092 by pointer, using vector_sizes rather than a bitmask.
26093 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
26094 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
26095 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
26097 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
26098 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
26099 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
26100 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
26101 * omp-general.c (omp_max_vf): Likewise.
26102 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26103 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
26104 * tree-vect-loop.c (vect_analyze_loop): Likewise.
26105 * tree-vect-slp.c (vect_slp_bb): Likewise.
26106 * doc/tm.texi: Regenerate.
26107 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
26109 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
26110 the vector size as a poly_uint64 rather than an unsigned int.
26111 (current_vector_size): Change from an unsigned int to a poly_uint64.
26112 (get_vectype_for_scalar_type): Update accordingly.
26113 * tree.h (build_truth_vector_type): Take the size and number of
26114 units as a poly_uint64 rather than an unsigned int.
26115 (build_vector_type): Add a temporary overload that takes
26116 the number of units as a poly_uint64 rather than an unsigned int.
26117 * tree.c (make_vector_type): Likewise.
26118 (build_truth_vector_type): Take the number of units as a poly_uint64
26119 rather than an unsigned int.
26121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26122 Alan Hayward <alan.hayward@arm.com>
26123 David Sherwood <david.sherwood@arm.com>
26125 * target.def (get_mask_mode): Take the number of units and length
26126 as poly_uint64s rather than unsigned ints.
26127 * targhooks.h (default_get_mask_mode): Update accordingly.
26128 * targhooks.c (default_get_mask_mode): Likewise.
26129 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
26130 * doc/tm.texi: Regenerate.
26132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26133 Alan Hayward <alan.hayward@arm.com>
26134 David Sherwood <david.sherwood@arm.com>
26136 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
26137 * omp-general.c (omp_max_vf): Likewise.
26138 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
26139 (expand_omp_simd): Handle polynomial safelen.
26140 * omp-low.c (omplow_simd_context): Add a default constructor.
26141 (omplow_simd_context::max_vf): Change from int to poly_uint64.
26142 (lower_rec_simd_input_clauses): Update accordingly.
26143 (lower_rec_input_clauses): Likewise.
26145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26146 Alan Hayward <alan.hayward@arm.com>
26147 David Sherwood <david.sherwood@arm.com>
26149 * tree-vectorizer.h (vect_nunits_for_cost): New function.
26150 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
26151 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
26152 (vect_analyze_slp_cost): Likewise.
26153 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
26154 (vect_model_load_cost): Likewise.
26156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26157 Alan Hayward <alan.hayward@arm.com>
26158 David Sherwood <david.sherwood@arm.com>
26160 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
26161 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
26162 from an unsigned int * to a poly_uint64_pod *.
26163 (calculate_unrolling_factor): New function.
26164 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
26166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26167 Alan Hayward <alan.hayward@arm.com>
26168 David Sherwood <david.sherwood@arm.com>
26170 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
26171 from an unsigned int to a poly_uint64.
26172 (_loop_vec_info::slp_unrolling_factor): Likewise.
26173 (_loop_vec_info::vectorization_factor): Change from an int
26175 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
26176 (vect_get_num_vectors): New function.
26177 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
26178 (vect_get_num_copies): Use vect_get_num_vectors.
26179 (vect_analyze_data_ref_dependences): Change max_vf from an int *
26180 to an unsigned int *.
26181 (vect_analyze_data_refs): Change min_vf from an int * to a
26183 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26184 than an unsigned HOST_WIDE_INT.
26185 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
26186 (vect_analyze_data_ref_dependence): Change max_vf from an int *
26187 to an unsigned int *.
26188 (vect_analyze_data_ref_dependences): Likewise.
26189 (vect_compute_data_ref_alignment): Handle polynomial vf.
26190 (vect_enhance_data_refs_alignment): Likewise.
26191 (vect_prune_runtime_alias_test_list): Likewise.
26192 (vect_shift_permute_load_chain): Likewise.
26193 (vect_supportable_dr_alignment): Likewise.
26194 (dependence_distance_ge_vf): Take the vectorization factor as a
26195 poly_uint64 rather than an unsigned HOST_WIDE_INT.
26196 (vect_analyze_data_refs): Change min_vf from an int * to a
26198 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
26199 vfm1 as a poly_uint64 rather than an int. Make the same change
26200 for the returned bound_scalar.
26201 (vect_gen_vector_loop_niters): Handle polynomial vf.
26202 (vect_do_peeling): Likewise. Update call to
26203 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
26204 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
26206 * tree-vect-loop.c (vect_determine_vectorization_factor)
26207 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
26208 (vect_get_known_peeling_cost): Likewise.
26209 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
26210 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
26211 (vect_transform_loop): Likewise. Use the lowest possible VF when
26212 updating the upper bounds of the loop.
26213 (vect_min_worthwhile_factor): Make static. Return an unsigned int
26214 rather than an int.
26215 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
26216 polynomial unroll factors.
26217 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
26218 (vect_make_slp_decision): Likewise.
26219 (vect_supported_load_permutation_p): Likewise, and polynomial
26221 (vect_analyze_slp_cost): Handle polynomial vf.
26222 (vect_slp_analyze_node_operations): Likewise.
26223 (vect_slp_analyze_bb_1): Likewise.
26224 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26225 than an unsigned HOST_WIDE_INT.
26226 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
26227 (vectorizable_load): Handle polynomial vf.
26228 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
26230 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
26232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26233 Alan Hayward <alan.hayward@arm.com>
26234 David Sherwood <david.sherwood@arm.com>
26236 * match.pd: Handle bit operations involving three constants
26237 and try to fold one pair.
26239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26241 * tree-vect-loop-manip.c: Include gimple-fold.h.
26242 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
26243 niters_maybe_zero parameters. Handle other cases besides a step of 1.
26244 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
26245 Add a path that uses a step of VF instead of 1, but disable it
26247 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
26248 and niters_no_overflow parameters. Update calls to
26249 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
26250 Create a new SSA name if the latter choses to use a ste other
26251 than zero, and return it via niters_vector_mult_vf_var.
26252 * tree-vect-loop.c (vect_transform_loop): Update calls to
26253 vect_do_peeling, vect_gen_vector_loop_niters and
26254 slpeel_make_loop_iterate_ntimes.
26255 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
26256 (vect_gen_vector_loop_niters): Update declarations after above changes.
26258 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
26260 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
26261 128-bit round to integer instructions.
26262 (ceil<mode>2): Likewise.
26263 (btrunc<mode>2): Likewise.
26264 (round<mode>2): Likewise.
26266 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26268 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
26269 unaligned VSX load/store on P8/P9.
26270 (expand_block_clear): Allow the use of unaligned VSX
26271 load/store on P8/P9.
26273 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26275 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
26277 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
26278 swap associated with both a load and a store.
26280 2018-01-02 Andrew Waterman <andrew@sifive.com>
26282 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
26283 * config/riscv/riscv.md (clear_cache): Use it.
26285 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
26287 * web.c: Remove out-of-date comment.
26289 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26291 * expr.c (fixup_args_size_notes): Check that any existing
26292 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
26293 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
26294 (emit_single_push_insn): ...here.
26296 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26298 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
26299 (const_vector_encoded_nelts): New function.
26300 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
26301 (const_vector_int_elt, const_vector_elt): Declare.
26302 * emit-rtl.c (const_vector_int_elt_1): New function.
26303 (const_vector_elt): Likewise.
26304 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
26305 of CONST_VECTOR_ELT.
26307 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26309 * expr.c: Include rtx-vector-builder.h.
26310 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
26311 directly on the tree encoding.
26312 (const_vector_from_tree): Likewise.
26313 * optabs.c: Include rtx-vector-builder.h.
26314 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
26315 sequence of "u" values.
26316 * vec-perm-indices.c: Include rtx-vector-builder.h.
26317 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
26318 directly on the vec_perm_indices encoding.
26320 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26322 * doc/rtl.texi (const_vector): Describe new encoding scheme.
26323 * Makefile.in (OBJS): Add rtx-vector-builder.o.
26324 * rtx-vector-builder.h: New file.
26325 * rtx-vector-builder.c: Likewise.
26326 * rtl.h (rtx_def::u2): Add a const_vector field.
26327 (CONST_VECTOR_NPATTERNS): New macro.
26328 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
26329 (CONST_VECTOR_DUPLICATE_P): Likewise.
26330 (CONST_VECTOR_STEPPED_P): Likewise.
26331 (CONST_VECTOR_ENCODED_ELT): Likewise.
26332 (const_vec_duplicate_p): Check for a duplicated vector encoding.
26333 (unwrap_const_vec_duplicate): Likewise.
26334 (const_vec_series_p): Check for a non-duplicated vector encoding.
26335 Say that the function only returns true for integer vectors.
26336 * emit-rtl.c: Include rtx-vector-builder.h.
26337 (gen_const_vec_duplicate_1): Delete.
26338 (gen_const_vector): Call gen_const_vec_duplicate instead of
26339 gen_const_vec_duplicate_1.
26340 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
26341 (gen_const_vec_duplicate): Use rtx_vector_builder.
26342 (gen_const_vec_series): Likewise.
26343 (gen_rtx_CONST_VECTOR): Likewise.
26344 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
26345 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26346 Build a new vector rather than modifying a CONST_VECTOR in-place.
26347 (handle_special_swappables): Update call accordingly.
26348 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
26349 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26350 Build a new vector rather than modifying a CONST_VECTOR in-place.
26351 (handle_special_swappables): Update call accordingly.
26353 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26355 * simplify-rtx.c (simplify_const_binary_operation): Use
26356 CONST_VECTOR_ELT instead of XVECEXP.
26358 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26360 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
26361 the selector elements to be different from the data elements
26362 if the selector is a VECTOR_CST.
26363 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
26364 ssizetype for the selector.
26366 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26368 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
26369 before testing each element individually.
26370 * tree-vect-generic.c (lower_vec_perm): Likewise.
26372 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26374 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
26375 * selftest-run-tests.c (selftest::run_tests): Call it.
26376 * vector-builder.h (vector_builder::operator ==): New function.
26377 (vector_builder::operator !=): Likewise.
26378 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
26379 (vec_perm_indices::all_from_input_p): New function.
26380 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26381 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
26382 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
26383 instead of reading the VECTOR_CST directly. Detect whether both
26384 vector inputs are the same before constructing the vec_perm_indices,
26385 and update the number of inputs argument accordingly. Use the
26386 utility functions added above. Only construct sel2 if we need to.
26388 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26390 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
26391 the broadcast of the low byte.
26392 (expand_mult_highpart): Use an explicit encoding for the permutes.
26393 * optabs-query.c (can_mult_highpart_p): Likewise.
26394 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
26395 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26396 (vectorizable_bswap): Likewise.
26397 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
26398 explicit encoding for the power-of-2 permutes.
26399 (vect_permute_store_chain): Likewise.
26400 (vect_grouped_load_supported): Likewise.
26401 (vect_permute_load_chain): Likewise.
26403 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26405 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
26406 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
26407 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
26408 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26409 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
26410 (vect_gen_perm_mask_any): Likewise.
26412 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26414 * int-vector-builder.h: New file.
26415 * vec-perm-indices.h: Include int-vector-builder.h.
26416 (vec_perm_indices): Redefine as an int_vector_builder.
26417 (auto_vec_perm_indices): Delete.
26418 (vec_perm_builder): Redefine as a stand-alone class.
26419 (vec_perm_indices::vec_perm_indices): New function.
26420 (vec_perm_indices::clamp): Likewise.
26421 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
26422 (vec_perm_indices::new_vector): New function.
26423 (vec_perm_indices::new_expanded_vector): Update for new
26424 vec_perm_indices class.
26425 (vec_perm_indices::rotate_inputs): New function.
26426 (vec_perm_indices::all_in_range_p): Operate directly on the
26427 encoded form, without computing elided elements.
26428 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
26429 encoding. Update for new vec_perm_indices class.
26430 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
26431 the given vec_perm_builder.
26432 (expand_vec_perm_var): Update vec_perm_builder constructor.
26433 (expand_mult_highpart): Use vec_perm_builder instead of
26434 auto_vec_perm_indices.
26435 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
26436 vec_perm_indices instead of auto_vec_perm_indices. Use a single
26437 or double series encoding as appropriate.
26438 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
26439 vec_perm_indices instead of auto_vec_perm_indices.
26440 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26441 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26442 (vect_permute_store_chain): Likewise.
26443 (vect_grouped_load_supported): Likewise.
26444 (vect_permute_load_chain): Likewise.
26445 (vect_shift_permute_load_chain): Likewise.
26446 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26447 (vect_transform_slp_perm_load): Likewise.
26448 (vect_schedule_slp_instance): Likewise.
26449 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26450 (vectorizable_mask_load_store): Likewise.
26451 (vectorizable_bswap): Likewise.
26452 (vectorizable_store): Likewise.
26453 (vectorizable_load): Likewise.
26454 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
26455 vec_perm_indices instead of auto_vec_perm_indices. Use
26456 tree_to_vec_perm_builder to read the vector from a tree.
26457 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
26458 vec_perm_builder instead of a vec_perm_indices.
26459 (have_whole_vector_shift): Use vec_perm_builder and
26460 vec_perm_indices instead of auto_vec_perm_indices. Leave the
26461 truncation to calc_vec_perm_mask_for_shift.
26462 (vect_create_epilog_for_reduction): Likewise.
26463 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
26464 from auto_vec_perm_indices to vec_perm_indices.
26465 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26466 instead of changing individual elements.
26467 (aarch64_vectorize_vec_perm_const): Use new_vector to install
26468 the vector in d.perm.
26469 * config/arm/arm.c (expand_vec_perm_d::perm): Change
26470 from auto_vec_perm_indices to vec_perm_indices.
26471 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26472 instead of changing individual elements.
26473 (arm_vectorize_vec_perm_const): Use new_vector to install
26474 the vector in d.perm.
26475 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
26476 Update vec_perm_builder constructor.
26477 (rs6000_expand_interleave): Likewise.
26478 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
26479 (rs6000_expand_interleave): Likewise.
26481 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26483 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
26484 to qimode could truncate the indices.
26485 * optabs.c (expand_vec_perm_var): Likewise.
26487 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26489 * Makefile.in (OBJS): Add vec-perm-indices.o.
26490 * vec-perm-indices.h: New file.
26491 * vec-perm-indices.c: Likewise.
26492 * target.h (vec_perm_indices): Replace with a forward class
26494 (auto_vec_perm_indices): Move to vec-perm-indices.h.
26495 * optabs.h: Include vec-perm-indices.h.
26496 (expand_vec_perm): Delete.
26497 (selector_fits_mode_p, expand_vec_perm_var): Declare.
26498 (expand_vec_perm_const): Declare.
26499 * target.def (vec_perm_const_ok): Replace with...
26500 (vec_perm_const): ...this new hook.
26501 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
26502 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
26503 * doc/tm.texi: Regenerate.
26504 * optabs.def (vec_perm_const): Delete.
26505 * doc/md.texi (vec_perm_const): Likewise.
26506 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
26507 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
26508 expand_vec_perm for constant permutation vectors. Assert that
26509 the mode of variable permutation vectors is the integer equivalent
26510 of the mode that is being permuted.
26511 * optabs-query.h (selector_fits_mode_p): Declare.
26512 * optabs-query.c: Include vec-perm-indices.h.
26513 (selector_fits_mode_p): New function.
26514 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
26515 is defined, instead of checking whether the vec_perm_const_optab
26516 exists. Use targetm.vectorize.vec_perm_const instead of
26517 targetm.vectorize.vec_perm_const_ok. Check whether the indices
26518 fit in the vector mode before using a variable permute.
26519 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
26520 vec_perm_indices instead of an rtx.
26521 (expand_vec_perm): Replace with...
26522 (expand_vec_perm_const): ...this new function. Take the selector
26523 as a vec_perm_indices rather than an rtx. Also take the mode of
26524 the selector. Update call to shift_amt_for_vec_perm_mask.
26525 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
26526 Use vec_perm_indices::new_expanded_vector to expand the original
26527 selector into bytes. Check whether the indices fit in the vector
26528 mode before using a variable permute.
26529 (expand_vec_perm_var): Make global.
26530 (expand_mult_highpart): Use expand_vec_perm_const.
26531 * fold-const.c: Includes vec-perm-indices.h.
26532 * tree-ssa-forwprop.c: Likewise.
26533 * tree-vect-data-refs.c: Likewise.
26534 * tree-vect-generic.c: Likewise.
26535 * tree-vect-loop.c: Likewise.
26536 * tree-vect-slp.c: Likewise.
26537 * tree-vect-stmts.c: Likewise.
26538 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
26540 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
26541 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
26542 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
26543 (aarch64_vectorize_vec_perm_const): ...this new function.
26544 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26545 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26546 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
26547 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
26548 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26549 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26550 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
26552 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
26553 check for NEON modes.
26554 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
26555 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
26556 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
26557 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
26559 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
26560 the old VEC_PERM_CONST conditions.
26561 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
26562 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
26563 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
26564 (ia64_vectorize_vec_perm_const_ok): Merge into...
26565 (ia64_vectorize_vec_perm_const): ...this new function.
26566 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
26567 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
26568 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
26569 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
26570 * config/mips/mips.c (mips_expand_vec_perm_const)
26571 (mips_vectorize_vec_perm_const_ok): Merge into...
26572 (mips_vectorize_vec_perm_const): ...this new function.
26573 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
26574 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
26575 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
26576 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
26577 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
26578 (rs6000_expand_vec_perm_const): Delete.
26579 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
26581 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26582 (altivec_expand_vec_perm_const_le): Take each operand individually.
26583 Operate on constant selectors rather than rtxes.
26584 (altivec_expand_vec_perm_const): Likewise. Update call to
26585 altivec_expand_vec_perm_const_le.
26586 (rs6000_expand_vec_perm_const): Delete.
26587 (rs6000_vectorize_vec_perm_const_ok): Delete.
26588 (rs6000_vectorize_vec_perm_const): New function.
26589 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26590 an element count and rtx array.
26591 (rs6000_expand_extract_even): Update call accordingly.
26592 (rs6000_expand_interleave): Likewise.
26593 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
26594 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
26595 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
26596 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
26597 (rs6000_expand_vec_perm_const): Delete.
26598 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26599 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26600 (altivec_expand_vec_perm_const_le): Take each operand individually.
26601 Operate on constant selectors rather than rtxes.
26602 (altivec_expand_vec_perm_const): Likewise. Update call to
26603 altivec_expand_vec_perm_const_le.
26604 (rs6000_expand_vec_perm_const): Delete.
26605 (rs6000_vectorize_vec_perm_const_ok): Delete.
26606 (rs6000_vectorize_vec_perm_const): New function. Remove stray
26607 reference to the SPE evmerge intructions.
26608 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26609 an element count and rtx array.
26610 (rs6000_expand_extract_even): Update call accordingly.
26611 (rs6000_expand_interleave): Likewise.
26612 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26613 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26615 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26617 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26619 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26620 vector mode and that that mode matches the mode of the data
26622 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26623 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
26624 directly using expand_vec_perm_1 when forcing selectors into
26626 (expand_vec_perm_var): New function, split out from expand_vec_perm.
26628 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26630 * optabs-query.h (can_vec_perm_p): Delete.
26631 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26632 * optabs-query.c (can_vec_perm_p): Split into...
26633 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26634 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26635 particular selector is valid.
26636 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26637 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26638 (vect_grouped_load_supported): Likewise.
26639 (vect_shift_permute_load_chain): Likewise.
26640 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26641 (vect_transform_slp_perm_load): Likewise.
26642 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26643 (vectorizable_bswap): Likewise.
26644 (vect_gen_perm_mask_checked): Likewise.
26645 * fold-const.c (fold_ternary_loc): Likewise. Don't take
26646 implementations of variable permutation vectors into account
26647 when deciding which selector to use.
26648 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26649 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26650 with a false third argument.
26651 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26652 to test whether the constant selector is valid and can_vec_perm_var_p
26653 to test whether a variable selector is valid.
26655 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26657 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26658 * optabs-query.c (can_vec_perm_p): Likewise.
26659 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26660 instead of vec_perm_indices.
26661 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26662 (vect_gen_perm_mask_checked): Likewise,
26663 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26664 (vect_gen_perm_mask_checked): Likewise,
26666 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26668 * optabs-query.h (qimode_for_vec_perm): Declare.
26669 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26670 (qimode_for_vec_perm): ...this new function.
26671 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26673 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26675 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26676 does not have a conditional at the top.
26678 2018-01-02 Richard Biener <rguenther@suse.de>
26680 * ipa-inline.c (big_speedup_p): Fix expression.
26682 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26685 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26688 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26692 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26693 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26694 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26695 cond_taken_branch_cost 3->4.
26697 2018-01-01 Jakub Jelinek <jakub@redhat.com>
26699 PR tree-optimization/83581
26700 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26701 TODO_cleanup_cfg if any changes have been made.
26703 PR middle-end/83608
26704 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26705 convert_modes if target mode has the right side, but different mode
26708 PR middle-end/83609
26709 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26710 last argument when extracting from CONCAT. If either from_real or
26711 from_imag is NULL, use expansion through memory. If result is not
26712 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26713 the parts directly to inner mode, if even that fails, use expansion
26716 PR middle-end/83623
26717 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26718 check for bswap in mode rather than HImode and use that in expand_unop
26721 Copyright (C) 2018 Free Software Foundation, Inc.
26723 Copying and distribution of this file, with or without modification,
26724 are permitted in any medium without royalty provided the copyright
26725 notice and this notice are preserved.