* config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
[official-gcc.git] / gcc / ChangeLog
blob4f606d35373ded6c4c74637214fe31a66f52ebe6
1 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
4         (arm32_output_mi_thunk): Deal with long calls.
6 2018-09-26  Richard Biener  <rguenther@suse.de>
8         PR debug/87428
9         PR debug/87362
10         * tree-inline.c (expand_call_inline): When the location
11         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
12         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
13         the inserted BLOCK to make inlined_function_outer_scope_p
14         recognize it.
15         * dwarf2out.c (add_call_src_coords_attributes): Do not add
16         coords for reserved locations.
18 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
20         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
21         (*call_indirect_nonlocal_sysv<mode>): Ditto.
22         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
23         (*sibcall_nonlocal_sysv<mode>): Ditto.
24         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
25         (<bd>_<mode>): Ditto.
26         (<bd>tf_<mode>): Ditto.
28 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
30         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
31         control string as a list of templates instead of as C code.
32         (*altivec_movti): Ditto.
33         * config/rs6000/darwin.md (movdf_low_di): Ditto.
35 2018-09-25  Jim Wilson  <jimw@sifive.com>
37         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
38         when target symbol is weak.
40 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
42         PR c/87387
43         * builtins.c (unterminated_array): Simplify.
44         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
45         where pointer arithmetic is safe.
47 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
49         PR target/86987
50         * config/rs6000/altivec.md (altivec_vspltb): Use
51         const_0_to_15_operand instead of u5bit_cint_operand.
52         (*altivec_vspltb_internal): Ditto.
53         (altivec_vspltb_direct): Ditto.
54         (altivec_vsplth): Use const_0_to_7_operand instead of
55         u5bit_cint_operand.
56         (*altivec_vsplth_internal): Ditto.
57         (altivec_vsplth_direct): Ditto.
58         (altivec_vspltw): Use const_0_to_3_operand instead of
59         u5bit_cint_operand.
60         (*altivec_vspltw_internal): Ditto.
61         (altivec_vspltw_direct): Ditto.
62         (altivec_vspltsf): Ditto.
63         (*altivec_vspltsf_internal): Ditto.
64         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
65         various splats with the proper size immediate.  Reorder the various
66         cases by ascending size of immediate, and put all such together.
68 2018-09-25  Richard Biener  <rguenther@suse.de>
70         PR debug/83941
71         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
72         GC-ification.
73         (maybe_create_die_with_external_ref): Do not create
74         DW_TAG_imported_unit here.
75         (add_abstract_origin_attribute): Handle external BLOCK refs.
76         (dwarf2out_abstract_function): Simplify LTO case.
77         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
78         rather than using maybe_create_die_with_external_ref.
80 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
82         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
83         (frndintxf2_mask_pm_i387): Ditto.
84         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
85         Enable for !flag_trapping_math.
86         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
87         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
88         Change operand 1 predicate to nonimmediate_operand.
89         (attr "i387_cw"): Remove mask_pm.
90         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
91         (enum ix86_entity): Remove I387_MASK_PM.
92         * config/i386/i386.c (ix86_i387_mode_needed): Do not
93         handle I387_MASK_PM.
94         (ix86_mode_needed): Ditto.
95         (ix86_mode_after): Ditto.
96         (ix86_mode_entry): Ditto.
97         (ix86_mode_exit): Ditto.
98         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
100 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
102         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
103         to_update_switch_stmts to vNULL instead of calling create on them
104         immediately.
106 2018-09-25  Richard Biener  <rguenther@suse.de>
108         PR tree-optimization/87402
109         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
110         (visit_phi): Re-instantiate handling of supposed to be VARYING
111         but non-VARYING backedge value.
113 2018-09-25  Richard Biener  <rguenther@suse.de>
115         PR debug/83941
116         * dwarf2out.c (struct sym_off_pair): New.
117         (external_die_map): New global.
118         (lookup_decl_die): When in LTO create DIEs lazily from the
119         external_die_map.
120         (lookup_block_die): New function, create DIEs lazily in LTO.
121         (equate_block_to_die): New function.
122         (dwarf2out_die_ref_for_decl): During WPA get the association
123         from the external DIE map.
124         (dwarf2out_register_external_die): Record mapping into the
125         external DIE map.
126         (maybe_create_die_with_external_ref): New function split out from
127         DIE generation part of old dwarf2out_register_external_die.
128         (add_abstract_origin_attribute): Do not return the DIE.  When
129         in LTO reference externals directly.
130         (dwarf2out_abstract_function): When in LTO ignore calls for
131         decls with external DIEs (already present abstract instances).
132         (gen_call_site_die): Adjust.
133         (add_high_low_attributes): Likewise.
134         (gen_lexical_block_die): Likewise.
135         (gen_inlined_subroutine_die): Likewie.
136         (gen_block_die): Likewise.
137         (dwarf2out_inline_entry): Likewise.
138         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
139         DIEs.
141 2018-09-25  Martin Liska  <mliska@suse.cz>
143         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
144         integers and not by a float value.
146 2018-09-25  Martin Liska  <mliska@suse.cz>
148         PR fortran/87394
149         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
150         instead of NULL.
151         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
152         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
153         * godump.c (go_format_type): Remove extra parenthesis.
155 2018-09-25  Martin Liska  <mliska@suse.cz>
157         * alias.c (set_dest_equal_p): Remove unused function.
158         * config/i386/i386.c (def_builtin_pure2): Likewise.
159         * diagnostic-show-locus.c (class layout): Remove
160         unused field.
161         (layout::layout): Likewise here.
162         * dump-context.h (class temp_dump_context): Likewise.
163         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
164         (add_AT_loclistsptr): Likewise.
165         (add_AT_offset): Likewise.
166         (get_AT_hi_pc): Likewise.
167         (is_comdat_die): Likewise.
168         (type_is_enum): Likewise.
169         (ceiling): Likewise.
170         (add_AT_vms_delta): Likewise.
171         (is_class_die): Likewise.
172         * edit-context.c (class line_event): Remove unused field.
173         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
174         unused function.
175         * ipa-cp.c (ipa_get_vr_lat): Likewise.
176         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
177         (ok_for_base_p_nonstrict): Likewise.
178         * tree-chrec.c (is_not_constant_evolution): Likewise.
179         (chrec_fold_poly_cst): Likewise.
180         * tree-if-conv.c (has_pred_critical_p): Likewise.
181         * tree-ssa-coalesce.c (print_exprs): Likewise.
182         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
183         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
184         * tree-vrp.c (value_ranges_intersect_p): Likewise.
185         (value_range_nonnegative_p): Likewise.
187 2018-09-25  Martin Liska  <mliska@suse.cz>
189         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
190         Do not handle "GNU Pascal".
191         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
192         Likewise.
193         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
194         from documentation. Likewise.
195         * dbxout.c (dbxout_range_type): Likewise.
196         * doc/cpp.texi: Likewise.
197         * doc/extend.texi: Likewise.
198         * doc/frontends.texi: Likewise.
199         * doc/invoke.texi: Remove Pascal entry.
200         * tree.def (CLEANUP_POINT_EXPR): Likewise.
201         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
203 2018-09-25  Martin Liska  <mliska@suse.cz>
205         PR middle-end/86078
206         * doc/invoke.texi: Document all parameters and remove default
207         of the parameters.
209 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
211         PR bootstrap/87417
212         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
213         contains HOST_WIDE_INTs when computing its size.
215 2018-09-24  Jim Wilson  <jimw@sifive.com>
217         PR target/87391
218         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
219         not TARGET_RVE.
220         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
222 2018-09-24  Andrew Pinski  <apinski@marvell.com>
224         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
225         access prev before checking it for NULLness in the
226         AARCH64_FUSE_CMP_BRANCH case.
228 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
230         PR target/82699
231         * config/i386/i386.c (rest_of_insert_endbranch): Set
232         endbr_queued_at_entrance to true and don't insert ENDBR if
233         x86_function_profiler will be called.
234         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
235         is true.
236         * config/i386/i386.h (machine_function): Add
237         endbr_queued_at_entrance.
239 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
241         * genattrtab.c (mk_attr_alt): Use alternative_mask.
242         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
243         types.
244         (check_attr_test): Use alternative_mask.
245         (get_attr_value): Likewise.
246         (compute_alternative_mask): Use alternative_mask and XWINT.
247         (make_alternative_compare): Use alternative_mask.
248         (attr_alt_subset_p): Use XWINT.
249         (attr_alt_subset_of_compl_p): Likewise.
250         (attr_alt_intersection): Use alternative_mask and XWINT.
251         (attr_alt_union): Likewise.
252         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
253         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
254         (simplify_test_exp): Use alternative_mask and XWINT.
255         (write_test_expr): Use alternative_mask and XWINT, adjust bit
256         number calculation to support 64 bits.  Generate code that
257         checks 64-bit masks.
258         (main): Use alternative_mask.
259         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
261 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
263         PR target/80080
264         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
265         RETURN+USE when returning via %r14.
267 2018-09-24  Martin Liska  <mliska@suse.cz>
269         * gcov.c (output_lines): Print colorization legend
270         for both flag_use_colors and flag_use_hotness_colors.
271         Reword the help.
273 2018-09-24  Martin Liska  <mliska@suse.cz>
275         * coverage.c (get_coverage_counts): Use warning_at
276         with current_function_decl location. Use %qD in warning
277         message.
279 2018-09-24  Martin Liska  <mliska@suse.cz>
281         * memory-block.h (memory_block_pool::release): Annotate with
282         valgrind that the memory is not accessible.
284 2018-09-24  Martin Liska  <mliska@suse.cz>
286         PR sanitizer/85774
287         * asan.c: Make asan_handled_variables extern.
288         * asan.h: Likewise.
289         * cfgexpand.c (expand_stack_vars): Make sure
290         a representative is unpoison if another
291         variable in the partition is handled by
292         use-after-scope sanitization.
294 2018-09-24  Richard Biener  <rguenther@suse.de>
296         PR tree-optimization/63155
297         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
298         the worklist when the edge of the respective argument isn't
299         executable.
301 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
303         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
304         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
305         (MASK_CLASS_P): Update for rename.
306         (MAYBE_MASK_CLASS_P): Ditto.
307         (REG_CLASS_NAMES): Update.
308         (REG_CLASS_CONTENT): Update.
309         * config/i386/i386.c (regclass_map): Update for MASK_REG
310         and ALL_MASK_REGS rename.
311         * config/i386/constraints.md (Yk): Update for rename.
312         (k): Ditto.
314 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
316         * config/i386/i386.h (enum reg_class): Remove
317         EVEX_SSE_REGS and MOD4_SSE_REGS.
318         (REG_CLASS_NAMES): Update.
319         (REG_CLASS_CONTENT): Update.
320         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
321         registers as ALL_SSE_REGS.
322         (ix86_additional_allocno_class_p): Remove.
323         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
324         (ix86_register_priority): Lower priority of EVEX SSE registers.
325         Use IN_RANGE macro where appropriate.
326         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
327         AVX-5124VNNIW checks.
328         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
329         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
330         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
331         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
332         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
333         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
334         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
335         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
336         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
337         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
338         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
339         * config/i386/constraints.md (Yh): Remove.
341 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
343         * config/i386/i386.c (regclass_map): Declare integer REX registers
344         as GENERAL_REGS.
346 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
348         * doc/service.texi (Service): Switch the fsf.org link to https.
350 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
352         PR target/86798
353         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
354         Define to speculation_safe_value_not_needed.
356 2018-09-21  Florian Weimer  <fweimer@redhat.com>
358         PR middle-end/81035
359         * doc/extend.texi (Common Function Attributes): Mention that
360         noreturn suppresses tail call optimization.
362 2018-09-21  Jeff Law  <law@redhat.com>
364         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
365         vr_values::cleanup_edges_and_switches.
366         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
367         vr_values class.
368         (identify_jump_threads): Remove EDGE_IGNORE handling.
369         (execute_vrp): Move handling of to_remove_edges and
370         to_update_switch_stmts into vr_values class member functions.
371         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
372         (to_update_switch_stmts): Likewise.
373         * vr-values.c: Include cfghooks.h.
374         (vr_values::vr_values): Initialize to_remove_edges and
375         to_update_switch_stmts.
376         (vr_values::~vr_values): Verify to_remove_edges and
377         to_update_switch_stmts are empty.
378         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
379         (vr_values::cleanup_edges_and_switches): New member function.
380         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
381         function.  Add new data members.
383 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
385         PR tree-optimization/87309
386         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
387         calls with pflags and alt_flags.
388         (selftest::test_capture_of_dump_calls): Add test of interaction of
389         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
391 2018-09-21  Olivier Hainque  <hainque@adacore.com>
393         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
395 2018-09-21  Olivier Hainque  <hainque@adacore.com>
397         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
399 2018-09-21  Olivier Hainque  <hainque@adacore.com>
401         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
402         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
403         (VXWORKS_LIBS_RTP): Minor reordering.
405 2018-09-21  Olivier Hainque  <hainque@adacore.com>
407         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
408         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
410 2018-09-21  Olivier Hainque  <hainque@adacore.com>
412         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
413         (PTRDIFF_TYPE): Likewise.
415 2018-09-21  Olivier Hainque  <hainque@adacore.com>
417         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
418         triplet, similar to support for VxWorks7.
419         * config/vxworks-dummy.h: Provide a default definition
420         of TARGET_VXWORKS64 to 0.
422 2018-09-21  Olivier Hainque  <hainque@adacore.com>
424         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
425         * config/vxworks-dummy.h: here.
427 2018-09-21  Olivier Hainque  <hainque@adacore.com>
429         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
431 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
432             Bo Zhou  <zbo.zhou@hisilicon.com>
434         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
435         * config/aarch64/aarch64-tune.md: Regenerated.
436         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
437         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
438         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
440 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
441             Julian Brown  <julian@codesourcery.com>
443         * builtins.c (get_builtin_sync_mem): Handle address spaces.
445 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
447         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
448         if the call takes a static chain.
450 2018-09-21  Martin Liska  <mliska@suse.cz>
452         * auto-profile.c (autofdo_source_profile::read): Do not
453         set sum_all.
454         (read_profile): Do not add working sets.
455         (read_autofdo_file): Remove sum_all.
456         (afdo_callsite_hot_enough_for_early_inline): Remove const
457         qualifier.
458         * coverage.c (struct counts_entry): Remove gcov_summary.
459         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
460         do not support GCOV_TAG_PROGRAM_SUMMARY.
461         (get_coverage_counts): Remove summary and expected
462         arguments.
463         * coverage.h (get_coverage_counts): Likewise.
464         * doc/gcov-dump.texi: Remove -w option.
465         * gcov-dump.c (dump_working_sets): Remove.
466         (main): Do not support '-w' option.
467         (print_usage): Likewise.
468         (tag_summary): Likewise.
469         * gcov-io.c (gcov_write_summary): Do not dump
470         histogram.
471         (gcov_read_summary): Likewise.
472         (gcov_histo_index): Remove.
473         (gcov_histogram_merge): Likewise.
474         (compute_working_sets): Likewise.
475         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
476         it not obsolete.
477         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
478         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
479         (GCOV_HISTOGRAM_SIZE): Remove.
480         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
481         (struct gcov_summary): Simplify rapidly just
482         to runs and sum_max fields.
483         (gcov_histo_index): Remove.
484         (NUM_GCOV_WORKING_SETS): Likewise.
485         (compute_working_sets): Likewise.
486         * gcov-tool.c (print_overlap_usage_message): Remove
487         trailing empty line.
488         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
489         (output_lines): Remove program related line.
490         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
491         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
492         histogram.
493         (input_profile_summary): Do not read it.
494         (merge_profile_summaries): And do not merge it.
495         (input_symtab): Do not call removed function.
496         * modulo-sched.c (sms_schedule): Do not print sum_max.
497         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
498         removed when histogram method was invented.
499         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
500         mode.
501         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
502         GCOV coding style.
503         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
504         and dump selected value.
505         * profile.c (add_working_set): Remove.
506         (get_working_sets): Likewise.
507         (find_working_set): Likewise.
508         (get_exec_counts): Do not work with working sets.
509         (read_profile_edge_counts): Do not inform as sum_max is removed.
510         (compute_branch_probabilities): Likewise.
511         (compute_value_histograms): Remove argument for call of
512         get_coverage_counts.
513         * profile.h: Do not make gcov_summary const.
515 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
517         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
519 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
521         PR tree-optimization/86990
522         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
523         Check that the entire merged store group is made of constants only for
524         overlapping stores.
526 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
528         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
529         (VTABLE_VERIFICATION_SPEC): Likewise.
530         (SANITIZER_EARLY_SPEC): Likewise.
531         (SANITIZER_SPEC): Likewise.
532         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
533         * doc/invoke.texi (Link Options): Document -r.
535 2018-09-20  Richard Biener <rguenther@suse.de>
537         PR middle-end/87054
538         * gimplify.c (gimplify_expr): Retain alignment of
539         addressable lvalue in dereference.
541 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
543         PR bootstrap/87013
544         * configure.ac: Check for .loc is_stmt support.
545         * configure, config.in: Rebuilt.
546         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
547         if not supported.
549 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
551         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
552         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
553         -misel=no.
555 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
557         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
558         VECTOR_OTHER.
559         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
560         case VECTOR_OTHER.
562 2018-09-20  Marek Polacek  <polacek@redhat.com>
564         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
566 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
568         PR tree-optimization/87288
569         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
570         into account when determining PEELING_FOR_NITERS.
572 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
574         PR tree-optimization/86877
575         * tree-vect-loop.c (vect_analyze_loop_2): Call
576         vect_verify_datarefs_alignment.
578 2018-09-19  Marek Polacek  <polacek@redhat.com>
580         * doc/invoke.texi: Document -Wclass-conversion.
582 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
584         * config/pa/pa.c (pa_adjust_priority): Delete.
585         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
587         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
588         (atomic_storehi): Likewise.
589         (atomic_storesi): Likewise.
590         (atomic_loaddi): Restore compare and swap exchange loop code.
592 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
594         PR rtl-optimization/86902
595         * combine.c (try_combine): When changing the CC mode used, don't change
596         an unrelated mode in other_insn to that new CC mode.
598 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
600         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
601         with %T in place of calls to dump_generic_expr.
602         (prune_runtime_alias_test_list): Likewise.
603         (create_runtime_alias_checks): Likewise.
604         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
605         (vect_analyze_data_ref_dependence): Likewise.
606         (vect_slp_analyze_data_ref_dependence): Likewise.
607         (vect_record_base_alignment): Likewise.  Use %G in place of call
608         to dump_gimple_stmt.
609         (vect_compute_data_ref_alignment): Likewise.
610         (verify_data_ref_alignment): Likewise.
611         (vect_find_same_alignment_drs): Likewise.
612         (vect_analyze_group_access_1): Likewise.
613         (vect_analyze_data_ref_accesses): Likewise.
614         (dependence_distance_ge_vf): Likewise.
615         (dump_lower_bound): Likewise.
616         (vect_prune_runtime_alias_test_list): Likewise.
617         (vect_find_stmt_data_reference): Likewise.
618         (vect_analyze_data_refs): Likewise.
619         (vect_create_addr_base_for_vector_ref): Likewise.
620         (vect_create_data_ref_ptr): Likewise.
621         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
622         (vect_can_advance_ivs_p): Likewise.
623         (vect_update_ivs_after_vectorizer): Likewise.
624         (vect_gen_prolog_loop_niters): Likewise.
625         (vect_prepare_for_masked_peels): Likewise.
626         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
627         (vect_determine_vectorization_factor): Likewise.
628         (vect_is_simple_iv_evolution): Likewise.
629         (vect_analyze_scalar_cycles_1): Likewise.
630         (vect_analyze_loop_operations): Likewise.
631         (report_vect_op): Likewise.
632         (vect_is_slp_reduction): Likewise.
633         (check_reduction_path): Likewise.
634         (vect_is_simple_reduction): Likewise.
635         (vect_create_epilog_for_reduction): Likewise.
636         (vect_finalize_reduction:): Likewise.
637         (vectorizable_induction): Likewise.
638         (vect_transform_loop_stmt): Likewise.
639         (vect_transform_loop): Likewise.
640         (optimize_mask_stores): Likewise.
641         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
642         (vect_split_statement): Likewise.
643         (vect_recog_over_widening_pattern): Likewise.
644         (vect_recog_average_pattern): Likewise.
645         (vect_determine_min_output_precision_1): Likewise.
646         (vect_determine_precisions_from_range): Likewise.
647         (vect_determine_precisions_from_users): Likewise.
648         (vect_mark_pattern_stmts): Likewise.
649         (vect_pattern_recog_1): Likewise.
650         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
651         (vect_record_max_nunits): Likewise.
652         (vect_build_slp_tree_1): Likewise.
653         (vect_build_slp_tree_2): Likewise.
654         (vect_print_slp_tree): Likewise.
655         (vect_analyze_slp_instance): Likewise.
656         (vect_detect_hybrid_slp_stmts): Likewise.
657         (vect_detect_hybrid_slp_1): Likewise.
658         (vect_slp_analyze_operations): Likewise.
659         (vect_slp_analyze_bb_1): Likewise.
660         (vect_transform_slp_perm_load): Likewise.
661         (vect_schedule_slp_instance): Likewise.
662         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
663         (vect_mark_stmts_to_be_vectorized): Likewise.
664         (vect_init_vector_1): Likewise.
665         (vect_get_vec_def_for_operand): Likewise.
666         (vect_finish_stmt_generation_1): Likewise.
667         (vect_check_load_store_mask): Likewise.
668         (vectorizable_call): Likewise.
669         (vectorizable_conversion): Likewise.
670         (vectorizable_operation): Likewise.
671         (vectorizable_load): Likewise.
672         (vect_analyze_stmt): Likewise.
673         (vect_is_simple_use): Likewise.
674         (vect_get_vector_types_for_stmt): Likewise.
675         (vect_get_mask_type_for_stmt): Likewise.
676         * tree-vectorizer.c (increase_alignment): Likewise.
678 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
680         * doc/rtl.texi: Adjust vec_select description.
681         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
682         non-constant selectors.
684 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
686         * config/aarch64/aarch64-protos.h
687         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
688         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
689         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
690         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
691         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
692         (AARCH64_FL_PROFILE): Move index so flags are ordered.
693         (AARCH64_ISA_RCPC8_4): New flag.
694         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
695         to aarch64_offset_9bit_signed_unscaled_p.
696         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
697         and use stlur.
698         * config/aarch64/constraints.md (Ust): New constraint.
699         * config/aarch64/predicates.md.
700         (aarch64_9bit_offset_memory_operand): New predicate.
701         (aarch64_rcpc_memory_operand): New predicate.
703 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
705         PR rtl-optimization/87361
706         * rtlanal.c (nonzero_bits1): Revert accidental change.
708 2018-09-19  Richard Biener  <rguenther@suse.de>
710         PR tree-optimization/87349
711         PR tree-optimization/87342
712         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
714 2018-09-18  Marek Polacek  <polacek@redhat.com>
716         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
717         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
719 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
721         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
723 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
725         PR rtl-optimization/86882
726         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
728 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
730         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
731         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
733 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
735         PR other/87353
736         * doc/invoke.texi (Link Options): Fix formatting and grammar.
738 2018-09-18  Richard Biener  <rguenther@suse.de>
740         PR middle-end/63155
741         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
742         (compute_samebase_partition_bases): Likewise.
743         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
744         (gimple_can_coalesce_p): Simplify.
746 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
748         Handle a library implementation of ffs calling __builtin_ffs.
749         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
750         (mmix_init_libfuncs): New function: make __builtin_ffs expand
751         to __ffsdi2.
753 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
755         * diagnostic-show-locus.c (class layout_range): Add field
756         "m_original_idx".
757         (layout_range::layout_range): Add "original_idx" param and use it
758         to initialize new field.
759         (make_range): Use 0 for original_idx.
760         (layout::layout): Pass in index to calls to
761         maybe_add_location_range.
762         (layout::maybe_add_location_range): Add param "original_idx" and
763         pass it on to layout_range.
764         (layout::print_any_labels): Pass on range->m_original_idx to
765         get_text call.
766         (gcc_rich_location::add_location_if_nearby): Use 0 for
767         original_idx.
768         * gcc-rich-location.h (text_range_label::get_text): Update for new
769         param.
770         (range_label_for_type_mismatch::get_text): Likewise.
772 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
774         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
776 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
778         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
779         format_string_diagnostic_t.
780         (fmtwarn_n): Likewise.
781         * substring-locations.c
782         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
783         (format_warning_n_va): Convert to...
784         (format_string_diagnostic_t::emit_warning_n_va): ...this.
785         (format_warning_va): Convert to...
786         (format_string_diagnostic_t::emit_warning_va): ...this.
787         (format_warning_at_substring): Convert to...
788         (format_string_diagnostic_t::emit_warning): ...this.
789         (format_warning_at_substring_n): Convert to...
790         (format_string_diagnostic_t::emit_warning_n): ...this.
791         * substring-locations.h (class format_string_diagnostic_t): New
792         class.
793         (format_warning_va): Convert to
794         format_string_diagnostic_t::emit_warning_va.
795         (format_warning_n_va): Convert to
796         format_string_diagnostic_t::emit_warning_n_va.
797         (format_warning_at_substring): Convert to
798         format_string_diagnostic_t::emit_warning.
799         (format_warning_at_substring_n): Convert to
800         format_string_diagnostic_t::emit_warning_n.
802 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
803             Bernd Schmidt <bernds_cb1@t-online.de>
805         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
806         SImode args.
808 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
810         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
811         operand 0 predicate to nonimmediate operand.
812         (rint<mode>2_frndint): Remove insn pattern.
813         (rint<mode>2): Change operand 1 predicate to general_operand.
814         Extend operand 1 to XFmode and generate rintxf2 insn.
815         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
816         Do not use X87MODEF mode macro.
817         (frndintxf2_<rounding>_i387): Rename from
818         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
819         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
820         to XFmode and generate significandxf3 insn.
822 2018-09-17  Richard Biener  <rguenther@suse.de>
824         PR tree-optimization/87328
825         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
826         visiting unexecutable backedges when not iterating.
827         (do_rpo_vn): Mark all edges not executable even when not
828         iterating.
830 2018-09-17  Martin Jambor  <mjambor@suse.cz>
832         PR c/63886
833         * doc/invoke.texi (Warning Options): Likewise.
835 2018-09-17  Richard Biener  <rguenther@suse.de>
837         PR tree-optimization/87301
838         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
839         clean EH info from leftover copy assignments.
841 2018-09-17  Martin Liska  <mliska@suse.cz>
843         PR gcov-profile/85871
844         * gcov.c (output_intermediate_file): Fix out of bounds
845         access.
847 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
849         * config/arc/arc.c: Object attributes for core4 not reflected
850         correctly.
851         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
852         core3).
854 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
856         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
858 2018-09-17  Martin Liska  <mliska@suse.cz>
860         * doc/gcov.texi: Document new option --use-hotness-colors.
861         * gcov.c (struct source_info): Declare new field.
862         (source_info::source_info): Set default for maximum_count.
863         (print_usage): Add new -q option.
864         (process_args): Process it.
865         (accumulate_line_info): Save src->maximum_count.
866         (output_line_beginning): Make color line number if
867         flag_use_hotness_colors is set.
868         (output_line_details): Pass default argument value.
869         (output_lines): Pass src->maximum_count.
871 2018-09-17  Martin Liska  <mliska@suse.cz>
873         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
874         Use processor_names table.
875         * config/i386/i386.c (ix86_default_align): Use
876         processor_cost_table for alignment values.
877         (ix86_option_override_internal): Use processor_names.
878         (ix86_function_specific_print): Likewise.
879         * config/i386/i386.h (struct processor_costs):
880         Add alignment values.
881         (struct ptt): Remove and replace with const char *.
882         * config/i386/x86-tune-costs.h (struct processor_costs):
883         Declare default alignments for all costs.
885 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
887         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
888         symbolics or VR_VARYING ranges for ABS_EXPR.
889         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
890         when range will wrap.
892 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
894         PR middle-end/86864
895         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
896         before and after a JUMP_TABLE_DATA.
898 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
900         PR middle-end/87188
901         * dojump.c (do_compare_and_jump): Canonicalize function pointers
902         when one operand is a function pointer.  Use POINTER_TYPE_P and
903         FUNC_OR_METHOD_TYPE_P.
904         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
905         * fold-const.c (build_range_check): Likewise.
906         * match.pd (simple_comparison): Likewise.
908 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
910         PR c/82967
911         * spellcheck.c (get_edit_distance_cutoff): New function.
912         (selftest::test_edit_distance_unit_test_oneway): Rename to...
913         (selftest::test_get_edit_distance_one_way): ...this.
914         (selftest::test_get_edit_distance_unit): Rename to...
915         (selftest::test_get_edit_distance_both_ways): ...this.
916         (selftest::test_edit_distances): Move tests to this new function,
917         and test some more pairs of strings.  Update for above renaming.
918         (selftest::get_old_cutoff): New function.
919         (selftest::test_get_edit_distance_cutoff): New function.
920         (selftest::assert_suggested_for): New function.
921         (ASSERT_SUGGESTED_FOR): New macro.
922         (selftest::assert_not_suggested_for): New function.
923         (ASSERT_NOT_SUGGESTED_FOR): New macro.
924         (selftest::test_suggestions): New function.
925         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
926         tests to selftest::test_edit_distances and call it.  Add calls to
927         selftest::test_get_edit_distance_cutoff and
928         selftest::test_suggestions.
929         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
930         (best_match::consider): Replace hard-coded cutoff calculation with
931         a call to...
932         (best_match::get_cutoff): New declaration.
933         (best_match::get_best_meaningful_candidate): Likewise.
935 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
937         * builtins.c (fold_builtin_strlen): Remove TODO comment.
939 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
941         revert:
942         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
944         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
945         terminated string literal.
947 2018-09-14  Martin Sebor  <msebor@redhat.com>
949         * builtins.c (unterminated_array): Handle ARRAY_REF.
950         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
951         * builtins.h (unterminated_array): Declare extern.
952         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
953         arrays.
954         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
955         calls.
957 2018-09-14  Martin Sebor  <msebor@redhat.com>
958             Jeff Law  <law@redhat.com>
960         * builtins.c (unterminated_array): New.
961         (expand_builtin_strcpy): Adjust.
962         (expand_builtin_strcpy_args): Detect unterminated arrays.
963         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
964         unterminated arrays.
965         * gimple-fold.h (get_maxval_strlen): Add argument.
966         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
968         * gimple-fold.c (get_range_strlen): Add argument.
969         (get_maxval_strlen): Adjust.
970         * gimple-fold.h (get_range_strlen): Add argument.
972 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
974         * config/i386/movdirintrin.h: Fix copyright year.
976 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
978         * reg-stack.c: Include regs.h.
979         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
980         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
981         FIRST_STACK_REG, not DFmode.
982         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
983         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
984         (change stack): Default register mode to the reg_raw_mode of
985         FIRST_STACK_REG, not DFmode.
986         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
987         (*swapxf): Rename from swapxf.
989 2018-09-14  Carl Love  <cel@us.ibm.com>
991         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
992         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
994 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
996         PR target/87224
997         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
998         alternatives.
1000 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
1002         PR target/85628
1003         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
1005 2018-09-14  Jason Merrill  <jason@redhat.com>
1007         Fix --enable-gather-detailed-mem-stats.
1008         * hash-table.c (hash_table_usage): Change from variable to function.
1009         * hash-table.h: Adjust.
1010         * Makefile.in: Add missing dependencies on hash-table.h.
1012 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1014         PR tree-optimization/87259
1015         PR lto/87283
1016         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
1017         execute_cse_reciprocals_1 has tried transforming.
1019 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
1021         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
1022         VR_VARYING for PLUS/MINUS_EXPR.
1024 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1026         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
1027         formatting.
1029 2018-09-14  Richard Biener  <rguenther@suse.de>
1031         PR middle-end/63155
1032         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
1033         bits for the merged partition.
1035 2018-09-13  Martin Sebor  <msebor@redhat.com>
1036             Bernd Edlinger  <bernd.edlinger@hotmail.de>
1038         * builtins.h (c_srlen): Add argument.
1039         * builtins.c (warn_string_no_nul): New function.
1040         (c_strlen): Add argument and use it.  Update recursive calls.
1041         Pass DECL argument to string_constant to get info on non
1042         terminated strings.  Update *NONSTR as needed.
1043         (fold_builtin_strlen): Add argument to calls to c_strlen.
1044         Warn for unterminated arrays.
1045         (warn_string_no_null): Add prototype.
1046         * expr.c (string_constant): Update arguments.  Update recursive
1047         calls appropriately.  Detect missing NUL terminator and outermost
1048         declaration its missing in.
1049         Improve checks for arrays with nonzero lower bound or elements
1050         that are not a single byte.  Simplify offset computation.
1051         Simplify checks for non-NUL terminated strings.
1052         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
1053         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
1055 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1057         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
1058         correctly.
1059         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
1060         argument.  Fix range checks.
1061         * fold-const.h (c_getstr): Adjust protoype.
1062         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
1063         string is constant but contains no NUL byte.
1065         * expr.c (string_constant): Adjust function comment.
1066         Remove bogus check for zero termination.
1068         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
1070         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
1071         (get_constant_size): Don't make STRING_CSTs larger than they are.
1072         (check_string_literal): New check function for STRING_CSTs.
1073         (output_constant): Use it.
1075 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
1077         PR target/86812
1078         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
1080 2018-09-13  Richard Biener  <rguenther@suse.de>
1082         PR tree-optimization/87263
1083         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
1084         (struct unwind_state): Add max_rpo field.
1085         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
1086         Compute max_rpo, the max RPO number a block can be backwards reached
1087         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
1088         separating it from the iterating mode.
1090 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
1092         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
1093         (rfs_decision): New scheduling decision.
1095 2018-09-13  Richard Biener  <rguenther@suse.de>
1097         PR bootstrap/87134
1098         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
1099         (vn_nary_op_insert_pieces_predicated): Do not write useless
1100         valid_dominated_by_p entry outside of the allocated storage.
1102 2018-09-13  Omar Sandoval  <osandov@osandov.com>
1103             Tom de Vries  <tdevries@suse.de>
1105         PR debug/86985
1106         * dwarf2out.c (is_c): New function.
1107         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
1109 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
1111         PR target/85628
1112         * config/aarch64/aarch64.md (*aarch64_bfxil):
1113         Define.
1114         * config/aarch64/constraints.md (Ulc): Define.
1115         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
1116         Define.
1117         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
1118         New function.
1120 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
1122         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
1123         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
1124         aarch64_layout_frame call.
1125         (aarch64_expand_epilogue): Likewise.
1126         (aarch64_initial_elimination_offset): Likewise.
1127         (aarch64_get_separate_components): Likewise.
1128         (aarch64_use_return_insn_p): Likewise.
1129         (aarch64_layout_frame): Remove unneeded check.
1131 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1133         * configure.ac: Only append
1134         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
1135         gcc_config_arguments if it was never reconfigured or last reconfigure
1136         was with different arguments.
1137         * configure: Regenerated.
1139 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1140             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1142         PR middle-end/87290
1143         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
1144         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
1146 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1148         PR tree-optimization/87287
1149         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
1150         X % C == 0 to X % (unsigned) C == 0 optimization to ...
1151         * match.pd (X % C == 0): ... here.  New optimization.
1153 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1155         PR middle-end/82853
1156         * expr.h (maybe_optimize_mod_cmp): Declare.
1157         * expr.c (mod_inv): New function.
1158         (maybe_optimize_mod_cmp): New function.
1159         (do_store_flag): Use it.
1160         * cfgexpand.c (expand_gimple_cond): Likewise.
1162 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
1163             Julian Brown  <julian@codesourcery.com>
1165         PR middle-end/86336
1166         * gimplify.c (gimplify_scan_omp_clauses): Set
1167         target_firstprivatize_array_bases in OpenACC parallel and kernels
1168         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
1169         OpenACC data regions.
1171 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
1173         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
1174         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
1176 2018-09-12  Richard Biener  <rguenther@suse.de>
1178         PR tree-optimization/87280
1179         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
1180         edge but unreachable target.
1181         (do_rpo_vn): For conservatively handling a PHI only mark
1182         the backedge executable but not the block reachable.
1184 2018-09-12  Richard Biener  <rguenther@suse.de>
1186         PR tree-optimization/87266
1187         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
1188         visited blocks.
1190 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
1192         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
1193         constants.
1194         ("trunc<BFP:mode><DFP_ALL:mode>2")
1195         ("trunc<DFP_ALL:mode><BFP:mode>2")
1196         ("extend<BFP:mode><DFP_ALL:mode>2")
1197         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
1198         according to the target operand type.
1200 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1201             Andreas Krebbel  <krebbel@linux.ibm.com>
1203         PR tree-optimization/86844
1204         * gimple-ssa-store-merging.c
1205         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
1206         there are any overlapping stores in between them, make sure they are
1207         also coalesced or we give up completely.
1209 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1211         PR middle-end/87248
1212         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
1213         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
1215 2018-09-12  Tom de Vries  <tdevries@suse.de>
1217         * common.opt (gdescribe-dies): Add option.
1218         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
1219         attribute for artifical and nameless decls.
1220         (dwarf2out_register_external_die): Add description attribute to
1221         external reference die.
1222         (add_desc_attribute): New functions.
1223         (gen_subprogram_die): Add description attribute to
1224         DW_TAG_call_site_parameter.
1225         * tree-pretty-print.c (print_generic_expr_to_str): New function.
1226         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
1227         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
1228         -gno-describe-dies.
1229         (@item -gdescribe-dies): Add.
1231 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
1233         * tree-vrp.c (vrp_shift_undefined_p): Remove.
1234         (extract_range_from_binary_expr_1: Call
1235         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
1236         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
1237         depend on sign.
1239 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
1241         * gimple-ssa-warn-alloca.c
1242         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
1243         field for ALLOCA_BOUND_*_LARGE.
1245 2018-09-11  Nathan Sidwell  <nathan@acm.org>
1247         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
1249 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
1251         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
1252         for clobbers.  Remove obsolete comment.
1254 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
1256         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
1257         mpxchk, mpxld and mpxst types.
1258         (define_attr length_immediate): Remove all processing of mpx types.
1259         (define_attr prefix_0f): Ditto.
1260         (define_attr memory): Ditto.
1262 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
1264         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
1265         (log<mode>2): Change operand 1 predicate to general_operand.
1266         Extend operand 1 to XFmode and generate logxf3 insn.
1267         (log10<mode>2): Change operand 1 predicate to general_operand.
1268         Extend operand 1 to XFmode and generate log10xf3 insn.
1269         (log2<mode>2): Change operand 1 predicate to general_operand.
1270         Extend operand 1 to XFmode and generate log2xf3 insn.
1271         (fyl2xp1_extend<mode>xf3_i387): Remove.
1272         (log1p<mode>2): Change operand 1 predicate to general_operand.
1273         Extend operand 1 to XFmode and generate log1pxf3 insn.
1274         (fxtract_extend<mode>xf3_i387): Remove.
1275         (logb<mode>2): Change operand 1 predicate to general_operand.
1276         Extend operand 1 to XFmode and generate logbxf3 insn.
1277         (ilogb<mode>2): Change operand 1 predicate to general_operand.
1278         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
1279         (significand<mode>2): Change operand 1 predicate to general_operand.
1280         Extend operand 1 to XFmode and generate significandxf3 insn.
1282 2018-09-11  Nathan Sidwell  <nathan@acm.org>
1284         * gcc.c (perror_with_name, pfatal_with_name): Delete.
1285         (load_specs): Use fatal_error.
1286         (DELETE_IF_ORDINARY, process_command): Use error.
1287         (execute, run_attempt): Use fatal_error.
1289 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
1291         * diagnostic-core.h (sorry_at): New prototype.
1292         * diagnostic.c (sorry_at): New function.
1294 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
1296         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
1297         by zero as VR_UNDEFINED.
1299 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
1301         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
1302         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
1303         (<sincos>mode2): New expander.
1304         (sincos_extend<mode>xf3_i387): Remove insn pattern.
1305         (sincos -> sin, cos splitters): Remove splitter patterns.
1306         (sincos<mode>3): Change operand 2 predicate to general_operand.
1307         Extend operand 2 to XFmode and generate sincosxf3 insn.
1308         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
1309         Change operand 3 predicate to const1_operand.
1310         (fptan_extend<mode>xf4_i387): Remove insn pattern.
1311         (tanxf2): Update operands in the call to fptanxf4_i387.
1312         (tan<mode>2): Change operand 1 predicate to general_operand.
1313         Extend operand 1 to XFmode and generate tanxf3 insn.
1314         (atan2xf3): Rename from *fpatanxf3_i387.
1315         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
1316         (atan2xf3): Remove expander.
1317         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
1318         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
1319         (atan<mode>2): Change operand 1 predicate to general_operand.
1320         Extend operand 1 to XFmode and generate atanxf3 insn.
1322 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
1324         * config/i386/i386.md (x87/SSE constant load splitter): Use
1325         memory_operand instead of nonimmediate_operand for input operand
1326         predicate.
1328 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
1330         * config/i386/i386.md (float partial SSE register stall splitter): Move
1331         splitter near its instruction pattern.
1332         (float_extend partial SSE register stall splitter): Ditto.
1333         (float_truncate partial SSE register stall splitter): Ditto.
1335 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
1337         PR target/86794
1338         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1339         to speculation_safe_value_not_needed.
1341         PR target/85666
1342         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
1343         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
1344         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
1345         leaf_function_p, instead use has_hard_reg_initial_val.
1347 2018-09-09  Nathan Sidwell  <nathan@acm.org>
1349         * gcc.h (pfatal_with_name): Don't declare here.
1350         * gcc.c (pfatal_with_name): Make static.
1352 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1354         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
1355         earlyclobber.
1357 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
1359         PR rtl-optimization/85458
1360         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
1361         priority hook to reduce the priority of EXPR.
1363 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
1365         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
1366         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
1367         with X87_ENABLE_FLOAT.  Remove preparation code.
1368         (*float<SWI48:mode><MODEF:mode>2): Rename from
1369         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
1370         math using "enabled" attribute.
1371         (*floatdi<MODEF:mode>2_i387): Rename from
1372         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
1373         enable for 32bit targets only.
1374         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
1375         splitter.
1376         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
1377         as operand 1 predicate.  Rewrite as define_insn_and_split.
1378         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
1380 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
1382         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
1383         to fallthru to FLOAT case.
1385 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
1387         PR target/86731
1388         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
1389         around folding of vec_sl to handle out of range shift values.
1391 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
1393         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
1394         Update callers to gen_fix_trunc<mode>_i387_fisttp
1395         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
1396         nonimmediate_operand.
1397         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
1398         and corresponding splitters.
1399         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
1400         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
1401         (fix_truncdi_i387_with_temp): Remove insn pattern
1402         and corresponding splitters.
1403         (fix_trunc<mode>_i387): Change operand 0 predicate to
1404         nonimmediate_operand.
1405         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
1406         and corresponding splitters.
1407         (*fistdi2_1): Remove.
1408         (fistdi2): Ditto.
1409         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
1410         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
1411         (*fist<mode>2_1): Remove.
1412         (fist<mode>2): Ditto.
1413         (fist<mode>2_with_temp): Remove insn pattern and corresponding
1414         splitters.
1415         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
1416         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
1417         (fistdi2_<rounding>): Change operand 0 predicate to
1418         nonimmediate_operand.
1419         (fistdi2_<rounding>_with_temp): Remove insn pattern
1420         and corresponding splitters.
1421         (fist<mode>2_<rounding>): Change operand 0 predicate to
1422         nonimmediate_operand.
1423         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
1424         and corresponding splitters.
1426         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
1428 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1430         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1431         the init value.
1433 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
1435         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1436         early gimple folding of vec_splat().
1437         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1438         * gimple-fold.h: Add an extern define for tree_vec_extract().
1440 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
1442         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1443         wrappers around TREE_TYPE comparisons.
1445 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1447         PR target/80080
1448         * config/s390/predicates.md: Add nonsym_memory_operand.
1449         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1450         contains a SYMBOL_REF, load it into an intermediate pseudo.
1451         (s390_emit_compare_and_swap): Legitimize operand.
1452         * config/s390/s390.md: Use the new nonsym_memory_operand
1453         with UNSPECV_CAS patterns.
1455 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1457         PR target/80080
1458         * config/s390/s390-passes.def: New file.
1459         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1460         declaration.
1461         (make_pass_s390_early_mach): Add declaration.
1462         * config/s390/s390.c (make_pass_s390_early_mach):
1463         (s390_option_override): Remove dynamic registration.
1464         * config/s390/t-s390: Add s390-passes.def.
1466 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1468         * config/s390/s390.c (s390_decompose_constant_pool_ref):
1469         Remove UNSPEC_LTREL_BASE check.
1470         (annotate_constant_pool_refs): Likewise.
1471         (find_constant_pool_ref): Likewise.
1472         (find_ltrel_base): Removed.
1473         (replace_ltrel_base): Removed.
1474         (s390_mainpool_finish): Remove replace_ltrel_base call.
1475         (s390_chunkify_start): Remove pending LTREL_BASE logic.
1476         (s390_chunkify_finish): Remove replace_ltrel_base call.
1477         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1479 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
1481         PR target/86779
1482         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1483         to speculation_safe_value_not_needed.
1485 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
1486             Bernd Schmidt  <bernds_cb1@t-online.de>
1488         * config/nvptx/nvptx-opts.h: New file.
1489         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1490         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1491         (ASM_SPEC): Define.
1492         (TARGET_SM35): New macro.
1493         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1494         correct predicate.
1495         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1496         values.
1497         (misa=): New option.
1498         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1500 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
1502         * config/i386/i386.md (truncdfsf2): Remove expander.
1503         (truncdfsf2_with_temp): Ditto.
1504         (truncxf<mode>2): Ditto.
1505         (*truncdfsf_fast_mixed): Remove insn pattern.
1506         (*truncdfsf_fast_i387): Ditto.
1507         (*truncdfsf_mixed): Ditto.
1508         (*truncdfsf_i387): Ditto.
1509         (*truncdfsf2_i387_1): Ditto.
1510         (*truncxfsf2_mixed): Ditto.
1511         (*truncxfdf2_mixed): Ditto.
1512         (*truncxf<mode>2_i387_noop): Ditto. Update callers
1513         to call gen_truncxf<mode>2 instead.
1514         (*truncxf<mode>2_i387): Remove.
1515         (reg->reg splitters): Remove splitter pattern.
1516         (reg->mem splitters): Ditto.
1518         (truncdfsf2): New insn pattern.
1519         (truncxf<mode>2): Ditto.
1521 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1523         * tree-ssa-math-opts.c (is_mult_by): New function.
1524         (is_square_of): Use the above.
1525         (optimize_recip_sqrt): New function.
1526         (pass_cse_reciprocals::execute): Use the above.
1528 2018-09-05  Richard Biener  <rguenther@suse.de>
1530         PR bootstrap/87134
1531         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1532         to zero-init the emplaced vec.
1534 2018-09-05  Martin Liska  <mliska@suse.cz>
1536         PR tree-optimization/87205
1537         * tree-switch-conversion.c (pass_lower_switch::execute):
1538         Group cases for switch statements.
1540 2018-09-05  Richard Biener  <rguenther@suse.de>
1542         PR tree-optimization/87217
1543         * tree-ssa-sccvn.c (vuse_valueize): New.
1544         (vn_reference_lookup_pieces): Use it.
1545         (vn_reference_lookup): Likewise.
1547 2018-09-05  Nathan Sidwell  <nathan@acm.org>
1549         PR c++/87137
1550         * stor-layout.c (place_field): Scan forwards to check last
1551         bitfield when ms_bitfield_placement is in effect.
1553 2018-09-05  Richard Biener  <rguenther@suse.de>
1555         PR bootstrap/87225
1556         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1557         return.
1559 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1560             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
1562         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1563         * config.gcc (extra_objs): Build it.
1564         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1565         Likewise.
1566         * config/aarch64/aarch64-passes.def
1567         (pass_tag_collision_avoidance): New pass.
1568         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1569         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1570         (aarch64_classify_address): Remove static qualifier.
1571         (aarch64_address_info, aarch64_address_type): Move to...
1572         * config/aarch64/aarch64-protos.h: ... here.
1573         (make_pass_tag_collision_avoidance): New function.
1574         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1575         New tuning flag.
1577 2018-09-05  Martin Liska  <mliska@suse.cz>
1579         * doc/gcov.texi: Update documentation of humar
1580         readable mode.
1581         * gcov.c (format_count): Print one decimal place, it provides
1582         more fine number of situations like '1G' vs. '1.4G'.
1584 2018-09-05  Martin Liska  <mliska@suse.cz>
1586         PR target/87164
1587         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1588         * optc-gen.awk: Allow 'Var' for Deprecated options in order
1589         to generate a MASK value.
1591 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
1593         PR debug/86593
1594         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1595         if frame pointer isn't used.
1596         (compute_frame_pointer_to_fb_displacement): Likewise.
1598 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
1600         PR target/87198
1601         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1602         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1603         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1604         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1605         and OPTION_MASK_ISA_XSAVEC_UNSET.
1607 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
1609         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1610         XOR operations in NAND case.
1612 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
1614         * wide-int-range.cc (wide_int_range_convert): New.
1615         * wide-int-range.h (wide_int_range_convert): New.
1616         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1617         code into wide_int_range_convert.
1618         (extract_range_into_wide_ints): Do not munge anti range constants
1619         into the entire domain.  Just return the range back.
1621 2018-09-04  Martin Liska  <mliska@suse.cz>
1623         * genmatch.c (output_line_directive): Add new argument
1624         fnargs.
1625         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1627 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
1629         * doc/invoke.texi (Option Summary): Add whitespace.
1631         * doc/invoke.texi (Option Summary): Add -Waligned-new.
1633 2018-09-04  Richard Biener  <rguenther@suse.de>
1635         PR tree-optimization/87211
1636         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1637         backedge value we're supposed to treat as VARYING also number
1638         the PHI to VARYING in case it got a different value-number already.
1640 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
1642         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1643         (extract_range_from_binary_expr_1): Do not call
1644         vrp_can_optimize_bit_op.
1645         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1646         static.
1647         (wide_int_range_get_mask_and_bounds): New.
1648         (wide_int_range_optimize_bit_op): New.
1649         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1650         (wide_int_range_bit_and): Same.
1651         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1652         (wide_int_range_optimize_bit_op): New.
1653         (wide_int_range_get_mask_and_bounds): New.
1655 2018-09-04  Richard Biener  <rguenther@suse.de>
1657         PR tree-optimization/87176
1658         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1659         variable.  When value-numbering a virtual PHI node make sure
1660         to not value-number to the backedge value.
1662 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
1664         * doc/extend.texi (Long Long, Hex Floats): Document support for
1665         long long and hex floats in more recent versions of ISO C++.
1667 2018-09-03  Richard Biener  <rguenther@suse.de>
1669         PR tree-optimization/87177
1670         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1671         cleanup.
1673 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1675         * bb-reorder.c (edge_order): Convert to C-qsort-style
1676         tri-state comparator.
1677         (reorder_basic_blocks_simple): Change std::stable_sort to
1678         gcc_stablesort.
1680 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1682         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1683         tri-state comparator.
1684         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1686 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1688         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
1689         (mergesort): ... here as maximum count for using netsort.
1690         (gcc_qsort): Set nlim to 3 if stable sort is requested.
1691         (gcc_stablesort): New.
1692         * system.h (gcc_stablesort): Declare.
1694 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1696         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1697         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
1698         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
1700 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
1702         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1703         lxsdx and stxsdx alternatives.
1704         (*mov<mode>_hardfloat64): Ditto.
1705         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1707 2018-09-03  Richard Biener  <rguenther@suse.de>
1709         PR tree-optimization/87200
1710         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1711         simplify result.
1713 2018-09-03  Martin Liska  <mliska@suse.cz>
1715         PR tree-optimization/87201
1716         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1717         Fix parenthesis in an expression.
1719 2018-09-03  Richard Biener  <rguenther@suse.de>
1721         PR tree-optimization/87197
1722         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1723         visited.  CSE the VN_INFO hashtable lookup.
1725         PR tree-optimization/87169
1726         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1727         iterating make sure there's no extra backedges from irreducible
1728         regions feeding the header.  Mark the destination block
1729         executable.
1731 2018-09-03  Martin Liska  <mliska@suse.cz>
1733         PR driver/83193
1734         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1735         * common/common-targhooks.c (default_get_valid_option_values):
1736         New function.
1737         * common/common-targhooks.h (default_get_valid_option_values):
1738         Likewise.
1739         * common/config/i386/i386-common.c: Move processor_target_table
1740         from i386.c.
1741         (ix86_get_valid_option_values): New function.
1742         (TARGET_GET_VALID_OPTION_VALUES): New macro.
1743         * config/i386/i386.c (struct ptt): Move to i386-common.c.
1744         (PTA_*): Move all defined masks into i386-common.c.
1745         (ix86_function_specific_restore): Use new processor_cost_table.
1746         * config/i386/i386.h (struct ptt): Moved from i386.c.
1747         (struct pta): Likewise.
1748         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1749         * doc/tm.texi.in: Likewise.
1750         * opt-suggestions.c (option_proposer::suggest_option):
1751         Pass prefix to build_option_suggestions.
1752         (option_proposer::get_completions): Likewise.
1753         (option_proposer::build_option_suggestions): Use the new target
1754         hook.
1755         * opts.c (struct option_help_tuple): New struct.
1756         (print_filtered_help): Use the new target hook.
1758 2018-09-03  Martin Liska  <mliska@suse.cz>
1760         PR middle-end/59521
1761         * predict.c (set_even_probabilities): Add likely_edges
1762         argument and handle cases where we have precisely one
1763         likely edge.
1764         (combine_predictions_for_bb): Catch also likely_edges.
1765         (tree_predict_by_opcode): Handle gswitch statements.
1766         * tree-cfg.h (find_case_label_for_value): New declaration.
1767         (find_taken_edge_switch_expr): Likewise.
1768         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1769         Find pivot in decision tree based on probabily, not by number of
1770         nodes.
1772 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
1774         * doc/standards.texi (Standards): Update Objective-C reference.
1776 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1778         * doc/install.texi (Prerequisites): Update link for MPC.
1780 2018-09-01  Michael Matz  <matz@suse.de>
1782         PR tree-optimization/87074
1783         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1784         PHIs for outer-loop uses.
1786 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1788         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1789         * doc/invoke.texi (C Dialect Options): Ditto.
1791 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1793         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1795 2018-08-31  Richard Biener  <rguenther@suse.de>
1797         PR tree-optimization/87168
1798         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1799         (rpo_elim::eliminate_avail): When OP was not visited it must
1800         be available.
1802 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
1804         * tree-vrp.c (copy_value_range): Convert param "from" from
1805         "value_range *" to "const value_range *".
1806         (range_is_null): Likewise for param "vr".
1807         (range_int_cst_p): Likewise.
1808         (range_int_cst_singleton_p): Likewise.
1809         (symbolic_range_p): Likewise.
1810         (value_ranges_intersect_p): Likewise for both params.
1811         (value_range_nonnegative_p): Likewise for param "vr".
1812         (value_range_constant_singleton): Likewise.
1813         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1814         (extract_range_into_wide_ints): Likewise for param "vr".
1815         (extract_range_from_multiplicative_op): Likewise for params "vr0"
1816         and "vr1".
1817         (vrp_can_optimize_bit_op): Likewise.
1818         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1819         "vr1_".
1820         (extract_range_from_unary_expr): Likewise.
1821         (debug_value_range): Likewise for param "vr".
1822         (value_range::dump): Add "const" qualifier.
1823         (vrp_prop::check_array_ref): Convert local "vr" from
1824         "value_range *" to "const value_range *".
1825         (vrp_prop::check_mem_ref): Likewise.
1826         (vrp_prop::visit_stmt): Likewise for local "old_vr".
1827         (vrp_intersect_ranges_1): Likewise for param "vr_1".
1828         (vrp_intersect_ranges): Likewise.
1829         (simplify_stmt_for_jump_threading): Likewise for local "vr".
1830         (vrp_prop::vrp_finalize): Likewise.
1831         * tree-vrp.h (value_range::dump): Add "const" qualifier.
1832         (vrp_intersect_ranges): Add "const" qualifier to params as above.
1833         (extract_range_from_unary_expr): Likewise.
1834         (value_range_constant_singleton): Likewise.
1835         (symbolic_range_p): Likewise.
1836         (copy_value_range): Likewise.
1837         (extract_range_from_binary_expr_1): Likewise.
1838         (range_int_cst_p): Likewise.
1839         (vrp_set_zero_nonzero_bits): Likewise.
1840         (range_int_cst_singleton_p): Likewise.
1842 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
1844         * config/aarch64/arm_neon.h (vabsd_s64): New.
1845         (vnegd_s64): Likewise.
1847 2018-08-31  Martin Jambor  <mjambor@suse.cz>
1849         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1851 2018-08-31  Martin Liska  <mliska@suse.cz>
1853         * ipa-icf.c (sem_item::add_type): Use
1854         sem_item::m_type_hash_cache.
1855         * ipa-icf.h: Move the cache from sem_item_optimizer
1856         to sem_item.
1858 2018-08-31  Nathan Sidwell  <nathan@acm.org>
1860         * doc/extend.texi (Backwards Compatibility): Remove implicit
1861         extern C leeway of () being (...).
1863 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1865         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1867 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
1869         PR target/86684
1870         PR target/87149
1871         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1873 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
1875         PR middle-end/87138
1876         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1877         gen_int_mode.  Formatting fixes.
1879 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
1881         * target.def (custom_function_descriptors): Improve documentation.
1882         * doc/tm.texi.in (Trampolines): Expand discussion of function
1883         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1884         beginning of the section.
1885         * doc/tm.texi: Regenerated.
1887 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
1889         * cfg.h (class auto_edge_flag): Spell out the template-id of the
1890         base class in the initializer list.  This is a workaround for
1891         building with older GCC.
1892         (class auto_bb_flag): Likewise.
1894 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
1896         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1897         (altivec_vcmpequ<VI_char>_p): Remove star.
1898         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1899         vector load modes.
1900         (expand_strncmp_vec_sequence): New function.
1901         (emit_final_str_compare_vec): New function.
1902         (expand_strn_compare): Add support for vector strncmp.
1903         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1904         length specification to bytes.
1905         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1906         (vcmpnezb_p): New pattern.
1907         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1908         for option -mstring-compare-inline-limit.
1910 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
1912         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1913         (PTA_SKYLAKE): Add PTA_AES.
1914         (PTA_GOLDMONT): Likewise.
1916 2018-08-29  Jan Hubicka  <jh@suse.cz>
1918         PR lto/86517
1919         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1920         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1922 2018-08-29  Jan Hubicka  <jh@suse.cz>
1924         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1925         TYPE_STUB_DECL.
1926         (hash_tree): Do not visit TYPE_STUB_DECL.
1927         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1928         stream TYPE_STUB_DECL.
1929         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1930         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1931         after free_lang_data.
1932         (type_in_anonymous_namespace_p): Likewise.
1934 2018-08-29  Jan Hubicka  <jh@suse.cz>
1936         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1937         comment that it has to be even number.
1938         (class sreal): Change m_sig type to int32_t.
1939         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1940         int64_t for temporary calculations.
1941         (sreal_verify_basics): Drop one bit from minimum and maximum.
1943 2018-08-30  Richard Biener  <rguenther@suse.de>
1945         PR tree-optimization/87147
1946         * tree-ssa-sccvn.c (SSA_VISITED): New function.
1947         (visit_phi): When the degenerate result is from the backedge and
1948         we didn't visit its definition yet drop to VARYING.
1949         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1951 2018-08-29  Jan Hubicka  <jh@suse.cz>
1953         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1954         DECL_VINDEX.
1955         (hash_tree): Likewise.
1957 2018-08-29  Jan Hubicka  <jh@suse.cz>
1959         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1960         and TYPE_NEXT_REF_TO.
1962 2018-08-29  Jan Hubicka  <jh@suse.cz>
1964         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1965         comment that it has to be even number.
1966         (class sreal): Change m_sig type to int32_t.
1967         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1968         int64_t for temporary calculations.
1969         (sreal_verify_basics): Drop one bit from minimum and maximum.
1971 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
1973         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1975 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
1977         PR middle-end/86995
1978         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1979         if to_add is negative.
1981 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1983         PR middle-end/87053
1984         * builtins.c (c_strlen): Improve range checks.
1986 2018-08-29  Martin Sebor  <msebor@redhat.com>
1987             Jeff Law  <law@redhat.com>
1989         PR tree-optimization/86714
1990         PR tree-optimization/86711
1991         * builtins.c (c_strlen): Add arguments to call to string_constant.
1992         * expr.c (string_constant): Add argument.  Detect missing nul
1993         terminator and outermost declaration it's missing in.
1994         * expr.h (string_constant): Add argument.
1995         * fold-const.c (read_from_constant_string): Add arguments to call to
1996         string_constant.
1997         (c_getstr): Likewise.
1998         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1999         to string_constant.
2000         * tree-ssa-strlen.c (get_stridx): Likewise.
2002 2018-08-29  Jan Hubicka  <jh@suse.cz>
2004         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
2005         Do not stream DECL_VINDEX.
2006         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
2007         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
2008         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
2010 2018-08-29  Richard Biener  <rguenther@suse.de>
2012         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
2013         virtual operands that are not default defs to honor region
2014         boundaries.
2015         (rpo_vn_valueize): Remove ineffective code here.
2017 2018-08-29  Richard Biener  <rguenther@suse.de>
2019         PR tree-optimization/87132
2020         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
2021         when skipping defs reachable over backedges.
2023 2018-08-29  Richard Biener  <rguenther@suse.de>
2025         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
2026         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
2027         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
2028         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
2029         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
2030         (vn_reference_lookup_3): Remove use of const_parms.
2031         (free_rpo_vn): Do not free const_parms.
2032         (do_rpo_vn): Do not call init_const_parms.
2033         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
2034         SSA_NAME_POINTS_TO_READONLY_MEMORY.
2035         (call_may_clobber_ref_p_1): Likewise.
2037 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
2039         PR other/86726
2040         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
2041         (-O): Ditto.
2042         (-ftree-scev-cprop): Document.
2044 2018-08-29  Jan Hubicka  <jh@suse.cz>
2046         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
2047         parameters.
2048         (sreal constructor): Update.
2049         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
2050         sreal:operator/): Update.
2052 2018-08-29  Martin Liska  <mliska@suse.cz>
2054         * tree-switch-conversion.c (switch_conversion::expand):
2055         Strenghten assumption about gswitch statements.
2057 2018-08-29  Richard Biener  <rguenther@suse.de>
2059         PR tree-optimization/87117
2060         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
2061         re-value-number released SSA VDEFs.
2063 2018-08-29  Richard Biener  <rguenther@suse.de>
2065         PR tree-optimization/87126
2066         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
2068 2018-08-28  Jim Wilson  <jimw@sifive.com>
2070         * config/riscv/pic.md: Rewrite.
2071         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
2072         invalid address.
2073         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
2074         (SOFTF, default_load, softload, softstore): New.
2076 2018-08-28  Jeff Law  <law@redhat.com>
2078         * fold-const.c (fold_binary_loc): Remove recently added assert.
2080 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
2082         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
2083         to OP parmeter of generated function.
2085 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
2087         PR tree-optimization/87009
2088         * match.pd: Add boolean optimizations.
2090 2018-08-28  Martin Sebor  <msebor@redhat.com>
2092         PR middle-end/86631
2093         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
2094         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
2095         (pass_walloca::gate): Use it.
2096         (alloca_call_type): Same.
2097         (pass_walloca::execute): Same.
2098         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
2100 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
2102         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
2103         GCC_VERSION for usage of "__gcc_dump_printf__" format from
2104         >= 3005 to >= 9000.
2106 2018-08-28  Richard Biener  <rguenther@suse.de>
2108         PR tree-optimization/87124
2109         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
2110         constants before looking up avail.
2112 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
2114         PR middle-end/87099
2115         * calls.c (maybe_warn_nonstring_arg): Punt early if
2116         warn_stringop_overflow is zero.  Don't call get_range_strlen
2117         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
2118         Swap comparison operands to have constants on rhs.  Only use
2119         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
2120         increment lenrng[0].
2122 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
2124         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
2125         use of tree_to_shwi.  Remove duplicated test for the size being
2126         a whole number of bytes.
2128 2018-08-28  Richard Biener  <rguenther@suse.de>
2130         PR tree-optimization/87117
2131         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
2132         Handle removed stmt without LHS (GIMPLE_NOP).
2134 2018-08-28  Richard Biener  <rguenther@suse.de>
2136         PR tree-optimization/87117
2137         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
2138         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
2140 2018-08-28  Richard Biener  <rguenther@suse.de>
2142         PR tree-optimization/87117
2143         * tree-ssa-pre.c (compute_avail): Do not make expressions
2144         with predicated values available.
2145         (get_expr_value_id): Assert we do not run into predicated value
2146         expressions.
2148 2018-08-28  Richard Biener  <rguenther@suse.de>
2150         PR tree-optimization/87117
2151         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
2152         get virtual operands.
2153         (get_expr_operands): Handle STRING_CST like other decls.
2155 2018-08-28  Martin Liska  <mliska@suse.cz>
2157         * tree.h: Update documentation of fndecl_built_in_p
2158         functions.
2161 2018-08-27  Jeff Law  <law@redhat.com>
2162         PR tree-optimization/87110
2163         * tree-ssa-dse.c (compute_trims): Handle non-constant
2164         TYPE_SIZE_UNIT.
2166 2018-08-27  Martin Sebor  <msebor@redhat.com>
2168         PR tree-optimization/86914
2169         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
2171 2018-08-27  Martin Sebor  <msebor@redhat.com>
2173         PR tree-optimization/87112
2174         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
2175         the type of the bound argument.
2177 2018-08-27  Jeff Law  <law@redhat.com>
2179         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
2180         type does not have a TYPE_SIZE_UNIT.
2182 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
2184         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
2185         with include of backend.h.
2187 2018-08-27  Richard Biener  <rguenther@suse.de>
2189         PR tree-optimization/86927
2190         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
2191         use const cond reduction code.
2193 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
2195         PR tree-optimization/85758
2196         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
2198 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2200         PR c++/87091
2201         * diagnostic-show-locus.c (class layout_range): Update for
2202         conversion of show_caret_p to a tri-state.
2203         (layout_range::layout_range): Likewise.
2204         (make_range): Likewise.
2205         (layout::maybe_add_location_range): Likewise.
2206         (layout::should_print_annotation_line_p): Don't show annotation
2207         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
2208         (layout::get_state_at_point): Update for conversion of
2209         show_caret_p to a tri-state.  Bail out early for
2210         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
2211         underlining or source colorization.
2212         (gcc_rich_location::add_location_if_nearby): Update for conversion
2213         of show_caret_p to a tri-state.
2214         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
2215         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
2216         Likewise.
2217         (selftest::test_one_liner_labels): Likewise.
2218         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
2219         conversion of show_caret_p to a tri-state.
2220         * pretty-print.c (text_info::set_location): Likewise.
2221         * pretty-print.h (text_info::set_location): Likewise.
2222         * substring-locations.c (format_warning_n_va): Likewise.
2223         * tree-diagnostic.c (default_tree_printer): Likewise.
2224         * tree-pretty-print.c (newline_and_indent): Likewise.
2226 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2228         PR c++/87091
2229         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
2230         line above for line-insertion fix-it hints.
2231         (selftest::test_fixit_insert_containing_newline): Update the
2232         expected results, and add a test with line-numbering enabled.
2234 2018-08-27  Martin Liska  <mliska@suse.cz>
2236         PR sanitizer/86962
2237         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
2238         params with DECL_HAS_VALUE_EXPR_P.
2240 2018-08-27  Martin Liska  <mliska@suse.cz>
2242         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
2243         selected expansion strategy.
2245 2018-08-27  Martin Liska  <mliska@suse.cz>
2247         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
2248         * builtins.c (is_builtin_fn): Likewise.
2249         * attribs.c (diag_attr_exclusions): Use new function
2250         fndecl_built_in_p and remove check for FUNCTION_DECL if
2251         possible.
2252         (builtin_mathfn_code): Likewise.
2253         (fold_builtin_expect): Likewise.
2254         (fold_call_expr): Likewise.
2255         (fold_builtin_call_array): Likewise.
2256         (fold_call_stmt): Likewise.
2257         (set_builtin_user_assembler_name): Likewise.
2258         (is_simple_builtin): Likewise.
2259         * calls.c (gimple_alloca_call_p): Likewise.
2260         (maybe_warn_nonstring_arg): Likewise.
2261         * cfgexpand.c (expand_call_stmt): Likewise.
2262         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
2263         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
2264         (cgraph_node::verify_node): Likewise.
2265         * cgraphclones.c (build_function_decl_skip_args): Likewise.
2266         (cgraph_node::create_clone): Likewise.
2267         * config/arm/arm.c (arm_insert_attributes): Likewise.
2268         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
2269         * dse.c (scan_insn): Likewise.
2270         * expr.c (expand_expr_real_1): Likewise.
2271         * fold-const.c (operand_equal_p): Likewise.
2272         (fold_binary_loc): Likewise.
2273         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
2274         * gimple-low.c (lower_stmt): Likewise.
2275         * gimple-pretty-print.c (dump_gimple_call): Likewise.
2276         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2277         Likewise.
2278         * gimple.c (gimple_build_call_from_tree): Likewise.
2279         (gimple_call_builtin_p): Likewise.
2280         (gimple_call_combined_fn): Likewise.
2281         * gimplify.c (gimplify_call_expr): Likewise.
2282         (gimple_boolify): Likewise.
2283         (gimplify_modify_expr): Likewise.
2284         (gimplify_addr_expr): Likewise.
2285         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
2286         * ipa-cp.c (determine_versionability): Likewise.
2287         * ipa-fnsummary.c (compute_fn_summary): Likewise.
2288         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
2289         * ipa-split.c (visit_bb): Likewise.
2290         (split_function): Likewise.
2291         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2292         * lto-cgraph.c (input_node): Likewise.
2293         * lto-streamer-out.c (write_symbol): Likewise.
2294         * omp-low.c (setjmp_or_longjmp_p): Likewise.
2295         (lower_omp_1): Likewise.
2296         * predict.c (strip_predict_hints): Likewise.
2297         * print-tree.c (print_node): Likewise.
2298         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
2299         * trans-mem.c (is_tm_irrevocable): Likewise.
2300         (is_tm_load): Likewise.
2301         (is_tm_simple_load): Likewise.
2302         (is_tm_store): Likewise.
2303         (is_tm_simple_store): Likewise.
2304         (is_tm_abort): Likewise.
2305         (tm_region_init_1): Likewise.
2306         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
2307         * tree-cfg.c (verify_gimple_call): Likewise.
2308         (move_stmt_r): Likewise.
2309         (stmt_can_terminate_bb_p): Likewise.
2310         * tree-eh.c (lower_eh_constructs_2): Likewise.
2311         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
2312         * tree-inline.c (remap_gimple_stmt): Likewise.
2313         (copy_bb): Likewise.
2314         (estimate_num_insns): Likewise.
2315         (fold_marked_statements): Likewise.
2316         * tree-sra.c (scan_function): Likewise.
2317         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
2318         (optimize_stack_restore): Likewise.
2319         (pass_fold_builtins::execute): Likewise.
2320         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2321         (mark_all_reaching_defs_necessary_1): Likewise.
2322         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
2323         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2324         (pass_forwprop::execute): Likewise.
2325         * tree-ssa-loop-im.c (stmt_cost): Likewise.
2326         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2327         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
2328         * tree-ssa-strlen.c (get_string_length): Likewise.
2329         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
2330         (find_func_aliases_for_call): Likewise.
2331         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
2332         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
2333         * tree-tailcall.c (find_tail_calls): Likewise.
2334         * tree.c (need_assembler_name_p): Likewise.
2335         (free_lang_data_in_decl): Likewise.
2336         (get_call_combined_fn): Likewise.
2337         * ubsan.c (is_ubsan_builtin_p): Likewise.
2338         * varasm.c (incorporeal_function_p): Likewise.
2339         * tree.h (DECL_BUILT_IN): Remove and replace with
2340         fndecl_built_in_p.
2341         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
2342         (fndecl_built_in_p): New.
2344 2018-08-27  Martin Liska  <mliska@suse.cz>
2346         PR tree-optimization/86847
2347         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
2348         Dump also subtree probability.
2349         (switch_decision_tree::do_jump_if_equal): New function.
2350         (switch_decision_tree::emit_case_nodes): Handle special
2351         situations in balanced tree that can be emitted much simpler.
2352         Fix calculation of probabilities that happen in tree expansion.
2353         * tree-switch-conversion.h (struct cluster): Add
2354         is_single_value_p.
2355         (struct simple_cluster): Likewise.
2356         (struct case_tree_node): Add new function has_child.
2357         (do_jump_if_equal): New.
2359 2018-08-27  Martin Liska  <mliska@suse.cz>
2361         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
2362         Add new argument to bit_test_cluster constructor.
2363         (bit_test_cluster::emit): Set bits really number of values
2364         handlel by a test.
2365         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
2366         probability argument.
2367         * tree-switch-conversion.h (struct bit_test_cluster):
2368         Add m_handles_entire_switch.
2370 2018-08-27  Martin Liska  <mliska@suse.cz>
2372         PR tree-optimization/86702
2373         * tree-switch-conversion.c (jump_table_cluster::emit):
2374         Make probabilities even for values in jump table
2375         according to number of cases handled.
2376         (switch_decision_tree::compute_cases_per_edge): Pass
2377         argument to reset_out_edges_aux function.
2378         (switch_decision_tree::analyze_switch_statement): Likewise.
2379         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
2380         Make it static.
2382 2018-08-27  Martin Liska  <mliska@suse.cz>
2384         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
2385         cfun argument explicitly.
2386         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
2387         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
2388         function gimple_switch_default_bb.
2389         (convert_switch_statements):
2390         (expand_builtins):
2391         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
2392         * stmt.c (label_to_block_fn): Use label_to_block and pass
2393         cfun argument explicitly and use gimple_switch_label_bb.
2394         (expand_case): Likewise.
2395         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
2396         cfun argument explicitly. Likewise.
2397         (make_edges_bb): Likewise.
2398         (make_cond_expr_edges): Likewise.
2399         (get_cases_for_edge): Likewise.
2400         (make_gimple_switch_edges): Likewise.
2401         (label_to_block_fn): Likewise.
2402         (label_to_block): Likewise.
2403         (make_goto_expr_edges): Likewise.
2404         (make_gimple_asm_edges): Likewise.
2405         (main_block_label): Likewise.
2406         (group_case_labels_stmt): Likewise.
2407         (find_taken_edge_computed_goto): Likewise.
2408         (find_taken_edge_switch_expr): Likewise.
2409         (gimple_verify_flow_info): Likewise.
2410         (gimple_redirect_edge_and_branch): Likewise.
2411         (gimple_switch_label_bb): New function.
2412         (gimple_switch_default_bb): Likewise.
2413         (gimple_switch_edge): Likewise.
2414         (gimple_switch_default_edge): Likewise.
2415         * tree-cfg.h (label_to_block_fn): Remove and replace ...
2416         (label_to_block): ... with this.
2417         (gimple_switch_label_bb): New.
2418         (gimple_switch_default_bb): Likewise.
2419         (gimple_switch_edge): Likewise.
2420         (gimple_switch_default_edge): Likewise.
2421         * tree-cfgcleanup.c (convert_single_case_switch): Use
2422         new gimple functions and pass new argument to label_to_block.
2423         (cleanup_control_flow_bb):
2424         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
2425         cfun argument explicitly.
2426         (make_eh_edges): Likewise.
2427         (redirect_eh_dispatch_edge): Likewise.
2428         (lower_resx): Likewise.
2429         (lower_eh_dispatch): Likewise.
2430         (maybe_remove_unreachable_handlers): Likewise.
2431         (unsplit_eh): Likewise.
2432         (cleanup_empty_eh): Likewise.
2433         (verify_eh_edges): Likewise.
2434         (verify_eh_dispatch_edge): Likewise.
2435         * tree-ssa-dom.c (record_edge_info): Likewise.
2436         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2437         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2438         (thread_through_normal_block): Likewise.
2439         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2440         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2441         * tree-switch-conversion.c (switch_conversion::collect): Use new
2442         gimple functions.
2443         (switch_conversion::check_final_bb): Likewise.
2444         (switch_conversion::gather_default_values): Pass new argument
2445         to label_to_block.
2446         (switch_conversion::build_constructors): Likewise.
2447         (switch_decision_tree::compute_cases_per_edge): Use new
2448         gimple_switch_edge function.
2449         (switch_decision_tree::analyze_switch_statement): Pass new argument
2450         to label_to_block.
2451         (switch_decision_tree::try_switch_expansion): Use
2452         gimple_switch_default_edge.
2453         * tree-vrp.c (find_switch_asserts): Pass new argument
2454         to label_to_block.
2455         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2456         (vr_values::simplify_switch_using_ranges): Likewise.
2458 2018-08-27  Richard Biener  <rguenther@suse.de>
2460         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2461         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2463         * tree-ssa-sccvn.h (struct vn_pval): New structure.
2464         (struct vn_nary_op_s): Add unwind_to member.  Add
2465         predicated_values flag and put result into a union together
2466         with a linked list of vn_pval.
2467         (struct vn_ssa_aux): Add name member to make maintaining
2468         a map of SSA name to vn_ssa_aux possible.  Remove no longer
2469         needed info, dfsnum, low, visited, on_sccstack, use_processed
2470         and range_info_anti_range_p members.
2471         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2472         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2473         New functions.
2474         (vn_valueize): New global.
2475         (vn_context_bb): Likewise.
2476         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2477         VN_INFO_PTR_INFO): Remove.
2478         * tree-ssa-sccvn.c: ... (rewrite)
2479         (pass_fre::execute): For -O2+ initialize loops and run
2480         RPO VN in optimistic mode (iterating).  For -O1 and -Og
2481         run RPO VN in non-optimistic mode.
2482         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2483         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2484         * doc/invoke.texi (sccvn-max-scc-size): Remove.
2485         (rpo-vn-max-loop-depth): Document.
2486         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2487         when valuezing the VUSE signals we walked out of the region.
2488         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2489         (phi_translate): Set VN context block to use for availability
2490         lookup.
2491         (compute_avail): Likewise.
2492         (pre_valueize): New function.
2493         (pass_pre::execute): Adjust to the RPO VN API.
2495         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2496         (propagate_constants_for_unrolling): Remove.
2497         (tree_unroll_loops_completely): Perform value-numbering
2498         on the unrolled bodies loop parent.
2500 2018-08-27  Richard Biener  <rguenther@suse.de>
2502         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2503         for partial antic compute.
2505 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
2507         PR rtl-optimization/87065
2508         * combine.c (simplify_if_then_else): Formatting fix.
2509         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2510         check.
2511         (known_cond): Don't return const_true_rtx for vector modes.  Use
2512         CONST0_RTX instead of const0_rtx.  Formatting fixes.
2514 2018-08-27  Martin Liska  <mliska@suse.cz>
2516         PR gcov-profile/87069
2517         * gcov.c (process_file): Record files already processed
2518         and warn about a file being processed multiple times.
2520 2018-08-27  Martin Liska  <mliska@suse.cz>
2522         PR driver/83193
2523         * config/aarch64/aarch64.c (aarch64_override_options_internal):
2524         Set default values for x_aarch64_*_string strings.
2525         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2526         prefix.  For -mabi do not print '=ABI' in help and use
2527         <option_value> format for -msve-vector-bits and -moverride
2528         options.
2530 2018-08-26  Jeff Law  <law@redhat.com>
2532         * config/mips/frame-header-opt.c: Include "backend.h" rather than
2533         "cfg.h"
2535 2018-08-26  Marek Polacek  <polacek@redhat.com>
2537         PR c++/87029, Implement -Wredundant-move.
2538         * doc/invoke.texi: Document -Wredundant-move.
2540 2018-08-25  Martin Sebor  <msebor@redhat.com>
2542         PR tree-optimization/87059
2543         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2544         to the same type as the other.
2545         * fold-const.c (fold_binary_loc): Assert expectation.
2547 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
2549         * config/darwin.c (machopic_legitimize_pic_address): Clean up
2550         extraneous parentheses, dead code section and formatting.
2552 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
2554         PR c++/87091
2555         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2556         wide enough for jumps in the line-numbering to be visible.
2557         (layout::print_gap_in_line_numbering): New member function.
2558         (layout::calculate_line_spans): When using line numbering, merge
2559         line spans that are only 1 line apart.
2560         (diagnostic_show_locus): When printing line numbers, show gaps in
2561         line numbering directly, rather than printing headers.
2562         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2563         line-numbering with multiple line spans.
2564         (selftest::test_fixit_insert_containing_newline_2): Add test of
2565         line-numbering, in which the spans are close enough to be merged.
2567 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
2569         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2570         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
2571         * tree-vrp.c (range_is_nonnull): Remove.
2572         (range_includes_zero_p): Accept value_range instead of min/max.
2573         (extract_range_from_binary_expr_1): Do not early bail on
2574         POINTER_PLUS_EXPR.
2575         Use range_includes_zero_p instead of range_is_nonnull.
2576         (extract_range_from_unary_expr): Use range_includes_zero_p instead
2577         of range_is_nonnull.
2578         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
2579         special case VR_ANTI_RANGE.
2580         (vrp_finalize): Same.
2581         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2582         instead of min/max.
2583         (range_is_nonnull): Remove.
2584         * vr-values.c (vrp_stmt_computes_nonzero): Use
2585         range_includes_zero_p instead of range_is_nonnull.
2586         (extract_range_basic): Pass value_range to range_includes_zero_p
2587         instead of range_is_nonnull.
2589 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
2591         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2592         * emit-rtl.h (rtl_data): Remove return_bnd.
2593         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2594         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2595         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2596         (POINTER_BOUNDS_MODE): Remove definition.
2597         (make_pointer_bounds_mode): Remove.
2598         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2599         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2600         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2601         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2602         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2603         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2604         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2606         * config/i386/i386-modes.def (BND32, BND64): Remove.
2607         * config/i386/i386.c (dbx_register_map): Remove bound registers.
2608         (dbx64_register_map): Ditto.
2609         (svr4_dbx_register_map): Ditto.
2610         (indirect_thunk_bnd_needed): Remove.
2611         (indirect_thunks_bnd_used): Ditto.
2612         (indirect_return_bnd_needed): Ditto.
2613         (indirect_return_via_cx_bnd): Ditto.
2614         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2615         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2616         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
2617         (output_indirect_thunk_function): Remove handling of
2618         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2619         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2620         (ix86_save_reg): Remove handling of crtl->return_bnd.
2621         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2622         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2623         and UNSPEC_BNDLX_ADDR.
2624         (ix86_output_indirect_branch_via_reg): Remove handling of
2625         indirect_thunk_prefix_bnd.
2626         (ix86_output_indirect_branch_via_push): Ditto.
2627         (ix86_output_function_return): Ditto.
2628         (ix86_output_indirect_function_return): Ditto.
2629         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2630         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2631         (CALL_USED_REGISTERS): Ditto.
2632         (REG_ALLOC_ORDER): Update for removal of bound registers.
2633         (HI_REGISTER_NAMES): Ditto.
2634         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2635         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2636         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2637         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2638         (FIRST_PSEUDO_REG): Update.
2639         (BND): Remove mode iterator.
2640         * config/i386/predicates.md (bnd_mem_operator): Remove.
2642 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
2644         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2645         vectors.
2647 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
2649         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2650         the case in which the permute needs only a single element and
2651         repeats for every vector of the result.  Extend that case to
2652         handle variable-length vectors.
2653         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2655 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
2657         PR debug/79342
2658         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2659         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2661 2018-08-24  Richard Biener  <rguenther@suse.de>
2663         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2664         bb_flags_allocated members.
2665         (auto_flag): New RAII class for allocating flags.
2666         (auto_edge_flag): New RAII class for allocating edge flags.
2667         (auto_bb_flag): New RAII class for allocating bb flags.
2668         * cfgloop.c (verify_loop_structure): Allocate temporary edge
2669         flag dynamically.
2670         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2671         in favor of temporarily allocated BB flag.
2672         * hsa-brig.c: Re-order includes.
2673         * hsa-dump.c: Likewise.
2674         * hsa-regalloc.c: Likewise.
2675         * print-rtl.c: Likewise.
2676         * profile-count.c: Likewise.
2678 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
2680         PR target/86989
2681         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2682         the TOC register.
2684 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
2686         PR 87073/bootstrap
2687         * wide-int-range.cc (wide_int_range_div): Do not ignore result
2688         from wide_int_range_multiplicative_op.
2690 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2692         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2693         "permutaion".
2695 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
2697         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2698         to 'expanded'.
2700 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
2702         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2703         full GENERIC expression used for replacement.
2705 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
2707         * tree-vrp.c (abs_extent_range): Remove.
2708         (extract_range_into_wide_ints): Pass wide ints by reference.
2709         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2710         Pass wide ints by reference in all calls to
2711         extract_range_into_wide_ints.
2712         * wide-int-range.cc (wide_int_range_div): New.
2713         * wide-int-range.h (wide_int_range_div): New.
2714         (wide_int_range_includes_zero_p): New.
2715         (wide_int_range_zero_p): New.
2717 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
2719         * config/aarch64/aarch64.md (arches): New enum.
2720         (arch): New enum attr.
2721         (arch_enabled): New attr.
2722         (enabled): Now uses arch_enabled only.
2723         (simd, sve, fp16): Removed attribute.
2724         (fp): Attr now defined in terms of 'arch'.
2725         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2726         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2727         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2728         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2729         attributes into 'arch'.
2730         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2731         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2732         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2733         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2734         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2735         'simd' attribute into 'arch'.
2736         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2737         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2738         Convert use of 'fp' attribute to 'arch'.
2739         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2740         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2741         into 'arch'.
2742         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2743         (different modes) Merge 'fp' and 'simd' into 'arch'.
2744         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2745         'simd' into 'arch'.
2747 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
2749         PR rtl-optimization/87026
2750         * expmed.c (canonicalize_comparison): If we can no longer create
2751         pseudoregisters, don't.
2753 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
2755         PR target/86951
2756         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2757         prototype.
2758         * config/arm/arm.c (speculation_barrier_libfunc): New static
2759         variable.
2760         (arm_init_libfuncs): Initialize it.
2761         (arm_emit_speculation_barrier): New function.
2762         * config/arm/arm.md (speculation_barrier): Call
2763         arm_emit_speculation_barrier for architectures that do not have
2764         DSB or ISB.
2765         (speculation_barrier_insn): Only match on Armv7 or later.
2767 2018-08-23  Richard Biener  <rguenther@suse.de>
2769         PR middle-end/87024
2770         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2771         calls.
2773 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
2775         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2776         of single-vector TBLs.
2777         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2778         one input is given.
2780 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
2782         PR target/85910
2783         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2784         aarch64_evpc_tbl guard.
2786 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2788         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2789         behaviour.
2791 2018-08-22  Martin Sebor  <msebor@redhat.com>
2793         PR middle-end/87052
2794         * tree-pretty-print.c (pretty_print_string): Add argument.
2795         (dump_generic_node): Call to pretty_print_string with string size.
2797 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
2799         PR rtl-optimization/86771
2800         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2801         of two SETs into those two SETs, one to be placed at i2, if that SETs
2802         destination is modified between i2 and i3.
2804 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2806         PR tree-optimization/86725
2807         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2808         function.
2809         (vect_analyze_scalar_cycles_1): Check it.
2811 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2813         PR tree-optimization/86725
2814         * tree-vect-loop.c (vect_is_simple_reduction): When treating
2815         an outer loop phi as a double reduction, make sure that the
2816         single user of the phi result is an inner loop phi.
2818 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2820         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2821         grouped stores with gaps to a strided group.
2823 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2825         * tree-vect-stmts.c (get_group_load_store_type)
2826         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2827         first statement in a group.
2829 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2831         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2832         the sequence used in gcc/gcc.c.
2834 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2836         PR other/704
2837         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2838         building it.
2840 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2842         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2843         Darwin10-specific unwinder-shim.
2844         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2845         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2846         New to cater for Darwin10 Rosetta.
2848 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2850         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2851         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2853 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2855         PR bootstrap/81033
2856         PR target/81733
2857         PR target/52795
2858         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2859         (dwarf2out_switch_text_section): Generate a local label for the
2860         second function sub-section and apply it as the second FDE start
2861         label.
2862         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2863         second sub-section start.
2865 2018-08-22  Richard Biener  <rguenther@suse.de>
2867         PR tree-optimization/86988
2868         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2870 2018-08-22  Richard Biener  <rguenther@suse.de>
2872         PR tree-optimization/86945
2873         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2875 2018-08-22  Alexandre Oliva <oliva@adacore.com>
2877         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2878         a comment about how uses of r2 for .sdata2 come about.
2880 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
2882         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2884 2018-08-21  Marek Polacek  <polacek@redhat.com>
2886         PR c++/86981, Implement -Wpessimizing-move.
2887         * doc/invoke.texi: Document -Wpessimizing-move.
2889 2018-08-21  Jan Hubicka  <jh@suse.cz>
2891         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2892         * tree.h (is_redundant_typedef): Remove.
2893         * dwarf2out.c (is_redundant_typedef): Turn into static function.
2895 2018-08-21  Jan Hubicka  <jh@suse.cz>
2897         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2898         when possible.
2900 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
2902         * expmed.c (extract_low_bits): Reject invalid subregs early.
2904 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2906         PR middle-end/86121
2907         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2908         behaviour.
2910 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2912         * config/vxworks.h: Guard vxworks_asm_out_constructor and
2913         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2914         * config/vxworks.c: Likewise.
2916 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2918         * config/vxworks.c: Set targetm.have_ctors_dtors
2919         if HAVE_INITFINI_ARRAY_SUPPORT.
2920         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2921         if HAVE_INITFINI_ARRAY_SUPPORT.
2923 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2925         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2926         default search path for VxWorks < 7.
2928 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2930         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2931         (get_format_string): Refer to c_getstr.
2933 2018-08-21  Tom de Vries  <tdevries@suse.de>
2935         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2936         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2937         (debuginfo_early_stop): Declare.
2938         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2939         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2940         (debuginfo_early_stop): New function.
2941         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2942         and debuginfo_early_stop.
2943         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2944         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2945         (general_init): Call debuginfo_early_init.
2946         (finalize): Call debuginfo_fini.
2947         (do_compile): Call debuginfo_init.
2948         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2949         -fdump-early-debug.
2950         (@item -fdump-debug, @item -fdump-earlydebug): Add.
2952 2018-08-21  Tom de Vries  <tdevries@suse.de>
2954         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2955         flag_dump_noaddr and flag_dump_unnumbered.
2957 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
2959         * wide-int-range.cc (wide_int_range_abs): New.
2960         (wide_int_range_order_set): Rename from wide_int_range_min_max.
2961         * wide-int-range.h (wide_int_range_abs): New.
2962         (wide_int_range_min_max): New.
2963         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2964         case to call wide_int_range_abs.
2965         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2966         (extract_range_from_abs_expr): Delete.
2968 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
2970         PR target/87033
2971         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2972         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2973         for indexed loads.
2975 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2976             Jeff Law <law@redhat.com>
2978         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2979         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2981 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
2983         PR other/84889
2984         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2985         (decl_attributes): Likewise.
2986         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2987         instance.
2988         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2989         * diagnostic-core.h (class auto_diagnostic_group): New class.
2990         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2991         (diagnostic_report_diagnostic): Handle the first diagnostics within
2992         a group.
2993         (emit_diagnostic): Add auto_diagnostic_group instance.
2994         (inform): Likewise.
2995         (inform_n): Likewise.
2996         (warning): Likewise.
2997         (warning_at): Likewise.
2998         (warning_n): Likewise.
2999         (pedwarn): Likewise.
3000         (permerror): Likewise.
3001         (error): Likewise.
3002         (error_n): Likewise.
3003         (error_at): Likewise.
3004         (sorry): Likewise.
3005         (fatal_error): Likewise.
3006         (internal_error): Likewise.
3007         (internal_error_no_backtrace): Likewise.
3008         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
3009         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
3010         * diagnostic.h (struct diagnostic_context): Add fields
3011         "diagnostic_group_nesting_depth",
3012         "diagnostic_group_emission_count", "begin_group_cb",
3013         "end_group_cb".
3014         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
3015         Add auto_diagnostic_group instance(s).
3016         (find_explicit_erroneous_behavior): Likewise.
3017         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
3018         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
3019         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
3020         (gimplify_va_arg_expr): Likewise.
3021         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
3022         (HSA_SORRY_AT): Likewise.
3023         * ipa-devirt.c (compare_virtual_tables): Likewise.
3024         (warn_odr): Likewise.
3025         * multiple_target.c (expand_target_clones): Likewise.
3026         * opts-common.c (cmdline_handle_error): Likewise.
3027         * reginfo.c (globalize_reg): Likewise.
3028         * substring-locations.c (format_warning_n_va): Likewise.
3029         * tree-inline.c (expand_call_inline): Likewise.
3030         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
3031         * tree-ssa-loop-niter.c
3032         (do_warn_aggressive_loop_optimizations): Likewise.
3033         * tree-ssa-uninit.c (warn_uninit): Likewise.
3034         * tree.c (warn_deprecated_use): Likewise.
3036 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
3038         PR target/87014
3039         * config/i386/i386.md (eh_return): Always update EH return
3040         address in word_mode.
3042 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
3044         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
3045         TARGET_SPLIT_COMPLEX_ARG is defined.
3047 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3049         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
3051 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3053         PR target/86984
3054         * expr.c (expand_assignment): Assert that bitpos is positive.
3055         (store_field): Likewise
3056         (expand_expr_real_1): Make sure that bitpos is positive.
3057         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
3058         integer overflow.
3060 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3062         * Makefile.in (CPP_ID_DATA_H): Delete.
3063         (CPP_INTERNAL_H): Don't add it.
3064         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
3065         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
3067 2018-08-20  Richard Biener  <rguenther@suse.de>
3069         PR tree-optimization/78655
3070         * tree-vrp.c (extract_range_from_binary_expr_1): Make
3071         pointer + offset nonnull if either operand is nonnull work.
3073 2018-08-20  Tom de Vries  <tdevries@suse.de>
3075         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
3076         unless the referenced die describes the added property using
3077         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
3078         Otherwise, add a DW_AT_location to the referenced die.
3080 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
3082         PR target/86994
3083         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
3084         register_operand when calling ix86_set_reg_reg_cost.
3085         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
3086         Set *total to 0 for operands that satisfy x86_64_immediate_operand
3087         predicate and to 1 otherwise.
3089 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
3091         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
3092         emit a diagnostic that it is not supported and reset the option.
3093         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
3094         supported and consume the option.  (ASM_FINAL_SPEC): New.
3096 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
3098         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
3099         a sentence.
3101 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
3103         C-SKY port: Documentation
3105         * doc/extend.texi (C-SKY Function Attributes): New section.
3106         * doc/invoke.texi (Option Summary): Add C-SKY options.
3107         (C-SKY Options): New section.
3108         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
3110 2018-08-17  Jojo  <jijie_rong@c-sky.com>
3111             Huibin Wang  <huibin_wang@c-sky.com>
3112             Sandra Loosemore  <sandra@codesourcery.com>
3113             Chung-Lin Tang  <cltang@codesourcery.com>
3115         C-SKY port: Backend implementation
3117         * config/csky/*: New.
3118         * common/config/csky/*: New.
3120 2018-08-17  Jojo  <jijie_rong@c-sky.com>
3121             Huibin Wang  <huibin_wang@c-sky.com>
3122             Sandra Loosemore  <sandra@codesourcery.com>
3123             Chung-Lin Tang  <cltang@codesourcery.com>
3124             Andrew Jenner  <andrew@codesourcery.com>
3126         C-SKY port: Configury
3128         * config.gcc (csky-*-*): New.
3129         * configure.ac: Add csky to targets for dwarf2 debug_line support.
3130         * configure: Regenerated.
3132 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
3134         * dump-context.h: Include "dumpfile.h".
3135         (dump_context::dump_printf_va): Convert final param from va_list
3136         to va_list *.  Convert from ATTRIBUTE_PRINTF to
3137         ATTRIBUTE_GCC_DUMP_PRINTF.
3138         (dump_context::dump_printf_loc_va): Likewise.
3139         * dumpfile.c: Include "stringpool.h".
3140         (make_item_for_dump_printf_va): Delete.
3141         (make_item_for_dump_printf): Delete.
3142         (class dump_pretty_printer): New class.
3143         (dump_pretty_printer::dump_pretty_printer): New ctor.
3144         (dump_pretty_printer::emit_items): New member function.
3145         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
3146         function.
3147         (dump_pretty_printer::emit_item): New member function.
3148         (dump_pretty_printer::stash_item): New member function.
3149         (dump_pretty_printer::format_decoder_cb): New member function.
3150         (dump_pretty_printer::decode_format): New member function.
3151         (dump_context::dump_printf_va): Reimplement in terms of
3152         dump_pretty_printer.
3153         (dump_context::dump_printf_loc_va): Convert final param from va_list
3154         to va_list *.
3155         (dump_context::begin_scope): Reimplement call to
3156         make_item_for_dump_printf.
3157         (dump_printf): Update for change to dump_printf_va.
3158         (dump_printf_loc): Likewise.
3159         (selftest::test_capture_of_dump_calls): Convert "stmt" from
3160         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
3161         with %T, %E, and %G.
3162         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
3163         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
3164         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
3165         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
3166         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
3167         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
3168         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
3169         within a dump_printf_loc call to "%wu".
3170         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
3171         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
3172         missing space after "=".
3173         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
3174         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
3175         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
3176         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
3177         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
3178         duplicate "vectorized" from message.
3180 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3182         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
3183         polyNxK_t element's TYPE_STRING_FLAG.
3185 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
3187         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
3188         (they were unnamed before).  Fix comments.
3190 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3192         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
3194 2018-08-17  Richard Biener  <rguenther@suse.de>
3196         PR tree-optimization/86841
3197         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
3199 2018-08-17  Martin Liska  <mliska@suse.cz>
3201         * common.opt: Remove Warn, Init and Report for options with
3202         Ignore/Deprecated flag. Warning is done automatically for
3203         Deprecated flags.
3204         * config/i386/i386.opt: Likewise.
3205         * config/ia64/ia64.opt: Likewise.
3206         * config/rs6000/rs6000.opt: Likewise.
3207         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
3208         Remove usage of flag_check_pointer_bounds.
3209         * lto-wrapper.c (merge_and_complain): Do not handle
3210         OPT_fcheck_pointer_bounds.
3211         (append_compiler_options): Likewise.
3212         * opt-functions.awk: Do not handle Deprecated.
3213         * optc-gen.awk: Check that Var, Report and Init are not
3214         used for an option with Ignore/Deprecated flag.
3215         * opts-common.c (decode_cmdline_option): Do not report
3216         CL_ERR_DEPRECATED.
3217         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
3218         options.
3219         * opts.h (struct cl_option): Remove cl_deprecated flag.
3220         (CL_ERR_DEPRECATED): Remove error enum value.
3222 2018-08-17  Richard Biener  <rguenther@suse.de>
3224         PR middle-end/86505
3225         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
3226         across a va-arg-pack using call adjust its return value accordingly.
3228 2018-08-16  Martin Sebor  <msebor@redhat.com>
3230         PR tree-optimization/86853
3231         * gimple-ssa-sprintf.c (struct format_result): Rename member.
3232         (struct fmtresult): Add member and initialize it in ctors.
3233         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
3234         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
3235         (format_directive): Set POSUNDER4K when MAYFAIL is set.
3236         (parse_directive): Handle %C same as %c.
3237         (sprintf_dom_walker::compute_format_length): Adjust.
3238         (is_call_safe): Adjust.
3240 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3242         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
3243         for determining how to count the elements.
3244         * builtins.h (c_strlen): Adjust prototype.
3245         * expr.c (string_constant): Add new parameter mem_size.
3246         Set *mem_size appropriately.
3247         * expr.h (string_constant): Adjust protoype.
3248         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
3249         * gimple-fold.h (get_range_strlen): Adjust prototype.
3250         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
3251         (format_string): Call get_string_length with eltsize.
3253 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3255         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
3256         to emit the span, rather than setting it as the prefix.
3258 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3260         * diagnostic-show-locus.c (layout::start_annotation_line): Add
3261         "margin_char" parameter, defaulting to space.  Use it in place
3262         of pp_space for the initial part of the margin.
3263         (layout::print_leading_fixits): Use '+' when filling the margin
3264         of line-insertion fix-it hints.
3266 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3268         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
3269         Delete.
3271 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3273         * config/rs6000/altivec.md: Don't set length attribute to the default
3274         value.
3275         * config/rs6000/darwin.md: Ditto.
3276         * config/rs6000/dfp.md: Ditto.
3277         * config/rs6000/htm.md: Ditto.
3278         * config/rs6000/rs6000.md: Ditto.
3279         * config/rs6000/sync.md: Ditto.
3280         * config/rs6000/vsx.md: Ditto.
3282 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3284         * config/rs6000/altivec.md: Don't set length attribute to the default
3285         value, for branch instructions.
3286         * config/rs6000/darwin.md: Ditto.
3287         * config/rs6000/rs6000.md: Ditto.
3289 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3291         * config/rs6000/rs6000.md (length): Always define as const_int 4.
3292         (unnamed conditional branch define_insn): Set length to 4 or 8
3293         depending on offset.
3294         (<bd>_<mode>): Similar, for alternative 0.
3295         (<bd>tf_<mode>): Ditto.
3297 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3299         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
3301 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
3303         * doc/rtl.texi: Replace old RTX class names with new names.
3306 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
3308         * expmed.h (canonicalize_comparison): New declaration.
3309         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
3310         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
3311         * optabs.c (prepare_cmp_insn): Likewise.
3312         * rtl.h (unsigned_condition_p): New function which checks if a
3313         comparison operator is unsigned.
3315 2018-08-16  Nathan Sidwell  <nathan@acm.org>
3317         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
3318         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
3320 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3322         PR target/84711
3323         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
3324         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
3325         (mov<mov>): ..this and enable unconditionally.
3327 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3329         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
3331 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
3333         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
3334         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
3335         "Common" with "Target".
3337 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
3339         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
3340         * doc/invoke.texi (mmitigate-rop): Remove.
3341         * config/i386/i386.c: Do not include "regrename.h".
3342         (ix86_rop_should_change_byte_p, reg_encoded_number)
3343         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
3344         Remove.
3345         (ix86_reorg): Remove call to ix86_mitigate_rop.
3346         * config/i386/i386.md (attr "modrm_class"): Remove.
3347         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
3348         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
3349         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
3351 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
3353         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
3354         allow folding of mergeh() and mergel() for the float and double types.
3355         (fold_mergehl_helper): Rework to handle building a permute tree
3356         for float vectors.
3358 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
3360         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
3361         for TARGET_SSE.
3363 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
3365         * common.opt (fdiagnostics-show-labels): New option.
3366         * diagnostic-show-locus.c (class layout_range): Add field
3367         "m_label".
3368         (class layout): Add field "m_show_labels_p".
3369         (layout_range::layout_range): Add param "label" and use it to
3370         initialize m_label.
3371         (make_range): Pass in NULL for new "label" param of layout_range's
3372         ctor.
3373         (layout::layout): Initialize m_show_labels_p.
3374         (layout::maybe_add_location_range): Pass in loc_range->m_label
3375         when constructing layout_range instances.
3376         (struct line_label): New struct.
3377         (layout::print_any_labels): New member function.
3378         (layout::print_line): Call it if label-printing is enabled.
3379         (selftest::test_one_liner_labels): New test.
3380         (selftest::test_diagnostic_show_locus_one_liner): Call it.
3381         * diagnostic.c (diagnostic_initialize): Initialize
3382         context->show_labels_p.
3383         * diagnostic.h (struct diagnostic_context): Add field
3384         "show_labels_p".
3385         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3386         -fno-diagnostics-show-labels.
3387         * dwarf2out.c (gen_producer_string): Add
3388         OPT_fdiagnostics_show_labels to the ignored options.
3389         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
3390         param.
3391         (gcc_rich_location::maybe_add_expr): Likewise.
3392         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
3393         label" param, defaulting to NULL.
3394         (gcc_rich_location::add_expr): Add "label" param.
3395         (gcc_rich_location::maybe_add_expr): Likewise.
3396         (class text_range_label): New class.
3397         (class range_label_for_type_mismatch): New class.
3398         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
3399         of format_warning_va.
3400         (fmtwarn_n): Likewise for new params of format_warning_n_va.
3401         * lto-wrapper.c (merge_and_complain): Add
3402         OPT_fdiagnostics_show_labels to the "pick one setting" options.
3403         (append_compiler_options): Likewise to the dropped options.
3404         (append_diag_options): Likewise to the passed-on options.
3405         * opts.c (common_handle_option): Handle the new option.
3406         * selftest-diagnostic.c
3407         (test_diagnostic_context::test_diagnostic_context): Enable
3408         show_labels_p.
3409         * substring-locations.c: Include "gcc-rich-location.h".
3410         (format_warning_n_va): Add "fmt_label" and "param_label" params
3411         and use them as appropriate.
3412         (format_warning_va): Add "fmt_label" and "param_label" params,
3413         passing them on to format_warning_n_va.
3414         (format_warning_at_substring): Likewise.
3415         (format_warning_at_substring_n): Likewise.
3416         * substring-locations.h (format_warning_va): Add "fmt_label" and
3417         "param_label" params.
3418         (format_warning_n_va): Likewise.
3419         (format_warning_at_substring): Likewise.
3420         (format_warning_at_substring_n): Likewise.
3421         * toplev.c (general_init): Initialize global_dc->show_labels_p.
3423 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
3425         PR testsuite/86519
3426         * builtins.c (expand_builtin_memcmp): Do not expand the call
3427         when overflow is detected.
3429 2018-08-15  Martin Sebor  <msebor@redhat.com>
3431         PR tree-optimization/71625
3432         * config/aarch64/aarch64-builtins.c
3433         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3435 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
3437         * config/s390/s390.c (s390_reorg): Remove loop.
3439 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
3441         * config/darwin.c
3442          (darwin_function_switched_text_sections): Delete.
3443         * gcc/config/darwin.h
3444          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3446 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
3448         PR target/81685
3449         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3450         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
3451         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3453 2018-08-15  Martin Liska  <mliska@suse.cz>
3455         PR tree-optimization/86925
3456         * predict.c (expr_expected_value_1): When taking
3457         later predictor, assign also probability.
3458         Use fold_build2_initializer_loc in order to fold
3459         the expression in -frounding-math.
3461 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
3463         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3464         patterns.
3465         (expand_vec_perm_1): Try the new method.
3467 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
3469         PR target/86547
3470         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3471         Check whether lra_live_max_point is 0 before dividing.
3473 2018-08-14  Martin Sebor  <msebor@redhat.com>
3475         PR tree-optimization/86650
3476         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3477         (vrp_prop::check_mem_ref): Same.
3479 2018-08-13  Liu Hao <lh_mouse@126.com>
3481         * pretty-print.c (eat_esc_sequence): Swap the foreground and
3482         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3483         and clear it thereafter, as it only works for DBCS.
3485 2018-08-13  Liu Hao <lh_mouse@126.com>
3487         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3488         handle returned by _get_osf_handle().
3490 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
3492         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3493         for folding vec_perm.
3495 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
3497         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3498         Add support for gimple-folding of vec_pack() and vec_unpack()
3499         intrinsics.
3501 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
3503         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3504         vec_xst variants to the list.
3505         (rs6000_gimple_fold_builtin): Add support for folding unaligned
3506         vector loads and stores.
3508 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
3510         * config.gcc (rs6000-ibm-aix4.x): Delete.
3511         (rs6000-ibm-aix5.1): Delete.
3512         (rs6000-ibm-aix5.2): Delete.
3513         (rs6000-ibm-aix5.3): Delete.
3514         * config/rs6000/aix43.h: Delete.
3515         * config/rs6000/aix51.h: Delete.
3516         * config/rs6000/aix52.h: Delete.
3517         * config/rs6000/t-aix43: Delete.
3519 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
3521         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3522         New function.
3523         (s390_decompose_address): Factor out constant pool ref
3524         decomposition.
3526 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3528         * config/nds32/nds32-predicates.c
3529         (nds32_can_use_bclr_p): Change return type as bool.
3530         (nds32_can_use_bset_p): Ditto.
3531         (nds32_can_use_btgl_p): Ditto.
3532         (nds32_can_use_bitci_p): Ditto.
3533         * config/nds32/nds32-protos.h
3534         (nds32_can_use_bclr_p): Change declaration.
3535         (nds32_can_use_bset_p): Ditto.
3536         (nds32_can_use_btgl_p): Ditto.
3537         (nds32_can_use_bitci_p): Ditto.
3539 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3541         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3542         Support -msched-prolog-epilog option.
3543         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3545 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3547         * common/config/nds32/nds32-common.c
3548         (nds32_option_optimization_table): Enalbe -malways-align.
3550 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3552         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3553         extra_headers.
3554         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3555         OPT_misr_secure_ case.
3556         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3557         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3558         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3559         secure attribute.
3560         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3561         (nds32_isr_info): New field security_level.
3562         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3563         * config/nds32/nds32.md (return_internal): Consider critical attribute.
3564         * config/nds32/nds32.opt (misr-secure): New option.
3565         * config/nds32/nds32_init.inc: New file.
3566         * config/nds32/nds32_isr.h: New file.
3568 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
3570         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3571         Update comment for atomic instructions.
3572         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3573         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3574         Remove.
3575         (atomic_loaddi): Revise fence expansion to only emit fence prior to
3576         load for __ATOMIC_SEQ_CST model.
3577         (atomic_loaddi_1): Remove float register target.
3578         (atomic_storedi): Handle CONST_INT values.
3579         (atomic_storedi_1): Remove float register source.  Add special case
3580         for zero value.
3581         (memory_barrier): New expander and insn.
3583 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
3585         PR tree-optimization/86835
3586         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3587         new_stmt after def_gsi, make sure to insert new_square_stmt after
3588         that stmt, not 2 stmts before it.
3590 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
3592         PR target/82418
3593         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3594         instead of SWI48.
3596 2018-08-10  Martin Liska  <mliska@suse.cz>
3598         PR target/83610
3599         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3600         function type.
3601         * builtins.c (expand_builtin_expect_with_probability):
3602         New function.
3603         (expand_builtin_expect_with_probability): New function.
3604         (build_builtin_expect_predicate): Add new argumnet probability
3605         for BUILT_IN_EXPECT_WITH_PROBABILITY.
3606         (fold_builtin_expect):
3607         (fold_builtin_2):
3608         (fold_builtin_3):
3609         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3610         * builtins.h (fold_builtin_expect): Set new argument.
3611         * doc/extend.texi: Document __builtin_expect_with_probability.
3612         * doc/invoke.texi: Likewise.
3613         * gimple-fold.c (gimple_fold_call): Pass new argument.
3614         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3615         also BUILT_IN_EXPECT_WITH_PROBABILITY.
3616         * predict.c (get_predictor_value): New function.
3617         (expr_expected_value): Add new argument probability. Assume
3618         that predictor and probability are always non-null.
3619         (expr_expected_value_1): Likewise.  For __builtin_expect and
3620         __builtin_expect_with_probability set probability.  Handle
3621         combination in binary expressions.
3622         (tree_predict_by_opcode): Simplify code by simply calling
3623         get_predictor_value.
3624         (pass_strip_predict_hints::execute): Add handling of
3625         BUILT_IN_EXPECT_WITH_PROBABILITY.
3626         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3627         new predictor.
3628         * tree.h (DECL_BUILT_IN_P): New function.
3630 2018-08-10  Martin Liska  <mliska@suse.cz>
3632         PR tree-optimization/85799
3633         * passes.def: Add argument for pass_strip_predict_hints.
3634         * predict.c (class pass_strip_predict_hints): Add new argument
3635         early_p.
3636         (strip_predictor_early): New function.
3637         (pass_strip_predict_hints::execute): Call the function to
3638         strip predictors.
3639         (strip_predict_hints): New function.
3640         * predict.def: Fix comment.
3642 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
3644         * Makefile.in: Clarify which tm.texi to copy over to assert the
3645         right to grant a GFDL license for all.
3647 2018-08-09  Jeff Law  <law@redhat.com>
3649         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3650         unused variable.
3652 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
3654         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3655         prototype.
3657 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
3659         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3660         reductions for variable-length vectors.
3662 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
3664         PR other/84889
3665         * common.opt (fdiagnostics-show-line-numbers): New option.
3666         * diagnostic-show-locus.c (class layout): Add fields
3667         "m_show_line_numbers_p" and "m_linenum_width";
3668         (num_digits): New function.
3669         (test_num_digits): New function.
3670         (layout::layout): Initialize new fields.  Update m_x_offset
3671         logic to handle any left margin.
3672         (layout::print_source_line): Print line number when requested.
3673         (layout::start_annotation_line): New member function.
3674         (layout::print_annotation_line): Call it.
3675         (layout::print_leading_fixits): Likewise.
3676         (layout::print_trailing_fixits): Likewise.  Update calls to
3677         move_to_column for new parameter.
3678         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3679         it to potentially call start_annotation_line.
3680         (layout::show_ruler): Call start_annotation_line.
3681         (selftest::test_line_numbers_multiline_range): New selftest.
3682         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3683         and selftest::test_line_numbers_multiline_range.
3684         * diagnostic.c (diagnostic_initialize): Initialize
3685         show_line_numbers_p.
3686         * diagnostic.h (struct diagnostic_context): Add field
3687         "show_line_numbers_p".
3688         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3689         -fno-diagnostics-show-line-numbers.
3690         * dwarf2out.c (gen_producer_string): Add
3691         OPT_fdiagnostics_show_line_numbers to the ignored options.
3692         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3693         one setting" options.
3694         (append_compiler_options): Likewise to the dropped options.
3695         (append_diag_options): Likewise to the passed-on options.
3696         * opts.c (common_handle_option): Handle the new option.
3697         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3699 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3701         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3702         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
3703         third argument of type "const signed char" to descriptions of
3704         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3705         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3706         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3707         __builtin_bcdsub_ov functions.
3709 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
3711         PR tree-optimization/86858
3712         * tree-vect-loop.c (vect_is_simple_reduction): Restore
3713         flow_bb_inside_loop_p calls.
3715 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
3717         PR tree-optimization/86871
3718         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3719         instead of gimple_assign_lhs.
3721 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
3723         PR target/86887
3724         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3725         register constraint to operand 0.
3726         (add<mode>3_carryinC): Likewise.
3727         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3729 2018-08-09  Martin Liska  <mliska@suse.cz>
3731         PR c/86895
3732         * common.opt: Remove extra line.
3734 2018-08-09  Martin Liska  <mliska@suse.cz>
3736         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3737         at the end of a line, make first letter capital and end up
3738         a sentence with a dot.
3739         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3740         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3741         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3742         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3743         (PARAM_MAX_ISL_OPERATIONS): Likewise.
3744         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3745         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3746         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3747         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3748         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3749         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3750         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3751         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3752         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3753         (PARAM_TREE_REASSOC_WIDTH): Likewise.
3754         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3755         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3756         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3758 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
3760         PR target/84332
3761         * config/s390/s390.c (s390_option_override_internal): Reduce the
3762         stack-clash-protection-probe-interval param if it would be too big
3763         for z900.
3765 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
3767         PR target/46179
3768         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3769         * config/m68k/m68k.c (handle_move_double): Don't call
3770         m68k_final_prescan_insn.
3771         (m68k_adjust_decorated_operand): Renamed from
3772         m68k_final_prescan_insn, remove first and third operand and
3773         simplify.
3774         (print_operand): Call it.
3775         (print_operand_address): Call it.
3777 2018-08-08  Nathan Sidwell  <nathan@acm.org>
3779         * diagnostic.c (diagnostic_report_current_module): Use
3780         linemap_included_from & linemap_included_from_linemap.
3782 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
3784         * config/aarch64/aarch64-cores.def: Add phecda core.
3785         * config/aarch64/aarch64-tune.md: Regenerate.
3786         * doc/invoke.texi: Add phecda core.
3788 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
3790         PR target/85295
3791         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3792         definitions.
3793         * config/s390/s390.md ("movti"): Add more alternatives for
3794         constant to GPR copies.
3796 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
3798         * config/s390/s390.c: Fix whitespace damage throughout the file.
3799         * config/s390/s390.h: Likewise.
3800         * config/s390/tpf.h: Likewise.
3802 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
3804         * config/s390/s390.c (s390_loadrelative_operand_p):
3805         Remove TARGET_CPU_ZARCH usages.
3806         (s390_rtx_costs): Likewise.
3807         (s390_legitimate_constant_p): Likewise.
3808         (s390_cannot_force_const_mem): Likewise.
3809         (legitimate_reload_constant_p): Likewise.
3810         (s390_preferred_reload_class): Likewise.
3811         (legitimize_pic_address): Likewise.
3812         (legitimize_tls_address): Likewise.
3813         (s390_split_branches): Removed.
3814         (s390_add_execute): Removed.
3815         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3816         (s390_mainpool_start): Likewise.
3817         (s390_mainpool_finish): Likewise.
3818         (s390_mainpool_cancel): Removed.
3819         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3820         (s390_chunkify_cancel): Likewise.
3821         (s390_return_addr_rtx): Likewise.
3822         (s390_register_info): Remove split_branches_pending_p uages.
3823         (s390_optimize_register_info): Likewise.
3824         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3825         split_branches_pending_p usages.
3826         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3827         (s390_load_got): Likewise.
3828         (s390_expand_split_stack_prologue): Likewise.
3829         (output_asm_nops): Likewise.
3830         (s390_function_profiler): Likewise.
3831         (s390_emit_call): Likewise.
3832         (s390_conditional_register_usage): Likewise.
3833         (s390_optimize_prologue): Likewise.
3834         (s390_reorg): Remove TARGET_CPU_ZARCH and
3835         split_branches_pending_p usages.
3836         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3837         usages.
3838         (s390_output_indirect_thunk_function): Likewise.
3839         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3840         (TARGET_CPU_ZARCH_P): Removed.
3841         (struct machine_function): Remove split_branches_pending_p.
3842         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3844 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
3846         * common/config/s390/s390-common.c (processor_flags_table):
3847         Remove flags.
3848         * config.gcc: Remove with_arch/with_tune support.
3849         * config/s390/2064.md: Remove cpu attribute comparisons.
3850         * config/s390/driver-native.c (s390_host_detect_local_cpu):
3851         Remove MTN.
3852         * config/s390/linux.h (ASM_SPEC):
3853         Remove -march support.
3854         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3855         Use a table to get an arch level.
3856         * config/s390/s390-opts.h (enum processor_type):
3857         Remove enum values.
3858         * config/s390/s390.c
3859         (processor_table): Remove entries, add arch_level values.
3860         (s390_issue_rate): Remove cases.
3861         (s390_option_override): Adjust
3862         s390_option_override_internal() call.
3863         (s390_option_override_internal): Remove deprecation warning.
3864         (s390_valid_target_attribute_tree): Adjust
3865         s390_option_override_internal() call.
3866         * config/s390/s390.h (struct s390_processor):
3867         Share with s390-c.c, add arch_level field.
3868         * config/s390/s390.md:
3869         Remove occurrences in cpu attribute.
3870         * config/s390/s390.opt: Remove -march/-mtune support.
3871         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3872         * doc/invoke.texi: Remove deprecation warning.
3874 2018-08-08  Luis Machado  <luis.machado@linaro.org>
3876         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3877         global.
3878         (qdf24xx_tunings): Set vector cost structure to
3879         qdf24xx_vector_cost.
3881         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3882         <register_sextend>: Set to 3.
3884 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
3886         PR target/86838
3887         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3888         * config/aarch64/aarch64-simd.md
3889         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3890         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3891         (aarch64_frecpx<mode>): ...this new pattern.
3892         * config/aarch64/aarch64-simd-builtins.def: Remove comment
3893         about aarch64_frecp<FRECP:frecp_suffix><mode>.
3895 2018-08-07  Martin Liska  <mliska@suse.cz>
3897         PR middle-end/83023
3898         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3899         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3900         * predict.def (PRED_MALLOC_NONNULL): New predictor.
3901         * doc/extend.texi: Document that malloc attribute adds
3902         hit to compiler.
3904 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
3906         PR target/86785
3907         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3908         Define to speculation_safe_value_not_needed.
3910 2018-08-06  Jeff Law  <law@redhat.com>
3912         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3913         the vr_values instance to cprop_into_stmt.
3914         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3915         (cprop_operand): Also query EVRP to determine if OP is a constant.
3917 2018-08-06  Nathan Sidwell  <nathan@acm.org>
3919         * diagnostic.c (diagnostic_report_current_module): Reroll
3920         included-at loop.  Translate text.
3922 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
3924         * function-tests.c (selftest::test_expansion_to_rtl): Call
3925         free_after_compilation.
3927 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3929         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3931 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
3933         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3934         loops with memory block operations from getting unrolled.
3936 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
3938         PR target/86807
3939         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3940         Define to speculation_safe_value_not_needed.
3942 2018-08-06  Jeff Law  <law@redhat.com>
3944         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3945         assert.
3947 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3949         PR target/86662
3950         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3951         with all enabled __intN types.
3953         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3955 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3957         * alias.c (record_set): Check for clobber high.
3958         * cfgexpand.c (expand_gimple_stmt): Likewise.
3959         * combine-stack-adj.c (single_set_for_csa): Likewise.
3960         * combine.c (find_single_use_1): Likewise.
3961         (set_nonzero_bits_and_sign_copies): Likewise.
3962         (get_combine_src_dest): Likewise.
3963         (is_parallel_of_n_reg_sets): Likewise.
3964         (try_combine): Likewise.
3965         (record_dead_and_set_regs_1): Likewise.
3966         (reg_dead_at_p_1): Likewise.
3967         (reg_dead_at_p): Likewise.
3968         * dce.c (deletable_insn_p): Likewise.
3969         (mark_nonreg_stores_1): Likewise.
3970         (mark_nonreg_stores_2): Likewise.
3971         * df-scan.c (df_find_hard_reg_defs): Likewise.
3972         (df_uses_record): Likewise.
3973         (df_get_call_refs): Likewise.
3974         * dwarf2out.c (mem_loc_descriptor): Likewise.
3975         * haifa-sched.c (haifa_classify_rtx): Likewise.
3976         * ira-build.c (create_insn_allocnos): Likewise.
3977         * ira-costs.c (scan_one_insn): Likewise.
3978         * ira.c (equiv_init_movable_p): Likewise.
3979         (rtx_moveable_p): Likewise.
3980         (interesting_dest_for_shprep): Likewise.
3981         * jump.c (mark_jump_label_1): Likewise.
3982         * postreload-gcse.c (record_opr_changes): Likewise.
3983         * postreload.c (reload_cse_simplify): Likewise.
3984         (struct reg_use): Add source expr.
3985         (reload_combine): Check for clobber high.
3986         (reload_combine_note_use): Likewise.
3987         (reload_cse_move2add): Likewise.
3988         (move2add_note_store): Likewise.
3989         * print-rtl.c (print_pattern): Likewise.
3990         * recog.c (decode_asm_operands): Likewise.
3991         (store_data_bypass_p): Likewise.
3992         (if_test_bypass_p): Likewise.
3993         * regcprop.c (kill_clobbered_value): Likewise.
3994         (kill_set_value): Likewise.
3995         * reginfo.c (reg_scan_mark_refs): Likewise.
3996         * reload1.c (maybe_fix_stack_asms): Likewise.
3997         (eliminate_regs_1): Likewise.
3998         (elimination_effects): Likewise.
3999         (mark_not_eliminable): Likewise.
4000         (scan_paradoxical_subregs): Likewise.
4001         (forget_old_reloads_1): Likewise.
4002         * reorg.c (find_end_label): Likewise.
4003         (try_merge_delay_insns): Likewise.
4004         (redundant_insn): Likewise.
4005         (own_thread_p): Likewise.
4006         (fill_simple_delay_slots): Likewise.
4007         (fill_slots_from_thread): Likewise.
4008         (dbr_schedule): Likewise.
4009         * resource.c (update_live_status): Likewise.
4010         (mark_referenced_resources): Likewise.
4011         (mark_set_resources): Likewise.
4012         * rtl.c (copy_rtx): Likewise.
4013         * rtlanal.c (reg_referenced_p): Likewise.
4014         (single_set_2): Likewise.
4015         (noop_move_p): Likewise.
4016         (note_stores): Likewise.
4017         * sched-deps.c (sched_analyze_reg): Likewise.
4018         (sched_analyze_insn): Likewise.
4020 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4022         * cse.c (invalidate_reg): New function extracted from...
4023         (invalidate): ...here.
4024         (canonicalize_insn): Check for clobber high.
4025         (invalidate_from_clobbers): invalidate clobber highs.
4026         (invalidate_from_sets_and_clobbers): Likewise.
4027         (count_reg_usage): Check for clobber high.
4028         (insn_live_p): Likewise.
4029         * cselib.c (cselib_expand_value_rtx_1):Likewise.
4030         (cselib_invalidate_regno): Check for clobber in setter.
4031         (cselib_invalidate_rtx): Pass through setter.
4032         (cselib_invalidate_rtx_note_stores):
4033         (cselib_process_insn): Check for clobber high.
4034         * cselib.h (cselib_invalidate_rtx): Add operand.
4036 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4038         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
4039         (mark_not_eliminable): Likewise.
4040         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
4041         * lra-lives.c (process_bb_lives): Check for clobber high.
4042         * lra.c (new_insn_reg): Remember clobber highs.
4043         (collect_non_operand_hard_regs): Check for clobber high.
4044         (lra_set_insn_recog_data): Likewise.
4045         (add_regs_to_insn_regno_info): Likewise.
4046         (lra_update_insn_regno_info): Likewise.
4048 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4050         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
4051         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
4053 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4055         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
4056         (copy_insn_1): Likewise.
4057         (gen_hard_reg_clobber_high): New gen function.
4058         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
4059         * genemit.c (gen_exp): Likewise.
4060         (gen_emit_seq): Pass through info.
4061         (gen_insn): Check for CLOBBER_HIGH.
4062         (gen_expand): Pass through info.
4063         (gen_split): Likewise.
4064         (output_add_clobbers): Likewise.
4065         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
4066         (remove_clobbers): Likewise.
4067         * rtl.h (gen_hard_reg_clobber_high): New declaration.
4069 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4071         * doc/rtl.texi (clobber_high): Add.
4072         (parallel): Add in clobber high
4073         * rtl.c (rtl_check_failed_code3): Add function.
4074         * rtl.def (CLOBBER_HIGH): Add expression.
4075         * rtl.h (RTL_CHECKC3): Add macro.
4076         (rtl_check_failed_code3): Add declaration.
4077         (XC3EXP): Add macro.
4079 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
4081         PR target/86386
4082         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
4083         cfun->machine->max_used_stack_alignment if needed.
4085 2018-08-04  Martin Sebor  <msebor@redhat.com>
4087         PR tree-optimization/86571
4088         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
4089         NaN output to 4.
4091 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
4093         PR target/86799
4094         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4095         Define.
4097 2018-08-03  Jeff Law  <law@redhat.com>
4099         PR target/86795
4100         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4101         Define to speculation_safe_value_not_needed.
4103 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
4105         * doc/gcov.texi (-x): Remove duplicate "to".
4106         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
4107         (-Wif-not-aligned): Remove duplicate "is".
4108         (-flto): Remove duplicate "the".
4109         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
4110         duplicate "v5.00.b".
4111         (MSP430 Options): Remove duplicate "and" from the description
4112         of "-mgprel-sec=regexp".
4113         (x86 Options): Remove duplicate copies of "vmldLog102" and
4114         vmlsLog104 from description of "-mveclibabi=type".
4116 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4118         * internal-fn.h (first_commutative_argument): Declare.
4119         * internal-fn.c (first_commutative_argument): New function.
4120         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
4121         restrictions for pattern statements.  Use first_commutative_argument
4122         to look for commutative operands in calls to internal functions.
4124 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
4126         * Makefile.in (wide-int-range.o): New.
4127         * tree-vrp.c: Move all the wide_int_* functions to...
4128         * wide-int-range.cc: ...here.
4129         * tree-vrp.h: Move all the wide_int_* prototypes to...
4130         * wide-int-range.h: ...here.
4132 2018-08-03  Tom de Vries  <tdevries@suse.de>
4134         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
4135         UI_NONE.
4136         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
4137         * except.c (output_function_exception_table): Do early exit if
4138         targetm_common.except_unwind_info (&global_options) == UI_NONE.
4140 2018-08-03  Martin Liska  <mliska@suse.cz>
4142         * predict.c (dump_prediction): Change to 2 digits
4143         in fraction part.
4145 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4147         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
4148         neon_dup_q to...
4149         (falkor_am_1_gtov_gtov): ... a new insn reservation.
4151 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
4153         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
4154         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
4155         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
4156         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
4157         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
4159 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
4161         * diagnostic-show-locus.c (diagnostic_show_locus): Use
4162         pp_take_prefix when saving the existing prefix.
4163         * diagnostic.c (diagnostic_append_note): Likewise.
4164         * langhooks.c (lhd_print_error_function): Likewise.
4165         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
4166         param's type.  Free the existing prefix.
4167         (pp_take_prefix): New function.
4168         (pretty_printer::pretty_printer): Drop the prefix parameter.
4169         Rename the length parameter to match the comment.
4170         (pretty_printer::~pretty_printer): Free the prefix.
4171         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
4172         parameter.
4173         (struct pretty_printer): Drop the "const" from "prefix" field's
4174         type and clarify memory management.
4175         (pp_set_prefix): Drop the "const" from the 2nd param.
4176         (pp_take_prefix): New decl.
4178 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4180         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
4181         for word_mode_ok here instead of passing as argument.
4182         (expand_block_compare): Change select_block_compare_mode() call.
4183         (expand_strncmp_gpr_sequence): New function.
4184         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
4186 2018-08-02  Jeff Law  <law@redhat.com>
4188         PR target/86790
4189         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4190         Define to speculation_safe_value_not_needed.
4192         PR target/86784
4193         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4194         Define to speculation_safe_value_not_needed.
4196 2018-08-02  Tom de Vries  <tdevries@suse.de>
4198         PR target/86660
4199         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
4200         function.  Return UI_TARGET unconditionally.
4201         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
4202         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
4204 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4206         * genemit.c (print_overload_test): Fix typo.
4208 2018-08-02  Richard Biener  <rguenther@suse.de>
4210         PR tree-optimization/86816
4211         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
4212         which checks for value availability before querying it.
4213         (gvn_uses_equal): Use it.
4214         (same_succ_hash): Likewise.
4215         (gimple_equal_p): Likewise.
4217 2018-08-02  Nick Clifton  <nickc@redhat.com>
4219         PR target/86813
4220         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4221         Define to speculation_safe_value_not_needed.
4223         PR target/86810
4224         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4225         Define to speculation_safe_value_not_needed.
4227         PR target/86810
4228         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4229         Define to speculation_safe_value_not_needed.
4231         PR target/86803
4232         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4233         Define to speculation_safe_value_not_needed.
4235         PR target/86797
4236         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4237         Define to speculation_safe_value_not_needed.
4239         PR target/86791
4240         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4241         Define to speculation_safe_value_not_needed.
4243         PR target/86789
4244         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4245         Define to speculation_safe_value_not_needed.
4247         PR target/86787
4248         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4249         Define to speculation_safe_value_not_needed.
4251         PR target/86782
4252         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4253         speculation_safe_value_not_needed.
4255         PR target/86781
4256         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
4257         to speculation_safe_value_not_needed.
4259 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4261         * doc/md.texi: Expand the documentation of instruction names
4262         to mention port-local uses.  Document '@' in pattern names.
4263         * read-md.h (overloaded_instance, overloaded_name): New structs.
4264         (mapping): Declare.
4265         (md_reader::handle_overloaded_name): New member function.
4266         (md_reader::get_overloads): Likewise.
4267         (md_reader::m_first_overload): New member variable.
4268         (md_reader::m_next_overload_ptr): Likewise.
4269         (md_reader::m_overloads_htab): Likewise.
4270         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
4271         m_next_overload_ptr and m_overloads_htab.
4272         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
4273         (get_mode_token, get_code_token, get_int_token): New functions.
4274         (map_attr_string): Add an optional argument that passes back
4275         the associated iterator.
4276         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
4277         (md_reader::handle_overloaded_name, add_overload_instance): New
4278         functions.
4279         (apply_iterators): Handle '@' names.  Report an error if '@'
4280         is used without iterators.
4281         (initialize_iterators): Initialize the new iterator_group fields.
4282         * genopinit.c (handle_overloaded_code_for)
4283         (handle_overloaded_gen): New functions.
4284         (main): Use them to print declarations of maybe_code_for_* and
4285         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
4286         * genemit.c (print_overload_arguments, print_overload_test)
4287         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
4288         (main): Use it to print definitions of maybe_code_for_* and
4289         maybe_gen_* functions.
4290         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
4291         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
4292         instead of explicit mode checks.
4293         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
4294         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
4295         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
4296         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
4297         (aarch64_expand_compare_and_swap): Likewise
4298         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
4299         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
4300         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
4301         (aarch64_constant_pool_reload_icode): Delete.
4302         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
4303         instead of aarch64_constant_pool_reload_icode.  Use
4304         code_for_aarch64_reload_mov instead of explicit mode checks.
4305         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
4306         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
4307         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
4308         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
4309         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
4310         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
4311         (aarch64_atomic_load_op_code): Delete.
4312         (aarch64_emit_atomic_load_op): Likewise.
4313         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
4314         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
4315         instead of aarch64_emit_atomic_load_op.
4316         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
4317         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
4318         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
4319         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
4320         character before the pattern name.
4321         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4322         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
4323         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
4324         (aarch64_frecps<mode>): Likewise.
4325         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
4326         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
4327         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
4328         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
4329         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
4331 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4333         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4334         Allow HFmode constants if TARGET_FP_F16INST.
4336 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
4338         PR target/86014
4339         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
4340         No longer check last store for clobber of address register.
4342 2018-08-02  Martin Liska  <mliska@suse.cz>
4344         PR gcov-profile/86817
4345         * gcov.c (process_all_functions): New function.
4346         (main): Call it.
4347         (process_file): Move functions processing to
4348         process_all_functions.
4350 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
4352         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
4353         "const" to the "gimple *" and "rtx_insn *" parameters.
4354         * dumpfile.h (dump_user_location_t::dump_user_location_t):
4355         Likewise.
4356         (dump_location_t::dump_location_t): Likewise.
4358 2018-08-01  Martin Sebor  <msebor@redhat.com>
4360         PR tree-optimization/86650
4361         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
4362         rather than a "gcall *".  Directly pass the data of interest
4363         to percent_K_format, rather than building a temporary CALL_EXPR
4364         to hold it.
4365         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
4366         (gimple_fold_builtin_strncat): Adjust.
4367         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
4368         gcall* argument with gimple*.
4369         * gimple-ssa-warn-restrict.c (check_call): Same.
4370         (wrestrict_dom_walker::before_dom_children): Same.
4371         (builtin_access::builtin_access): Same.
4372         (check_bounds_or_overlap): Same
4373         (maybe_diag_overlap): Same.
4374         (maybe_diag_offset_bounds): Same.
4375         * tree-diagnostic.c (default_tree_printer): Move usage of
4376         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
4377         to this callsite.
4378         * tree-pretty-print.c (percent_K_format): Add argument.
4379         * tree-pretty-print.h: Add argument.
4380         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
4381         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
4382         (maybe_diag_stxncpy_trunc): Same.
4383         (handle_builtin_stxncpy): Same.
4384         (handle_builtin_strcat): Same.
4386 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4388         * match.pd: Optimise pointer range checks.
4390 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4392         PR tree-optimization/86758
4393         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
4394         to remove pattern statements.
4396 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4398         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
4399         result of dfs_enumerate_from when constructing stmt_vec_infos,
4400         instead of additionally calling get_loop_body.
4402 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4404         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
4405         parameter.
4406         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
4407         When creating an iv, assert that the step is not known to be zero.
4408         (vect_setup_realignment): Update call accordingly.
4409         * tree-vect-stmts.c (vectorizable_store): Likewise.
4410         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
4412 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4414         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
4415         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
4416         (vectorizable_reduction): Likewise.
4417         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4418         (vect_detect_hybrid_slp_stmts): Likewise.
4419         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4421 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
4423         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
4424         (wide_int_set_zero_nonzero_bits): ...this.
4425         (zero_nonzero_bits_from_vr): Rename to...
4426         (vrp_set_zero_nonzero_bits): ...this.
4427         (extract_range_from_multiplicative_op_1): Abstract wide int
4428         code...
4429         (wide_int_range_multiplicative_op): ...here.
4430         (extract_range_from_binary_expr_1): Extract wide int binary
4431         operations into their own functions.
4432         (wide_int_range_lshift): New.
4433         (wide_int_range_can_optimize_bit_op): New.
4434         (wide_int_range_shift_undefined_p): New.
4435         (wide_int_range_bit_xor): New.
4436         (wide_int_range_bit_ior): New.
4437         (wide_int_range_bit_and): New.
4438         (wide_int_range_trunc_mod): New.
4439         (extract_range_into_wide_ints): New.
4440         (vrp_shift_undefined_p): New.
4441         (extract_range_from_multiplicative_op): New.
4442         (vrp_can_optimize_bit_op): New.
4443         * tree-vrp.h (value_range::dump): New.
4444         (wide_int_range_multiplicative_op): New.
4445         (wide_int_range_lshift):New.
4446         (wide_int_range_shift_undefined_p): New.
4447         (wide_int_range_bit_xor): New.
4448         (wide_int_range_bit_ior): New.
4449         (wide_int_range_bit_and): New.
4450         (wide_int_range_trunc_mod): New.
4451         (zero_nonzero_bits_from_bounds): Rename to...
4452         (wide_int_set_zero_nonzero_bits): ...this.
4453         (zero_nonzero_bits_from_vr): Rename to...
4454         (vrp_set_zero_nonzero_bits): ...this.
4455         (range_easy_mask_min_max): Rename to...
4456         (wide_int_range_can_optimize_bit_op): this.
4457         * vr-values.c (simplify_bit_ops_using_ranges): Rename
4458         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4460 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4462         * tree-vectorizer.h (vect_orig_stmt): New function.
4463         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4464         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4465         (vect_create_epilog_for_reduction): Likewise.
4466         (vectorizable_live_operation): Likewise.
4467         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4468         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4469         * tree-vect-stmts.c (vectorizable_call): Likewise.
4470         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4472 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4474         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4475         argument.
4476         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4477         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4478         (vect_transform_loop): Likewise.
4479         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4481 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4483         * tree-vectorizer.h (vect_schedule_slp): Return void.
4484         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4485         (vect_schedule_slp): Likewise.
4487 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4489         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4490         argument.
4491         (vect_transform_loop): Update calls accordingly.  Schedule SLP
4492         instances before the main loop, if any exist.
4494 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4496         PR tree-optimization/86749
4497         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4498         If the lhs is used in a COND_EXPR, check that it is being used
4499         as the "then" or "else" value.
4501 2018-08-01  Tom de Vries  <tdevries@suse.de>
4503         PR target/86800
4504         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4505         speculation_safe_value_not_needed.
4507 2018-08-01  Richard Biener  <rguenther@suse.de>
4509         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4510         as base and offset.
4512 2018-08-01  Martin Liska  <mliska@suse.cz>
4514         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4515         format how successful transformation is dumped.
4516         (gimple_mod_pow2_value_transform): Likewise.
4517         (gimple_mod_subtract_transform): Likewise.
4518         (gimple_stringops_transform): Likewise.
4520 2018-08-01  Martin Liska  <mliska@suse.cz>
4522         PR value-prof/35543
4523         * value-prof.c (interesting_stringop_to_profile_p):
4524         Simplify the code and add BUILT_IN_MEMMOVE.
4525         (gimple_stringops_transform): Likewise.
4527 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
4529         * config/aarch64/aarch64-simd.md
4530         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4531         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4532         use GPI iterator instead of SI mode.
4534 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
4536         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4537         rs6000_speculation_barrier.
4538         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4539         new barrier pattern name.
4541 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
4543         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4544         (speculation_barrier): New insn.
4546 2018-08-01  Richard Biener  <rguenther@suse.de>
4548         PR bootstrap/86724
4549         * graphite.h: Include isl/id.h and isl/space.h to allow build
4550         with ISL 0.20.
4552 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
4554         PR target/86651
4555         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4556         mode for COFF targets.
4557         * defaults.h (TARGET_COFF): Define.
4558         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4559         TARGET_COFF): Define.
4560         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4561         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4562         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4564 2018-07-31  Alexandre Oliva <oliva@adacore.com>
4566         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4567         * gimple-streamer-out.c (output_bb): Save it.
4568         * lto-streamer-in.c (input_struct_function_base): Restore
4569         instance discriminator if available.  Create map on demand.
4570         * lto-streamer-out.c (output_struct_function_base): Save it if
4571         available.
4572         * final.c (decl_to_instance_map): Document LTO strategy.
4574 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
4575             Olivier Hainque  <hainque@adacore.com>
4577         * debug.h (decl_to_instance_map_t): New type.
4578         (decl_to_instance_map): Declare.
4579         (maybe_create_decl_to_instance_map): New inline function.
4580         * final.c (bb_discriminator, last_bb_discriminator): New statics,
4581         to track basic block discriminators.
4582         (final_start_function_1): Initialize them.
4583         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4584         bb_discriminator.
4585         (decl_to_instance_map): New variable.
4586         (map_decl_to_instance, maybe_set_discriminator): New functions.
4587         (notice_source_line): Set discriminator.
4589 2018-07-31  Ian Lance Taylor  <iant@golang.org>
4591         * targhooks.c (default_have_speculation_safe_value): Add
4592         ATTRIBUTE_UNUSED.
4594 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
4596         * dump-context.h: Include "pretty-print.h".
4597         (dump_context::refresh_dumps_are_enabled): New decl.
4598         (dump_context::emit_item): New decl.
4599         (class dump_context): Add fields "m_test_pp" and
4600         "m_test_pp_flags".
4601         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4602         (temp_dump_context::get_dumped_text): New decl.
4603         (class temp_dump_context): Add field "m_pp".
4604         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4605         (dump_context::refresh_dumps_are_enabled): ...and add a test for
4606         m_test_pp.
4607         (set_dump_file): Update for above change.
4608         (set_alt_dump_file): Likewise.
4609         (dump_loc): New overload, taking a pretty_printer *.
4610         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
4611         to any test pretty-printer.
4612         (make_item_for_dump_gimple_stmt): New function, adapted from
4613         optinfo::add_gimple_stmt.
4614         (dump_context::dump_gimple_stmt): Call it, and use the result,
4615         eliminating the direct usage of dump_file and alt_dump_file in
4616         favor of indirectly using them via emit_item.
4617         (make_item_for_dump_gimple_expr): New function, adapted from
4618         optinfo::add_gimple_expr.
4619         (dump_context::dump_gimple_expr): Call it, and use the result,
4620         eliminating the direct usage of dump_file and alt_dump_file in
4621         favor of indirectly using them via emit_item.
4622         (make_item_for_dump_generic_expr): New function, adapted from
4623         optinfo::add_tree.
4624         (dump_context::dump_generic_expr): Call it, and use the result,
4625         eliminating the direct usage of dump_file and alt_dump_file in
4626         favor of indirectly using them via emit_item.
4627         (make_item_for_dump_printf_va): New function, adapted from
4628         optinfo::add_printf_va.
4629         (make_item_for_dump_printf): New function.
4630         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4631         and use the result, eliminating the direct usage of dump_file and
4632         alt_dump_file in favor of indirectly using them via emit_item.
4633         (make_item_for_dump_dec): New function.
4634         (dump_context::dump_dec): Call it, and use the result,
4635         eliminating the direct usage of dump_file and alt_dump_file in
4636         favor of indirectly using them via emit_item.
4637         (make_item_for_dump_symtab_node): New function, adapted from
4638         optinfo::add_symtab_node.
4639         (dump_context::dump_symtab_node): Call it, and use the result,
4640         eliminating the direct usage of dump_file and alt_dump_file in
4641         favor of indirectly using them via emit_item.
4642         (dump_context::begin_scope): Reimplement, avoiding direct usage
4643         of dump_file and alt_dump_file in favor of indirectly using them
4644         via emit_item.
4645         (dump_context::emit_item): New member function.
4646         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4647         Set up test pretty-printer on the underlying context.  Call
4648         refresh_dumps_are_enabled.
4649         (temp_dump_context::~temp_dump_context): Call
4650         refresh_dumps_are_enabled.
4651         (temp_dump_context::get_dumped_text): New member function.
4652         (selftest::verify_dumped_text): New function.
4653         (ASSERT_DUMPED_TEXT_EQ): New macro.
4654         (selftest::test_capture_of_dump_calls): Run all tests twice, with
4655         and then without optinfo enabled.  Add uses of
4656         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
4657         * dumpfile.h: Update comment for the dump_* API.
4658         * optinfo-emit-json.cc
4659         (selftest::test_building_json_from_dump_calls): Update for new
4660         param for temp_dump_context ctor.
4661         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4662         and "m_owned" field.
4663         (optinfo_item::~optinfo_item): Likewise.
4664         (optinfo::add_item): New member function.
4665         (optinfo::emit): Update comment.
4666         (optinfo::add_string): Delete.
4667         (optinfo::add_printf): Delete.
4668         (optinfo::add_printf_va): Delete.
4669         (optinfo::add_gimple_stmt): Delete.
4670         (optinfo::add_gimple_expr): Delete.
4671         (optinfo::add_tree): Delete.
4672         (optinfo::add_symtab_node): Delete.
4673         (optinfo::add_dec): Delete.
4674         * optinfo.h (class dump_context): New forward decl.
4675         (optinfo::add_item): New decl.
4676         (optinfo::add_string): Delete.
4677         (optinfo::add_printf): Delete.
4678         (optinfo::add_printf_va): Delete.
4679         (optinfo::add_gimple_stmt): Delete.
4680         (optinfo::add_gimple_expr): Delete.
4681         (optinfo::add_tree): Delete.
4682         (optinfo::add_symtab_node): Delete.
4683         (optinfo::add_dec): Delete.
4684         (optinfo::add_poly_int): Delete.
4685         (optinfo_item::optinfo_item): Remove "owned" param.
4686         (class optinfo_item): Remove field "m_owned".
4688 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4690         PR middle-end/86705
4691         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4692         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4693         requested variable alignment.
4694         (expand_one_ssa_partition): Likewise.
4695         (expand_one_var): Likewise.
4697 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4699         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4700         to speculation_safe_value_not_needed.
4702 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4704         * targhooks.h (speculation_safe_value_not_needed): New prototype.
4705         * targhooks.c (speculation_safe_value_not_needed): New function.
4706         * target.def (have_speculation_safe_value): Update documentation.
4707         * doc/tm.texi: Regenerated.
4709 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4711         * config/aarch64/iterators.md (ALLI_TI): New iterator.
4712         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4713         expand.
4714         (despeculate_copy<ALLI:mode>_insn): New insn.
4715         (despeculate_copyti_insn): New insn.
4716         (despeculate_simple<ALLI:mode>): New insn
4717         (despeculate_simpleti): New insn.
4718         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4719         function.
4720         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4721         aarch64_speculation_safe_value.
4722         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4724 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4726         * config/aarch64/aarch64-speculation.cc: New file.
4727         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4728         before pass_reorder_blocks.
4729         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4730         prototype.
4731         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4732         X14 and X15 when tracking speculation.
4733         * config/aarch64/aarch64.md (register name constants): Add
4734         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4735         (unspec): Add UNSPEC_SPECULATION_TRACKER.
4736         (speculation_barrier): New insn attribute.
4737         (cmp<mode>): Allow SP in comparisons.
4738         (speculation_tracker): New insn.
4739         (speculation_barrier): Add speculation_barrier attribute.
4740         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4741         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4742         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4744 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4746         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4747         aarch64_track_speculation is true.
4748         (tb<optab><mode>1): Likewise.
4749         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4750         generate CB[N]Z when tracking speculation.
4751         (aarch64_split_compare_and_swap): Likewise.
4752         (aarch64_split_atomic_op): Likewise.
4754 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4756         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4758 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4760         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4761         (speculation_barrier): New insn.
4763 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4765         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4766         * config/arm/arm.md (speculation_barrier): New expand.
4767         (speculation_barrier_insn): New pattern.
4769 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4771         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4772         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4773         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4774         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4775         list.
4776         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4777         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4778         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4779         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4780         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4781         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4782         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4783         * builtins.c (expand_speculation_safe_value): New function.
4784         (expand_builtin): Call it.
4785         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4786         * doc/extend.texi: Document __builtin_speculation_safe_value.
4787         * doc/md.texi: Document "speculation_barrier" pattern.
4788         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4789         TARGET_HAVE_SPECULATION_SAFE_VALUE.
4790         * doc/tm.texi: Regenerated.
4791         * target.def (have_speculation_safe_value, speculation_safe_value): New
4792         hooks.
4793         * targhooks.c (default_have_speculation_safe_value): New function.
4794         (default_speculation_safe_value): New function.
4795         * targhooks.h (default_have_speculation_safe_value): Add prototype.
4796         (default_speculation_safe_value): Add prototype.
4798 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
4800         * dump-context.h (dump_context::dump_loc): New decl.
4801         * dumpfile.c (dump_context::dump_loc): New member function.
4802         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4803         and dump_gimple_stmt.
4804         (dump_context::dump_gimple_expr_loc): Likewise, using
4805         dump_gimple_expr.
4806         (dump_context::dump_generic_expr_loc): Likewise, using
4807         dump_generic_expr.
4808         (dump_context::dump_printf_loc_va): Likewise, using
4809         dump_printf_va.
4810         (dump_context::begin_scope): Explicitly using the global function
4811         "dump_loc", rather than the member function.
4813 2018-07-31  Martin Sebor  <msebor@redhat.com>
4815         PR tree-optimization/86741
4816         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4818 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
4820         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4821         depend on whether prefetch instructions will be emitted or not.
4822         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4823         will be emitted or not.
4824         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4825         (TARGET_SETMEM_PFD): New macros.
4827 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4829         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4830         (NULL_STMT_VEC_INFO): Delete.
4831         (stmt_vec_info::operator*): Likewise.
4832         (stmt_vec_info::operator gimple *): Likewise.
4833         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4834         of NULL_STMT_VEC_INFO.
4835         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4836         (vect_reassociating_reduction_p): Likewise.
4837         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4838         (vectorizable_store): Likewise.
4839         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4840         (vec_info::free_stmt_vec_infos): Likewise.
4842 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4844         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4845         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4847 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4849         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4850         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4851         (vec_info::free_stmt_vec_info): New private member functions.
4852         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4853         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4854         * tree-parloops.c (gather_scalar_reductions): Remove calls to
4855         set_stmt_vec_info_vec and free_stmt_vec_infos.
4856         * tree-vect-loop.c (_loop_vec_info): Remove call to
4857         set_stmt_vec_info_vec.
4858         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4859         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4860         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4861         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4862         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
4863         assignments in {vec_info::,}new_stmt_vec_info that are redundant
4864         with the clearing in the xcalloc.
4865         (stmt_vec_info_vec): Delete.
4866         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4867         (vectorize_loops): Likewise.
4868         (vec_info::~vec_info): Remove argument from call to
4869         free_stmt_vec_infos.
4870         (vec_info::add_stmt): Remove vinfo argument from call to
4871         new_stmt_vec_info.
4873 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4875         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4876         rather than a gimple stmt.
4877         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
4878         information for pattern statements when passed the original
4879         statement; instead wait to be passed the pattern statement itself.
4880         Don't call set_vinfo_for_stmt here.
4881         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4882         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4883         stmt_vec_infos here.
4884         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4885         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4886         stmt_vec_infos entry.
4888 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4890         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4891         * tree-vectorizer.c (vec_info::replace_stmt): New function.
4892         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4893         * tree-vect-stmts.c (vectorizable_call): Likewise.
4894         (vectorizable_simd_clone_call): Likewise.
4896 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4898         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4899         * tree-vectorizer.c (vec_info::remove_stmt): New function.
4900         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4901         * tree-vect-loop.c (vect_transform_loop): Likewise.
4902         * tree-vect-slp.c (vect_schedule_slp): Likewise.
4903         * tree-vect-stmts.c (vect_remove_stores): Likewise.
4905 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4907         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4908         (vect_dr_stmt): Delete.
4909         * tree-vectorizer.c (vec_info::lookup_dr): New function.
4910         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4911         of DR_VECT_AUX.
4912         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4913         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4914         (vect_verify_datarefs_alignment, vect_peeling_supportable)
4915         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4916         (vect_analyze_data_refs): Likewise.
4917         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
4918         argument.
4919         (vect_find_same_alignment_drs): Likewise.
4920         (vect_slp_analyze_node_dependences): Update calls accordingly.
4921         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
4922         instead of DR_VECT_AUX.
4923         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4924         of a vector data references.  Use vec_info::lookup_dr instead of
4925         DR_VECT_AUX.
4926         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4927         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
4928         instead of DR_VECT_AUX.
4930 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4932         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4933         dr_vec_info.
4934         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4935         accordingly.
4936         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4937         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4938         (vect_gen_prolog_loop_niters): Likewise.
4940 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4942         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4943         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4944         (vect_known_alignment_in_bytes, vect_dr_behavior)
4945         (vect_get_scalar_dr_size): Take references as dr_vec_infos
4946         instead of data_references.  Update calls to other routines for
4947         which the same change has been made.
4948         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4949         dr_vec_infos instead of stmt_vec_infos.
4950         (vect_analyze_data_ref_dependence): Update call accordingly.
4951         (vect_slp_analyze_data_ref_dependence)
4952         (vect_record_base_alignments): Use DR_VECT_AUX.
4953         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4954         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4955         (vector_alignment_reachable_p, vect_get_data_access_cost)
4956         (vect_peeling_supportable, vect_analyze_group_access_1)
4957         (vect_analyze_group_access, vect_analyze_data_ref_access)
4958         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4959         (vect_compile_time_alias, vect_small_gap_p)
4960         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4961         (vect_supportable_dr_alignment): Take references as dr_vec_infos
4962         instead of data_references.  Update calls to other routines for
4963         which the same change has been made.
4964         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4965         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4966         (vect_slp_analyze_and_verify_node_alignment)
4967         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4968         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4969         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
4970         above changes.
4971         (_vect_peel_info::dr): Replace with...
4972         (_vect_peel_info::dr_info): ...this new field.
4973         (vect_peeling_hash_get_most_frequent)
4974         (vect_peeling_hash_choose_best_peeling): Update accordingly.
4975         (vect_peeling_hash_get_lowest_cost):
4976         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
4977         routines for which the same change has been made.
4978         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
4979         data_reference.
4980         * tree-vect-loop-manip.c (get_misalign_in_elems)
4981         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
4982         above changes.
4983         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4984         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4985         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4986         (get_group_load_store_type, get_negative_load_store_type)
4987         (vect_get_data_ptr_increment, vectorizable_store)
4988         (vectorizable_load): Likewise.
4989         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4990         Update calls to other routines for which the same change has been made.
4992 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4994         * tree-vectorizer.h (vec_info::move_dr): New member function.
4995         (dataref_aux): Rename to...
4996         (dr_vec_info): ...this and add "dr" and "stmt" fields.
4997         (_stmt_vec_info::dr_aux): Update accordingly.
4998         (_stmt_vec_info::data_ref_info): Delete.
4999         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
5000         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
5001         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
5002         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
5003         of data_ref.
5004         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
5005         (STMT_VINFO_DR_INFO): New macro.
5006         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
5007         (set_dr_misalignment): Update after rename of dataref_aux.
5008         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
5009         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
5010         initialization of STMT_VINFO_DATA_REF.
5011         * tree-vectorizer.c (vec_info::move_dr): New function.
5012         * tree-vect-patterns.c (vect_recog_bool_pattern)
5013         (vect_recog_mask_conversion_pattern)
5014         (vect_recog_gather_scatter_pattern): Use it.
5015         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
5016         the "dr" and "stmt" fields of dr_vec_info instead of
5017         STMT_VINFO_DATA_REF.
5019 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5021         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
5022         (is_pattern_stmt_p): Use it.
5023         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
5024         on pattern statements.
5026 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5028         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
5029         original stmt as a stmt_vec_info rather than a gimple stmt.
5030         (vect_pattern_recog_1): Take the statement directly as a
5031         stmt_vec_info, rather than via a gimple_stmt_iterator.
5032         Update call to vect_mark_pattern_stmts.
5033         (vect_pattern_recog): Update calls accordingly.
5035 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5037         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
5038         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
5039         a vect_def_type for the first argument.
5040         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
5041         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
5042         operand if it isn't defined by a vectorized statement.
5043         (vect_build_gather_load_calls): Remove the mask_dt argument and
5044         update calls to vect_get_vec_def_for_stmt_copy.
5045         (vectorizable_bswap): Likewise the dt argument.
5046         (vectorizable_call): Update calls to vectorizable_bswap and
5047         vect_get_vec_def_for_stmt_copy.
5048         (vectorizable_simd_clone_call, vectorizable_assignment)
5049         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
5050         (vectorizable_comparison): Update calls to
5051         vect_get_vec_def_for_stmt_copy.
5052         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
5053         vect_is_simple_use.
5054         (vect_get_loop_based_defs): Remove dt argument and update call
5055         to vect_get_vec_def_for_stmt_copy.
5056         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
5057         and vect_get_vec_def_for_stmt_copy.
5058         (vectorizable_load): Update calls to vect_build_gather_load_calls
5059         and vect_get_vec_def_for_stmt_copy.
5060         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5061         (vectorizable_reduction, vectorizable_live_operation): Update calls
5062         to vect_get_vec_def_for_stmt_copy.
5064 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5066         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
5067         and gimple stmt arguments with a stmt_vec_info.
5068         (vect_record_base_alignments): Update calls accordingly.
5069         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
5070         and gimple stmt arguments with a stmt_vec_info.
5071         (vect_build_slp_tree_1): Remove vinfo argument and update call
5072         to vect_record_max_nunits.
5073         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
5074         and vect_record_max_nunits.
5076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5078         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
5079         file and take a stmt_vec_info instead of a gimple stmt.
5080         (supportable_widening_operation, vect_finish_replace_stmt)
5081         (vect_finish_stmt_generation, vect_get_store_rhs)
5082         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
5083         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
5084         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
5085         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
5086         (vect_create_data_ref_ptr, bump_vector_ptr)
5087         (vect_permute_store_chain, vect_setup_realignment)
5088         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
5089         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
5090         (vectorizable_reduction, vectorizable_induction)
5091         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
5092         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
5093         than gimple stmts as arguments.
5094         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
5095         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
5096         (can_group_stmts_p, vect_check_gather_scatter)
5097         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5098         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
5099         (vect_permute_load_chain, vect_shift_permute_load_chain)
5100         (vect_transform_grouped_load)
5101         (vect_record_grouped_load_vectors): Likewise.
5102         * tree-vect-loop.c (vect_fixup_reduc_chain)
5103         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
5104         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
5105         (vectorizable_reduction, vectorizable_induction)
5106         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
5107         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
5108         (vect_get_load_store_mask): Likewise.
5109         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
5110         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
5111         * tree-vect-stmts.c (vect_mark_relevant)
5112         (is_simple_and_all_uses_invariant)
5113         (exist_non_indexing_operands_for_use_p, process_use)
5114         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
5115         (vect_get_vec_def_for_operand, vect_get_vec_defs)
5116         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
5117         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
5118         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
5119         (get_negative_load_store_type, get_load_store_type)
5120         (vect_check_load_store_mask, vect_check_store_rhs)
5121         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
5122         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5123         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5124         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5125         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
5126         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
5127         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
5128         (supportable_widening_operation): Likewise.
5130 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5132         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
5133         a stmt_vec_info instead of a gcall.
5134         (vect_check_gather_scatter): Update call accordingly.
5135         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
5136         of a gphi.
5137         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
5138         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
5139         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
5140         instead of a gimple stmt.
5141         (vect_transform_loop): Update calls accordingly.
5142         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
5143         stmt_vec_infos instead of gimple stmts.
5144         (vect_analyze_slp_instance): Update use accordingly.
5145         * tree-vect-stmts.c (read_vector_array, write_vector_array)
5146         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
5147         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
5148         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
5149         (vect_gen_widened_results_half, vect_get_loop_based_defs)
5150         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
5151         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
5152         down to subroutines.
5154 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5156         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
5157         of the worklist from a vector of gimple stmts to a vector of
5158         stmt_vec_infos.
5159         * tree-vect-stmts.c (vect_mark_relevant, process_use)
5160         (vect_mark_stmts_to_be_vectorized): Likewise
5162 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5164         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
5165         statement before passing it to vect_analyze_stmt.
5166         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
5167         the chain of phi vector definitions.  Track the exit phi via its
5168         stmt_vec_info.
5169         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
5170         STMT_VINFO_REDUC_DEF.
5171         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
5172         stmt_vec_infos to handle the statement chains.
5173         (vect_get_slp_defs): Record the first statement in the node
5174         using a stmt_vec_info.
5175         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
5176         statements here and pass their stmt_vec_info down to subroutines.
5177         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
5178         down to vect_finish_stmt_generation.
5179         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
5180         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
5181         stmt_vec_infos to subroutines.
5182         (vect_remove_stores): Use stmt_vec_infos to handle the statement
5183         chains.
5185 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5187         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
5188         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
5189         (vect_permute_store_chain, vect_setup_realignment)
5190         (vect_permute_load_chain, vect_shift_permute_load_chain)
5191         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
5192         stmts internally, and when passing values to other vectorizer routines.
5193         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5194         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
5195         (vect_analyze_loop_operations, get_initial_def_for_reduction)
5196         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
5197         (vectorizable_reduction, vectorizable_induction)
5198         (vectorizable_live_operation, vect_transform_loop_stmt)
5199         (vect_transform_loop): Likewise.
5200         * tree-vect-patterns.c (vect_reassociating_reduction_p)
5201         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
5202         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
5203         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5204         (vect_slp_analyze_node_operations_1): Likewise.
5205         * tree-vect-stmts.c (vect_mark_relevant, process_use)
5206         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
5207         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
5208         (vect_finish_stmt_generation_1, get_group_load_store_type)
5209         (get_load_store_type, vect_build_gather_load_calls)
5210         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5211         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5212         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5213         (vectorizable_store, vectorizable_load, vectorizable_condition)
5214         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
5215         (supportable_widening_operation): Likewise.
5216         (vect_get_vector_types_for_stmt): Likewise.
5217         * tree-vectorizer.h (vect_dr_behavior): Likewise.
5219 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5221         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5222         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
5223         (vect_permute_store_chain, vect_permute_load_chain)
5224         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
5225         repeated stmt_vec_info lookups.
5226         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5227         (vect_update_ivs_after_vectorizer): Likewise.
5228         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
5229         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5230         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
5231         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5232         (vect_bb_slp_scalar_cost): Likewise.
5233         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
5235 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5237         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
5238         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5239         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
5240         to get gassigns and gcalls, rather than operating on generc gimple
5241         stmts.
5242         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
5243         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
5244         (vectorizable_load, vect_analyze_stmt): Likewise.
5245         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
5247 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5249         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
5250         return stmt_vec_infos rather than gimple stmts.  Do not accept
5251         null arguments.
5252         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
5253         of a gimple stmt.
5254         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5255         Update use of get_later_stmt.
5256         (vect_get_constant_vectors): Update call accordingly.
5257         (vect_schedule_slp_instance): Likewise
5258         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
5259         (vect_slp_analyze_instance_dependence): Likewise.
5260         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
5262 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5264         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
5265         (stmt_info_for_cost::stmt_info): ...this new field.
5266         (add_stmt_costs): Update accordingly.
5267         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5268         (vect_get_known_peeling_cost): Likewise.
5269         (vect_estimate_min_profitable_iters): Likewise.
5270         * tree-vect-stmts.c (record_stmt_cost): Likewise.
5272 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5274         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
5275         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5276         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5277         accordingly.
5278         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
5280 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5282         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
5283         a gimple stmt to a stmt_vec_info.
5284         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5286 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5288         * tree-vectorizer.h (vec_info::grouped_stores): Change from
5289         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5290         (_loop_vec_info::reduction_chains): Likewise.
5291         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
5292         accordingly.
5293         * tree-vect-slp.c (vect_analyze_slp): Likewise.
5295 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5297         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
5298         a gimple stmt to a stmt_vec_info.
5299         (_stmt_vec_info::next_element): Likewise.
5300         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
5301         (vect_slp_analyze_and_verify_node_alignment)
5302         (vect_analyze_group_access_1, vect_analyze_group_access)
5303         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
5304         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
5305         (vect_supportable_dr_alignment): Update accordingly.
5306         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
5307         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
5308         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
5309         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5310         * tree-vect-slp.c (vect_build_slp_tree_1)
5311         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
5312         (vect_split_slp_store_group, vect_analyze_slp_instance)
5313         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
5314         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
5315         (get_group_load_store_type, get_load_store_type)
5316         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
5317         (vect_transform_stmt, vect_remove_stores): Likewise.
5319 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5321         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
5322         than a gimple stmt.
5323         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5324         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
5325         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
5326         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
5327         (vector_alignment_reachable_p, vect_get_data_access_cost)
5328         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
5329         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
5330         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5331         (vect_analyze_group_access_1, vect_analyze_group_access)
5332         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
5333         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
5334         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
5335         result of vect_dr_stmt and use the stmt_vec_info instead of
5336         the associated gimple stmt.
5337         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5338         (vect_gen_prolog_loop_niters): Likewise.
5339         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5341 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5343         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
5344         to a vec<stmt_vec_info>.
5345         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
5346         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
5347         vec<stmt_vec_info>.
5348         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
5349         to a vec<stmt_vec_info>.
5350         (bst_traits::value_type, bst_traits::value_type): Likewise.
5351         (bst_traits::hash): Update accordingly.
5352         (vect_get_and_check_slp_defs): Change the stmts parameter from
5353         a vec<gimple *> to a vec<stmt_vec_info>.
5354         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
5355         (vect_build_slp_tree): Likewise.
5356         (vect_build_slp_tree_2): Likewise.  Update uses of
5357         SLP_TREE_SCALAR_STMTS.
5358         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
5359         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
5360         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
5361         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
5362         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
5363         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
5364         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
5365         (vect_get_constant_vectors, vect_get_slp_defs)
5366         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
5367         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
5368         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
5369         instead of gimple stmts.
5370         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
5371         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
5372         (vect_slp_analyze_instance_dependence): Update uses of
5373         SLP_TREE_SCALAR_STMTS.
5374         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5375         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
5376         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
5377         (get_initial_defs_for_reduction): Likewise.
5378         (vect_create_epilog_for_reduction): Likewise.
5379         (vectorize_fold_left_reduction): Likewise.
5380         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
5381         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
5382         (can_vectorize_live_stmts): Likewise.
5384 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5386         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
5387         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5388         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
5389         than gimple stmts.
5390         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
5391         of a gimple stmt.
5392         (gather_scalar_reductions): Update after above interface changes.
5393         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
5394         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
5395         than gimple stmts.
5396         (vect_force_simple_reduction): Likewise.
5397         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
5398         LOOP_VINFO_REDUCTIONS.
5399         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5401 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5403         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
5404         a gimple stmt to a stmt_vec_info.
5405         * tree-vect-loop.c (vect_active_double_reduction_p)
5406         (vect_force_simple_reduction, vectorizable_reduction): Update
5407         accordingly.
5409 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5411         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
5412         vec<gimple *> to a vec<stmt_vec_info>.
5413         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
5414         the reduction_phis argument from a vec<gimple *> to a
5415         vec<stmt_vec_info>.
5416         (vectorizable_reduction): Likewise the phis local variable that
5417         is passed to vect_create_epilog_for_reduction.  Update for new type
5418         of SLP_TREE_VEC_STMTS.
5419         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
5420         (vectorizable_live_operation): Likewise.
5421         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
5422         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
5424 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5426         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
5427         a gimple stmt to a stmt_vec_info.
5428         (vectorizable_condition, vectorizable_live_operation)
5429         (vectorizable_reduction, vectorizable_induction): Pass back the
5430         vectorized statement as a stmt_vec_info.
5431         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5432         use of STMT_VINFO_VEC_STMT.
5433         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5434         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5435         as stmt_vec_infos rather than gimple stmts.
5436         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5437         to a stmt_vec_info.
5438         (vectorizable_live_operation): Likewise.
5439         (vectorizable_reduction, vectorizable_induction): Likewise,
5440         updating use of STMT_VINFO_VEC_STMT.
5441         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5442         of STMT_VINFO_VEC_STMT.
5443         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5444         (vectorizable_simd_clone_call, vectorizable_conversion)
5445         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5446         (vectorizable_store, vectorizable_load, vectorizable_condition)
5447         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5448         from a gimple stmt to a stmt_vec_info.
5449         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
5450         pointer to a stmt_vec_info to the vectorizable_* routines.
5452 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5454         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5455         a gimple stmt to a stmt_vec_info.
5456         (is_pattern_stmt_p): Update accordingly.
5457         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5458         (vect_record_grouped_load_vectors): Likewise.
5459         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5460         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5461         (vect_model_reduction_cost): Likewise.
5462         (vect_create_epilog_for_reduction): Likewise.
5463         (vectorizable_reduction, vectorizable_induction): Likewise.
5464         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5465         Return the stmt_vec_info for the pattern statement.
5466         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5467         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5468         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5469         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5470         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5471         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5472         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5473         (free_stmt_vec_info, vect_is_simple_use): Likewise.
5475 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5477         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5478         (vect_finish_stmt_generation): Likewise.
5479         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5480         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5481         (vect_build_gather_load_calls): Use the return value of the above
5482         functions instead of a separate call to vinfo_for_stmt.  Use narrow
5483         scopes for the input gimple stmt and wider scopes for the associated
5484         stmt_vec_info.  Use vec_info::lookup_def when setting these
5485         stmt_vec_infos from an SSA_NAME definition.
5486         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5487         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5488         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5489         (vectorizable_store, vectorizable_load, vectorizable_condition)
5490         (vectorizable_comparison): Likewise.
5491         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5492         (vectorizable_reduction): Likewise.
5494 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5496         * tree-vectorizer.h (vect_is_simple_use): Add an optional
5497         stmt_vec_info * parameter before the optional gimple **.
5498         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5499         (process_use, vect_get_vec_def_for_operand_1): Update callers.
5500         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5501         * tree-vect-loop.c (vectorizable_reduction): Likewise.
5502         (vectorizable_live_operation): Likewise.
5503         * tree-vect-patterns.c (type_conversion_p): Likewise.
5504         (vect_look_through_possible_promotion): Likewise.
5505         (vect_recog_rotate_pattern): Likewise.
5506         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5508 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5510         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5511         a typedef to a wrapper class.
5512         (NULL_STMT_VEC_INFO): New macro.
5513         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5514         (stmt_vec_info::operator*): New function.
5515         (stmt_vec_info::operator gimple *): Likewise.
5516         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5517         (add_stmt_costs): Likewise.
5518         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5519         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5520         (vect_get_known_peeling_cost): Likewise.
5521         (vect_estimate_min_profitable_iters): Likewise.
5522         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5523         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5524         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5525         (vectorizable_store, free_stmt_vec_infos): Likewise.
5526         (new_stmt_vec_info): Change return type of xcalloc to
5527         _stmt_vec_info *.
5529 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5531         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5532         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5533         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5534         a single_imm_use-based sequence.
5535         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5537 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5539         * tree-vectorizer.h (vec_info::lookup_def): Declare.
5540         * tree-vectorizer.c (vec_info::lookup_def): New function.
5541         * tree-vect-patterns.c (vect_get_internal_def): Use it.
5542         (vect_widened_op_tree): Likewise.
5543         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5544         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5545         (vectorizable_reduction): Likewise.
5546         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5547         of a gimple *.
5548         (vect_is_slp_reduction): Update calls accordingly.  Use
5549         vec_info::lookup_def.
5550         (vect_is_simple_reduction): Likewise
5551         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5553 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5555         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5556         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5557         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5558         of vinfo_for_stmt.
5559         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5560         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5561         (vect_update_vf_for_slp, vect_analyze_loop_operations)
5562         (vect_is_slp_reduction, vectorizable_induction)
5563         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5564         * tree-vect-patterns.c (vect_init_pattern_stmt):
5565         (vect_determine_min_output_precision_1, vect_determine_precisions)
5566         (vect_pattern_recog): Likewise.
5567         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5568         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5569         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5570         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5571         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5572         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
5573         info field from a loop to a loop_vec_info.
5575 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5577         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5578         (vec_info::add_stmt): Declare.
5579         * tree-vectorizer.c (vec_info::add_stmt): New function.
5580         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5581         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5582         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5583         (vectorizable_induction): Likewise.
5584         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5585         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5586         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5587         (vectorizable_load): Likewise.
5588         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5589         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5590         (vect_recog_gather_scatter_pattern): Likewise.
5591         (append_pattern_def_seq): Likewise.  Remove a check that is
5592         performed by add_stmt itself.
5594 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5596         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5597         which make_ssa_name was called with new_stmt before new_stmt
5598         had been created.
5600 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5602         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5603         split out from...
5604         (vect_is_slp_reduction): ...here...
5605         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
5606         that are already known to be false.
5608 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5610         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5611         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
5612         STMT_VINFO_NUM_SLP_USES when it's true.
5613         (vect_free_slp_instance): Add a final_p parameter and pass it to
5614         vect_free_slp_tree.
5615         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5616         (vect_analyze_slp_instance): Likewise.
5617         (vect_slp_analyze_operations): Likewise.
5618         (vect_slp_analyze_bb_1): Likewise.
5619         * tree-vectorizer.c (vec_info): Likewise.
5620         * tree-vect-loop.c (vect_transform_loop): Likewise.
5622 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5624         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5625         function is not called for second and subsequent members of
5626         a reduction group.
5628 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5630         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5631         cases for nested loops from here to ...
5632         (vect_create_epilog_for_reduction): ...here.  Only call
5633         vect_is_simple_use for inner-loop reductions.
5635 2018-07-31  Martin Liska  <mliska@suse.cz>
5637         PR gcov-profile/85338
5638         PR gcov-profile/85350
5639         PR gcov-profile/85372
5640         * profile.c (struct location_triplet): New.
5641         (struct location_triplet_hash): Likewise.
5642         (output_location): Do not output a BB that
5643         is already recorded for a line.
5644         (branch_prob): Use streamed_locations.
5646 2018-07-31  Martin Liska  <mliska@suse.cz>
5648         PR gcov-profile/85370
5649         * coverage.c (coverage_begin_function): Do not mark target
5650         clones as artificial functions.
5652 2018-07-31  Martin Liska  <mliska@suse.cz>
5654         PR gcov-profile/83813
5655         PR gcov-profile/84758
5656         PR gcov-profile/85217
5657         PR gcov-profile/85332
5658         * profile.c (branch_prob): Do not record GOTO expressions
5659         for GIMPLE statements which locations are already streamed.
5661 2018-07-31  Olivier Hainque  <hainque@adacore.com>
5663         * gcc.c (handle_spec_function): Accept a soft_matched_part
5664         argument, as do_spec_1.  Pass it down to ...
5665         (eval_spec_function): Accept a soft_matched_part argument,
5666         and pass it down to ...
5667         (do_spec_2): Accept a soft_matched_part argument, and pass
5668         it down to do_spec_1.
5669         (do_spec_1): Pass soft_matched_part to handle_spec_function.
5670         (handle_braces): Update call to handle_spec_function.
5671         (driver::set_up_specs): Update calls to do_spec_2.
5672         (compare_debug_dump_opt_spec_function): Likewise.
5673         (compare_debug_self_opt_spec_function): Likewise.
5675 2018-07-31  Olivier Hainque  <hainque@adacore.com>
5677         * common.opt (nolibc): New option.
5678         * doc/invoke.texi (Link Options): Document it.
5679         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5680         * config/alpha/linux.h: Likewise.
5681         * config/arc/elf.h: Likewise.
5682         * config/arm/uclinux-elf.h: Likewise.
5683         * config/arm/unknown-elf.h: Likewise.
5684         * config/avr/avrlibc.h: Likewise.
5685         * config/bfin/bfin.h: Likewise.
5686         * config/bfin/linux.h: Likewise.
5687         * config/bfin/uclinux.h: Likewise.
5688         * config/darwin.h: Likewise.
5689         * config/darwin10.h: Likewise.
5690         * config/darwin12.h: Likewise.
5691         * config/gnu-user.h: Likewise.
5692         * config/lm32/uclinux-elf.h: Likewise.
5693         * config/pa/pa-hpux11.h: Likewise.
5694         * config/pa/pa64-hpux.h: Likewise.
5695         * config/sparc/sparc.h: Likewise.
5697 2018-07-31  Olivier Hainque  <hainque@adacore.com>
5699         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5700         undefined variables.
5702 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
5704         PR target/86640
5705         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5706         instead of GEN_INT.
5708 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5710         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5711         terminated string literal.
5713 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
5715         PR rtl-optimization/85160
5716         * combine.c (is_just_move): New function.
5717         (try_combine): Allow combining two instructions into two if neither of
5718         the original instructions was a move.
5720 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
5722         PR target/86673
5723         * doc/extend.texi (Global Register Variables): Discourage use of type
5724         qualifiers.
5725         (Local Register Variables): Likewise.
5727 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
5729         PR tree-optimization/86506
5730         * hwint.h (ceil_log2): Resync with hwint.c implementation.
5732 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
5734         PR target/86547
5735         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5736         hard_regno, make sure no insn between `from` and `to` clobbers it.
5738 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
5739             Tom de Vries  <tdevries@suse.de>
5741         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5742         (PTX_DEFAULT_RUNTIME_DIM): ... this.
5743         (nvptx_goacc_validate_dims): Set default worker and gang dims to
5744         PTX_DEFAULT_RUNTIME_DIM.
5745         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5747 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
5749         * config/pa/pa.c (pa_output_addr_vec): Align address table.
5750         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5751         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5753 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
5755         * config/rs6000/constraints.md (wG constraint): Delete, no longer
5756         used.
5757         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5758         predicate to reflect toc fusion has been deleted.
5759         (toc_fusion_mem_raw): Delete, no longer used.
5760         (toc_fusion_mem_wrapped): Likewise.
5761         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5762         fusion mask bit.
5763         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5764         Delete, no longer used.
5765         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5766         meant to be used for toc fusion.
5767         (rs6000_debug_print_mode): Delete toc fusion debugging.
5768         (rs6000_debug_reg_global): Likewise.
5769         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5770         fusion and secondary reload support that were never used.
5771         (rs6000_option_override_internal): Delete TOC fusion, that was only
5772         partially defined, and it did not work unless you also used the
5773         -mcmodel= switch.
5774         (rs6000_legitimate_address_p): Delete TOC fusion support.
5775         (rs6000_opt_masks): Likewise.
5776         (fusion_wrap_memory_address): Delete function, no longer used.
5777         (fusion_split_address); Delete TOC fusion support.
5778         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5779         longer used with toc fusion being deleted.
5780         (TARGET_TOC_FUSION_FP): Likewise.
5781         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5782         UNSPEC.
5783         (toc fusion spliter): Delete TOC fusion support.
5784         (toc_fusionload_<mode>): Likewise.
5785         (toc_fusionload_di): Likewise.
5786         (fusion_gpr_load_<mode>): Delete generator function, this insn no
5787         longer needs to be named.  Rename predicate to delete TOC fusion.
5788         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5789         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5790         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5791         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5792         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5794 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5796         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5797         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
5798         __int128 in built-in function prototypes.
5799         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5800         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5802 2018-07-27  Martin Sebor  <msebor@redhat.com>
5804         PR tree-optimization/86696
5805         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5806         types, including enums.
5807         (handle_char_store): Be prepared for the above function to fail.
5809 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
5811         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5812         when optimization level is lower than 2 or optimize for size.
5814 2018-07-26  Martin Sebor  <msebor@redhat.com>
5816         PR tree-optimization/86043
5817         PR tree-optimization/86042
5818         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5819         (get_string_cst_length): Rename...
5820         (get_min_string_length): ...to this.  Add argument.
5821         (handle_char_store): Extend to handle multi-character stores by
5822         MEM_REF.
5823         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
5824         * tree.h (initializer_zerop): Add argument.
5826 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
5828         PR middle-end/86660
5829         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5830         declare target to variables if they have always,{to,from,tofrom} map
5831         kinds.
5833 2018-07-26  Martin Liska  <mliska@suse.cz>
5835         PR lto/86548
5836         * lto-wrapper.c: Add linker_output as prefix
5837         for ltrans_output_file.
5839 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
5841         PR rtl-optimization/85805
5842         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5843         value for hard registers if that was written in the same mode.
5845 2018-07-26  Martin Liska  <mliska@suse.cz>
5847         PR gcov-profile/86536
5848         * gcov.c (format_gcov): Use printf format %.*f directly
5849         and do not handle special values.
5851 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5853         * common/config/arc/arc-common.c (arc_option_optimization_table):
5854         Update default optimizations for size.
5856 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5858         * config/arc/arc.md (movsf_insn): Add short instruction selection.
5859         * config/arc/constraints.md (CfZ): New constraint.
5860         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5861         (subsf3_fpu): Likewise.
5862         (cmpsf_fpu): Likewise.
5863         (cmpsf_fpu_uneq): Likewise.
5865 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5867         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5868         accesses as well.
5869         (arc_is_uncached_mem_p): uncached applies to both the variable and
5870         the pointer.
5872 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5874         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5875         register names.
5877 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
5879         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5880         field "m_scopes" from vec to auto_vec.
5882 2018-07-25  Martin Liska  <mliska@suse.cz>
5884         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5885         return type.
5887 2018-07-25  Richard Biener  <rguenther@suse.de>
5889         PR debug/86654
5890         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5891         special wrt context_die late.
5892         (gen_subprogram_die): Re-use DIEs in local scope.
5894 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
5896         PR tree-optimization/86644
5897         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
5899 2018-07-25  Martin Liska  <mliska@suse.cz>
5901         PR middle-end/86645
5902         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5903         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5905 2018-07-25  Martin Liska  <mliska@suse.cz>
5907         PR sanitizer/79635
5908         * params.def: Explain ASan abbreviation and provide
5909         a documentation link.
5911 2018-07-24  Martin Sebor  <msebor@redhat.com>
5913         PR tree-optimization/86622
5914         PR tree-optimization/86532
5915         * builtins.h (string_length): Declare.
5916         * builtins.c (c_strlen): Correct handling of non-constant offsets.
5917         (check_access): Be prepared for non-constant length ranges.
5918         (string_length): Make extern.
5919         * expr.c (string_constant): Only handle the minor non-constant
5920         array index.  Use string_constant to compute the length of
5921         a generic string constant.
5923 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
5925         PR tree-optimization/86618
5926         * tree-vect-stmts.c (vectorizable_call): Don't take the address
5927         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5929 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
5931         PR tree-optimization/86636
5932         * json.cc (json::object::set): Fix comment.  Add assertions.
5933         (json::array::append): Move here from json.h.  Add comment and an
5934         assertion.
5935         (json::string::string): Likewise.
5936         * json.h (json::array::append): Move to json.cc.
5937         (json::string::string): Likewise.
5938         * optinfo-emit-json.cc
5939         (optrecord_json_writer::impl_location_to_json): Assert that we
5940         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5941         wrapper around it.  Expand the location once, rather than three
5942         times.
5943         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5944         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5945         wrappers.
5946         (optrecord_json_writer::optinfo_to_json): Likewise, in four
5947         places.  Fix some overlong lines.
5949 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
5951         * config/aarch64/aarch64-simd.md
5952         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5953         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5954         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5955         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5956         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5957         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5958         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5959         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5960         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5962 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
5964         PR middle-end/86627
5965         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5966         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
5967         and abs_d == d, do the power of two handling if profitable.
5969 2018-07-24  Richard Biener  <rguenther@suse.de>
5971         * match.pd: Add BIT_FIELD_REF canonicalizations.
5973 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5975         PR c/86617
5976         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5978 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5980         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5981         terminated STRING_CST object.
5983 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5985         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5987 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
5989         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5990         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5991         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5992         the elements into a register.
5993         (rs6000_split_v4si_init_di_reg): Delete.
5994         (rs6000_split_v4si_init): Delete.
5995         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5996         (vsx_init_v4si): Rewrite as a define_expand.
5998 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
6000         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
6001         zero_extend argument from memory): New.
6003 2018-07-22  Martin Sebor  <msebor@redhat.com>
6005         PR bootstrap/86621
6006         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
6007         diagnosing calls with unknown arguments unless -Walloca-larger-than
6008         is restricted to less than PTRDIFF_MAX bytes.
6010 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
6012         * doc/gcov.texi (Invoking Gcov): Editorial changes.
6014 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
6016         * pretty-print.c (text_info::set_location): Remove redundant
6017         "line_table" parameter from call to rich_location::set_range.
6019 2018-07-20  Martin Sebor  <msebor@redhat.com>
6021         PR middle-end/82063
6022         * builtins.c (expand_builtin_alloca): Adjust.
6023         * calls.c (alloc_max_size): Simplify.
6024         * cgraphunit.c (cgraph_node::expand): Adjust.
6025         * common.opt (larger_than_size, warn_frame_larger_than): Remove
6026         variables.
6027         (frame_larger_than_size): Same.
6028         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
6029         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
6030         Initialize.
6031         * doc/invoke.texi (GCC Command Options): Document option arguments.
6032         Explain byte-size arguments and suffixes.
6033         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
6034         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
6035         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
6036         * doc/options.texi (UInteger): Expand.
6037         (Host_Wide_Int, ByteSize): Document new properties.
6038         * final.c (final_start_function_1): Include sizes in an error message.
6039         * function.c (frame_offset_overflow): Same.
6040         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
6041         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
6042         Diagnose unbounded alloca calls only for limits of less than
6043         PTRDIFF_MAX.
6044         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
6045         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
6046         for alloca(0).
6047         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
6048         only for limits of less than PTRDIFF_MAX.
6049         * langhooks-def.h (lhd_handle_option): Change function argument
6050         to HOST_WIDE_INT.
6051         * langhooks.c (lhd_handle_option): Same.
6052         * langhooks.h (handle_option): Same.
6053         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
6054         ByteSize flags.
6055         (var_type, var_type_struct): Same.
6056         (var_set): Handle ByteSize flag.
6057         * optc-gen.awk: Add comments to output to ease debugging.  Make
6058         use of HOST_WIDE_INT where appropriate.
6059         * opts-gen-save.awk:  Use %lx to format unsigned long.
6060         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
6061         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
6062         arguments.  Parse bytes-size suffixes.
6063         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
6064         (enum_value_to_arg): Same.
6065         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
6066         (handle_option): Adjust.
6067         (generate_option): Change function argument to HOST_WIDE_INT.
6068         (cmdline_handle_error): Adjust.
6069         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
6070         (set_option): Change function argument to HOST_WIDE_INT.
6071         (option_enabled): Handle cl_host_wide_int.
6072         (get_option_state): Handle CLVC_SIZE.
6073         (control_warning_option): Same.
6074         * opts.c (common_handle_option): Change function argument to
6075         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
6076         OPT_Wvla_larger_than_.
6077         * opts.h (enum cl_var_type): Add an enumerator.
6078         * stor-layout.c (layout_decl): Print a more meaningful warning.
6079         * toplev.c (output_stack_usage): Adjust.
6081 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
6083         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
6084         call to inline_expand_builtin_string_cmp.
6085         (expand_builtin_strcmp): Likewise.
6086         (expand_builtin_strncmp): Likewise.
6087         (inline_string_cmp): Delete the last parameter, change char_type_node
6088         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
6089         two operands.
6090         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
6091         the inlining expansion on target where the type of the call has same or
6092         narrower precision than unsigned char.
6094 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
6096         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
6097         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
6098         * common.opt (fsave-optimization-record): New option.
6099         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
6100         * doc/invoke.texi (-fsave-optimization-record): New option.
6101         * dumpfile.c: Include "optinfo-emit-json.h".
6102         (struct kv_pair): Move to coretypes.h.
6103         (optgroup_options): Make non-static.
6104         (dump_context::end_scope): Call
6105         optimization_records_maybe_pop_dump_scope.
6106         * dumpfile.h (optgroup_options): New decl.
6107         * json.cc: New file.
6108         * json.h: New file.
6109         * optinfo-emit-json.cc: New file.
6110         * optinfo-emit-json.h: New file.
6111         * optinfo.cc: Include "optinfo-emit-json.h".
6112         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
6113         (optinfo_enabled_p): Check optimization_records_enabled_p.
6114         (optinfo_wants_inlining_info_p): Likewise.
6115         * optinfo.h: Update comment.
6116         * profile-count.c (profile_quality_as_string): New function.
6117         * profile-count.h (profile_quality_as_string): New decl.
6118         (profile_count::quality): New accessor.
6119         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
6120         and optinfo_emit_json_cc_tests.
6121         * selftest.h (selftest::json_cc_tests): New decl.
6122         (selftest::optinfo_emit_json_cc_tests): New decl.
6123         * toplev.c: Include "optinfo-emit-json.h".
6124         (compile_file): Call optimization_records_finish.
6125         (do_compile): Call optimization_records_start.
6126         * tree-ssa-live.c: Include optinfo.h.
6127         (remove_unused_scope_block_p): Retain inlining information if
6128         optinfo_wants_inlining_info_p returns true.
6130 2018-07-20  Richard Biener  <rguenther@suse.de>
6132         PR debug/86585
6133         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
6134         to cover -flto-partition=none.
6136 2018-07-20  Martin Liska  <mliska@suse.cz>
6138         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
6139         (get_decl_source_range): Remove unused function.
6141 2018-07-20  Richard Biener  <rguenther@suse.de>
6143         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
6144         (struct vn_phi_s): Likewise.
6145         (struct vn_reference_s): Likewise.
6146         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
6147         for searching the slot of an entry known to be in the hash itself.
6148         (vn_phi_hasher::equal): Likewise.
6149         (vn_reference_hasher::equal): Likewise.
6150         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
6151         globals.
6152         (optimistic_info, current_info): Remove, keeping only valid_info.
6153         (vn_reference_lookup_1): Remove fallback lookup.
6154         (vn_reference_lookup_2): Likewise.
6155         (vn_nary_op_lookup_1): Likewise.
6156         (vn_phi_lookup): Likewise.
6157         (vn_nary_build_or_lookup_1): Make sure to not chain the built
6158         hash element.
6159         (vn_reference_insert): Adjust, chain the inserted hash element
6160         at last_inserted_ref.
6161         (vn_reference_insert_pieces): Likewise.
6162         (visit_reference_op_call): Likewise.
6163         (vn_nary_op_insert_into): Chain the inserted hash element at
6164         last_inserted_nary.
6165         (vn_nary_op_insert_pieces): Adjust.
6166         (vn_nary_op_insert): Likewise.
6167         (vn_nary_op_insert_stmt): Likewise.
6168         (vn_phi_insert): Adjust, chain the inserted hash element at
6169         last_inserted_phi.
6170         (process_scc): Remove clearing and copying the optimistic
6171         table.  Instead remove elements inserted during an optimistic
6172         iteration from the single table we maintain.
6173         (init_scc_vn): Adjust.
6174         (free_scc_vn): Likewise.
6175         (sccvn_dom_walker::record_cond): Likewise.
6176         (sccvn_dom_walker::after_dom_children): Likewise.
6178 2018-07-19  Martin Sebor  <msebor@redhat.com>
6180         PR tree-optimization/84047
6181         PR tree-optimization/83776
6182         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
6183         (check_array_bounds): Call it.
6185 2018-07-19  Martin Sebor  <msebor@redhat.com>
6187         * align.h (align_flags): Use member initialization.
6189 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
6191         * Makefile.in (OBJS): Add optinfo.o.
6192         * coretypes.h (class symtab_node): New forward decl.
6193         (struct cgraph_node): New forward decl.
6194         (class varpool_node): New forward decl.
6195         * dump-context.h: New file.
6196         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
6197         "tree-pass.h".
6198         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
6199         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
6200         (set_alt_dump_file): Likewise.
6201         (dump_context::~dump_context): New dtor.
6202         (dump_gimple_stmt): Move implementation to...
6203         (dump_context::dump_gimple_stmt): ...this new member function.
6204         Add the stmt to any pending optinfo, creating one if need be.
6205         (dump_gimple_stmt_loc): Move implementation to...
6206         (dump_context::dump_gimple_stmt_loc): ...this new member function.
6207         Start a new optinfo and add the stmt to it.
6208         (dump_gimple_expr): Move implementation to...
6209         (dump_context::dump_gimple_expr): ...this new member function.
6210         Add the stmt to any pending optinfo, creating one if need be.
6211         (dump_gimple_expr_loc): Move implementation to...
6212         (dump_context::dump_gimple_expr_loc): ...this new member function.
6213         Start a new optinfo and add the stmt to it.
6214         (dump_generic_expr): Move implementation to...
6215         (dump_context::dump_generic_expr): ...this new member function.
6216         Add the tree to any pending optinfo, creating one if need be.
6217         (dump_generic_expr_loc): Move implementation to...
6218         (dump_context::dump_generic_expr_loc): ...this new member
6219         function.  Add the tree to any pending optinfo, creating one if
6220         need be.
6221         (dump_printf): Move implementation to...
6222         (dump_context::dump_printf_va): ...this new member function.  Add
6223         the text to any pending optinfo, creating one if need be.
6224         (dump_printf_loc): Move implementation to...
6225         (dump_context::dump_printf_loc_va): ...this new member function.
6226         Start a new optinfo and add the stmt to it.
6227         (dump_dec): Move implementation to...
6228         (dump_context::dump_dec): ...this new member function.  Add the
6229         value to any pending optinfo, creating one if need be.
6230         (dump_context::dump_symtab_node): New member function.
6231         (dump_context::get_scope_depth): New member function.
6232         (dump_context::begin_scope): New member function.
6233         (dump_context::end_scope): New member function.
6234         (dump_context::ensure_pending_optinfo): New member function.
6235         (dump_context::begin_next_optinfo): New member function.
6236         (dump_context::end_any_optinfo): New member function.
6237         (dump_context::s_current): New global.
6238         (dump_context::s_default): New global.
6239         (dump_scope_depth): Delete global.
6240         (dumpfile_ensure_any_optinfo_are_flushed): New function.
6241         (dump_symtab_node): New function.
6242         (get_dump_scope_depth): Reimplement in terms of dump_context.
6243         (dump_begin_scope): Likewise.
6244         (dump_end_scope): Likewise.
6245         (selftest::temp_dump_context::temp_dump_context): New ctor.
6246         (selftest::temp_dump_context::~temp_dump_context): New dtor.
6247         (selftest::verify_item): New function.
6248         (ASSERT_IS_TEXT): New macro.
6249         (ASSERT_IS_TREE): New macro.
6250         (ASSERT_IS_GIMPLE): New macro.
6251         (selftest::test_capture_of_dump_calls): New test.
6252         (selftest::dumpfile_c_tests): Call it.
6253         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
6254         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
6255         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
6256         descriptive comment.
6257         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
6258         (dump_node, dump_bb): Move these unrelated decls.
6259         (class dump_manager): Add leading comment.
6260         * optinfo.cc: New file.
6261         * optinfo.h: New file.
6263 2018-07-19  Michael Collison  <michael.collison@arm.com>
6264             Richard Henderson <rth@redhat.com>
6266         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
6267         (subti): Handle op1 zero.
6268         (subvti4, usub4ti4): New.
6269         (*sub<GPI>3_compare1_imm): New.
6270         (sub<GPI>3_carryinCV): New.
6271         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
6272         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
6274 2018-07-19  Michael Collison  <michael.collison@arm.com>
6275             Richard Henderson <rth@redhat.com>
6277         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
6278         (addti3): Create simpler code if low part is already known to be 0.
6279         (addvti4, uaddvti4): New.
6280         (*add<GPI>3_compareC_cconly_imm): New.
6281         (*add<GPI>3_compareC_cconly): New.
6282         (*add<GPI>3_compareC_imm): New.
6283         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
6284         handle constants within this pattern..
6285         (*add<GPI>3_compareV_cconly_imm): New.
6286         (*add<GPI>3_compareV_cconly): New.
6287         (*add<GPI>3_compareV_imm): New.
6288         (add<GPI>3_compareV): New.
6289         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
6290         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
6291         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
6292         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
6293         with 'comparison' operator.
6294         (*add<GPI>3_compareV_cconly_imm): Ditto.
6295         (*add<GPI>3_compareV_cconly): Ditto.
6296         (*add<GPI>3_compareV_imm): Ditto.
6297         (add<GPI>3_compareV): Ditto.
6298         (add<mode>3_carryinC): Ditto.
6299         (*add<mode>3_carryinC_zero): Ditto.
6300         (*add<mode>3_carryinC): Ditto.
6301         (add<mode>3_carryinV): Ditto.
6302         (*add<mode>3_carryinV_zero): Ditto.
6303         (*add<mode>3_carryinV): Ditto.
6305 2018-07-19  Michael Collison  <michael.collison@arm.com>
6306             Richard Henderson <rth@redhat.com>
6308         * config/aarch64/aarch64-modes.def (CC_V): New.
6309         * config/aarch64/aarch64-protos.h
6310         (aarch64_addti_scratch_regs): Declare
6311         (aarch64_subvti_scratch_regs): Declare.
6312         (aarch64_expand_subvti): Declare.
6313         (aarch64_gen_unlikely_cbranch): Declare
6314         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
6315         for signed overflow using CC_Vmode.
6316         (aarch64_get_condition_code_1): Handle CC_Vmode.
6317         (aarch64_gen_unlikely_cbranch): New function.
6318         (aarch64_addti_scratch_regs): New function.
6319         (aarch64_subvti_scratch_regs): New function.
6320         (aarch64_expand_subvti): New function.
6322 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6324         * config/aarch64/aarch64-option-extensions.def: New entry for profile
6325         extension.
6326         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
6327         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
6328         extension.
6330 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6332         PR target/83009
6333         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6334         address check not strict.
6336 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6338         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
6339         Umq with Umn.
6340         (store_pair_lanes<mode>): Likewise.
6341         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
6342         enum value 'ADDR_QUERY_LDP_STP_N'.
6343         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
6344         (aarch64_print_address_internal): Add declaration.
6345         (aarch64_print_ldpstp_address): Remove.
6346         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
6347         (aarch64_print_operand): Change printing of 'y'.
6348         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
6349         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
6350         'true' rather than '1'.
6351         * config/aarch64/constraints.md (Uml): Likewise.
6352         (Uml): Rename to Umn.
6353         (Umq): Remove.
6355 2018-07-19  Richard Biener  <rguenther@suse.de>
6357         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
6358         a trailing array.
6359         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
6360         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
6361         (vn_reference_hasher): Likewise.
6362         (struct vn_tables_s): Remove obstack and alloc-pool members.
6363         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
6364         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
6365         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
6366         (vn_reference_insert_pieces): Likewise.
6367         (alloc_vn_nary_op_noinit): Adjust.
6368         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
6369         (vn_phi_eq): Adjust.
6370         (shared_lookup_phiargs): Remove.
6371         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
6372         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
6373         (visit_reference_op_call): Likewise.
6374         (copy_nary, copy_phi, copy_reference): Remove.
6375         (process_scc): Rewind the obstack when iterating.  Do not
6376         copy the elements to valid_info but just move them from one
6377         hashtable to the other.
6378         (allocate_vn_table): Adjust.
6379         (free_vn_table): Likewise.
6380         (init_scc_vn): Likewise.
6381         (free_scc_vn): Likewise.
6383 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
6385         PR target/86560
6386         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
6387         indirect_return as function type attribute.
6388         (ix86_attribute_table): Change indirect_return to function
6389         type attribute.
6390         * doc/extend.texi: Update indirect_return attribute.
6392 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
6394         * wide-int.h (widest2_int): New.
6395         * gimple-fold.c (arith_overflowed_p): Use it.
6396         * tree.h (widest2_int_cst): New.
6397         * tree-vrp.c (wide_int_binop_overflow): Rename from
6398         vrp_int_const_binop.
6399         Rewrite to work on trees.
6400         (extract_range_from_multiplicative_op_1): Abstract code to...
6401         (wide_int_range_min_max): ...here.
6402         (wide_int_range_cross_product): ...and here.
6403         (extract_range_from_binary_expr_1): Abstract overflow code to...
6404         (wide_int_range_mult_wrapping): ...here.
6405         * tree-vrp.h (wide_int_range_cross_product): New.
6406         (wide_int_range_mult_wrapping): New.
6408 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
6409             Julia Koval  <julia.koval@intel.com>
6411         * config/i386/x86-tune-costs.h (skylake_memcpy,
6412         skylake_memset): Replace rep_prefix with unrolling for size 512.
6414 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
6416         PR middle-end/86544
6417         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
6418         comparision with EQ_EXPR in last stmt.
6420 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6422         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
6423         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
6424         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
6425         previously known as "PowerPC AltiVec Built-in Functions".  Move
6426         some material to new subsubsections "PowerPC AltiVec Built-in
6427         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
6428         ISA 2.07".
6429         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
6430         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
6431         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6432         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6434 2018-07-18  Richard Biener  <rguenther@suse.de>
6436         PR tree-optimization/86557
6437         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6438         EXACT_DIV_EXPR.
6440 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
6442         * config/s390/s390.c (s390_function_profiler): Generate CFI.
6444 2018-07-17  Jeff Law  <law@redhat.com>
6446         * config/arm/arm.c (get_label_padding): Update for recent
6447         changes to label_to_alignment.
6449         PR tree-optimization/86010
6450         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6452         * config/mips/mips.c (vr4130_align_insns): Update for recent
6453         changes to label_to_alignment.
6455         * config/frv/frv.c (frv_label_align): Update for recent changes
6456         to label_to_alignment.
6458         * config/nios2/nios2.c (nios2_label_align): Update for recent
6459         changes which dropped ALIGN_LABELS_LOG.
6461 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
6463         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6464         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6466 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
6468         * config/arc/arc.c (arc_label_align): Use align_labels instead of
6469         deprecated align_labels_log.
6471 2018-07-17  Richard Biener  <rguenther@suse.de>
6473         PR lto/86456
6474         * dwarf2out.c (init_sections_and_labels): Always generate
6475         a debug_line_str_section for early LTO debug.
6476         (dwarf2out_finish): Reset debug_line_str_hash output early.
6477         Bump counter for extra dwarf5 .debug_loc labels to not conflict
6478         with fat LTO part.
6479         (dwarf2out_early_finish): Output debug_line_str.
6481 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
6483         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6484         index register on z196 or later.
6486 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
6488         * config/s390/s390.c (s390_default_align): Set default function
6489         alignment to 16.
6490         (s390_override_options_after_change): Call s390_default align.
6491         (s390_option_override_internal): Call s390_default_align.
6492         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6494 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
6496         PR middle-end/86542
6497         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6498         to _looptemp_ clauses, other than the first two.
6500 2018-07-17  Martin Liska  <mliska@suse.cz>
6502         * opts.c: Do not enable OPT_falign_* for -Os.
6504 2018-07-17  Martin Liska  <mliska@suse.cz>
6506         * align.h (MAX_CODE_ALIGN): New.
6507         (MAX_CODE_ALIGN_VALUE): New.
6508         * common/config/i386/i386-common.c (ix86_handle_option):
6509         (MAX_CODE_ALIGN): Moved to align.h.
6510         * final.c (MAX_CODE_ALIGN): Likewise.
6511         * opts.c (parse_and_check_align_values):
6512         (MAX_CODE_ALIGN): Likewise.
6513         (MAX_CODE_ALIGN_VALUE): Likewise.
6515 2018-07-17  Martin Liska  <mliska@suse.cz>
6517         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6518         in order to fulfil coding style.
6519         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6520         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6521         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6522         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6523         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6524         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6525         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6526         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6527         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6529 2018-07-17  Martin Liska  <mliska@suse.cz>
6531         * align.h: New file.
6532         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6533         directly.
6534         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6535         align_flags of label_to_alignment.
6536         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6537         align_flags class.
6538         * config/m68k/m68k.c: Do not use removed align_labels_value and
6539         align_loops_value.
6540         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6541         (LOOP_ALIGN): Likewise.
6542         (LABEL_ALIGN): Likewise.
6543         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6544         Remove not used macro.
6545         (rs6000_loop_align): Change return type to align_flags.
6546         (rs6000_loop_align_max_skip): Remove.
6547         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6548         Change return type to align_flags.
6549         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6550         Remove not used macro.
6551         (rs6000_loop_align):  Change return type to align_flags.
6552         (rs6000_loop_align_max_skip): Remove.
6553         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6554         * config/rx/rx-protos.h (rx_align_for_label): Make it
6555         static function.
6556         * config/rx/rx.c (rx_align_for_label): Change return type
6557         to align_flags.
6558         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6559         macro definitions.
6560         into align_flags class.
6561         (LABEL_ALIGN): Likewise.
6562         (LOOP_ALIGN): Likewise.
6563         * config/s390/s390.c (s390_label_align): Use align_flags
6564         class member.
6565         (s390_asm_output_function_label): Likewise.
6566         * config/sh/sh.c (sh_override_options_after_change):
6567         Use align_flags class directly without macros.
6568         (find_barrier): Likewise.
6569         (barrier_align): Likewise.
6570         (sh_loop_align): Likewise.
6571         * config/spu/spu.c (spu_option_override):
6572         Use align_flags_tuple::get_value instead of removed macros.
6573         (spu_sched_init): Likewise.
6574         * config/spu/spu.h (GTY): Likewise.
6575         * config/visium/visium.c (visium_option_override):
6576         Set "8" as default secondary alignment.
6577         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6578         in order to guarantee secondary alignment of 8.
6579         * coretypes.h: Include align.h header file.
6580         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6581         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6582         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6583         * doc/tm.texi.in: Likewise.
6584         * final.c (struct label_alignment): Remove not used structure.
6585         (LABEL_ALIGN): Change type to align_flags.
6586         (LOOP_ALIGN): Likewise.
6587         (JUMP_ALIGN): Likewise.
6588         (default_loop_align_max_skip): Remove.
6589         (default_label_align_max_skip): Likewise.
6590         (default_jump_align_max_skip): Likewise.
6591         (default_label_align_after_barrier_max_skip):
6592         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6593         (LABEL_TO_MAX_SKIP): Remove.
6594         (label_to_alignment): Return align_flags type instead of integer.
6595         (label_to_max_skip): Remove.
6596         (align_fuzz): Use align_flags type.
6597         (compute_alignments): Use align_flags type and use align_flags::max
6598         to combine multiple alignments.
6599         (grow_label_align): Grow vec instead of C array.
6600         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6601         (shorten_branches):  Use align_flags type and use align_flags::max
6602         to combine multiple alignments.
6603         (final_scan_insn_1): Remove usage of secondary alignment that comes
6604         from label alignment, but instead use proper secondary alignment
6605         which is computed in grow_label_align.
6606         * flags.h (struct align_flags_tuple): Move to align.h.
6607         (struct align_flags): Likewise.
6608         (state_align_loops): Rename to align_loops.
6609         (state_align_jumps): Rename to align_jumps.
6610         (state_align_labels): Rename to align_labels.
6611         (state_align_functions): Rename to align_functions.
6612         (align_loops_log): Remove.
6613         (align_jumps_log): Remove.
6614         (align_labels_log): Remove.
6615         (align_functions_log): Remove.
6616         (align_loops_max_skip): Remove.
6617         (align_jumps_max_skip): Remove.
6618         (align_labels_max_skip): Remove.
6619         (align_functions_max_skip): Remove.
6620         (align_loops_value): Remove.
6621         (align_jumps_value): Remove.
6622         (align_labels_value): Remove.
6623         (align_functions_value): Remove.
6624         * output.h (label_to_alignment): Change return type to align_flags.
6625         (label_to_max_skip): Remove.
6626         * target.def: Remove loop_align_max_skip, label_align_max_skip,
6627         jump_align_max_skip macros.
6628         * targhooks.h (default_loop_align_max_skip): Remove.
6629         (default_label_align_max_skip): Likewise.
6630         (default_jump_align_max_skip): Likewise.
6631         (default_label_align_after_barrier_max_skip): Remove.
6632         * toplev.c (read_log_maxskip): Use ::normalize function.
6633         (parse_N_M): Remove not used argument and also call ::normalize.
6634         (parse_alignment_opts): Do not pass unused arguments.
6635         * varasm.c (assemble_start_function): Use directly align_functions
6636         instead of removed macros.
6637         * system.h: Do not poison removed macros.
6639 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
6641         PR middle-end/86539
6642         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6643         and cond temporaries don't have reference type if iterator has
6644         pointer type.  For init use &for_pre_body instead of pre_p if
6645         for_pre_body is non-empty.
6647 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
6649         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6650         double-double modes to SFmode directly directly.
6651         (trunc<mode>sf2_fprs): Delete.
6653 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
6655         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6656         for conversions between IFmode and the decimal floating point modes.
6657         (init_float128_ieee): Use the correct names for conversions between
6658         KFmode and the decimal floating point modes.
6660 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
6662         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6663         for the conversions between TDmode and IFmode.
6664         (init_float128_ieee): Use more correct names for the conversions
6665         between TDmode and KFmode.
6667 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
6669         PR tree-optimization/86526
6670         * builtins.c (expand_builtin_memcmp): Formatting fixes.
6671         (inline_expand_builtin_string_cmp): Likewise.
6672         (inline_string_cmp): Likewise.  Use c_readstr instead of
6673         builtin_memcpy_read_str.  Add unit_mode temporary.
6675 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6677         PR middle-end/86528
6678         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6679         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6681 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6683         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6684         Alphabetize prototypes of built-in functions, separating out
6685         built-in functions that are listed in this section but should be
6686         described elsewhere.
6688 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
6690         PR target/86511
6691         * expmed.c (emit_store_flag): Do not emit setcc followed by a
6692         conditional move when trapping comparison was split to a
6693         non-trapping one (and vice versa).
6695 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6697         * config/s390/s390.c (s390_function_profiler): Generate nops
6698         instead of profiler call sequences.
6699         * config/s390/s390.opt: Add the new option.
6701 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6703         * config/s390/s390.c (s390_function_profiler): Generate
6704         __mcount_loc section.
6705         * config/s390/s390.opt: Add the new option.
6707 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6709         * common.opt: Add the new warning.
6710         * config/s390/s390.c (s390_function_profiler): Emit "brasl
6711         %r0,__fentry__" when -mfentry is specified.
6712         (s390_option_override_internal): Disallow -mfentry for 31-bit
6713         CPUs.
6714         * config/s390/s390.opt: Add the new option.
6716 2018-07-16  Richard Biener  <rguenther@suse.de>
6718         PR lto/86523
6719         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6720         for function-local FUNCTION_DECL and RESULT_DECL immediately.
6722 2018-07-16  Martin Liska  <mliska@suse.cz>
6724         PR ipa/86529
6725         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6726         to ::get_create.
6728 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
6730         * config/arc/arcHS.md: Update ARCHS scheduling rules.
6732 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
6734         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6735         for ARCHS4x.
6736         * config/arc/arc-cpus.def (hs4x): New cpu.
6737         (hs4xd): Likewise.
6738         * config/arc/arc-tables.opt: Regenerate.
6739         * config/arc/arc.c (arc_sched_issue_rate): New function.
6740         (TARGET_SCHED_ISSUE_RATE): Define.
6741         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6742         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6743         fpu_cvt.
6744         (attr tune): Add ARCHS4x tune values.
6745         (attr tune_dspmpy): Define.
6746         (*tst): Correct instruction type.
6747         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6748         * config/arc/arcHS4x.md: New file.
6749         * config/arc/fpu.md: Update instruction type attributes.
6750         * config/arc/t-multilib: Regenerate.
6752 2018-07-16  Tom de Vries  <tdevries@suse.de>
6754         PR debug/86455
6755         * var-tracking.c (vt_initialize): Fix pre_dec handling.
6757 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6759         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6760         early clobber.
6762 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
6764         PR tree-optimization/86514
6765         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6766         conversion to a boolean type from a type with greater precision.
6768 2018-07-16  Tom de Vries  <tdevries@suse.de>
6770         * var-tracking.c (vt_initialize): Print adjusted insn slim if
6771         dump_flags request TDF_SLIM.
6773 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
6775         * fold-const.c (int_const_binop_1): Abstract...
6776         (wide_int_binop): ...wide int code here.
6777         (poly_int_binop): ...poly int code here.
6778         Abstract the rest of int_const_binop_1 into int_const_binop.
6779         * fold-const.h (wide_int_binop): New.
6780         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6781         Remove useless PLUS/MINUS_EXPR case.
6782         (zero_nonzero_bits_from_vr): Move wide int code...
6783         (zero_nonzero_bits_from_bounds): ...here.
6784         (extract_range_from_binary_expr_1): Move mask optimization code...
6785         (range_easy_mask_min_max): ...here.
6786         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6787         (range_easy_mask_min_max): New.
6789 2018-07-15  Jeff Law  <law@redhat.com>
6791         PR target/85993
6792         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6793         block.
6795 2018-07-14  Jim Wilson  <jimw@sifive.com>
6797         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6799 2018-07-14  Paul Koning  <ni1d@arrl.net>
6801         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6803 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
6805         * lto-streamer-out.c (copy_function_or_variable): Dump info about
6806         copying section.
6808 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
6809             Steve Munroe  <munroesj52@gmail.com>
6811         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6812         (_mm_andnot_si128): Likewise.
6813         (_mm_or_si128): Likewise.
6814         (_mm_xor_si128): Likewise.
6816 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
6818         PR middle-end/78809
6819         * builtins.c (expand_builtin_memcmp): Inline the calls first
6820         when result_eq is false.
6821         (expand_builtin_strcmp): Inline the calls first.
6822         (expand_builtin_strncmp): Likewise.
6823         (inline_string_cmp): New routine. Expand a string compare
6824         call by using a sequence of char comparison.
6825         (inline_expand_builtin_string_cmp): New routine. Inline expansion
6826         a call to str(n)cmp/memcmp.
6827         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6828         New option.
6829         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6831 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
6833         * config/arm/driver-arm.c: Include arm-native.h.
6834         (host_detect_local_cpu): Use auto-generated data tables.
6835         (vendors, arm_cpu_table): Delete.  Move part information to ...
6836         * config/arm/arm-cpus.in: ... here.
6837         * config/arm/parsecpu.awk (gen_native): New function.
6838         (vendor, part): New CPU fields.
6839         (END): Add support for building the native CPU detection tables.
6840         * config/arm/t-arm (arm-native.h): Add build rule.
6841         (driver-arm.o): Add dependency on arm-native.h.
6843 2018-07-13  Richard Biener  <rguenther@suse.de>
6845         PR middle-end/85974
6846         * match.pd (addr1 - addr2): Allow either of the operand to
6847         have a conversion.
6849 2018-07-13  Tom de Vries  <tdevries@suse.de>
6851         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6852         in remap_ssa_name.
6854 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
6856         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6857         arrays instead of numbered variables.
6859 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
6861         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6862         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6864 2018-07-13  Richard Biener  <rguenther@suse.de>
6866         PR debug/86452
6867         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6868         instead of get_context_die.
6870 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
6871             Richard Biener  <rguenther@suse.de>
6873         PR middle-end/86489
6874         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6875         that the loop latch destination where phi is defined.
6877 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
6879         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6880         (riscv_expand_epilogue): Add assertion to check interrupt mode.
6881         (riscv_set_current_function): Extract getting interrupt type to new
6882         function.
6883         (riscv_get_interrupt_type): New function.
6884         (riscv_merge_decl_attributes): New function, checking interrupt type is
6885         same.
6886         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6888 2018-07-12  Paul Koning  <ni1d@arrl.net>
6890         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6891         directive.
6893 2018-07-12  Paul Koning  <ni1d@arrl.net>
6895         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6896         zero reference, add doloop_end instead.
6897         * doc/md.texi (decrement_and_branch_until_zero): Remove.
6898         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
6899         detail for doloop_end.
6901 2018-07-12  Martin Sebor  <msebor@redhat.com>
6903         PR c/86453
6904         * attribs.c (decl_attributes): Reject conflicting attributes before
6905         calling attribute handlers.
6907 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6909         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6910          parameter.
6911         (gcc::dump_manager::get_dump_file_name): likewise.
6912         (dump_begin): Likewise.
6913         * dumpfile.h (dump_begin): Update prototype.
6914         (gcc::dump_manager::get_dump_file_name,
6915         gcc::dump_manager::get_dump_file_name): Update prototype.
6917 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6919         * internal-fn.h (vectorizable_internal_fn_p): New function.
6920         * tree-vect-slp.c (compatible_calls_p): Likewise.
6921         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
6922         to internal functions.
6923         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6925 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6927         * fold-const.h (inverse_conditions_p): Declare.
6928         * fold-const.c (inverse_conditions_p): New function.
6929         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
6930         that test the inverse condition of a conditional internal function.
6931         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6932         * internal-fn.c (internal_fn_mask_index): Handle conditional
6933         internal functions.
6934         (vectorized_internal_fn_supported_p): New function.
6935         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6936         (any_pred_load_store): Replace with...
6937         (need_to_predicate): ...this new variable.
6938         (redundant_ssa_names): New variable.
6939         (ifcvt_can_use_mask_load_store): Move initial checks to...
6940         (ifcvt_can_predicate): ...this new function.  Handle tree codes
6941         for which a conditional internal function exists.
6942         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6943         instead of ifcvt_can_use_mask_load_store.  Update after variable
6944         name change.
6945         (predicate_load_or_store): New function, split out from
6946         predicate_mem_writes.
6947         (check_redundant_cond_expr): New function.
6948         (value_available_p): Likewise.
6949         (predicate_rhs_code): Likewise.
6950         (predicate_mem_writes): Rename to...
6951         (predicate_statements): ...this.  Use predicate_load_or_store
6952         and predicate_rhs_code.
6953         (combine_blocks, tree_if_conversion): Update after above name changes.
6954         (ifcvt_local_dce): Handle redundant_ssa_names.
6955         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6956         general conditional functions.
6957         * tree-vect-stmts.c (vectorizable_call): Likewise.
6959 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6960             Alan Hayward  <alan.hayward@arm.com>
6961             David Sherwood  <david.sherwood@arm.com>
6963         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6964         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6965         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6966         plus and minus and convert them into IFN_COND_FMA-based sequences.
6967         (convert_mult_to_fma): Handle conditional plus and minus.
6969 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6971         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6972         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6973         (cond_fnms_optab): New optabs.
6974         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6975         internal functions.
6976         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6977         * internal-fn.h (get_conditional_internal_fn): Declare.
6978         (get_unconditional_internal_fn): Likewise.
6979         * internal-fn.c (cond_ternary_direct): New macro.
6980         (expand_cond_ternary_optab_fn): Likewise.
6981         (direct_cond_ternary_optab_supported_p): Likewise.
6982         (FOR_EACH_COND_FN_PAIR): Likewise.
6983         (get_conditional_internal_fn): New function.
6984         (get_unconditional_internal_fn): Likewise.
6985         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6986         (gimple_match_op::gimple_match_op): Add a new overload for 5
6987         operands.
6988         (gimple_match_op::set_op): Likewise.
6989         (gimple_resimplify5): Declare.
6990         * genmatch.c (decision_tree::gen): Generate simplifications for
6991         5 operands.
6992         * gimple-match-head.c (gimple_simplify): Define an overload for
6993         5 operands.  Handle calls with 5 arguments in the top-level overload.
6994         (convert_conditional_op): Handle conversions from unconditional
6995         internal functions to conditional ones.
6996         (gimple_resimplify5): New function.
6997         (build_call_internal): Pass a fifth operand.
6998         (maybe_push_res_to_seq): Likewise.
6999         (try_conditional_simplification): Try converting conditional
7000         internal functions to unconditional internal functions.
7001         Handle 3-operand unconditional forms.
7002         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
7003         Define ternary equivalents of the current rules for binary conditional
7004         internal functions.
7005         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
7006         ternary operations.
7007         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
7008         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
7009         (optab): Handle them.
7010         (SVE_COND_FP_TERNARY): New int iterator.
7011         (sve_fmla_op, sve_fmad_op): New int attributes.
7012         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
7013         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
7014         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
7016 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7018         * target.def (preferred_else_value): New target hook.
7019         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
7020         * doc/tm.texi: Regenerate.
7021         * targhooks.h (default_preferred_else_value): Declare.
7022         * targhooks.c (default_preferred_else_value): New function.
7023         * internal-fn.h (conditional_internal_fn_code): Declare.
7024         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
7025         (get_conditional_internal_fn): Use it.
7026         (conditional_internal_fn_code): New function.
7027         * gimple-match.h (gimple_match_cond): New struct.
7028         (gimple_match_op): Add a cond member function.
7029         (gimple_match_op::gimple_match_op): Update all forms to take a
7030         gimple_match_cond.
7031         * genmatch.c (expr::gen_transform): Use the same condition as res_op
7032         for the suboperation, but don't specify a particular else_value.
7033         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
7034         (visit_nary_op, visit_reference_op_load): Pass
7035         gimple_match_cond::UNCOND to the gimple_match_op constructor.
7036         * gimple-match-head.c: Include tree-eh.h
7037         (convert_conditional_op): New function.
7038         (maybe_resimplify_conditional_op): Likewise.
7039         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
7040         (gimple_resimplify2): Likewise.
7041         (gimple_resimplify3): Likewise.
7042         (gimple_resimplify4): Likewise.
7043         (maybe_push_res_to_seq): Return null for conditional operations.
7044         (try_conditional_simplification): New function.
7045         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
7046         constructor.
7047         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
7048         IFN_COND_* call.
7049         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
7050         function.
7051         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
7053 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
7055         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7056         DECL_FCONTEXT
7057         (hash_tree): Do not hash DECL_FCONTEXT
7058         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
7059         Do not stream DECL_FCONTEXT.
7060         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
7061         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
7063 2018-07-12  Richard Biener  <rguenther@suse.de>
7065         PR debug/86462
7066         * dwarf2out.c (gen_block_die): Only output blocks when they have
7067         at least one !DECL_IGNORED_P variable.
7069 2018-07-12  Richard Biener  <rguenther@suse.de>
7071         PR target/84829
7072         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
7073         Remove -mieee-fp handling.
7075 2018-07-12  Richard Biener  <rguenther@suse.de>
7077         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
7078         left-over from last patch.
7080 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
7082         PR tree-optimization/86492
7083         * gimple-ssa-store-merging.c
7084         (imm_store_chain_info::coalesce_immediate_stores): Call
7085         check_no_overlap even for the merge_overlapping case.  Formatting fix.
7087 2018-07-12  Richard Biener  <rguenther@suse.de>
7089         PR middle-end/86479
7090         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
7091         move possibly trapping operations into the conditional.
7093 2018-07-12  Richard Biener  <rguenther@suse.de>
7095         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
7096         (vn_lookup_simplify_result): Remove recursion limit applied
7097         here.
7098         (vn_nary_build_or_lookup_1): Adjust.
7099         (try_to_simplify): Likewise.
7100         * gimple-match-head.c (gimple_resimplify1): Instead apply one
7101         here.
7102         (gimple_resimplify2): Likewise.
7103         (gimple_resimplify3): Likewise.
7104         (gimple_resimplify4): Likewise.
7106 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
7108         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
7109         Use __mmask64 type instead of __mmask8 for __M argument.
7110         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
7111         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
7112         __U argument.
7113         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
7114         __mmask16 for __M argument.
7115         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
7116         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
7117         to __mmask16 instead of __mmask8.
7118         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
7119         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
7120         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
7121         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
7122         instead of __mmask16 for __U argument.
7123         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
7124         __mmask16 instead of __mmask8 for __U argument.
7125         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
7126         __U argument.
7127         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
7128         __mmask16.
7129         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
7130         argument.
7131         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
7132         __U argument.
7133         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
7134         __mmask16.
7135         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
7136         of __mmask16.
7137         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
7138         __U argument.
7139         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
7140         __U argument.
7141         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
7142         __U argument.
7143         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
7144         __U argument.
7145         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
7146         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
7147         return type as well as __M argument type and all casts from __mmask8
7148         to __mmask32.
7149         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
7150         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
7151         return type as well as __M argument type and all casts from __mmask8
7152         to __mmask16.
7153         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
7154         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
7155         return type as well as __M argument type and all casts from __mmask8
7156         to __mmask32.
7157         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
7158         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
7159         return type as well as __M argument type and all casts from __mmask8
7160         to __mmask16.
7161         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
7162         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
7163         __mmask16.
7165 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
7167         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
7168         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
7169         for __U argument.
7171 2018-07-11  Paul Koning  <ni1d@arrl.net>
7173         * doc/md.texi (define_subst): Document how multiple occurrences of
7174         the same argument in the replacement pattern are handled.
7176 2018-07-11  Paul Koning  <ni1d@arrl.net>
7178         * doc/extend.texi (Common Variable Attributes): Move "mode" into
7179         alphabetical order.
7180         (Common Type Attributes): Add "mode" attribute.
7182 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
7184         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
7185         stream DECL_ORIGINAL_TYPE.
7186         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
7187         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
7188         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
7189         Do not walk original type.
7190         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
7191         external decls.
7192         (write_ts_decl_non_common_tree_pointers): Do not stream
7193         DECL_ORIGINAL_TYPE
7194         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
7195         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
7197 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
7199         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
7200         thread twice from the same starting edge.
7202 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
7204         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
7205         * gimple.c (gimple_call_nonnull_result_p): ...here...
7206         (gimple_call_nonnull_arg): ...and here.
7207         * gimple.h (gimple_call_nonnull_result_p): New.
7208         (gimple_call_nonnull_arg): New.
7210 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
7212         * config/arm/arm-cpus.in: Move information from fpu field of each
7213         cpu definition to the isa field.
7214         * config/arm/parsecpu.awk (fpu): Delete match rule.
7215         (gen_comm_data): Don't add bits from the CPU's FPU entry.
7217 2018-07-11  Richard Biener  <rguenther@suse.de>
7219         PR debug/86457
7220         * dwarf2out.c (init_sections_and_labels): Use
7221         output_asm_line_debug_info consistently.
7222         (dwarf2out_early_finish): Likewise.
7223         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
7224         type units.
7226 2018-07-11  Richard Biener  <rguenther@suse.de>
7228         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
7229         Rework father_bb setting in a way to avoid propagating constants
7230         multiple times on a loop body.
7232 2018-07-10  Mark Wielaard  <mark@klomp.org>
7234         PR debug/86459
7235         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
7237 2018-07-10  Richard Biener  <rguenther@suse.de>
7239         * hash-map.h (hash_map::iterator::operator*): Return
7240         references to key and value.
7242 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
7244         PR c++/86443
7245         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
7246         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
7247         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
7248         (gimplify_omp_for): For composite loops, move outer
7249         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
7250         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
7251         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
7252         TREE_LIST for both the original class iterator and the "last" helper
7253         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
7254         loop, remember has_decl_expr from outer composite loops for the
7255         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
7257 2018-07-09  Martin Sebor  <msebor@redhat.com>
7259         PR middle-end/77357
7260         PR middle-end/86428
7261         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
7262         accessing implicitly initialized array elements.
7263         * expr.c (string_constant): Handle string initializers of
7264         character arrays within aggregates.
7265         * gimple-fold.c (fold_array_ctor_reference): Add argument.
7266         Store element offset.  As a special case, handle zero size.
7267         (fold_nonarray_ctor_reference): Same.
7268         (fold_ctor_reference): Add argument.  Store subobject offset.
7269         * gimple-fold.h (fold_ctor_reference): Add argument.
7271 2018-07-09  Paul Koning  <ni1d@arrl.net>
7273         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
7274         (pdp11_insn_cost): New function.
7275         (pdp11_md_asm_adjust): New function.
7276         (TARGET_INVALID_WITHIN_DOLOOP): Define.
7277         (pdp11_rtx_costs): Update to match machine better.
7278         (output_addr_const_pdp11): Correct format mismatch warnings.
7279         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
7280         * config/pdp11/pdp11.md: General change to add base_cost and/or
7281         length attributes for use by new pdp11_insn_cost function.
7282         (MIN_BRANCH): Correct definition.
7283         (MIN_SOB): Ditto.
7284         (doloop_end): Use standard pattern name for looping pattern.
7285         (doloop_end_nocc): New.
7286         (movsf): Add another constraint alternative.
7287         (zero_extendqihi2): Add constraint alternatives for not in place
7288         extend.
7289         (zero_extendhisi2): Remove.
7290         (shift patterns): Add CC handling variants.
7291         (bswaphi2): New.
7292         (bswapsi2): New.
7293         (rothi3): New.
7294         (define_peephole2): New peephole to recognize mov that sets CC for
7295         subsequent test.
7297 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7299         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
7300         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
7301         wi::add.
7303 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
7305         PR c/86420
7306         * real.c (real_nextafter): Return true if result is denormal.
7308 2018-07-09  Martin Liska  <mliska@suse.cz>
7310         * common.opt: Add back wrongly removed attribute.
7312 2018-07-09  Richard Biener  <rguenther@suse.de>
7314         PR debug/86413
7315         * dwarf2out.c (gen_block_die): For an early generated DIE
7316         always output high/low PC attributes.
7318 2018-07-09  Tom de Vries  <tdevries@suse.de>
7320         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
7321         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
7322         onto VAR_DECL with abstract origin.
7324 2018-07-07  Jim Wilson  <jimw@sifive.com>
7326         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
7328 2018-07-07  Tom de Vries  <tdevries@suse.de>
7330         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
7332 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
7334         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
7335         overflow_type.
7336         (combine_bound): Use wide-int overflow calculation instead of
7337         rolling our own.
7338         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
7339         overflow_type.
7340         * fold-const.c (int_const_binop_2): Same.
7341         (extract_muldiv_1): Same.
7342         (fold_div_compare): Same.
7343         (fold_abs_const): Same.
7344         * match.pd: Same.
7345         * poly-int.h (add): Same.
7346         (sub): Same.
7347         (neg): Same.
7348         (mul): Same.
7349         * predict.c (predict_iv_comparison): Same.
7350         * profile-count.c (slow_safe_scale_64bit): Same.
7351         * simplify-rtx.c (simplify_const_binary_operation): Same.
7352         * tree-chrec.c (tree_fold_binomial): Same.
7353         * tree-data-ref.c (split_constant_offset_1): Same.
7354         * tree-if-conv.c (idx_within_array_bound): Same.
7355         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
7356         * tree-ssa-phiopt.c (minmax_replacement): Same.
7357         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
7358         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
7359         * vr-values.c (vr_values::adjust_range_with_scev): Same.
7360         * wide-int.cc (wi::add_large): Same.
7361         (wi::mul_internal): Same.
7362         (wi::sub_large): Same.
7363         (wi::divmod_internal): Same.
7364         * wide-int.h: Change overflow type to overflow_type for neg, add,
7365         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
7366         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
7367         mul_internal, divmod_internal.
7368         (overflow_type): New enum.
7369         (accumulate_overflow): New.
7371 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
7373         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
7374         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
7376 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
7378         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
7379         argument is checked for zero before entering loop, avoid checking again.
7381 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
7383         * gimplify.h (generic_expr_could_trap_p): Set as global function.
7384         * gimplify.h (generic_expr_could_trap_p): Likwise.
7385         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
7387 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
7389         PR tree-optimization/86401
7390         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
7391         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
7392         (fold_bit_and_mask): ... here.  New helper function for match.pd.
7393         * fold-const.h (fold_bit_and_mask): Declare.
7394         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
7396 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
7398         PR target/86324
7399         * target.def (translate_mode_attribute): New hook.
7400         * targhooks.h (default_translate_mode_attribute): Declare.
7401         * targhooks.c (default_translate_mode_attribute): New function.
7402         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
7403         * doc/tm.texi: Regenerate.
7404         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
7405         (rs6000_translate_mode_attribute): New function.
7407 2018-07-06  Paul Koning  <ni1d@arrl.net>
7409         * doc/md.texi (define_split): Document DONE and FAIL.
7410         (define_peephole2): Ditto.
7412 2018-07-05  Jeff Law  <law@redhat.com>
7414         PR tree-optimization/86010
7415         * tree-ssa-dse.c (compute_trims): More aggressively trim at
7416         both the head and tail of mem* and str* calls.
7418 2018-07-05  Jim Wilson  <jimw@sifive.com>
7420         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
7422 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
7424         * config/aarch64/aarch64-simd.md: correct flags text for
7425         MIN_EXPR replacement.
7427 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
7429         * configure: Regenerated.
7431 2018-07-05  Carl Love  <cel@us.ibm.com>
7433         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7434         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7435         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7436         VSX_BUILTIN_DOUBLEL_V4SF.
7438 2018-07-05  Martin Sebor  <msebor@redhat.com>
7440         PR c++/86400
7441         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7442         than its domain to compute its the upper bound of a char array.
7444 2018-07-05  Nathan Sidwell  <nathan@acm.org>
7446         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7447         * doc/cpp.texi: Update comment.
7448         * doc/tm.texi: Rebuilt.
7449         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7450         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7451         * doc/extend.texi (Backwards Compatibility): Clarify it is system
7452         headers affected by extern "C".
7453         * system.h: Poison NO_IMPLICIT_EXTERN_C.
7454         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7455         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7456         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7457         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7458         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7459         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7460         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7461         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7462         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7463         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7464         config/sparc/sp64-elf.h, config/spu/spu.h,
7465         config/stormy16/stormy16.h, config/v850/v850.h,
7466         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7467         define NO_IMPLICIT_EXTERN_C.
7468         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7470 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
7472         PR target/84711
7473         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7474         instead of GET_MODE_SIZE when comparing Units.
7476 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
7478         PR target/84711
7479         * rtlanal.c (set_noop_p): Constrain on mode change,
7480         include hard-reg-set.h
7482 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
7484         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7486 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
7488         Revert
7489         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
7491         PR sanitizer/84250
7492         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7493         libasan.
7494         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7496 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
7498         PR sanitizer/84250
7499         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7500         libasan.
7501         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7503 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
7505         PR middle-end/86380
7506         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7508 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
7510         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7511         neg_*_op* variables.
7513 2018-07-04  Martin Liska  <mliska@suse.cz>
7515         * tree-switch-conversion.c: Define
7516         max_ratio_for_speed and max_ratio_for_size constants.
7518 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
7519             Martin Liska  <mliska@suse.cz>
7521         PR middle-end/66240
7522         PR target/45996
7523         PR c/84100
7524         * common.opt: Rename align options with 'str_' prefix.
7525         * common/config/i386/i386-common.c (set_malign_value): New
7526         function.
7527         (ix86_handle_option): Use it to set -falign-* options/
7528         * config/aarch64/aarch64-protos.h (struct tune_params): Change
7529         type from int to string.
7530         * config/aarch64/aarch64.c: Update default values from int
7531         to string.
7532         * config/alpha/alpha.c (alpha_override_options_after_change):
7533         Likewise.
7534         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7535         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7536         max skip conditionally.
7537         * config/i386/freebsd.h (SUBALIGN_LOG): New.
7538         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7539         max skip conditionally.
7540         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7541         max skip conditionally.
7542         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7543         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7544         max skip conditionally.
7545         * config/i386/i386.c (struct ptt): Change type from int to
7546         string.
7547         (ix86_default_align): Set default values.
7548         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7549         max skip conditionally.
7550         * config/i386/iamcu.h (SUBALIGN_LOG): New.
7551         (ASM_OUTPUT_MAX_SKIP_ALIGN):
7552         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7553         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7554         max skip conditionally.
7555         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7556         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7557         * config/i386/x86-64.h (SUBALIGN_LOG): New.
7558         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7559         max skip conditionally.
7560         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7561         * config/ia64/ia64.c (ia64_option_override): Set default values
7562         for alignment options.
7563         * config/m68k/m68k.c: Handle new str_align_* options.
7564         * config/mips/mips.c (mips_set_compression_mode): Change
7565         type of constants.
7566         (mips_option_override): Set default values for options.
7567         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7568         Likewise.
7569         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7570         Likewise.
7571         * config/rx/rx.c (rx_option_override): Likewise.
7572         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7573         (LABEL_ALIGN): Use align_labels_log.
7574         (LOOP_ALIGN): Use align_loops_align.
7575         * config/s390/s390.c (s390_asm_output_function_label): Use new
7576         macros.
7577         * config/sh/sh.c (sh_override_options_after_change):
7578         Change type of constants.
7579         * config/spu/spu.c (spu_sched_init): Likewise.
7580         * config/sparc/sparc.c (sparc_option_override): Set default
7581         values for options.
7582         * config/visium/visium.c (visium_option_override): Likewise.
7583         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7584         emit p2align format with last argument if it's not needed.
7585         * doc/invoke.texi: Document extended format of -falign-*.
7586         * final.c: Use align_labels alignment.
7587         * flags.h (struct target_flag_state): Change type to use
7588         align_flags.
7589         (struct align_flags_tuple): New.
7590         (struct align_flags): Likewise.
7591         (align_loops_log): Redefine macro to use new types.
7592         (align_loops_max_skip): Redefine macro to use new types.
7593         (align_jumps_log): Redefine macro to use new types.
7594         (align_jumps_max_skip): Redefine macro to use new types.
7595         (align_labels_log): Redefine macro to use new types.
7596         (align_labels_max_skip): Redefine macro to use new types.
7597         (align_functions_log): Redefine macro to use new types.
7598         (align_loops): Redefine macro to use new types.
7599         (align_jumps): Redefine macro to use new types.
7600         (align_labels): Redefine macro to use new types.
7601         (align_functions): Redefine macro to use new types.
7602         (align_functions_max_skip): Redefine macro to use new types.
7603         (align_loops_value): New macro.
7604         (align_jumps_value): New macro.
7605         (align_labels_value): New macro.
7606         (align_functions_value): New macro.
7607         * function.c (invoke_set_current_function_hook): Propagate
7608         alignment values from flags to global variables default in
7609         topleev.h.
7610         * ipa-icf.c (sem_function::equals_wpa): Use
7611         cl_optimization_option_eq instead of memcmp.
7612         * lto-streamer.h (cl_optimization_stream_out): Support streaming
7613         of string types.
7614         (cl_optimization_stream_in): Likewise.
7615         * optc-save-gen.awk: Support strings in cl_optimization.
7616         * opth-gen.awk: Likewise.
7617         * opts.c (finish_options): Remove error checking of invalid
7618         value ranges.
7619         (MAX_CODE_ALIGN): Remove.
7620         (MAX_CODE_ALIGN_VALUE): Likewise.
7621         (parse_and_check_align_values): New function.
7622         (check_alignment_argument): Likewise.
7623         (common_handle_option): Use check_alignment_argument.
7624         * opts.h (parse_and_check_align_values): Declare.
7625         * toplev.c (init_alignments): Remove.
7626         (read_log_maxskip): New.
7627         (parse_N_M): Likewise.
7628         (parse_alignment_opts): Likewise.
7629         (backend_init_target): Remove usage of init_alignments.
7630         * toplev.h (parse_alignment_opts): Declare.
7631         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7632         argument.
7633         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7634         * tree.c (cl_option_hasher::equal): New.
7635         * varasm.c: Use new global macros.
7637 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
7639         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7640         Use a simpler align directive also if MAXSKIP = ALIGN-1.
7641         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7642         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7643         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7644         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7645         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7646         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7647         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7648         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7649         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7650         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7651         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7653 2018-07-04  Martin Liska  <mliska@suse.cz>
7654             Jonathan Wakely  <jwakely@redhat.com>
7656         * coverage.c: Use correct type.
7657         * doc/invoke.texi: Language correction.
7659 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
7661         PR target/85620
7662         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7663         ENDBRANCH for non-tail call which may return via indirect branch.
7664         * doc/extend.texi: Document indirect_return attribute.
7666 2018-07-03  Martin Sebor  <msebor@redhat.com>
7668         PR tree-optimization/86274
7669         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7670         precondition.
7671         (format_floating): Correct handling of infinities and NaNs.
7673 2018-07-03  Martin Sebor  <msebor@redhat.com>
7675         * print-tree.c (print_real_cst): New function.
7676         (print_node_brief): Call it.
7677         (print_node): Ditto.
7679 2018-07-03  Jeff Law  <law@redhat.com>
7681         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7682         into a single pattern.
7684         * config/h8300/h8300.md (ors code_iterator): New.
7685         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7686         a single pattern and single splitter.
7687         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7688         (iorqi3_1, xorqi3_1): Likewise.
7689         (iorqi3, xorqi3 expanders): Similarly.
7691         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7692         (movmd_internal) into a single pattern using the P mode iterator.
7693         (movmd splitters): Similarly.
7694         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7695         (movsd splitters): Similarly.
7697         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7698         ADDB, ADDW and ADDL into a single ADD attribute which selects the
7699         right table based on the size of the operand.
7700         * config/h8300/h8300.md (length_table): Corresponding changes. All
7701         references to "addb", "addw" and "addl" changed to "add".
7702         (btst patterns): Merge two variants into a single pattern.
7703         (tstqi, tsthi): Likewise.
7704         (addhi3_incdec, addsi3_incdec): Likewise.
7705         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7706         (mulhi3, mulsi3): Likewise.
7707         (udivhi3, udivsi3): Likewise.
7708         (divhi3, divsi3): Likewise.
7709         (andorqi3, andorhi3, andorsi3): Likewise.
7711 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
7713         PR target/85694
7714         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7715         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7717 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7719         PR tree-optimization/85694
7720         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7721         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7722         UNSPEC_URHADD.
7723         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7724         (<u>avg<mode>3_ceil): New patterns.
7726 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
7728         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7729         scan-tree-dump directive.
7730         * gcc.dg/vect/slp-perm-2.c: Likewise.
7731         * gcc.dg/vect/slp-perm-3.c: Likewise.
7732         * gcc.dg/vect/slp-perm-5.c: Likewise.
7733         * gcc.dg/vect/slp-perm-6.c: Likewise.
7734         * gcc.dg/vect/slp-perm-7.c: Likewise.
7735         * gcc.dg/vect/slp-perm-8.c: Likewise.
7737 2018-07-03  Marek Polacek  <polacek@redhat.com>
7739         PR middle-end/86202
7740         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7742 2018-07-03  Richard Biener  <rguenther@suse.de>
7744         PR ipa/86389
7745         * tree-ssa-structalias.c (find_func_clobbers): Properly
7746         handle indirect calls.
7748 2018-07-03  Jeff Law  <law@redhat.com>
7750         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7751         (shifts): New code iterator.
7752         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7753         expander.  Fix HImode handling on H8/SX.
7754         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7755         (subqi3, subhi3, subsi3 expanders): Likewise.
7756         (andqi3, andhi3, andsi3 expanders): Likewise.
7757         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7758         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7759         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7760         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7761         (zero_extendqihi2, zero_extendqisi2): Likewise.
7762         (extendqihi2, extendqisi2): Likewise.
7763         (rotlqi3, rotlhi3, rotlsi3): Likewise.
7764         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7765         (rotlqi3_1, rotlhi3_1): Likewise.
7766         (logicalhi3_sn, logicalsi3_sn): Likewise.
7767         (logicalhi3, logicalsi3): Likewise.
7769 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7771         * tree-vect-patterns.c (vect_recog_rotate_pattern)
7772         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7773         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7774         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7775         type to append_pattern_def_seq instead of creating a stmt_vec_info
7776         directly.
7777         (build_mask_conversion): Likewise.  Remove vinfo argument.
7778         (vect_add_conversion_to_patterm): Likewise, renaming to...
7779         (vect_add_conversion_to_pattern): ...this.
7780         (vect_recog_mask_conversion_pattern): Update call to
7781         build_mask_conversion.  Pass the vector type to
7782         append_pattern_def_seq here too.
7783         (vect_recog_gather_scatter_pattern): Update call to
7784         vect_add_conversion_to_pattern.
7786 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7788         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7789         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7790         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7791         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7792         STMT_VINFO_PATTERN_DEF_SEQ to null here.
7793         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7794         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7795         append_pattern_def_seq instead of new_pattern_def_seq.
7796         (vect_recog_divmod_pattern): Do both of the above.
7797         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7798         is null.
7800 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7802         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7803         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7804         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7805         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7806         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7807         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7808         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7809         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7810         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7811         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7812         parameter with a single stmt_vec_info.
7813         (vect_recog_func_ptr): Likewise.
7814         (vect_recog_gather_scatter_pattern): Likewise, folding in...
7815         (vect_try_gather_scatter_pattern): ...this.
7816         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7817         the stmt_vec_info of the statement to be matched.  Don't clear
7818         STMT_VINFO_RELATED_STMT.
7819         (vect_pattern_recog): Update call accordingly.
7821 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7823         PR tree-optimization/85694
7824         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7825         (uavgM3_ceil): Document new optabs.
7826         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7827         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7828         functions.
7829         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7830         (savg_ceil_optab): New optabs.
7831         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7832         (vect_vect_recog_func_ptrs): Add it.
7833         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7834         constant directly from the associated lhs.
7836 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7838         * tree-vect-patterns.c (vect_split_statement): New function.
7839         (vect_convert_input): Use it to try to split an existing cast.
7841 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7843         * poly-int.h (print_hex): New function.
7844         * dumpfile.h (dump_dec, dump_hex): Declare.
7845         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7846         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7847         min_input_precision, operation_precision and operation_sign.
7848         * tree-vect-patterns.c (vect_get_range_info): New function.
7849         (vect_same_loop_or_bb_p, vect_single_imm_use)
7850         (vect_operation_fits_smaller_type): Delete.
7851         (vect_look_through_possible_promotion): Add an optional
7852         single_use_p parameter.
7853         (vect_recog_over_widening_pattern): Rewrite to use new
7854         stmt_vec_info infomration.  Handle one operation at a time.
7855         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7856         (vect_truncatable_operation_p, vect_set_operation_type)
7857         (vect_set_min_input_precision): New functions.
7858         (vect_determine_min_output_precision_1): Likewise.
7859         (vect_determine_min_output_precision): Likewise.
7860         (vect_determine_precisions_from_range): Likewise.
7861         (vect_determine_precisions_from_users): Likewise.
7862         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7863         (vect_vect_recog_func_ptrs): Put over_widening first.
7864         Add cast_forwprop.
7865         (vect_pattern_recog): Call vect_determine_precisions.
7867 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7869         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7870         statements that have been replaced by further pattern statements.
7871         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7873 2018-07-03  Richard Biener  <rguenther@suse.de>
7875         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7876         always set *dt.  Dump vectype in vectype overload.
7877         * dumpfile.h (dump_gimple_expr): New function.
7878         (dump_gimple_expr_loc): Likewise.
7879         * dumpfile.c (dump_gimple_expr): New function.
7880         (dump_gimple_expr_loc): Likewise.
7882 2018-07-02  Jeff Law  <law@redhat.com>
7884         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7885         the H8/300, H8/300H and H8/S variants into a single pattern.
7886         (movhi_h8300, movqi_h8300hs): Similarly.
7887         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7888         (QHI mode iterator): New.
7890         * config/h8300/h8300.md: Remove trailing whitespace.
7892 2018-07-02  Jim Wilson  <jimw@sifive.com>
7894         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7895         instead of emit_insn for interrupt returns.
7896         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7897         (riscv_sret, riscv_uret): Likewise.
7899 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
7901         * pretty-print.c (selftest::test_pp_format): Move save and restore
7902         of quotes to class auto_fix_quotes, and add an instance.
7903         * selftest.c: Include "intl.h".
7904         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7905         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7906         * selftest.h (selftest::auto_fix_quotes): New class.
7908 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
7910         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7911         (aarch64_sve_prepare_conditional_op): Remove.
7912         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7913         Allow aarch64_simd_reg_or_zero as select operand; remove
7914         the aarch64_sve_prepare_conditional_op call.
7915         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7916         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7917         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7918         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7919         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7920         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7921         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7922         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7923         and a splitters to match all of the *_any patterns.
7924         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7926         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7927         (SVE_COND_FP_BINARY_REV): Remove.
7928         (sve_int_op_rev, sve_fp_op_rev): New.
7929         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7930         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7931         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7932         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7933         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7934         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7935         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7936         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7937         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7939         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7940         Remove match_dup 1 from the inner unspec.
7941         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7943         * config/aarch64/aarch64.md (movprfx): New attr.
7944         (length): Default movprfx to 8.
7945         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7946         (*madd<SVE_I>, *msub<SVE_I): Likewise.
7947         (*<su>mul<SVE_I>3_highpart): Likewise.
7948         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7949         (*v<ASHIFT><SVE_I>3): Likewise.
7950         (*<su><MAXMIN><SVE_I>3): Likewise.
7951         (*<su><MAXMIN><SVE_F>3): Likewise.
7952         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7953         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7954         (*div<SVE_F>4): Likewise.
7956 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
7958         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7959         in dump string.
7961 2018-07-02  Richard Biener  <rguenther@suse.de>
7963         PR tree-optimization/86363
7964         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7965         memset argument refers to a non-variable address.
7967 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
7969         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7970         {PLUS,MINUS}_EXPR code to...
7971         (adjust_symbolic_bound): ...here,
7972         (combine_bound): ...here,
7973         (set_value_range_with_overflow): ...and here.
7975 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
7977         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7978         code...
7979         (extract_range_from_abs_expr): ...here.
7981 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7983         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7984         -fno-omit-frame-pointer when not optimizing.
7986 2018-07-02  Martin Liska  <mliska@suse.cz>
7988         PR ipa/86279
7989         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7990         (propagate_nothrow): Likewise.
7992 2018-07-02  Martin Liska  <mliska@suse.cz>
7994         PR ipa/86323
7995         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7997 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
7999         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
8000         function in r262149, changing "loc" param from source_location to
8001         const dump_location_t &.
8002         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
8003         declaration, as above.
8005 2018-07-01  Paul Koning  <ni1d@arrl.net>
8007         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8008         -munit-asm, -mgnu-asm, -mdec-asm.
8009         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
8010         (pdp11_output_labelref): New.
8011         (pdp11_output_def): New.
8012         (pdp11_output_addr_vec_elt): New.
8013         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
8014         %# and %@ format codes.
8015         (pdp11_option_override): New.
8016         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
8017         (pdp11_output_ident): New.
8018         (pdp11_asm_named_section): New.
8019         (pdp11_asm_init_sections): New.
8020         (pdp11_file_start): New.
8021         (pdp11_file_end): New.
8022         (output_ascii): Use .ascii/.asciz for -mdec-asm.
8023         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
8024         %o, like %c but octal.
8025         (pdp11_option_override): New.
8026         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
8027         -mdec-asm.
8028         (DATA_SECTION_ASM_OP): Ditto.
8029         (READONLY_DATA_SECTION_ASM_OP): New.
8030         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
8031         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
8032         (ASM_OUTPUT_LABELREF): Ditto.
8033         (ASM_OUTPUT_DEF): Ditto.
8034         (ASM_OUTPUT_EXTERNAL): New.
8035         (ASM_OUTPUT_SOURCE_FILENAME): New.
8036         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
8037         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
8038         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
8039         %# and %@ format codes.
8040         * config/pdp11/pdp11.opt (mgnu-asm): New.
8041         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
8042         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
8043         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
8045 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
8047         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
8048         dereferencing path[] beyond its length.
8049         (debug_path): New.
8050         (debug_all_paths): New.
8051         (rewire_first_differing_edge): New.
8052         (adjust_paths_after_duplication): New.
8053         (duplicate_thread_path): Call adjust_paths_after_duplication.
8054         Add new argument.
8055         (thread_through_all_blocks): Add new argument to
8056         duplicate_thread_path.
8058 2018-06-30  Jim Wilson  <jimw@sifive.com>
8060         * config/riscv/predicates.md (p2m1_shift_operand): New.
8061         (high_mask_shift_operand): New.
8062         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
8063         pattern using p2m1_shift_operand.
8064         (lshsi3_zero_extend_3+2): New combiner pattern using
8065         high_mask_shift_operand.
8067 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8069         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
8070         split out from...
8071         (vect_recog_rotate_pattern): ...here.
8072         (vect_convert_input): Try to insert casts of invariants in the
8073         preheader.
8074         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
8075         preheader to be empty.
8077 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8079         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
8080         vector type.  If given, install it in the new statement's
8081         STMT_VINFO_VECTYPE.
8082         (vect_element_precision): New function.
8083         (vect_unpromoted_value): New struct.
8084         (vect_unpromoted_value::vect_unpromoted_value): New function.
8085         (vect_unpromoted_value::set_op): Likewise.
8086         (vect_look_through_possible_promotion): Likewise.
8087         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
8088         (vect_widened_op_tree, vect_convert_input): Likewise.
8089         (vect_convert_inputs, vect_convert_output): Likewise.
8090         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
8091         to handle the optional cast of the multiplication result and
8092         vect_widened_op_tree to detect the widened multiplication itself.
8093         Do not require the input and output of promotion casts to have
8094         the same sign, but base the signedness of the operation on the
8095         input rather than the result.  If the pattern includes two
8096         promotions, check that those promotions have the same sign.
8097         Do not restrict the MULT_EXPR handling to a double-width result;
8098         handle quadruple-width results and wider.  Use vect_convert_inputs
8099         to convert the inputs to the common type.
8100         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
8101         to handle the optional cast of the ABS result.  Also allow a sign
8102         change or a sign extension between the ABS and MINUS.
8103         Use vect_widened_op_tree to detect the widened subtraction and use
8104         vect_convert_inputs to convert the inputs to the common type.
8105         (vect_handle_widen_op_by_const): Delete.
8106         (vect_recog_widen_op_pattern): New function.
8107         (vect_recog_widen_mult_pattern): Use it.
8108         (vect_recog_widen_shift_pattern): Likewise.
8109         (vect_recog_widen_sum_pattern): Use
8110         vect_look_through_possible_promotion to handle the promoted
8111         PLUS_EXPR operand.
8113 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8115         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
8116         the containing gimple_seq *.
8117         * gimple-iterator.h (gsi_for_stmt): Declare it.
8118         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
8119         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
8120         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
8121         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8122         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
8123         checks.
8124         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
8125         split out from...
8126         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
8127         statement being replaced is part of an existing pattern
8128         definition sequence, inserting the new pattern statements before
8129         the original one.
8130         (vect_pattern_recog_1): Don't return a bool.  If the statement
8131         is already part of a pattern, instead apply pattern matching
8132         to the pattern definition statements.  Don't clear the
8133         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
8134         (vect_pattern_recog): Don't break after the first match;
8135         continue processing the pattern definition statements instead.
8136         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
8138 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8140         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8141         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8142         (vect_recog_widen_sum_pattern): Use it.
8144 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8146         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8147         phi is not a pattern statement and has not been replaced by
8148         a pattern statement.
8149         * tree-vect-patterns.c (type_conversion_p): Don't check
8150         STMT_VINFO_IN_PATTERN_P.
8151         (vect_recog_vector_vector_shift_pattern): Likewise.
8152         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
8153         the pattern statement rather than the original statement; check
8154         directly for a WIDEN_MULT_EXPR here.
8155         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
8156         vect_is_simple_use to return the pattern statement rather
8157         than the original statement; use is_pattern_stmt_p to check
8158         for such a pattern statement.
8159         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
8160         to return the pattern statement rather than the original statement;
8161         don't do the same transformation here.
8162         (vect_is_simple_use): If the defining statement has been replaced
8163         by a pattern statement, return the pattern statement instead.
8164         Remove the corresponding (local) transformation from the vectype
8165         overload.
8167 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8169         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
8170         end and default to null.
8171         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8172         (vectorizable_reduction): Update calls accordingly, dropping the
8173         gimple ** argument if the passed-back statement isn't needed.
8174         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
8175         (vect_recog_rotate_pattern): Likewise.
8176         (vect_recog_mask_conversion_pattern): Likewise.
8177         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8178         (vect_mask_constant_operand_p): Likewise.
8179         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
8180         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
8181         (get_group_load_store_type, get_load_store_type): Likewise.
8182         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
8183         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
8184         (vectorizable_conversion, vectorizable_assignment): Likewise.
8185         (vectorizable_shift, vectorizable_operation): Likewise.
8186         (vectorizable_store, vect_is_simple_cond): Likewise.
8187         (vectorizable_condition, vectorizable_comparison): Likewise.
8188         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
8189         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
8190         and move it to the end.  Cope with null def_stmt_outs.
8192 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8194         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
8196 2018-06-29  Jeff Law  <law@redhat.com>
8198         * config/v850/v850.c (v850_legitimate_address_p): Handle large
8199         displacements for TARGET_V850E2V3 and newer.
8200         (TARGET_LRA_P): Remove.  Defaults to LRA now.
8201         * config/v850/v850.md (sign23byte_load): Remove.
8202         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
8203         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
8205 2018-06-29  Martin Liska  <mliska@suse.cz>
8207         PR lto/85759
8208         * coverage.c (coverage_init): Mangle full path name.
8209         * doc/invoke.texi: Document the change.
8210         * gcov-io.c (mangle_path): New.
8211         * gcov-io.h (mangle_path): Likewise.
8212         * gcov.c (mangle_name): Use mangle_path for path mangling.
8214 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8216         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
8217         if starting source register is not even.
8219 2018-06-29  Martin Liska  <mliska@suse.cz>
8221         PR tree-optimization/86263
8222         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
8223         Make edge redirection.
8225 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
8227         * dumpfile.c (dump_loc): Add indentation based on scope depth.
8228         (dump_scope_depth): New variable.
8229         (get_dump_scope_depth): New function.
8230         (dump_begin_scope): New function.
8231         (dump_end_scope): New function.
8232         * dumpfile.h (get_dump_scope_depth): New declaration.
8233         (dump_begin_scope): New declaration.
8234         (dump_end_scope): New declaration.
8235         (class auto_dump_scope): New class.
8236         (AUTO_DUMP_SCOPE): New macro.
8237         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
8238         AUTO_DUMP_SCOPE.
8240 2018-06-29  Richard Biener  <rguenther@suse.de>
8242         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
8243         compute_all_dependences succeeds.
8244         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
8245         exceed --param loop-max-datarefs-for-datadeps.
8247 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
8249         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
8251 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
8253         PR target/86348
8254         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
8255         alternative 0 in preferred_for_speed attribute.
8257 2018-06-28  Paul Koning  <ni1d@arrl.net>
8259         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
8260         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
8261         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
8262         * config/pdp11/pdp11.md: Correct "length" attribute calculation
8263         for shift insn patterns.
8265 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
8267         * cgraph.c (cgraph_node::get_body): Replace assignments to
8268         "dump_file" with calls to set_dump_file.
8269         * dumpfile.c (alt_dump_file): Make static, and group with...
8270         (alt_flags): ...this definition.
8271         (dumps_are_enabled): New variable.
8272         (refresh_dumps_are_enabled): New function.
8273         (set_dump_file): New function.
8274         (set_alt_dump_file): New function.
8275         (gcc::dump_manager::dump_start): Replace assignments to
8276         "dump_file" and "alt_dump_file" with calls to set_dump_file and
8277         set_alt_dump_file.
8278         (gcc::dump_manager::dump_finish): Likewise.
8279         * dumpfile.h (alt_dump_file): Delete decl.
8280         (dumps_are_enabled): New variable decl.
8281         (set_dump_file): New function decl.
8282         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
8283         global.
8284         * tree-nested.c (lower_nested_functions): Replace assignments to
8285         "dump_file" with calls to set_dump_file.
8287 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
8289         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
8290         goto_locus of each outgoing edge of each basic block.
8292 2018-06-28  Richard Biener  <rguenther@suse.de>
8294         * dwarf2out.c (decl_scope_table): Remove.
8295         (push_decl_scope): Likewise.
8296         (pop_decl_scope): Likewise.
8297         (gen_type_die_for_member): Do not call push/pop_decl_scope.
8298         (gen_struct_or_union_type_die): Likewise.
8299         (gen_tagged_type_die): Likewise.
8300         (dwarf2out_init): Do not initialize decl_scope_table.
8301         (dwarf2out_c_finalize): Do not free it.
8303 2018-06-28  Richard Biener  <rguenther@suse.de>
8305         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
8306         deciding whether to not re-use a DIE.
8308 2018-06-28  Richard Biener  <rguenther@suse.de>
8310         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
8311         DW_AT_abstract_origin attribute.
8313 2018-06-28  Martin Liska  <mliska@suse.cz>
8315         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8316         Use newly introduced constants.
8317         * tree-switch-conversion.h (struct jump_table_cluster):
8318         Define max_ratio_for_size and max_ratio_for_speed.
8320 2018-06-28  Martin Liska  <mliska@suse.cz>
8322         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8323         Add new checking assert to catch invalid state.
8324         (jump_table_cluster::can_be_handled): Handle single case
8325         clusters.
8326         (jump_table_cluster::is_beneficial): Bail out for such case.
8327         (bit_test_cluster::find_bit_tests):
8328         Add new checking assert to catch invalid state.
8329         (bit_test_cluster::can_be_handled): Handle single case
8330         clusters.
8331         (bit_test_cluster::is_beneficial): Bail out for such case.
8332         (switch_decision_tree::analyze_switch_statement):
8333         Fix comment.
8335 2018-06-28  Martin Liska  <mliska@suse.cz>
8337         * common.opt: Introduce -completion option.
8338         * gcc.c (driver_handle_option): Handle it.
8339         (driver::main): Print completions if completion
8340         is set.
8341         * opt-suggestions.c (option_proposer::get_completions):
8342         New function.
8343         (option_proposer::suggest_completion): Likewise.
8344         (option_proposer::find_param_completions): Likewise.
8345         (verify_autocompletions): Likewise.
8346         (test_completion_valid_options): Likewise.
8347         (test_completion_valid_params): Likewise.
8348         (in_completion_p): Likewise.
8349         (empty_completion_p): Likewise.
8350         (test_completion_partial_match): Likewise.
8351         (test_completion_garbage): Likewise.
8352         (opt_proposer_c_tests): Likewise.
8353         * opt-suggestions.h: Declare new functions.
8354         * opts.c (common_handle_option): Handle OPT__completion_.
8355         * selftest-run-tests.c (selftest::run_tests): Add
8356         opt_proposer_c_tests.
8357         * selftest.c (assert_str_startswith): New.
8358         * selftest.h (assert_str_startswith): Likewise.
8359         (opt_proposer_c_tests): New.
8360         (ASSERT_STR_STARTSWITH): Likewise.
8362 2018-06-28  Martin Liska  <mliska@suse.cz>
8364         * Makefile.in: Add opt-suggestions.o.
8365         * gcc-main.c: Include opt-suggestions.h.
8366         * gcc.c (driver::driver): Likewise.
8367         (driver::~driver): Remove m_option_suggestions.
8368         (driver::build_option_suggestions): Moved to option_proposer.
8369         (driver::suggest_option): Likewise.
8370         (driver::handle_unrecognized_options): Use option_proposer.
8371         * gcc.h (class driver): Add new memver m_option_proposer.
8372         * opt-suggestions.c: New file.
8373         * opt-suggestions.h: New file.
8375 2018-06-28  Martin Liska  <mliska@suse.cz>
8377         * vec.h (class auto_string_vec): New (moved from auto_argvec).
8378         (auto_string_vec::~auto_string_vec): Likewise.
8380 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
8382         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
8383         prevent_decl_creation_for_types fields up and add reset_location field.
8384         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
8385         statement if id->reset_location is true.
8386         (copy_edges_for_bb): Do not set goto_locus on the new edges if
8387         id->reset_location is true.
8388         (copy_phis_for_bb): Force input_location on the arguments if
8389         id->reset_location is true.
8390         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
8391         is set on the function to be inlined.
8393 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
8395         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
8397 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
8399         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
8400         registers for Pmode.
8401         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
8402         hard registers for the clobbered pseudo.
8404 2018-06-27  Paul Koning  <ni1d@arrl.net>
8406         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8407         mutually exclusive options.
8408         * config/pdp11/constraints.md (h): New constraint.
8409         (O): Update definition to match shift code generation.
8410         (D): New constraint.
8411         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
8412         (CCFP): Remove.
8413         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
8414         function.
8415         (output_jump): Change arguments.
8416         (pdp11_fixed_cc_regs): New function.
8417         (pdp11_cc_mode): Ditto.
8418         (pdp11_expand_shift): Ditto.
8419         (pdp11_assemble_shift): Ditto.
8420         (pdp11_small_shift): Ditto.
8421         (pdp11_branch_cost): Remove.
8422         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
8423         from output.
8424         (pdp11_register_move_cost): Update for CC registers.
8425         (pdp11_rtx_costs): Add case for LSHIFTRT.
8426         (pdp11_output_jump): Add CCNZ mode conditional branches.
8427         (notice_update_cc_on_set): Remove.
8428         (pdp11_cc_mode): New function.
8429         (simple_memory_operand): Correct pre/post decrement case.
8430         (no_side_effect_operand): New function.
8431         (pdp11_regno_reg_class): Add CC_REGS class.
8432         (pdp11_fixed_cc_regs): New function.
8433         (pdp11_small_shift): New function.
8434         (pdp11_expand_shift): New function to expand shift insns.
8435         (pdp11_assemble_shift): New function to output shifts.
8436         (pdp11_branch_cost): Remove.
8437         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8438         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8439         (WCHAR_TYPE): Ditto.
8440         (PTRDIFF_TYPE): Ditto.
8441         (ADJUST_INSN_LENGTH): New macro.
8442         (FIXED_REGISTERS): Add CC registers.
8443         (CALL_USED_REGISTERS): Ditto.
8444         (reg_class): Ditto.
8445         (REG_CLASS_NAMES): Ditto.
8446         (REG_CLASS_CONTENTS): Ditto.
8447         (SELECT_CC_MODE): Use new function.
8448         (TARGET_FLAGS_REGNUM): New macro.
8449         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8450         (cc0_reg_rtx): Remove.
8451         (CC_STATUS_MDEP): Remove.
8452         (CC_STATUS_MDEFP_INIT): Remove.
8453         (CC_IN_FPU): Remove.
8454         (NOTICE_UPDATE_CC): Remove.
8455         (REGISTER_NAMES): Add CC registers.
8456         (BRANCH_COST): Change to constant 1.
8457         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8458         handling.
8459         * config/pdp11/pdp11.opt (mbcopy): Remove.
8460         (mbcopy-builtin): Remove.
8461         (mbranch-cheap): Remove.
8462         (mbranch-expensive): Remove.
8463         * config/pdp11/predicates.md (expand_shift_operand): Update to
8464         match shift code generation.
8465         (ccnz_operator): New predicate.
8466         * doc/invoke.texi (PDP-11 Options): Remove deleted options
8467         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8468         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
8469         exclusive options.
8470         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
8471         description of O constraint.
8473 2018-06-27  Jeff Law  <law@redhat.com>
8474             Austin Law  <austinklaw@gmail.com>
8476         * config/v850/v850.md (addsi3_set_flags): New pattern.
8477         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8478         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8479         (zero_extendhisi2_v850_set_flags): Likewise.
8480         (zero_extendqisi2_v850_set_flags): Likewise.
8481         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8482         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8483         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8485         * config/v850/v850-protos.h (notice_update_cc): Remove.
8486         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8487         (v850_print_operand): Handle 'D' and "d".
8488         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8489         Add handling of arithmetic/logical operations compared against zero.
8490         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8491         Do not look at v850_compare_op, instead get mode from last argument.
8492         (v850_gen_compare): Remove
8493         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8494         after reload for prologue insns.
8495         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8496         patterns.
8497         (construct_save_jarl): Likewise.
8498         (TARGET_FLAGS_REGNUM): Define.
8499         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8500         (NOTICE_UPDATE_CC): Remove.
8501         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8502         than cc0.  Conditionalize on reload_completed.
8503         (cmpsi_insn, setfcc_insn): Likewise.
8504         (tst1 splitter): Turn into define_and_split which sets the flags
8505         after reload.
8506         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8507         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8508         (cstoresf4, cstoredf4): Clobber the flags.
8509         (cmpsi, cmpsf, cmpdf): Remove expanders.
8510         (setf_insn): Remove pattern.
8511         (addsi3): Turn into define_and_split which clobbers the flags after
8512         reload and a suitable pattern (addsi3_clobber_flags) for use after
8513         reload.
8514         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8515         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8516         (ashrsi3, ashrsi3_v850e2): Likewise.
8517         (bins): Clobber the flags.
8518         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8519         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8520         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8521         (call_value_internal_short, call_value_internal_long): Likewise.
8522         (callt_save_interrupt, callt_return_interrupt): Likewise.
8523         (save_interrupt, return_interrupt): Likewise.
8524         (callt_save_all_interrupt, save_all_interrupt): Likewise.
8525         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8526         (restore_all_interrupt, _restore_all_interrupt): Likewise.
8527         (All FP comparisons): Only allow after reload has completed.
8528         (trfsr): Likewise.
8529         (divh, divhu): Tweak output template.
8530         (branch_z_normal, branch_z_invert): Remove
8531         (branch_nz_normal, branch_nz_invert): Likewise.
8532         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8534         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8535         * config/v850/v850.c (notice_update_cc): Remove.
8536         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
8537         (CC_NO_CARRY): Likewise.
8538         (NOTICE_UPDATE_CC): Define to nothing.
8539         * config/v850/v850.md: Remove block comment on cc0 handling
8540         Remove "cc" attribute from all patterns.  Remove cc_status handling
8541         from all patterns.  Minor formatting fixes.
8543 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8545         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8546         (cortex-a76.cortex-a55): Likewise.
8547         * config/aarch64/aarch64-tune.md: Regenerate.
8548         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8549         cortex-a76.cortex-a55.
8551 2018-06-27  Jeff Law  <law@redhat.com>
8553         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8554         (MULTILIB_DIRNAMES): Similarly.
8556 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
8558         * gimple.h (gimple_return_retbnd): Delete.
8559         (gimple_return_set_retbnd): Likewise.
8560         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8561         gimple_return_set_retbnd.
8562         * gimple-pretty-print.c (dump_gimple_return): Remove call to
8563         gimple_return_retbnd and adjust.
8564         * tree-inline.h (struct copy_body_data): Remove retbnd field.
8565         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8566         Explicitly return NULL in a couple more cases.  Move assertion
8567         on debug statements and remove unreachable code.
8568         (reset_debug_binding): Do not test id->retbnd.
8569         (expand_call_inline): Do not set it.
8571 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8573         * configure.ac: Add --disable-gcov option.
8574         * configure: Regenerate.
8575         * Makefile.in: Honour @enable_gcov@.
8576         * doc/install.texi: Document --disable-gcov.
8578 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8580         * config/arm/arm-cpus.in (cortex-a76): New entry.
8581         (cortex-a76.cortex-a55): Likewise.
8582         * config/arm/arm-tables.opt: Regenerate.
8583         * config/arm/arm-tune.md: Likewise.
8584         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8585         * doc/invoke.texi (ARM Options): Document cortex-a76 and
8586         cortex-a76.cortex-a55.
8588 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
8590         PR target/85769
8591         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8593 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
8595         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8596         comment.
8597         (EPILOGUE_USES): Likewise.
8599 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
8601         * tree-inline.c (remap_location): New function extracted from...
8602         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
8603         (copy_phis_for_bb): ...here.  Call remap_location.
8604         (copy_cfg_body): Adjust call to copy_edges_for_bb.
8606 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
8608         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8609         unaligned vsx for 16B memset.
8611 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
8613         PR target/86285
8614         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8615         ieee128_float_type_node to long_double_type_node unless
8616         TARGET_LONG_DOUBLE_128 is set.
8618 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
8620         * cfgloop.c (get_loop_location): Convert return type from
8621         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8622         by implicit construction from rtx_insn *, and using
8623         dump_user_location_t::from_function_decl for the fallback case.
8624         * cfgloop.h (get_loop_location): Convert return type from
8625         location_t to dump_user_location_t.
8626         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8627         dump_printf_loc to pass in a dump_location_t rather than a
8628         location_t, via the gimple stmt.
8629         * coverage.c (get_coverage_counts): Update calls to
8630         dump_printf_loc to pass in dump_location_t rather than a
8631         location_t.
8632         * doc/optinfo.texi (Dump types): Convert example of
8633         dump_printf_loc from taking "locus" to taking "insn".  Update
8634         description of the "_loc" calls to cover dump_location_t.
8635         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8636         "selftest.h".
8637         (dump_user_location_t::dump_user_location_t): New constructors,
8638         from gimple *stmt and rtx_insn *.
8639         (dump_user_location_t::from_function_decl): New function.
8640         (dump_loc): Make static.
8641         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8642         const dump_location_t &.
8643         (dump_generic_expr_loc): Delete.
8644         (dump_printf_loc): Convert param "loc" from location_t to
8645         const dump_location_t &.
8646         (selftest::test_impl_location): New function.
8647         (selftest::dumpfile_c_tests): New function.
8648         * dumpfile.h: Include "profile-count.h".
8649         (class dump_user_location_t): New class.
8650         (struct dump_impl_location_t): New struct.
8651         (class dump_location_t): New class.
8652         (dump_printf_loc): Convert 2nd param from source_location to
8653         const dump_location_t &.
8654         (dump_generic_expr_loc): Delete.
8655         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8656         const dump_location_t &.
8657         * gimple-fold.c (fold_gimple_assign): Update call to
8658         dump_printf_loc to pass in a dump_location_t rather than a
8659         location_t, via the gimple stmt.
8660         (gimple_fold_call): Likewise.
8661         * gimple-loop-interchange.cc
8662         (loop_cand::analyze_iloop_reduction_var): Update for change to
8663         check_reduction_path.
8664         (tree_loop_interchange::interchange): Update for change to
8665         find_loop_location.
8666         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8667         change in return-type of find_loop_location.
8668         (graphite_regenerate_ast_isl): Likewise.
8669         * graphite-optimize-isl.c (optimize_isl): Likewise.
8670         * graphite.c (graphite_transform_loops): Likewise.
8671         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8672         pass in a dump_location_t rather than a location_t, via the
8673         gimple stmt.
8674         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8675         * ipa.c (walk_polymorphic_call_targets): Likewise.
8676         * loop-unroll.c (report_unroll): Convert "locus" param from
8677         location_t to dump_location_t.
8678         (decide_unrolling): Update for change to get_loop_location's
8679         return type.
8680         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8681         location_t to dump_user_location_t.
8682         (grid_find_single_omp_among_assignments_1): Updates calls to
8683         dump_printf_loc to pass in a dump_location_t rather than a
8684         location_t, via the gimple stmt.
8685         (grid_parallel_clauses_gridifiable): Convert "tloc" from
8686         location_t to dump_location_t.  Updates calls to dump_printf_loc
8687         to pass in a dump_location_t rather than a location_t, via the
8688         gimple stmt.
8689         (grid_inner_loop_gridifiable_p): Likewise.
8690         (grid_dist_follows_simple_pattern): Likewise.
8691         (grid_gfor_follows_tiling_pattern): Likewise.
8692         (grid_target_follows_gridifiable_pattern): Likewise.
8693         (grid_attempt_target_gridification): Convert initialization
8694         of local "grid" from memset to zero-initialization; FIXME: does
8695         this require C++11?  Update call to dump_printf_loc to pass in a
8696         optinfo_location rather than a location_t, via the gimple stmt.
8697         * profile.c (read_profile_edge_counts): Updates call to
8698         dump_printf_loc to pass in a dump_location_t rather than a
8699         location_t
8700         (compute_branch_probabilities): Likewise.
8701         * selftest-run-tests.c (selftest::run_tests): Call
8702         dumpfile_c_tests.
8703         * selftest.h (dumpfile_c_tests): New decl.
8704         * tree-loop-distribution.c (pass_loop_distribution::execute):
8705         Update for change in return type of find_loop_location.
8706         * tree-parloops.c (parallelize_loops): Likewise.
8707         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8708         "locus" from location_t to dump_user_location_t.
8709         (canonicalize_loop_induction_variables): Likewise.
8710         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8711         for change in return type of find_loop_location.
8712         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8713         to dump_printf_loc to pass in a dump_location_t rather than a
8714         location_t, via the stmt.
8715         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8716         Likewise.
8717         * tree-vect-loop-manip.c (find_loop_location): Convert return
8718         type from source_location to dump_user_location_t.
8719         (vect_do_peeling): Update for above change.
8720         (vect_loop_versioning): Update for change in type of
8721         vect_location.
8722         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8723         from location_t to dump_user_location_t.
8724         (vect_estimate_min_profitable_iters): Update for change in type
8725         of vect_location.
8726         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8727         location_t to dump_location_t.
8728         (vect_slp_bb): Update for change in type of vect_location.
8729         * tree-vectorizer.c (vect_location): Convert from source_location
8730         to dump_user_location_t.
8731         (try_vectorize_loop_1): Update for change in vect_location's type.
8732         (vectorize_loops): Likewise.
8733         (increase_alignment): Likewise.
8734         * tree-vectorizer.h (vect_location): Convert from source_location
8735         to dump_user_location_t.
8736         (find_loop_location): Convert return type from source_location to
8737         dump_user_location_t.
8738         (check_reduction_path): Convert 1st param from location_t to
8739         dump_user_location_t.
8740         * value-prof.c (check_counter): Update call to dump_printf_loc to
8741         pass in a dump_user_location_t rather than a location_t; update
8742         call to error_at for change in type of "locus".
8743         (check_ic_target): Update call to dump_printf_loc to
8744         pass in a dump_user_location_t rather than a location_t, via the
8745         call_stmt.
8747 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
8749         * config/s390/s390.h (enum processor_flags): Do not use
8750         default tune parameter when -march was specified.
8752 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
8754         PR target/86314
8755         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8756         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8757         operands.
8759 2018-06-26  Richard Biener  <rguenther@suse.de>
8761         PR tree-optimization/86287
8762         PR bootstrap/86316
8763         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8764         (vect_analyze_loop): Initialize n_stmts.
8766 2018-06-26  Richard Biener  <rguenther@suse.de>
8768         PR middle-end/86271
8769         * fold-const.c (fold_convertible_p): Pointer extension
8770         isn't valid.
8772 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
8774         PR debug/86064
8775         * dwarf2out.c (loc_list_has_views): Adjust comments.
8776         (dw_loc_list): Split single cross-partition range with
8777         nonzero locview.
8779 2018-06-25  Jeff Law  <law@redhat.com>
8781         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8782         on -mbig-switch by default.
8784         * config/v850/predicates.md (const_float_1_operand): Fix match_code
8785         test.
8786         (const_float_0_operand): Remove unused predicate.
8787         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8788         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8789         (recipsf2): New expander.  Original pattern now called
8790         (recipsf2_insn).
8791         (recipdf2, recipdf2_insn): Similarly.
8792         (rsqrtsf2, rsqrtsf2_insn): Similarly
8793         (rsqrtdf2, rsqrtdf2_insn): Similarly
8795 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
8797         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8798         Simplify logic for FreeBSD (twice).
8800 2018-06-25  Martin Sebor  <msebor@redhat.com>
8802         PR tree-optimization/86204
8803         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8804         a strnlen result if it's less than the length of the string.
8806 2018-06-25  Martin Sebor  <msebor@redhat.com>
8808         PR tree-optimization/85700
8809         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8810         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8811         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8813 2018-06-25  Martin Sebor  <msebor@redhat.com>
8815         * doc/extend.texi (Zero-length arrays): Update and clarify.
8817 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
8819         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8820         added IEEE/IBM long double multilib support on PowerPC little
8821         endian Linux systems.
8822         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8823         (MULTILIB_DEFAULTS): Likewise.
8824         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8825         Likewise.
8826         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8827         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8828         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8830 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
8832         PR middle-end/86311
8833         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8834         (REORDER_45): Likewise.
8836 2018-06-25  Jeff Law  <law@redhat.com>
8838         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8839         dividend to 32 bits.  Adjust length.
8840         (udivmodhi4): Cleanup output template.  Fix length.
8842 2018-06-25  Carl Love  <cel@us.ibm.com>
8844         * config/rs6000/vsx.md: Change word selector to prefered location.
8846 2018-06-25  Richard Biener  <rguenther@suse.de>
8848         PR tree-optimization/86304
8849         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8850         epilogue-if-converted loops as well.
8852 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
8854         * lto-section-out.c (lto_begin_section): Do not print section
8855         name for noaddr and unnumbered dumps.
8857 2018-06-25  Richard Biener  <rguenther@suse.de>
8859         * tree-vectorizer.h (struct vec_info_shared): New structure
8860         with parts split out from struct vec_info and loop_nest from
8861         struct _loop_vec_info.
8862         (struct vec_info): Adjust accordingly.
8863         (struct _loop_vec_info): Likewise.
8864         (LOOP_VINFO_LOOP_NEST): Adjust.
8865         (LOOP_VINFO_DATAREFS): Likewise.
8866         (LOOP_VINFO_DDRS): Likewise.
8867         (struct _bb_vec_info): Likewise.
8868         (BB_VINFO_DATAREFS): Likewise.
8869         (BB_VINFO_DDRS): Likewise.
8870         (struct _stmt_vec_info): Add dr_aux member.
8871         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8872         (DR_MISALIGNMENT_UNINITIALIZED): New.
8873         (set_dr_misalignment): Adjust.
8874         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8875         (vect_analyze_loop): Adjust prototype.
8876         (vect_analyze_loop_form): Likewise.
8877         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8878         Compute dependences lazily.
8879         (vect_record_base_alignments): Use shared datarefs/ddrs.
8880         (vect_verify_datarefs_alignment): Likewise.
8881         (vect_analyze_data_refs_alignment): Likewise.
8882         (vect_analyze_data_ref_accesses): Likewise.
8883         (vect_analyze_data_refs): Likewise.
8884         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8885         constructor parameter for shared part.
8886         (vect_analyze_loop_form): Pass in shared part and adjust.
8887         (vect_analyze_loop_2): Pass in storage for the number of
8888         stmts.  Move loop nest finding to the caller.  Compute
8889         datarefs lazily.
8890         (vect_analyze_loop): Pass in shared part.
8891         (vect_transform_loop): Verify shared datarefs are unchanged.
8892         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8893         constructor parameter for shared part.
8894         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8895         (vect_slp_bb): Verify shared datarefs are unchanged before
8896         transform.
8897         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8898         change.
8899         (new_stmt_vec_info): Initialize DR_AUX misalignment to
8900         DR_MISALIGNMENT_UNINITIALIZED.
8901         * tree-vectorizer.c (vec_info::vec_info): Add constructor
8902         parameter for shared part.
8903         (vec_info::~vec_info): Adjust.
8904         (vec_info_shared::vec_info_shared): New.
8905         (vec_info_shared::~vec_info_shared): Likewise.
8906         (vec_info_shared::save_datarefs): Likewise.
8907         (vec_info_shared::check_datarefs): Likewise.
8908         (try_vectorize_loop_1): Construct shared part live for analyses
8909         of a single loop for multiple vector sizes.
8910         * tree-parloops.c (gather_scalar_reductions): Adjust.
8912 2018-06-25  Richard Biener  <rguenther@suse.de>
8914         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8915         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8916         (vect_analyze_data_refs): Remove similar code from here and
8917         simplify accordingly.
8919 2018-06-25  Richard Biener  <rguenther@suse.de>
8921         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8922         for reverse storage order accesses rather than asserting
8923         they cannot happen here.
8925 2018-06-25  Tom de Vries  <tdevries@suse.de>
8927         PR debug/86257
8928         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8929         Use data16 instead of .byte for insn prefix.
8931 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
8933         PR C++/86082
8934         * parser.c (make_char_string_pack): Pass this literal chars
8935         through cpp_interpret_string.
8936         (cp_parser_userdef_numeric_literal): Check the result of
8937         make_char_string_pack.
8939 2018-06-24  Maya Rashish  <coypu@sdf.org>
8941         * ginclude/stddef.h: Simplify conditions around avoiding
8942         re-definition of __size_t.
8944 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8946         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8947         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8949 2018-06-22  Maya Rashish  <coypu@sdf.org>
8951         * doc/invoke.texi (mno-fancy-math-387): Update for changes
8952         made to OpenBSD and NetBSD through the years.
8954 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8956         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8957         behavior of vec_pack (vector double, vector double) to match
8958         behavior of vec_float2 (vector double, vector double).
8960 2018-06-22  Olivier Hainque  <hainque@adacore.com>
8962         * gimplify.c (gimplify_function_tree): Prevent creation
8963         of a trampoline for the address of the current function
8964         passed to entry/exit instrumentation hooks.
8966 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
8968         PR target/86222
8969         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8970         correctly.
8972 2018-06-22  Martin Liska  <mliska@suse.cz>
8974         PR tree-optimization/86263
8975         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8976         Bail out if is_enabled is false.
8977         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8978         New declaration.
8979         (jump_table_cluster::is_enabled): New function.
8981 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8983         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8984         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8985         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8986         (lto_input_ts_binfo_tree_pointers): Likewise.
8987         * tree-streamer-out.c (streamer_write_tree_bitfields,
8988         write_ts_binfo_tree_pointers): Likewise.
8989         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8991 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8993         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8995 2018-06-22  Martin Liska  <mliska@suse.cz>
8997         * symbol-summary.h (get): Make it pure and inline move
8998         functionality from ::get function.
8999         (get): Remove and inline into ::get and ::get_create.
9000         (get_create): Move code from ::get function.
9002 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9004         PR target/85994
9005         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
9006         -x assembler-with-cpp.
9008 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9010         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
9011         _FILE_OFFSET_BITS=64 for C++.
9013 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
9015         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
9016         conversion insn that shows up when pr85657-3.c is compiled using
9017         IEEE 128-bit long double.
9018         (neg<mode>2_internal): Use the correct mode to check whether the
9019         mode is IBM extended.
9020         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
9021         multiply and divide external functions from being created more
9022         than once.
9024 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9026         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
9027         functions.
9028         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
9029         the edge can be forwarded.
9030         (cfg_layout_merge_blocks): Likewise.
9032 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9034         * except.c (finish_eh_generation): Commit edge insertions only after
9035         the EH edges have been redirected from post-landing to landing pads.
9037 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9039         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
9040         create_tmp_var_for to create the FRAME decl.
9041         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
9043 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9045         * tree-inline.c (copy_edges_for_bb): Minor tweak.
9046         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
9047         debug statement when resetting its value.
9048         (expand_call_inline): Copy the locus of the call onto the assignment
9049         of the return value, if any.  Use local variable in more cases.
9051 2018-06-21  Martin Liska  <mliska@suse.cz>
9053         * ipa-pure-const.c (propagate_nothrow): Use
9054         funct_state_summaries->get.
9055         (dump_malloc_lattice): Likewise.
9056         (propagate_malloc): Likewise.
9058 2018-06-21  Richard Biener  <rguenther@suse.de>
9060         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
9061         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
9062         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
9063         comment.
9064         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
9065         BLOCK_ABSTRACT_ORIGIN unconditionally.
9067 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
9069         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
9070         deleting it.
9071         * ipa-reference.c (ipa_reference_c_finalize): Delete
9072         ipa_ref_opt_sum_summaries and set it to NULL.
9074 2018-06-21  Tom de Vries  <tdevries@suse.de>
9076         PR tree-optimization/85859
9077         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
9078         test with comment from bb_no_side_effects_p.
9080 2018-06-21  Richard Biener  <rguenther@suse.de>
9082         PR tree-optimization/86232
9083         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
9084         max for constant niter.
9086 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9088         * config/aarch64/aarch64-simd.md
9089         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
9091 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9093         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
9094         Make opernads of the unspec commutative.
9096 2018-06-21  Richard Biener  <rguenther@suse.de>
9098         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
9099         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
9100         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
9101         (vect_analyze_data_ref_dependence): Re-order checks to deal with
9102         NULL DR_STEP.
9103         (vect_record_base_alignments): Do not record base alignment
9104         for gathers or scatters.
9105         (vect_compute_data_ref_alignment): Drop return value that is always
9106         true.  Bail out early for gathers or scatters.
9107         (vect_enhance_data_refs_alignment): Bail out early for gathers
9108         or scatters.
9109         (vect_find_same_alignment_drs): Likewise.
9110         (vect_analyze_data_refs_alignment): Remove dead code.
9111         (vect_slp_analyze_and_verify_node_alignment): Likewise.
9112         (vect_analyze_data_refs): For possible gathers or scatters do
9113         not create an alternate DR, just check their possible validity
9114         and mark them.  Adjust DECL_NONALIASED handling to not rely
9115         on DR_BASE_ADDRESS.
9116         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
9117         update inits of gathers or scatters.
9118         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
9119         Also copy gather/scatter flag to pattern vinfo.
9121 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9123         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9124         behavior of vec_packsu (vector unsigned long long, vector unsigned
9125         long long) to match behavior of vec_packs with same signature.
9127 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
9128             Thomas Schwinge <thomas@codesourcery.com>
9129             Cesar Philippidis  <cesar@codesourcery.com>
9131         * gimplify.c (gimplify_scan_omp_clauses): Add support for
9132         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9133         (gimplify_adjust_omp_clauses): Likewise.
9134         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
9135         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
9136         (gimplify_omp_target_update): Update handling of acc update and
9137         enter/exit data.
9138         * omp-low.c (install_var_field): Remove unused parameter
9139         base_pointers_restrict.
9140         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
9141         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
9142         FINALIZE}
9143         (omp_target_base_pointers_restrict_p): Delete.
9144         (scan_omp_target): Update call to scan_sharing_clauses.
9145         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
9146         FINALIZE}.
9147         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
9148         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9149         (convert_local_omp_clauses): Likewise.
9150         * tree-pretty-print.c (dump_omp_clause): Likewise.
9151         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
9152         FINALIZE}.
9153         (omp_clause_code_name): Likewise.
9155 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
9157         PR debug/86194
9158         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
9159         be narrowed.
9161         PR tree-optimization/86231
9162         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
9163         anti-range don't overwrite *vr0min before using it to compute *vr0max.
9165 2018-06-20  Tom de Vries  <tdevries@suse.de>
9167         PR tree-optimization/86097
9168         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
9169         iv type if signedness of iv type is not the same as that of *nit.
9171 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
9173         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
9174         EDGE_EH edges, verify they are all EDGE_EH.
9176 2018-06-20  Maya Rashish  <coypu@sdf.org>
9178         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
9180 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9182         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
9183         * config/aarch64/aarch64.c (xgene1_tunings): Add
9184         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
9185         (aarch64_mode_valid_for_sched_fusion_p):
9186         Allow 16-byte modes.
9187         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
9188         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
9189         128-bit modes.
9190         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
9191         New pattern.
9192         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
9193         * config/aarch64/iterators.md (VQ2): New mode iterator.
9195 2018-06-20  Martin Liska  <mliska@suse.cz>
9197         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9198         Change default ratio from 10 to 8.
9200 2018-06-20  Martin Liska  <mliska@suse.cz>
9202         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9203         New.
9204         (bit_test_cluster::find_bit_tests): Likewise.
9205         (switch_decision_tree::analyze_switch_statement): Find clusters.
9206         * tree-switch-conversion.h (struct jump_table_cluster): Document
9207         hierarchy.
9209 2018-06-20  Martin Liska  <mliska@suse.cz>
9211         * tree-switch-conversion.c (switch_conversion::collect):
9212         Record m_uniq property.
9213         (switch_conversion::expand): Bail out for special conditions.
9214         (group_cluster::~group_cluster): New.
9215         (group_cluster::group_cluster): Likewise.
9216         (group_cluster::dump): Likewise.
9217         (jump_table_cluster::emit): New.
9218         (switch_decision_tree::fix_phi_operands_for_edges): New.
9219         (struct case_node): Remove struct.
9220         (jump_table_cluster::can_be_handled): New.
9221         (case_values_threshold): Moved to header.
9222         (reset_out_edges_aux): Likewise.
9223         (jump_table_cluster::is_beneficial): New.
9224         (bit_test_cluster::can_be_handled): Likewise.
9225         (add_case_node): Remove.
9226         (bit_test_cluster::is_beneficial): New.
9227         (case_bit_test::cmp): New.
9228         (bit_test_cluster::emit): New.
9229         (expand_switch_as_decision_tree_p): Remove.
9230         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
9231         (fix_phi_operands_for_edge): Likewise.
9232         (switch_decision_tree::analyze_switch_statement): New.
9233         (compute_cases_per_edge): Move ...
9234         (switch_decision_tree::compute_cases_per_edge): ... here.
9235         (try_switch_expansion): Likewise.
9236         (switch_decision_tree::try_switch_expansion): Likewise.
9237         (record_phi_operand_mapping): Likewise.
9238         (switch_decision_tree::record_phi_operand_mapping): Likewise.
9239         (emit_case_decision_tree): Likewise.
9240         (switch_decision_tree::emit): Likewise.
9241         (balance_case_nodes): Likewise.
9242         (switch_decision_tree::balance_case_nodes): Likewise.
9243         (dump_case_nodes): Likewise.
9244         (switch_decision_tree::dump_case_nodes): Likewise.
9245         (emit_jump): Likewise.
9246         (switch_decision_tree::emit_jump): Likewise.
9247         (emit_cmp_and_jump_insns): Likewise.
9248         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
9249         (emit_case_nodes): Likewise.
9250         (switch_decision_tree::emit_case_nodes): Likewise.
9251         (conditional_probability): Remove.
9252         * tree-switch-conversion.h (enum cluster_type): New.
9253         (PRINT_CASE): New.
9254         (struct cluster): Likewise.
9255         (cluster::cluster): Likewise.
9256         (struct simple_cluster): Likewise.
9257         (simple_cluster::simple_cluster): Likewise.
9258         (struct group_cluster): Likewise.
9259         (struct jump_table_cluster): Likewise.
9260         (struct bit_test_cluster): Likewise.
9261         (struct min_cluster_item): Likewise.
9262         (struct case_tree_node): Likewise.
9263         (case_tree_node::case_tree_node): Likewise.
9264         (jump_table_cluster::case_values_threshold): Likewise.
9265         (struct case_bit_test): Likewise.
9266         (struct switch_decision_tree): Likewise.
9267         (struct switch_conversion): Likewise.
9268         (switch_decision_tree::reset_out_edges_aux): Likewise.
9270 2018-06-20  Martin Liska  <mliska@suse.cz>
9272         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
9273         (hoist_edge_and_branch_if_true): Likewise.
9274         (expand_switch_using_bit_tests_p): Likewise.
9275         (struct case_bit_test): Likewise.
9276         (case_bit_test_cmp): Likewise.
9277         (emit_case_bit_tests): Likewise.
9278         (switch_conversion::switch_conversion): New class.
9279         (struct switch_conv_info): Remove old struct.
9280         (collect_switch_conv_info): More to ...
9281         (switch_conversion::collect): ... this.
9282         (check_range): Likewise.
9283         (switch_conversion::check_range): Likewise.
9284         (check_all_empty_except_final): Likewise.
9285         (switch_conversion::check_all_empty_except_final): Likewise.
9286         (check_final_bb): Likewise.
9287         (switch_conversion::check_final_bb): Likewise.
9288         (create_temp_arrays): Likewise.
9289         (switch_conversion::create_temp_arrays): Likewise.
9290         (free_temp_arrays): Likewise.
9291         (gather_default_values): Likewise.
9292         (switch_conversion::gather_default_values): Likewise.
9293         (build_constructors): Likewise.
9294         (switch_conversion::build_constructors): Likewise.
9295         (constructor_contains_same_values_p): Likewise.
9296         (switch_conversion::contains_same_values_p): Likewise.
9297         (array_value_type): Likewise.
9298         (switch_conversion::array_value_type): Likewise.
9299         (build_one_array): Likewise.
9300         (switch_conversion::build_one_array): Likewise.
9301         (build_arrays): Likewise.
9302         (switch_conversion::build_arrays): Likewise.
9303         (gen_def_assigns): Likewise.
9304         (switch_conversion::gen_def_assigns): Likewise.
9305         (prune_bbs): Likewise.
9306         (switch_conversion::prune_bbs): Likewise.
9307         (fix_phi_nodes): Likewise.
9308         (switch_conversion::fix_phi_nodes): Likewise.
9309         (gen_inbound_check): Likewise.
9310         (switch_conversion::gen_inbound_check): Likewise.
9311         (process_switch): Use the newly created class.
9312         (switch_conversion::expand): New.
9313         (switch_conversion::~switch_conversion): New.
9314         * tree-switch-conversion.h: New file.
9316 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9318         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
9319         tree-vect-patterns.c.
9320         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
9321         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
9322         (vect_recog_sad_pattern): Likewise.
9323         (vect_recog_widen_sum_pattern): Likewise.
9324         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
9325         (vect_recog_widen_shift_pattern): Remove the type_in argument.
9326         (vect_recog_rotate_pattern): Likewise.
9327         (vect_recog_mult_pattern): Likewise.
9328         (vect_recog_vector_vector_shift_pattern): Likewise.
9329         (vect_recog_divmod_pattern): Likewise.
9330         (vect_recog_mixed_size_cond_pattern): Likewise.
9331         (vect_recog_bool_pattern): Likewise.
9332         (vect_recog_mask_conversion_pattern): Likewise.
9333         (vect_try_gather_scatter_pattern): Likewise.
9334         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
9335         (vect_recog_over_widening_pattern): Likewise.
9336         (vect_recog_gather_scatter_pattern): Likewise.
9337         (vect_recog_func_ptr): Move from tree-vectorizer.h
9338         (vect_vect_recog_func_ptrs): Move further down the file.
9339         (vect_recog_func): Likewise.  Remove the third argument.
9340         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
9341         (vect_pattern_recog_1): Expect the pattern function to do any
9342         necessary target tests.  Also expect it to provide a vector type.
9343         Remove the type_in handling.
9345 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9347         * tree-vect-patterns.c (vect_pattern_detected): New function.
9348         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
9349         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
9350         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
9351         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
9352         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9353         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9354         (vect_recog_mask_conversion_pattern)
9355         (vect_try_gather_scatter_pattern): Likewise.
9357 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9359         * tree-vect-patterns.c (vect_get_internal_def): New function.
9360         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9361         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
9362         (search_type_for_mask_1): Use it.
9364 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9366         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9367         redundant WIDEN_SUM_EXPR handling.
9368         (vect_recog_sad_pattern): Likewise.
9370 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9372         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9373         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
9374         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
9375         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
9376         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
9378 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9380         * tree-vect-stmts.c (vectorizable_call): Make sure that we
9381         use the stmt_vec_info of the original bb statement for the
9382         new zero assignment, even if the call is part of a pattern.
9384 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9386         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
9387         that the sequence is attached to the original statement rather
9388         than the pattern statement.
9389         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
9390         PATTERN_DEF_SEQ from the original statement rather than
9391         the main pattern statement.
9392         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
9393         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
9394         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
9396 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9398         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
9399         definition statements before the early exit for statements that aren't
9400         live or relevant.
9401         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
9402         split out from...
9403         (vect_transform_loop): ...here.  Process pattern definition
9404         statements without first checking whether the main pattern
9405         statement is live or relevant.
9407 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
9409         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
9410         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
9412 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
9414         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
9415         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
9416         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
9417         (expand_block_compare): Change select_block_compare_mode call.
9418         (expand_strncmp_align_check): Use new functions, fix comment.
9419         (emit_final_str_compare_gpr): New function.
9420         (expand_strn_compare): Refactor and clean up code.
9421         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
9423 2018-06-19  Tony Reix  <tony.reix@atos.com>
9424             Damien Bergamini  <damien.bergamini@atos.com>
9425             David Edelsohn  <dje.gcc@gmail.com>
9427         * collect2.c (static_obj): New variable.
9428         (static_libs): New variable.
9429         (is_in_list): Uncomment declaration.
9430         (main): Track AIX libraries linked statically.
9431         (is_in_list): Uncomment definition.
9432         (scan_prog_file): Don't add AIX shared libraries initializer
9433         to constructor list if linking statically.
9435 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
9437         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9438         constant.
9439         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9441 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
9443         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9444         blocks.
9446 2018-06-19  Martin Liska  <mliska@suse.cz>
9448         * config/i386/i386.c (ix86_can_inline_p): Do not use
9449         ipa_fn_summaries::get_create.
9450         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9451         get.
9452         (devirtualization_time_bonus): Likewise.
9453         (ipcp_propagate_stage): Likewise.
9454         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9455         (edge_set_predicate): Likewise.
9456         (evaluate_conditions_for_known_args): Likewise.
9457         (evaluate_properties_for_edge): Likewise.
9458         (ipa_call_summary::reset): Tranform to ...
9459         (ipa_call_summary::~ipa_call_summary): ... this.
9460         (ipa_fn_summary::reset): Transform to ...
9461         (ipa_fn_summary::~ipa_fn_summary): ... this.
9462         (ipa_fn_summary_t::remove): Rename to ...
9463         (ipa_fn_summary_t::remove_callees): ... this.
9464         (ipa_fn_summary_t::duplicate): Use placement new
9465         instead of memory copy.
9466         (ipa_call_summary_t::duplicate): Likewise.
9467         (ipa_call_summary_t::remove): Remove.
9468         (dump_ipa_call_summary): Change get_create to get.
9469         (ipa_dump_fn_summary): Dump only when summary exists.
9470         (analyze_function_body): Use symbol_summary::get instead
9471         of get_create.
9472         (compute_fn_summary): Likewise.
9473         (estimate_edge_devirt_benefit): Likewise.
9474         (estimate_edge_size_and_time): Likewise.
9475         (inline_update_callee_summaries): Likewise.
9476         (remap_edge_change_prob): Likewise.
9477         (remap_edge_summaries): Likewise.
9478         (ipa_merge_fn_summary_after_inlining): Likewise.
9479         (write_ipa_call_summary): Likewise.
9480         (ipa_fn_summary_write): Likewise.
9481         (ipa_free_fn_summary): Likewise.
9482         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9483         (struct ipa_call_summary): Likewise.
9484         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9485         of get_create.
9486         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9487         (estimate_size_after_inlining): Likewise.
9488         (estimate_growth): Likewise.
9489         (growth_likely_positive): Likewise.
9490         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9491         (inline_call): Likewise.
9492         * ipa-inline.c (caller_growth_limits): Likewise.
9493         (can_inline_edge_p): Likewise.
9494         (can_inline_edge_by_limits_p): Likewise.
9495         (compute_uninlined_call_time): Likewise.
9496         (compute_inlined_call_time): Likewise.
9497         (want_inline_small_function_p): Likewise.
9498         (edge_badness): Likewise.
9499         (update_caller_keys): Likewise.
9500         (update_callee_keys): Likewise.
9501         (inline_small_functions): Likewise.
9502         (inline_to_all_callers_1): Likewise.
9503         (dump_overall_stats): Likewise.
9504         (early_inline_small_functions): Likewise.
9505         (early_inliner): Likewise.
9506         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9507         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9508         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9509         * ipa-split.c (execute_split_functions): Likewise.
9510         * symbol-summary.h: Likewise.
9511         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9513 2018-06-19  Richard Biener  <rguenther@suse.de>
9515         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9516         (vectorize_loops): ... here.  Fix dbgcnt handling.
9517         (try_vectorize_loop): Wrap try_vectorize_loop_1.
9519 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
9521         PR target/86197
9522         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9523         ieee128 argument takes up only one (vector) register, not two (floating
9524         point) registers.
9526 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
9528         * gimplify.c (gimplify_init_constructor): Really never clear for an
9529         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9531 2018-06-19  Richard Biener  <rguenther@suse.de>
9533         PR tree-optimization/86179
9534         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9535         after failed recognition.
9537 2018-06-18  Martin Sebor  <msebor@redhat.com>
9539         PR middle-end/85602
9540         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9541         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9542         Handle integer subtraction.
9543         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9544         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9546 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
9548         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9549         param from rtx to rtx_insn *.
9550         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9551         param.
9552         (frv_ifcvt_modify_insn): Likwise.
9553         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9554         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
9555         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9556         as_a <rtx_insn *> cast to local "unprotected_region" once
9557         it's been established that it's not NULL or pc_rtx.
9558         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9559         param "sethi" from rtx to rtx_insn *.
9560         (nds32_group_float_insns): Likewise for param "insn".
9561         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9562         param.
9563         (vax_output_int_subtract): Likewise.
9564         * config/vax/vax.c (vax_output_int_add): Likewise for param
9565         "insn".
9566         (vax_output_int_subtract): Likewise.
9567         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9568         (emit_pattern_after): Likewise for param "after".
9569         (emit_insn_after): Likewise.
9570         (emit_jump_insn_after): Likewise.
9571         (emit_call_insn_after): Likewise.
9572         (emit_debug_insn_after): Likewise.
9573         (emit_pattern_before): Likewise for param "before".
9574         (emit_insn_before): Likewise.
9575         (emit_jump_insn_before): Likewise.
9576         * final.c (get_insn_template): Likewise for param "insn", removing
9577         a cast.
9578         * output.h (get_insn_template): Likewise for 2nd param.
9579         * rtl.h (emit_insn_before): Likewise.
9580         (emit_jump_insn_before): Likewise.
9581         (emit_debug_insn_before_noloc): Likewise.
9582         (emit_insn_after): Likewise.
9583         (emit_jump_insn_after): Likewise.
9584         (emit_call_insn_after): Likewise.
9585         (emit_debug_insn_after): Likewise.
9586         (set_insn_deleted): Likewise for param.
9588 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
9590         PR target/85358
9591         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9592         floating point modes, so that IFmode is numerically greater than
9593         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9594         to declare the ordering.  This prevents IFmode from being
9595         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9596         machine.  Include rs6000-modes.h to share the fractional values
9597         between genmodes* and the rest of the compiler.
9598         (IFmode): Likewise.
9599         (KFmode): Likewise.
9600         (TFmode): Likewise.
9601         * config/rs6000/rs6000-modes.h: New file.
9602         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9603         meaning of rs6000_long_double_size so that 126..128 selects an
9604         appropriate 128-bit floating point type.
9605         (rs6000_option_override_internal): Likewise.
9606         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9607         (TARGET_LONG_DOUBLE_128): Change the meaning of
9608         rs6000_long_double_size so that 126..128 selects an appropriate
9609         128-bit floating point type.
9610         (LONG_DOUBLE_TYPE_SIZE): Update comment.
9611         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9612         source and destination to match the standard usage.
9613         (truncifkf2): Likewise.
9614         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9615         ISA 2.07 to use an explicit clobber, instead of passing in a
9616         temporary.
9617         (copysign<mode>3_soft): Likewise.
9619 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
9621         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9622         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9623         (vect_slp_analyze_instance_dependence): Likewise.
9624         (vect_enhance_data_refs_alignment): Likewise.
9625         (vect_analyze_data_refs_alignment): Likewise.
9626         (vect_slp_analyze_and_verify_instance_alignment
9627         (vect_analyze_data_ref_accesses): Likewise.
9628         (vect_prune_runtime_alias_test_list): Likewise.
9629         (vect_analyze_data_refs): Likewise.
9630         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9631         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9632         (vect_analyze_scalar_cycles_1): Likewise.
9633         (vect_get_loop_niters): Likewise.
9634         (vect_analyze_loop_form_1): Likewise.
9635         (vect_update_vf_for_slp): Likewise.
9636         (vect_analyze_loop_operations): Likewise.
9637         (vect_analyze_loop): Likewise.
9638         (vectorizable_induction): Likewise.
9639         (vect_transform_loop): Likewise.
9640         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9641         * tree-vect-slp.c (vect_analyze_slp): Likewise.
9642         (vect_make_slp_decision): Likewise.
9643         (vect_detect_hybrid_slp): Likewise.
9644         (vect_slp_analyze_operations): Likewise.
9645         (vect_slp_bb): Likewise.
9646         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9647         (vectorizable_bswap): Likewise.
9648         (vectorizable_call): Likewise.
9649         (vectorizable_simd_clone_call): Likewise.
9650         (vectorizable_conversion): Likewise.
9651         (vectorizable_assignment): Likewise.
9652         (vectorizable_shift): Likewise.
9653         (vectorizable_operation): Likewise.
9654         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9656 2018-06-18  Martin Sebor  <msebor@redhat.com>
9658         PR tree-optimization/81384
9659         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9660         * builtins.c (expand_builtin_strnlen): New function.
9661         (expand_builtin): Call it.
9662         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9663         * builtins.def (BUILT_IN_STRNLEN): New.
9664         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9665         Warn for bounds in excess of maximum object size.
9666         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9667         single-value ranges.  Handle strnlen.
9668         (handle_builtin_strlen): Handle strnlen.
9669         (strlen_check_and_optimize_stmt): Same.
9670         * doc/extend.texi (Other Builtins): Document strnlen.
9672 2018-06-18  Maya Rashish  <coypu@sdf.org>
9674         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9675         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9676         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9678         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9679         here to ...
9680         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9682 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9684         * tree.c (escaped_string::escape): Replace cast to char * by
9685         const_cast<char *> (unescaped).
9687 2018-06-18  Nick Clifton  <nickc@redhat.com>
9689         PR 84195
9690         * tree.c (escaped_string): New class.  Converts an unescaped
9691         string into its escaped equivalent.
9692         (warn_deprecated_use): Use the new class to convert the
9693         deprecation message, if present.
9694         (test_escaped_strings): New self test.
9695         (test_c_tests): Add test_escaped_strings.
9696         * doc/extend.texi (deprecated): Add a note that the
9697         deprecation message is affected by the -fmessage-length
9698         option, and that control characters will be escaped.
9699         (#pragma GCC error): Document this pragma.
9700         (#pragma GCC warning): Likewise.
9701         * doc/invoke.texi (-fmessage-length): Document this option's
9702         effect on the #warning and #error preprocessor directives and
9703         the deprecated attribute.
9705 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9707         * tree.c (decl_value_expr_lookup): Revert latest change.
9708         (decl_value_expr_insert): Likewise.
9710 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
9712         * gimplify.c (nonlocal_vlas): Delete.
9713         (nonlocal_vla_vars): Likewise.
9714         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9715         referenced VLAs.
9716         (gimplify_body): Do not create and destroy nonlocal_vlas.
9717         * tree-nested.c: Include diagnostic.h.
9718         (use_pointer_in_frame): Tweak.
9719         (lookup_field_for_decl): Add assertion and declare the transformation.
9720         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9721         internal error when the reference is in a wrong context.  Do not
9722         create a debug decl by default.
9723         (note_nonlocal_block_vlas): Delete.
9724         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9725         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
9726         create a debug decl by default.
9727         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9728         call is in a wrong context.
9729         (fixup_vla_decls): New function.
9730         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
9731         debug variables were created.
9732         * tree.c (decl_value_expr_lookup): Add checking assertion.
9733         (decl_value_expr_insert): Likewise.
9735 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
9737         PR middle-end/82479
9738         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9739         * tree-scalar-evolution.c (interpret_expr): Likewise.
9740         (expression_expensive_p): Likewise.
9741         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9742         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9743         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9744         (ssa_defined_by_minus_one_stmt_p): New.
9746 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
9748         PR middle-end/64946
9749         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9750         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9751         * dojump.c (do_jump): Likewise.
9752         * expr.c (expand_expr_real_2): Check operand type's sign.
9753         * fold-const.c (const_unop): Handle ABSU_EXPR.
9754         (fold_abs_const): Likewise.
9755         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9756         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9757         (strip_sign_op_1): Likesise.
9758         * match.pd: Add new pattern to generate ABSU_EXPR.
9759         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9760         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9761         * tree-eh.c (operation_could_trap_helper_p): Likewise.
9762         * tree-inline.c (estimate_operator_cost): Likewise.
9763         * tree-pretty-print.c (dump_generic_node): Likewise.
9764         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9765         * tree.def (ABSU_EXPR): New.
9767 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
9769         PR middle-end/86095
9770         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9771         documented as preserved for backward compatibility only.
9772         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9774         PR rtl-optimization/86108
9775         * bb-reorder.c (create_forwarder_block): Renamed to ...
9776         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
9777         jump from new landing pad to the second part.
9778         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9779         Adjust callers.
9781 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
9783         PR middle-end/85878
9784         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9785         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9786         Only call store_expr for halves if the mode is the same.
9788         PR middle-end/86123
9789         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9790         Fix up comment formatting.
9792 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9794         * typed-splay-tree.h (typed_splay_tree::remove): New function.
9795         (typed_splay_tree::closure,
9796         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9797         (typed_splay_tree::typed_splay_tree,
9798         typed_splay_tree::operator =): Declared private.
9799         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9800         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9801         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9802         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9803         typed_splay_tree::splay_tree_splay,
9804         typed_splay_tree::splay_tree_foreach_helper,
9805         typed_splay_tree::splay_tree_insert,
9806         typed_splay_tree::splay_tree_remove,
9807         typed_splay_tree::splay_tree_lookup,
9808         typed_splay_tree::splay_tree_predecessor,
9809         typed_splay_tree::splay_tree_successor,
9810         typed_splay_tree::splay_tree_min,
9811         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9812         (typed_splay_tree::root, typed_splay_tree::comp,
9813         typed_splay_tree::delete_key,
9814         typed_splay_tree::delete_value): New data members.
9815         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9816         typed_splay_tree::remove.
9818 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
9820         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9821         -mginv and -mno-ginv to the assembler.
9822         * config/mips/mips.opt (-mcrc): New option.
9823         (-mginv): Likewise.
9824         * doc/invoke.text (-mcrc): Document.
9825         (-mginv): Likewise.
9827 2018-06-15  Nick Clifton  <nickc@redhat.com>
9829         PR 84195
9830         * tree.c (escaped_string): New class.  Converts an unescaped
9831         string into its escaped equivalent.
9832         (warn_deprecated_use): Use the new class to convert the
9833         deprecation message, if present.
9834         (test_escaped_strings): New self test.
9835         (test_c_tests): Add test_escaped_strings.
9836         * doc/extend.texi (deprecated): Add a note that the
9837         deprecation message is affected by the -fmessage-length
9838         option, and that control characters will be escaped.
9839         (#pragma GCC error): Document this pragma.
9840         (#pragma GCC warning): Likewise.
9841         * doc/invoke.texi (-fmessage-length): Document this option's
9842         effect on the #warning and #error preprocessor directives and
9843         the deprecated attribute.
9845 2018-06-15  Richard Biener  <rguenther@suse.de>
9847         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9848         here, also noting vector size used.
9849         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
9850         size used in MSG_OPTIMIZED_LOCATIONS dump.
9851         (pass_slp_vectorize::execute): Adjust.
9853 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
9855         PR target/85968
9856         * config/arc/arc.c (arc_return_address_register): Fix
9857         if-condition.
9859 2018-06-15  Richard Biener  <rguenther@suse.de>
9861         PR middle-end/86159
9862         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9863         leave useless conversion stripping to force_gimple_operand_gsi.
9864         (gimplify_build2): Likewise.
9865         (gimplify_build1): Likewise.
9867 2018-06-15  Richard Biener  <rguenther@suse.de>
9869         PR middle-end/86076
9870         * tree-cfg.c (move_stmt_op): unshare invariant addresses
9871         before adjusting their block.
9873 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9875         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9876         multilibs for *-*-rtems*.
9877         * config/riscv/t-rtems: New file.
9879 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
9881         PR middle-end/86122
9882         * match.pd ((A +- CST1) +- CST2): Punt if last resort
9883         unsigned_type_for returns NULL.
9885         PR target/85945
9886         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9887         subregs of multi-word pseudos unless the float mode has word size.
9889 2018-06-14  Richard Biener  <rguenther@suse.de>
9891         PR middle-end/86139
9892         * tree-vect-generic.c (build_word_mode_vector_type): Remove
9893         duplicate and harmful type_hash_canon.
9894         * tree.c (type_hash_canon): Assert we didn't find ourselves.
9896 2018-06-14  Richard Biener  <rguenther@suse.de>
9898         PR ipa/86124
9899         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9900         NULL cgraph_node.
9902 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9904         * config/rtems.h (STDINT_LONG32): Define.
9906 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
9907             Prachi Godbole  <prachi.godbole@imgtec.com>
9909         * config/mips/mips-cpus.def: Define P6600.
9910         * config/mips/mips-tables.opt: Regenerate.
9911         * config/mips/mips.c (mips_ucbranch_type): New enum.
9912         (mips_rtx_cost_data): Add support for P6600.
9913         (mips_issue_rate): Likewise.
9914         (mips_multipass_dfa_lookahead): Likewise.
9915         (mips_avoid_hazard): Likewise.
9916         (mips_reorg_process_insns): Likewise.
9917         (mips_classify_branch_p6600): New function.
9918         * config/mips/mips.h (TUNE_P6600): New define.
9919         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9920         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9921         * config/mips/mips.md: Include p6600.md.
9922         (processor): Add p6600.
9923         * config/mips/p6600.md: New file.
9924         * doc/invoke.texi: Add p6600 to supported architectures.
9926 2018-06-13  Martin Sebor  <msebor@redhat.com>
9928         PR tree-optimization/86114
9929         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9930         of integer types.
9931         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9933 2018-06-13  Richard Biener  <rguenther@suse.de>
9935         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9936         Properly set vector type of the intermediate stmt.
9937         * tree-vect-stmts.c (vectorizable_operation): The destination
9938         var always has vectype_out type.
9940 2018-06-13  Jeff Law  <law@redhat.com>
9942         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9943         integer 0 for argument to print_rtl_with_bb.
9944         (rl78_reorg): Likewise.
9946 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
9948         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9949         from rtx to rtx_insn *.
9950         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9951         "label".
9952         (add_sched_insns_for_speculation): Likewise for local "target",
9953         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9954         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9955         from rtx_insn ** to rtx_code_label **.
9956         (reorg_emit_nops): Likewise.
9957         (c6x_reorg): Likewise for local "call_labels".
9958         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9959         rtx to rtx_insn *.
9960         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9961         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9962         the loops over LABEL_REFS.
9963         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9964         braf_label.
9965         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9966         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9967         (split_branches): Strengthen local "olabel" from rtx to
9968         rtx_insn *, adding a safe_as_a cast.
9969         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9970         to "rtx_insn *".
9971         (add_insn_after): Likewise for first two params.
9972         (add_insn_before): Likewise.
9973         (remove_insn): Likewise for param.
9974         (emit_pattern_before_noloc): Likewise for second and third params.
9975         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9976         (emit_call_insn_before_noloc): Likewise.
9977         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9978         to "rtx_insn *".
9979         (emit_barrier_before): Likewise.
9980         (emit_label_before): Strengthen "label" param from "rtx" to
9981         "rtx_code_label *".  Strengthen "before" param from "rtx" to
9982         "rtx_insn *".
9983         (emit_insn_after_1): Strengthen "after" param from "rtx" to
9984         "rtx_insn *".
9985         (emit_pattern_after_noloc): Likewise.
9986         (emit_insn_after_noloc): Likewise.
9987         (emit_jump_insn_after_noloc): Likewise.
9988         (emit_call_insn_after_noloc): Likewise.
9989         (emit_debug_insn_after_noloc): Likewise.
9990         (emit_barrier_after): Likewise.
9991         (emit_label_after): Likewise for both params.
9992         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
9993         "loc" param from "int" to "location_t".
9994         (emit_insn_after_setloc): Likewise.
9995         (emit_jump_insn_after_setloc): Likewise.
9996         (emit_call_insn_after_setloc): Likewise.
9997         (emit_debug_insn_after_setloc): Likewise.
9998         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
9999         "loc" param from "int" to "location_t".
10000         (emit_pattern_before): Convert NULL_RTX to NULL.
10001         (emit_insn_before_setloc): Convert "loc" param from "int" to
10002         "location_t".
10003         (emit_jump_insn_before_setloc): Likewise.
10004         (emit_call_insn_before_setloc): Likewise.
10005         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
10006         rtx_insn *.  Convert "loc" param from "int" to "location_t".
10007         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
10008         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
10009         Convert 3rd param from "int" to "location_t".
10010         (emit_barrier_before, emit_barrier_after, next_real_insn):
10011         Strengthen param from rtx to rtx_insn *.
10012         (emit_label_before): Strengthen 1st param from "rtx" to
10013         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
10014         "rtx_insn *".
10015         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
10016         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
10017         Strengthen 2nd param from "rtx" to "rtx_insn *".
10018         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
10019         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
10020         Likewise. Convert 3rd param from "int" to "location_t".
10021         (emit_label_after): Strengthen 1st param from "rtx" to
10022         "rtx_code_label *".
10023         (next_real_insn, remove_insn): Strengthen param from "rtx" to
10024         "rtx_insn *".
10025         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
10026         from "rtx" to "rtx_insn *".
10028 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
10030         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
10031         bodies streamed in with -Q.
10032         * dumpfile.c (dump_files): Add lto-stream-out dump file.
10033         * dumpfile.h (tree_dump_index): Add lto_stream_out.
10034         * gimple-streamer-out.c: Include gimple-pretty-print.h
10035         (output_bb): Dump stmts streamed.
10036         * lto-section-out.c: Include print-tree.h
10037         (lto_begin_section): Dump sections created.
10038         (lto_output_decl_index): Dump decl encoded.
10039         * lto-streamer-out.c: Include print-tree.h
10040         (create_output_block): Dump output block created.
10041         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
10042         (output_function): Dump function output.
10043         (output_constructor): Dump constructor streamed.
10044         (write_global_stream): Output indexes encoded.
10045         (produce_asm_for_decls): Dump streams encoded.
10046         * lto-streamer.c (streamer_dump_file): New global var.
10047         * lto-streamer.h (streamer_dump_file): Declare.
10048         * passes.c (ipa_write_summaries): Initialize streamer dump.
10049         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
10050         in.
10052 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
10054         PR target/86048
10055         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
10056         offsets for register save directives.  Emit a second batch of save
10057         directives, if need be, when the function accesses prior frames.
10059 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10061         * config/arc/fpu.md (fmasf4): Force operand to register.
10062         (fnmasf4): Likewise.
10064 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10066         * config/arc/arc-protos.h (arc_pad_return): Remove.
10067         * config/arc/arc.c (machine_function): Remove force_short_suffix
10068         and size_reason.
10069         (arc_print_operand): Adjust printing of '&'.
10070         (arc_verify_short): Remove conditional printing of short suffix.
10071         (arc_final_prescan_insn): Remove reference to size_reason.
10072         (pad_return): New function.
10073         (arc_reorg): Call pad_return.
10074         (arc_pad_return): Remove.
10075         (arc_init_machine_status): Remove reference to force_short_suffix.
10076         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
10077         (attr length): When attribute iscompact is true force to 2
10078         regardless; in the case of maybe check if we want to force the
10079         instruction to have 4 bytes length.
10080         (nopv): Change it to generate 4 byte long nop as well.
10081         (blockage): New pattern.
10082         (simple_return): Remove call to arc_pad_return.
10083         (p_return_i): Likewise.
10085 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10087         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
10089 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10091         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
10092         ARC cores.
10094 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10096         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
10097         for ARC700 and ARCv2.
10099 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
10101         PR target/86076
10102         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
10103         operands[2] instead of operands[1].
10106 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
10108         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
10109         case, check whether the outer register overlaps an unallocatable
10110         register, not just whether it fits the required class.
10112 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
10114         * poly-int.h (can_div_trunc_p): Add new overload in which all values
10115         are poly_ints.
10116         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
10117         (memrefs_conflict_p): Likewise.
10118         (init_alias_analysis): Likewise.
10119         * cfgexpand.c (expand_debug_expr): Likewise.
10120         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
10121         * cse.c (fold_rtx): Likewise.
10122         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
10123         * expr.c (emit_block_move_hints): Likewise.
10124         (clear_storage_hints, push_block, emit_push_insn): Likewise.
10125         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
10126         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
10127         (emit_group_store): Likewise.
10128         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
10129         to read the PRE/POST_MODIFY increment.
10130         * calls.c (store_one_arg): Use strip_offset.
10131         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
10132         poly_int_rtx_p.
10133         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
10134         by a VEC_SELECT.
10135         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
10136         (simplify_binary_operation_1): Extend CONST_INT handling to
10137         poly_int_rtx_p.
10138         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
10139         than a HOST_WIDE_INT.
10140         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
10141         poly_int64.
10142         (adjust_mems, add_stores): Update accodingly.
10143         (vt_canonicalize_addr): Track polynomial offsets.
10144         (emit_note_insn_var_location): Likewise.
10145         (vt_add_function_parameter): Likewise.
10146         (vt_initialize): Likewise.
10148 2018-06-12  Jeff Law  <law@redhat.com>
10150         * config.gcc (alpha*-*-freebsd*): Remove.
10151         * config/alpha/freebsd.h: Remove.
10153 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
10155         PR other/69968
10156         * spellcheck-tree.c (levenshtein_distance): Rename to...
10157         (get_edit_distance): ...this, and update for underlying renaming.
10158         * spellcheck-tree.h (levenshtein_distance): Rename to...
10159         (get_edit_distance): ...this.
10160         * spellcheck.c (levenshtein_distance): Rename to...
10161         (get_edit_distance): ...this.  Convert from Levenshtein distance
10162         to Damerau-Levenshtein distance by supporting transpositions of
10163         adjacent characters.  Rename "v1" to "v_next" and "v0" to
10164         "v_one_ago".
10165         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
10166         (selftest::test_edit_distance_unit_test_oneway): ...this, and
10167         update for underlying renaming.
10168         (selftest::levenshtein_distance_unit_test): Rename to...
10169         (selftest::test_get_edit_distance_unit): ...this, and update for
10170         underlying renaming.
10171         (selftest::test_find_closest_string): Add example from PR 69968
10172         where transposition helps
10173         (selftest::test_metric_conditions): Update for renaming.
10174         (selftest::test_metric_conditions): Likewise.
10175         (selftest::spellcheck_c_tests): Likewise.
10176         * spellcheck.h (levenshtein_distance): Rename both overloads to...
10177         (get_edit_distance): ...this.
10178         (best_match::consider): Update for renaming.
10180 2018-06-12  Martin Sebor  <msebor@redhat.com>
10182         PR tree-optimization/85259
10183         * builtins.c (compute_objsize): Handle constant offsets.
10184         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
10185         true iff a warning has been issued.
10186         * gimple.h (gimple_nonartificial_location): New function.
10187         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
10188         gimple_nonartificial_location and handle -Wno-system-headers.
10189         (handle_builtin_stxncpy): Same.
10191 2018-06-12  Martin Sebor  <msebor@redhat.com>
10193         PR c/85931
10194         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
10196 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
10198         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
10199         BUILTIN_VEC_XST entries for pointer to double and long long.
10201 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
10203         PR target/85990
10204         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10205         Update comments.
10206         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10207         Likewise.
10209 2018-06-12  Martin Liska  <mliska@suse.cz>
10211         * doc/options.texi: Document IntegerRange.
10213 2018-06-12  Martin Liska  <mliska@suse.cz>
10215         * config/i386/i386.opt: Make MPX-related options as Deprecated.
10216         * opt-functions.awk: Handle Deprecated flag.
10217         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
10218         and report error.
10219         (read_cmdline_option): Report warning for a deprecated option.
10220         * opts.h (struct cl_option): Add new field cl_deprecated.
10221         (CL_ERR_DEPRECATED): New.
10223 2018-06-12  Martin Liska  <mliska@suse.cz>
10225         * doc/options.texi: Document Deprecated option flag.
10227 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10229         * config/arc/arc-arch.h (arc_extras): New enum.
10230         (arc_cpu_t):Add field extra.
10231         (arc_cpu_types): Consider the extras.
10232         * config/arc/arc-cpus.def: Add extras info.
10233         * config/arc/arc-opts.h (processor_type): Consider extra field.
10234         * config/arc/arc.c (arc_override_options): Handle extra field.
10236 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10238         * config/arc/arc-arch.h: Update ARC_OPTX macro.
10239         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
10240         field.
10241         * config/arc/arc.c (arc_init): Update pic warning.
10242         (irq_range): Update irq range parsing warnings.
10243         (arc_override_options): Update various warning messages.
10244         (arc_handle_aux_attribute): Likewise.
10246 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
10248         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
10250 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10252         * doc/sourcebuild.texi: Document usage of line number 0 in verify
10253         compiler messages directives.
10255 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
10257         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
10258         * config/mips/mips-tables.opt: Regenerate.
10259         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
10260         mips64r6.
10261         * doc/invoke.texi: Document -march=i6500.
10263 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
10265         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
10266         (i6400_gpmul): Add cpu_unit.
10267         (i6400_gpdiv): Likewise.
10268         (i6400_msa_add_d): Update reservations.
10269         (i6400_msa_int_add) Likewise.
10270         (i6400_msa_short_logic3) Likewise.
10271         (i6400_msa_short_logic2) Likewise.
10272         (i6400_msa_short_logic) Likewise.
10273         (i6400_msa_move) Likewise.
10274         (i6400_msa_cmp) Likewise.
10275         (i6400_msa_short_float2) Likewise.
10276         (i6400_msa_div_d) Likewise.
10277         (i6400_msa_long_logic1) Likewise.
10278         (i6400_msa_long_logic2) Likewise.
10279         (i6400_msa_mult) Likewise.
10280         (i6400_msa_long_float2) Likewise.
10281         (i6400_msa_long_float4) Likewise.
10282         (i6400_msa_long_float5) Likewise.
10283         (i6400_msa_long_float8) Likewise.
10284         (i6400_fpu_fadd): Include frint type.
10285         (i6400_fpu_store): New define_insn_reservation.
10286         (i6400_fpu_load): Likewise.
10287         (i6400_fpu_move): Likewise.
10288         (i6400_fpu_fcmp): Likewise.
10289         (i6400_fpu_fmadd): Likewise.
10290         (i6400_int_mult): Include imul3nc type and update reservation.
10291         (i6400_int_div): Include idiv3 type and update reservation.
10292         (i6400_int_load): Update to check type not move_type.
10293         (i6400_int_store): Likewise.
10294         (i6400_int_prefetch): Set zero latency.
10296 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
10298         * gcc.c: Document new %@{...} sequence.
10299         (LINK_COMMAND_SPEC): Use it for the -L switches.
10300         (cpp_unique_options): Use it for the -I switches.
10301         (at_file_argbuf): New global variable.
10302         (in_at_file): Likewise.
10303         (alloc_args): Create at_file_argbuf.
10304         (clear_args): Truncate at_file_argbuf.
10305         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
10306         (open_at_file): New function.
10307         (close_at_file): Likewise.
10308         (create_at_file): Delete.
10309         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
10310         <'o'>: Likewise.
10311         <'@'>: New case.
10312         (validate_switches_from_spec): Deal with %@{...} sequence.
10313         (validate_switches): Likewise.
10314         (driver::finalize): Call clear_args.
10316 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
10318         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
10320 2018-06-11  Martin Sebor  <msebor@redhat.com>
10322         * doc/invoke.texi (-Wall): List -Wc++17-compat.
10323         (Wno-class-memaccess): Add @opindex.
10324         (Wno-templates, Wno-multiple-inheritance): Same.
10325         (Wno-virtual-inheritance, Wno-namespaces): Same.
10326         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
10327         (Wno-format-overflow, Wno-format-truncation): Same.
10328         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
10329         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
10330         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
10331         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
10332         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
10333         (Wno-misspelled-isr): Same.
10335 2018-06-11  Martin Sebor  <msebor@redhat.com>
10337         * PR tree-optimization/86083
10338         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
10340 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
10342         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
10344 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
10346         PR target/85755
10347         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
10348         on the correct operand.
10349         (*movdi_internal64): Ditto.
10351 2018-06-11  Martin Liska  <mliska@suse.cz>
10353         PR tree-optimization/86089
10354         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
10356 2018-06-11  Julia Koval  <julia.koval@intel.com>
10358         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
10359         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
10360         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
10362 2018-06-11  Olivier Hainque  <hainque@adacore.com>
10364         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
10365         for Ada with strict dwarf2.
10367 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
10369         PR target/85755
10370         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
10371         addresses.
10373 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
10375         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
10377 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
10379         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
10380         TARGET_ELF.
10382 2018-06-08  Martin Liska  <mliska@suse.cz>
10384         * tree-cfg.h (debug_function): Fix argument type to match
10385         implementation.
10387 2018-06-08  Martin Liska  <mliska@suse.cz>
10389         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
10390         Remove usage of MPX-related (and removed) fields.
10391         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
10393 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
10395         * cfg.c (debug): Use TDF_NONE rather than 0.
10396         * cfghooks.c (debug): Likewise.
10397         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
10398         (struct dump_option_value_info): Convert to...
10399         (struct kv_pair): ...this template type.
10400         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
10401         rather than 0.
10402         (optinfo_verbosity_options): Likewise.
10403         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
10404         OPTGROUP_NONE.
10405         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
10406         than int for "optgroup_flags" param.
10407         (dump_generic_expr_loc): Use dump_flags_t rather than int for
10408         "dump_kind" param.
10409         (dump_dec): Likewise.
10410         (dump_finish): Use TDF_NONE rather than 0.
10411         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
10412         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
10413         than 0.  Update for change to option_ptr.
10414         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
10415         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
10416         0.  Update for changes to optinfo_verbosity_options and
10417         optgroup_options.
10418         (opt_info_switch_p): Convert optgroup_flags from int to
10419         optgroup_flags_t.
10420         (dump_basic_block): Use dump_flags_t rather than int
10421         for "dump_kind" param.
10422         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
10423         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
10424         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
10425         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
10426         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
10427         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
10428         TDF_NONE): Convert from macros to...
10429         (enum dump_flag): ...this new enum.
10430         (dump_flags_t): Update to use enum.
10431         (operator|, operator&, operator~, operator|=, operator&=):
10432         Implement for dump_flags_t.
10433         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10434         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10435         Convert from macros to...
10436         (enum optgroup_flag): ...this new enum.
10437         (optgroup_flags_t): New typedef.
10438         (operator|, operator|=): Implement for optgroup_flags_t.
10439         (struct dump_file_info): Convert field "alt_flags" to
10440         dump_flags_t.  Convert field "optgroup_flags" to
10441         optgroup_flags_t.
10442         (dump_basic_block): Use dump_flags_t rather than int for param.
10443         (dump_generic_expr_loc): Likewise.
10444         (dump_dec): Likewise.
10445         (dump_register): Convert param "optgroup_flags" to
10446         optgroup_flags_t.
10447         (opt_info_enable_passes): Likewise.
10448         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10449         than 0.
10450         * gimple-pretty-print.c (debug): Likewise.
10451         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10452         (merged_store_group::apply_stores): Likewise.
10453         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10454         * gimple.c (verify_gimple_pp): Likewise.
10455         * graphite-poly.c (print_pbb_body): Likewise.
10456         * passes.c (pass_manager::register_one_dump_file): Convert
10457         local "optgroup_flags" to optgroup_flags_t.
10458         * print-tree.c (print_node): Use TDF_NONE rather than 0.
10459         (debug): Likewise.
10460         (debug_body): Likewise.
10461         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10462         to optgroup_flags_t.
10463         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10464         than 0.
10465         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10466         (convert_mult_to_fma): Likewise.
10467         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10468         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10469         * tree-vect-data-refs.c (dump_lower_bound): Convert param
10470         "dump_kind" to dump_flags_t.
10472 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
10474         * config/rs6000/rs6000.c (min, max): Delete.
10476 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
10478         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10479         -mabi=spe and -mabi=no-spe.
10481 2018-06-08  Martin Liska  <mliska@suse.cz>
10483         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10484         where we expect an existing summary.
10486 2018-06-08  Martin Liska  <mliska@suse.cz>
10488         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10489         * ipa-inline.h (estimate_edge_growth): Likewise.
10491 2018-06-08  Martin Liska  <mliska@suse.cz>
10493         * cgraph.c (function_version_hasher::hash): Use
10494         cgraph_node::get_uid ().
10495         (function_version_hasher::equal):
10496         * cgraph.h (cgraph_node::get_uid): New method.
10497         * ipa-inline.c (update_caller_keys): Use
10498         cgraph_node::get_uid ().
10499         (update_callee_keys): Likewise.
10500         * ipa-utils.c (searchc): Likewise.
10501         (ipa_reduced_postorder): Likewise.
10502         * lto-cgraph.c (input_node): Likewise.
10503         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10504         * symbol-summary.h (symtab_insertion): Likewise.
10505         (symtab_removal): Likewise.
10506         (symtab_duplication): Likewise.
10507         * tree-pretty-print.c (dump_function_header): Likewise.
10508         * tree-sra.c (convert_callers_for_node): Likewise.
10510 2018-06-08  Martin Liska  <mliska@suse.cz>
10512         * cgraph.c (symbol_table::create_edge): Always assign a new
10513         unique number.
10514         (symbol_table::free_edge): Do not recycle numbers.
10515         * cgraph.h (cgraph_edge::get): New method.
10516         * symbol-summary.h (symtab_removal): Use it.
10517         (symtab_duplication): Likewise.
10518         (call_summary::hashable_uid): Remove.
10520 2018-06-08  Martin Liska  <mliska@suse.cz>
10522         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10523         (initialize_growth_caches): Remove.
10524         (free_growth_caches): Likewise.
10525         (do_estimate_edge_time): Use edge_growth_cache.
10526         (do_estimate_edge_size): Likewise.
10527         (do_estimate_edge_hints): Likewise.
10528         * ipa-inline.c (reset_edge_caches): Likewise.
10529         (recursive_inlining): Likewise.
10530         (inline_small_functions): Likewise.
10531         * ipa-inline.h (initialize_growth_caches): Remove.
10532         (estimate_edge_size): Likewise.
10533         (estimate_edge_time): Likewise.
10534         (estimate_edge_hints): Likewise.
10535         (reset_edge_growth_cache): Likewise.
10536         * symbol-summary.h (call_summary::remove): New method.
10538 2018-06-08  Martin Liska  <mliska@suse.cz>
10540         * ipa-cp.c (class edge_clone_summary): New summary.
10541         (grow_edge_clone_vectors): Remove.
10542         (ipcp_edge_duplication_hook): Remove.
10543         (class edge_clone_summary_t): New call_summary class.
10544         (ipcp_edge_removal_hook): Remove.
10545         (edge_clone_summary_t::duplicate): New function.
10546         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10547         (create_specialized_node): Likewise.
10548         (ipcp_driver): Initialize edge_clone_summaries and do not
10549         register hooks.
10551 2018-06-08  Martin Liska  <mliska@suse.cz>
10553         * symbol-summary.h (get): New function.
10554         (call_summary::m_initialize_when_cloning): New class member.
10556 2018-06-08  Martin Liska  <mliska@suse.cz>
10558         * cgraph.c (cgraph_node::remove): Do not recycle uid.
10559         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10560         (symbol_table::allocate_cgraph_symbol): Do not set uid.
10561         * passes.c (uid_hash_t): Record removed_nodes by their uids.
10562         (remove_cgraph_node_from_order): Use the removed_nodes set.
10563         (do_per_function_toporder): Likwise.
10564         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10565         instead of summary_uid.
10566         (symtab_removal): Likewise.
10567         (symtab_duplication): Likewise.
10569 2018-06-08  Martin Liska  <mliska@suse.cz>
10571         * ipa-cp.c (ipcp_store_bits_results): Use
10572         ipcp_transformation_sum.
10573         (ipcp_store_vr_results): Likewise.
10574         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10575         to ...
10576         (ipcp_transformation_initialize): ... this.
10577         (ipa_set_node_agg_value_chain):
10578         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10579         (write_ipcp_transformation_info): Likewise.
10580         (read_ipcp_transformation_info): Likewise.
10581         (ipcp_update_bits): Likewise.
10582         (ipcp_update_vr): Likewise.
10583         (ipcp_transform_function): Likewise.
10584         * ipa-prop.h: Rename ipcp_transformation_summary to
10585         ipcp_transformation.
10586         (class ipcp_transformation_t): New function summary.
10587         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10588         (ipa_get_agg_replacements_for_node): Likewise.
10590 2018-06-08  Martin Liska  <mliska@suse.cz>
10592         * ipa-pure-const.c (struct funct_state_d): Do it class instead
10593         of struct.
10594         (class funct_state_summary_t): New function_summary class.
10595         (has_function_state): Remove.
10596         (get_function_state): Likewise.
10597         (set_function_state): Likewise.
10598         (add_new_function): Likewise.
10599         (funct_state_summary_t::insert): New function.
10600         (duplicate_node_data): Remove.
10601         (remove_node_data): Remove.
10602         (funct_state_summary_t::duplicate): New function.
10603         (register_hooks): Create new funct_state_summaries.
10604         (pure_const_generate_summary): Use it.
10605         (pure_const_write_summary): Likewise.
10606         (pure_const_read_summary): Likewise.
10607         (propagate_pure_const): Likewise.
10608         (propagate_nothrow): Likewise.
10609         (dump_malloc_lattice): Likewise.
10610         (propagate_malloc): Likewise.
10611         (execute): Do not register hooks, just remove summary
10612         instead.
10613         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10614         constructor.
10616 2018-06-08  Martin Liska  <mliska@suse.cz>
10618         * ipa-reference.c (remove_node_data): Remove.
10619         (duplicate_node_data): Likewise.
10620         (class ipa_ref_var_info_summary_t): New class.
10621         (class ipa_ref_opt_summary_t): Likewise.
10622         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10623         (get_reference_optimization_summary): Use
10624         ipa_ref_opt_sum_summaries.
10625         (set_reference_vars_info): Remove.
10626         (set_reference_optimization_summary): Likewise.
10627         (ipa_init): Create summaries.
10628         (init_function_info): Use function summary.
10629         (ipa_ref_opt_summary_t::duplicate): New function.
10630         (ipa_ref_opt_summary_t::remove): New function.
10631         (get_read_write_all_from_node): Fix GNU coding style.
10632         (propagate): Use function summary.
10633         (write_node_summary_p): Fix GNU coding style.
10634         (stream_out_bitmap): Likewise.
10635         (ipa_reference_read_optimization_summary): Use function summary.
10636         (ipa_reference_c_finalize): Do not release hooks.
10638 2018-06-08  Martin Liska  <mliska@suse.cz>
10640         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10641         (analyze_function_body): Extract multiple calls of get_create.
10642         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10643         * ipa-inline.c (recursive_inlining): Use ::get method.
10644         * ipa-inline.h (estimate_edge_growth): Likewise.
10646 2018-06-08  Martin Liska  <mliska@suse.cz>
10648         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10649         HSA_INVALID.
10650         (hsa_function_summary::hsa_function_summary): Use the new enum
10651         value.
10652         (hsa_gpu_implementation_p): Use hsa_summaries::get.
10653         * hsa-gen.c (hsa_get_host_function): Likewise.
10654         (get_brig_function_name): Likewise.
10655         * ipa-hsa.c (process_hsa_functions): Likewise.
10656         (ipa_hsa_write_summary): Likewise.
10657         * symbol-summary.h (symtab_duplication): Use ::get function/
10658         (get): New function.
10660 2018-06-08  Martin Liska  <mliska@suse.cz>
10662         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10663         of get.
10664         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10665         (hsa_register_kernel): Likewise.
10666         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10667         * hsa-gen.c (hsa_get_host_function): Likewise.
10668         (get_brig_function_name): Likewise.
10669         (generate_hsa): Likewise.
10670         (pass_gen_hsail::execute): Likewise.
10671         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10672         (devirtualization_time_bonus): Likewise.
10673         (ipcp_propagate_stage): Likewise.
10674         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10675         (edge_set_predicate): Likewise.
10676         (evaluate_conditions_for_known_args): Likewise.
10677         (evaluate_properties_for_edge): Likewise.
10678         (ipa_fn_summary::reset): Likewise.
10679         (ipa_fn_summary_t::duplicate): Likewise.
10680         (dump_ipa_call_summary): Likewise.
10681         (ipa_dump_fn_summary): Likewise.
10682         (analyze_function_body): Likewise.
10683         (compute_fn_summary): Likewise.
10684         (estimate_edge_devirt_benefit): Likewise.
10685         (estimate_edge_size_and_time): Likewise.
10686         (estimate_calls_size_and_time): Likewise.
10687         (estimate_node_size_and_time): Likewise.
10688         (inline_update_callee_summaries): Likewise.
10689         (remap_edge_change_prob): Likewise.
10690         (remap_edge_summaries): Likewise.
10691         (ipa_merge_fn_summary_after_inlining): Likewise.
10692         (ipa_update_overall_fn_summary): Likewise.
10693         (read_ipa_call_summary): Likewise.
10694         (inline_read_section): Likewise.
10695         (write_ipa_call_summary): Likewise.
10696         (ipa_fn_summary_write): Likewise.
10697         (ipa_free_fn_summary): Likewise.
10698         * ipa-hsa.c (process_hsa_functions): Likewise.
10699         (ipa_hsa_write_summary): Likewise.
10700         (ipa_hsa_read_section): Likewise.
10701         * ipa-icf.c (sem_function::merge): Likewise.
10702         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10703         (do_estimate_edge_time): Likewise.
10704         (estimate_size_after_inlining): Likewise.
10705         (estimate_growth): Likewise.
10706         (growth_likely_positive): Likewise.
10707         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10708         (inline_call): Likewise.
10709         * ipa-inline.c (caller_growth_limits): Likewise.
10710         (can_inline_edge_p): Likewise.
10711         (can_inline_edge_by_limits_p): Likewise.
10712         (compute_uninlined_call_time): Likewise.
10713         (compute_inlined_call_time): Likewise.
10714         (want_inline_small_function_p): Likewise.
10715         (edge_badness): Likewise.
10716         (update_caller_keys): Likewise.
10717         (update_callee_keys): Likewise.
10718         (recursive_inlining): Likewise.
10719         (inline_small_functions): Likewise.
10720         (inline_to_all_callers_1): Likewise.
10721         (dump_overall_stats): Likewise.
10722         (early_inline_small_functions): Likewise.
10723         (early_inliner): Likewise.
10724         * ipa-inline.h (estimate_edge_growth): Likewise.
10725         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10726         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10727         * ipa-prop.h (IPA_NODE_REF): Likewise.
10728         (IPA_EDGE_REF): Likewise.
10729         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10730         (propagate_malloc): Likewise.
10731         * ipa-split.c (execute_split_functions): Likewise.
10732         * symbol-summary.h: Rename get to get_create.
10733         (get): Likewise.
10734         (get_create): Likewise.
10735         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10737 2018-06-08  Martin Liska  <mliska@suse.cz>
10739         * symbol-summary.h (release): Move definition out of class
10740         declaration.
10741         (symtab_removal): Likewise.
10742         (symtab_duplication): Likewise.
10744 2018-06-08  Martin Liska  <mliska@suse.cz>
10746         * symbol-summary.h (function_summary): Move constructor
10747         implementation out of class declaration.
10748         (release): Likewise.
10749         (symtab_insertion): Likewise.
10750         (symtab_removal): Likewise.
10751         (symtab_duplication): Likewise.
10752         (get): Likewise.
10754 2018-06-08  Martin Liska  <mliska@suse.cz>
10756         * Makefile.in: Remove support for MPX (macros, related functions,
10757         fields in cgraph_node, ...).
10758         * builtin-types.def (BT_BND): Likewise.
10759         (BT_FN_BND_CONST_PTR): Likewise.
10760         (BT_FN_CONST_PTR_BND): Likewise.
10761         (BT_FN_VOID_PTR_BND): Likewise.
10762         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10763         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10764         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10765         (expand_builtin_mempcpy_with_bounds): Likewise.
10766         (expand_builtin_memset_with_bounds): Likewise.
10767         (expand_builtin_memset_args): Likewise.
10768         (std_expand_builtin_va_start): Likewise.
10769         (expand_builtin): Likewise.
10770         (expand_builtin_with_bounds): Likewise.
10771         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10772         (DEF_LIB_BUILTIN_CHKP): Likewise.
10773         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10774         (DEF_CHKP_BUILTIN): Likewise.
10775         (BUILT_IN_MEMCPY): Likewise.
10776         (BUILT_IN_MEMMOVE): Likewise.
10777         (BUILT_IN_MEMPCPY): Likewise.
10778         (BUILT_IN_MEMSET): Likewise.
10779         (BUILT_IN_STPCPY): Likewise.
10780         (BUILT_IN_STRCAT): Likewise.
10781         (BUILT_IN_STRCHR): Likewise.
10782         (BUILT_IN_STRCPY): Likewise.
10783         (BUILT_IN_STRLEN): Likewise.
10784         (BUILT_IN_MEMCPY_CHK): Likewise.
10785         (BUILT_IN_MEMMOVE_CHK): Likewise.
10786         (BUILT_IN_MEMPCPY_CHK): Likewise.
10787         (BUILT_IN_MEMSET_CHK): Likewise.
10788         (BUILT_IN_STPCPY_CHK): Likewise.
10789         (BUILT_IN_STRCAT_CHK): Likewise.
10790         (BUILT_IN_STRCPY_CHK): Likewise.
10791         * calls.c (store_bounds): Likewise.
10792         (emit_call_1): Likewise.
10793         (special_function_p): Likewise.
10794         (maybe_warn_nonstring_arg): Likewise.
10795         (initialize_argument_information): Likewise.
10796         (finalize_must_preallocate): Likewise.
10797         (compute_argument_addresses): Likewise.
10798         (expand_call): Likewise.
10799         * cfgexpand.c (expand_call_stmt): Likewise.
10800         (expand_return): Likewise.
10801         (expand_gimple_stmt_1): Likewise.
10802         (pass_expand::execute): Likewise.
10803         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10804         (cgraph_node::remove): Likewise.
10805         (cgraph_node::dump): Likewise.
10806         (cgraph_node::verify_node): Likewise.
10807         * cgraph.h (chkp_function_instrumented_p): Likewise.
10808         (symtab_node::get_alias_target): Likewise.
10809         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10810         (cgraph_local_p): Likewise.
10811         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10812         (cgraph_edge::rebuild_references): Likewise.
10813         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10814         (walk_polymorphic_call_targets): Likewise.
10815         (cgraph_node::expand_thunk): Likewise.
10816         (symbol_table::output_weakrefs): Likewise.
10817         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10818         (ix86_handle_option): Likewise.
10819         * config/i386/constraints.md: Likewise.
10820         * config/i386/i386-builtin-types.def (BND): Likewise.
10821         (VOID): Likewise.
10822         (PVOID): Likewise.
10823         (ULONG): Likewise.
10824         * config/i386/i386-builtin.def (BDESC_END): Likewise.
10825         (BDESC_FIRST): Likewise.
10826         (BDESC): Likewise.
10827         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10828         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10829         * config/i386/i386.c (enum reg_class): Likewise.
10830         (ix86_target_string): Likewise.
10831         (ix86_option_override_internal): Likewise.
10832         (ix86_conditional_register_usage): Likewise.
10833         (ix86_valid_target_attribute_inner_p): Likewise.
10834         (ix86_set_indirect_branch_type): Likewise.
10835         (ix86_set_current_function): Likewise.
10836         (ix86_function_arg_regno_p): Likewise.
10837         (init_cumulative_args): Likewise.
10838         (ix86_function_arg_advance): Likewise.
10839         (ix86_function_arg): Likewise.
10840         (ix86_pass_by_reference): Likewise.
10841         (ix86_function_value_regno_p): Likewise.
10842         (ix86_function_value_1): Likewise.
10843         (ix86_function_value_bounds): Likewise.
10844         (ix86_return_in_memory): Likewise.
10845         (ix86_setup_incoming_vararg_bounds): Likewise.
10846         (ix86_va_start): Likewise.
10847         (indirect_thunk_need_prefix): Likewise.
10848         (print_reg): Likewise.
10849         (ix86_print_operand): Likewise.
10850         (ix86_expand_call): Likewise.
10851         (ix86_output_function_return): Likewise.
10852         (reg_encoded_number): Likewise.
10853         (BDESC_VERIFYS): Likewise.
10854         (ix86_init_mpx_builtins): Likewise.
10855         (ix86_init_builtins): Likewise.
10856         (ix86_emit_cmove): Likewise.
10857         (ix86_emit_move_max): Likewise.
10858         (ix86_expand_builtin): Likewise.
10859         (ix86_builtin_mpx_function): Likewise.
10860         (ix86_get_arg_address_for_bt): Likewise.
10861         (ix86_load_bounds): Likewise.
10862         (ix86_store_bounds): Likewise.
10863         (ix86_load_returned_bounds): Likewise.
10864         (ix86_store_returned_bounds): Likewise.
10865         (ix86_class_likely_spilled_p): Likewise.
10866         (ix86_hard_regno_mode_ok): Likewise.
10867         (x86_order_regs_for_local_alloc): Likewise.
10868         (ix86_mitigate_rop): Likewise.
10869         (ix86_bnd_prefixed_insn_p): Likewise.
10870         (ix86_mpx_bound_mode): Likewise.
10871         (ix86_make_bounds_constant): Likewise.
10872         (ix86_initialize_bounds): Likewise.
10873         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10874         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10875         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10876         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10877         (TARGET_CHKP_BOUND_MODE): Likewise.
10878         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10879         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10880         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10881         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10882         * config/i386/i386.h (TARGET_MPX): Likewise.
10883         (TARGET_MPX_P): Likewise.
10884         (VALID_BND_REG_MODE): Likewise.
10885         (FIRST_BND_REG): Likewise.
10886         (LAST_BND_REG): Likewise.
10887         (enum reg_class): Likewise.
10888         (BND_REG_P): Likewise.
10889         (BND_REGNO_P): Likewise.
10890         (BNDmode): Likewise.
10891         (ADJUST_INSN_LENGTH): Likewise.
10892         * config/i386/i386.md: Likewise.
10893         * config/i386/i386.opt: Likewise.
10894         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10895         (defined): Likewise.
10896         (LINK_MPX): Likewise.
10897         (MPX_SPEC): Likewise.
10898         (LIBMPX_SPEC): Likewise.
10899         (LIBMPXWRAPPERS_SPEC): Likewise.
10900         (CHKP_SPEC): Likewise.
10901         * config/i386/predicates.md: Likewise.
10902         * dbxout.c (dbxout_type): Likewise.
10903         * doc/extend.texi: Likewise.
10904         * doc/invoke.texi: Likewise.
10905         * doc/md.texi: Likewise.
10906         * doc/tm.texi: Likewise.
10907         * doc/tm.texi.in: Likewise.
10908         * dwarf2out.c (is_base_type): Likewise.
10909         (gen_formal_types_die): Likewise.
10910         (gen_subprogram_die): Likewise.
10911         (gen_type_die_with_usage): Likewise.
10912         (gen_decl_die): Likewise.
10913         (dwarf2out_late_global_decl): Likewise.
10914         * expr.c (expand_assignment): Likewise.
10915         (emit_storent_insn): Likewise.
10916         (store_expr_with_bounds): Likewise.
10917         (store_expr): Likewise.
10918         (expand_expr_real_1): Likewise.
10919         * expr.h (store_expr_with_bounds): Likewise.
10920         * function.c (use_register_for_decl): Likewise.
10921         (struct bounds_parm_data): Likewise.
10922         (assign_parms_augmented_arg_list): Likewise.
10923         (assign_parm_find_entry_rtl): Likewise.
10924         (assign_parm_is_stack_parm): Likewise.
10925         (assign_parm_load_bounds): Likewise.
10926         (assign_bounds): Likewise.
10927         (assign_parms): Likewise.
10928         (expand_function_start): Likewise.
10929         * gcc.c (CHKP_SPEC): Likewise.
10930         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10931         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10932         (wrestrict_dom_walker::check_call): Likewise.
10933         * gimple.c (gimple_build_call_from_tree): Likewise.
10934         * gimple.h (enum gf_mask): Likewise.
10935         (gimple_call_with_bounds_p): Likewise.
10936         (gimple_call_set_with_bounds): Likewise.
10937         * gimplify.c (gimplify_init_constructor): Likewise.
10938         * ipa-cp.c (initialize_node_lattices): Likewise.
10939         (propagate_constants_across_call): Likewise.
10940         (find_more_scalar_values_for_callers_subset): Likewise.
10941         * ipa-hsa.c (process_hsa_functions): Likewise.
10942         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10943         * ipa-icf.c (sem_function::merge): Likewise.
10944         * ipa-inline.c (early_inliner): Likewise.
10945         * ipa-pure-const.c (warn_function_noreturn): Likewise.
10946         (warn_function_cold): Likewise.
10947         (propagate_pure_const): Likewise.
10948         * ipa-ref.h (enum GTY): Likewise.
10949         * ipa-split.c (find_retbnd): Likewise.
10950         (consider_split): Likewise.
10951         (split_function): Likewise.
10952         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10953         * ipa.c (walk_polymorphic_call_targets): Likewise.
10954         (symbol_table::remove_unreachable_nodes): Likewise.
10955         (process_references): Likewise.
10956         (cgraph_build_static_cdtor_1): Likewise.
10957         * lto-cgraph.c (lto_output_node): Likewise.
10958         (output_refs): Likewise.
10959         (compute_ltrans_boundary): Likewise.
10960         (input_overwrite_node): Likewise.
10961         (input_node): Likewise.
10962         (input_cgraph_1): Likewise.
10963         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10964         * passes.c (pass_manager::execute_early_local_passes): Likewise.
10965         (class pass_chkp_instrumentation_passes): Likewise.
10966         (make_pass_chkp_instrumentation_passes): Likewise.
10967         * passes.def: Likewise.
10968         * rtl.h (struct GTY): Likewise.
10969         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10970         * stor-layout.c (layout_type): Likewise.
10971         * symtab.c: Likewise.
10972         * target.def: Likewise.
10973         * targhooks.c (default_chkp_bound_type): Likewise.
10974         (default_chkp_bound_mode): Likewise.
10975         (default_builtin_chkp_function): Likewise.
10976         (default_chkp_function_value_bounds): Likewise.
10977         (default_chkp_make_bounds_constant): Likewise.
10978         (default_chkp_initialize_bounds): Likewise.
10979         * targhooks.h (default_chkp_bound_type): Likewise.
10980         (default_chkp_bound_mode): Likewise.
10981         (default_builtin_chkp_function): Likewise.
10982         (default_chkp_function_value_bounds): Likewise.
10983         (default_chkp_make_bounds_constant): Likewise.
10984         (default_chkp_initialize_bounds): Likewise.
10985         * toplev.c (compile_file): Likewise.
10986         (process_options): Likewise.
10987         * tree-core.h (DEF_BUILTIN): Likewise.
10988         (DEF_BUILTIN_CHKP): Likewise.
10989         * tree-inline.c (declare_return_variable): Likewise.
10990         (remap_gimple_stmt): Likewise.
10991         (copy_bb): Likewise.
10992         (initialize_inlined_parameters): Likewise.
10993         (expand_call_inline): Likewise.
10994         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10995         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10996         (make_pass_ipa_chkp_produce_thunks): Likewise.
10997         (make_pass_chkp): Likewise.
10998         (make_pass_chkp_opt): Likewise.
10999         (make_pass_chkp_instrumentation_passes): Likewise.
11000         * tree-pretty-print.c (dump_generic_node): Likewise.
11001         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
11002         * tree-ssa-dce.c (propagate_necessity): Likewise.
11003         (eliminate_unnecessary_stmts): Likewise.
11004         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
11005         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
11006         * tree-ssa-sccvn.h: Likewise.
11007         * tree-ssa-strlen.c (get_string_length): Likewise.
11008         (valid_builtin_call): Likewise.
11009         (adjust_last_stmt): Likewise.
11010         (handle_builtin_strchr): Likewise.
11011         (handle_builtin_strcpy): Likewise.
11012         (handle_builtin_stxncpy): Likewise.
11013         (handle_builtin_memcpy): Likewise.
11014         (handle_builtin_strcat): Likewise.
11015         (strlen_check_and_optimize_stmt): Likewise.
11016         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
11017         * tree-streamer-in.c: Likewise.
11018         * tree-streamer.c (record_common_node): Likewise.
11019         * tree.c (tree_code_size): Likewise.
11020         (wide_int_to_tree_1): Likewise.
11021         (type_contains_placeholder_1): Likewise.
11022         (build_common_tree_nodes): Likewise.
11023         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
11024         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
11025         (POINTER_BOUNDS_P): Likewise.
11026         (BOUNDED_TYPE_P): Likewise.
11027         (BOUNDED_P): Likewise.
11028         (CALL_WITH_BOUNDS_P): Likewise.
11029         (pointer_bounds_type_node): Likewise.
11030         * value-prof.c (gimple_ic): Likewise.
11031         * var-tracking.c (vt_add_function_parameters): Likewise.
11032         * varasm.c (make_decl_rtl): Likewise.
11033         (assemble_start_function): Likewise.
11034         (output_constant): Likewise.
11035         (maybe_assemble_visibility): Likewise.
11036         * varpool.c (ctor_for_folding): Likewise.
11037         * chkp-builtins.def: Remove.
11038         * ipa-chkp.c: Remove.
11039         * ipa-chkp.h: Remove.
11040         * rtl-chkp.c: Remove.
11041         * rtl-chkp.h: Remove.
11042         * tree-chkp-opt.c: Remove.
11043         * tree-chkp.c: Remove.
11044         * tree-chkp.h: Remove.
11046 2018-06-07  Carl Love  <cel@us.ibm.com>
11048         * config/rs6000/vsx.md (vextract_fp_from_shorth,
11049         vextract_fp_from_shortl): Add BE support.
11051 2018-06-07  Paul Koning  <ni1d@arrl.net>
11053         * compare-elim.c (try_merge_compare): Don't merge compare if
11054         address contains a side effect.
11055         (try_eliminate_compare): Likewise.
11057 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
11059         * config.gcc: Support "tremont".
11060         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
11061         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11062         PROCESSOR_TREMONT.
11063         * config/i386/i386.c (m_TREMONT): Define.
11064         (processor_target_table): Add "tremont".
11065         (PTA_TREMONT): Define.
11066         (ix86_lea_outperforms): Add TARGET_TREMONT.
11067         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
11068         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
11069         and M_INTEL_GOLDMONT_PLUS.
11070         (fold_builtin_cpu): Add "tremont".
11071         (ix86_add_stmt_cost): Add TARGET_TREMONT.
11072         (ix86_option_override_internal): Add "tremont".
11073         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
11074         (processor_type): Add PROCESSOR_TREMONT.
11075         * config/i386/x86-tune.def: Add m_TREMONT.
11076         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
11078 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11080         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
11081         symbol defined for msp430i* devices to be lower case.
11083 2018-06-07  Richard Biener  <rguenther@suse.de>
11085         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
11086         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
11087         Properly wrap signed arithmetic if overflow wraps.
11089 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
11091         PR tree-optimization/69615
11092         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
11093         of a cast from a same precision integral SSA_NAME in a bb dominated
11094         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
11095         cast to utype if rhs2 has already a compatible type.
11097 2018-06-07  Richard Biener  <rguenther@suse.de>
11099         PR tree-optimization/85935
11100         * graphite-scop-detection.c (find_params_in_bb): Analyze
11101         condition operands with respect to the correct loop.  Assert
11102         the analysis doesn't fail.
11104 2018-06-04  Carl Love  <cel@us.ibm.com>
11106         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
11107         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
11108         as it is slightly cheaper.
11109         (first_match_or_eos_index_<mode>):
11110         Calculate index using natural element order.
11111         (first_match_index_<mode>):
11112         Calculate index using natural element order.
11113         (first_match_or_eos_index_<mode>):
11114         Calculate index using natural order.
11115         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
11116         for BE and LE modes.
11117         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
11118         P9V_BUILTIN_VCLZLSBB_V16QI.
11119         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
11120         specific.
11122 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11124         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
11125         indentation and line wrap for many prototypes.  Add missing
11126         @smallexample directives around block of prototypes for vec_xl and
11127         vec_xst.
11129 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
11131         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
11132         track if we pass or return IEEE 128-bit floating point.
11133         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
11134         C++ mangling that is compatible with GCC 8.1.
11135         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
11136         (init_cumulative_args): Note if we pass or return IEEE 128-bit
11137         floating point types.
11138         (rs6000_function_arg_advance_1): Likewise.
11139         (rs6000_mangle_type): Optionally generate mangled names that match
11140         what GCC 8.1 generated for IEEE 128-bit floating point types.
11141         (rs6000_globalize_decl_name): If we have an external function that
11142         passes or returns IEEE 128-bit types, generate a weak reference
11143         from the mangled name used in GCC 8.1 to the current mangled
11144         name.
11145         (rs6000_init_builtins): Make __ibm128 use the long double type if
11146         long double is IBM extended double.  Make __float128 use the long
11147         double type if long double is IEEE 128-bit.
11149         PR target/85657
11150         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
11151         macro for __ibm128 built-in functions.
11152         (PACK_IF): Add __ibm128 pack/unpack functions.
11153         (UNPACK_IF): Likewise.
11154         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
11155         enable long double built-in functions if long double is IEEE
11156         128-bit floating point.
11157         (rs6000_invalid_builtin): Update long double built-in function
11158         error message.
11159         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
11160         functions, adjust the built-in function to use the long double
11161         built-in function if __ibm128 and long double are the same type.
11162         * doc/extend.texi (PowerPC builtins): Update documention for
11163         __builtin_{,un}pack_longdouble.  Add documentation for
11164         __builtin_{,un}pack_ibm128.
11166 2018-06-06  Jim Wilson  <jimw@sifive.com>
11168         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
11169         (struct machine_function): New field interrupt_mode.
11170         (riscv_handle_type_attribute): New function.  Add forward declaration.
11171         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
11172         (riscv_expand_epilogue): Check interrupt_mode field.
11173         (riscv_set_current_function): Check interrupt attribute args and
11174         set interrupt_mode field.
11175         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
11176         (riscv_sret, riscv_uret): New.
11177         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
11178         new arguments to interrupt attribute.
11180 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
11182         PR target/63177
11183         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
11184         Don't handle -mcpu=power8 if -mpower9-vector is also used.
11186 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11188         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
11189         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
11190         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11191         several redundant entries.
11193 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
11195         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
11196         type from "rtx" to "rtx_insn *".
11197         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
11198         for local "call_insn", removing cast.
11199         (ix86_expand_call): Likewise, introducing a "call_insn" local.
11201 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11203         PR tree-optimization/86066
11204         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
11205         for BIT_INSERT_EXPR stores.
11207 2018-06-06  Richard Biener  <rguenther@suse.de>
11209         PR tree-optimization/86062
11210         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11211         component refs ontop
11212         of to be offsetted base.
11214 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11216         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
11217         to be static and remove check on interrupt attribute name.
11219 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11221         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11222         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
11224 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
11226         PR target/79924
11227         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
11228         second argument.
11229         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
11230         Remove second argument, change how error is called.
11231         (aarch64_layout_arg): Remove second argument from
11232         aarch64_err_no_fpadvsimd call.
11233         (aarch64_init_cumulative_args): Ditto.
11234         (aarch64_gimplify_va_arg_expr): Ditto.
11235         * config/aarch64/aarch64.md (mov<mode>): Ditto.
11237 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
11239         * config/i386/i386.md (simple_return_indirect_internal): New expander.
11240         (*simple_return_indirect_internal<mode>): Rename from
11241         simple_return_indirect_internal.  Use W mode iterator.
11242         (rstorssp): New expander.
11243         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
11244         (clrssbsy): New expander.
11245         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
11247 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11249         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
11250         __typeof__.
11251         (cmse_check_pointed_object): Likewise.
11253 2018-06-05  Martin Liska  <mliska@suse.cz>
11255         PR gcov-profile/47618
11256         * doc/invoke.texi: Document how -fprofile-dir format
11257         is extended.
11259 2018-06-05  Richard Biener  <rguenther@suse.de>
11261         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
11262         removal pretend DOM info isn't available so we do not update
11263         it and only remove edges, not dominated blocks.  Actually free
11264         DOM info in case we removed something.  Remove unreachable blocks.
11265         (mfb_keep_latches): Work with either DOM info or marked backedges.
11266         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
11267         first.  Mark backedges if DOM info isn't available.
11268         (Re-)compute DOM info after cleanup_control_flow_pre.
11270 2018-06-05  Richard Biener  <rguenther@suse.de>
11272         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
11273         (locus_discrim_hasher::hash): Adjust.
11274         (locus_discrim_hasher::equal): Likewise.
11275         (next_discriminator_for_locus): Work on line directly.
11276         (same_line_p): Pass in expanded locus1 as well.
11277         (assign_discriminators): Avoid redundant location expansions.
11279 2018-06-05  Richard Biener  <rguenther@suse.de>
11281         PR tree-optimization/86046
11282         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
11283         if required after clearing TREE_ADDRESSABLE.
11285 2018-06-05  Richard Biener  <rguenther@suse.de>
11287         PR tree-optimization/86047
11288         * tree-ssa-loop.c (for_each_index): Glob handling of all
11289         decls and constants and really handle all of them.
11291 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11293         PR target/81497
11294         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
11295         qualifier_void_pointer and qualifier_const_void_pointer.
11296         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
11297         (arm_init_builtins): Handle the above.
11298         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
11299         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
11300         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
11301         void intrinsics.
11303 2018-06-05  Martin Liska  <mliska@suse.cz>
11305         * auto-profile.c (read_autofdo_file): Do not use
11306         gcov_ctr_summary struct.
11307         (afdo_callsite_hot_enough_for_early_inline): Likewise.
11308         * coverage.c (struct counts_entry): Likewise.
11309         (read_counts_file): Read just single summary entry.
11310         (get_coverage_counts): Use gcov_summary struct.
11311         * coverage.h (get_coverage_counts): Likewise.
11312         * gcov-dump.c (dump_working_sets): Likewise.
11313         (tag_summary): Dump just single summary.
11314         * gcov-io.c (gcov_write_summary): Write just histogram
11315         summary.
11316         (gcov_read_summary): Read just single summary.
11317         (compute_working_sets): Use gcov_summary struct.
11318         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
11319         of GCOV_COUNTERS_SUMMABLE.
11320         (GCOV_COUNTERS_SUMMABLE): Remove.
11321         (GCOV_FIRST_VALUE_COUNTER): Replace with
11322         GCOV_COUNTER_V_INTERVAL.
11323         (struct gcov_ctr_summary): Remove.
11324         (struct gcov_summary): Directly use fields of former
11325         gcov_ctr_summary.
11326         (compute_working_sets): Use gcov_summary struct.
11327         * gcov.c (read_count_file): Do not use ctrs fields.
11328         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
11329         struct.
11330         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
11331         struct.
11332         * profile.c: Likewise.
11333         * profile.h: Likewise.
11335 2018-06-05  Martin Liska  <mliska@suse.cz>
11337         PR gcov-profile/84846
11338         * gcov.c (output_lines): Print working directory only
11339         in intermediate format.
11341 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
11343         * config/s390/s390-builtin-types.def: Add void function type.
11344         * config/s390/s390-builtins.def: Use the function type for the
11345         tbeginc builtin.
11347 2018-06-04  Jim Wilson  <jimw@sifive.com>
11349         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
11350         to int.
11351         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
11352         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
11353         handle EH_RETURN_DATA_REGNO registers properly.
11354         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
11355         (riscv_expand_epilogue): Update comment.  Change argument name and
11356         type.  Update code to use new name and type.  Pass new args to
11357         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
11358         EXCEPTION_RETURN.
11359         * config/riscv/riscv.md (NORMAL_RETURN): New.
11360         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
11361         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
11362         (eh_return): Call gen_eh_return_internal and emit barrier.
11363         (eh_return_internal): Call riscv_expand_epilogue.
11365 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
11367         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
11368         bit_insertion field and declare can_be_merged_into method.
11369         (merged_store_group::can_be_merged_into): New method.
11370         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
11371         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
11372         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
11374 2018-06-04  Richard Biener  <rguenther@suse.de>
11376         PR tree-optimization/85955
11377         * builtins.c (fold_builtin_sincos): Convert pointers to
11378         destination to appropriate type before dereferencing.
11380 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
11382         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
11384 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
11386         * expr.c (expand_expr_real_1): Force the operand into memory if
11387         its TYPE_MODE is BLKmode and if there is no integer mode for
11388         the number of bits being extracted.
11390 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
11392         PR target/85832
11393         PR target/86036
11394         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11395         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
11397 2018-06-04  Richard Biener  <rguenther@suse.de>
11399         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
11400         (cleanup_tree_cfg_noloop): ... single caller.  Do
11401         start_recording_case_labels later.
11403 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
11405         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
11406         to _IMMINTRIN_H_INCLUDED.
11407         * config/i386/pconfigintrin.h: Ditto.
11408         * config/i386/waitpkgintrin.h: Ditto.
11409         * config/i386/immintrin.h: Add includes for sgxintrin.h,
11410         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
11411         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
11412         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
11413         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
11414         waitpkgintrin.h and cldemoteintrin.h.
11416 2018-06-04  Richard Biener  <rguenther@suse.de>
11418         PR tree-optimization/86038
11419         * tracer.c (find_best_successor): Check probability for
11420         being initialized, bail out if not.
11422 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
11424         PR target/86003
11425         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
11426         of bits to ignore when comparing architectures.
11428 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
11430         PR tree-optimization/69615
11431         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11432         maximum or minimum of the type, try to merge it also as if
11433         range1 is + [-, x - 1] or + [x + 1, -].
11435         PR c++/86025
11436         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11438 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
11440         PR tree-optimization/86034
11441         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11442         the unsigned bitfield type in a bit insertion sequence if it does not
11443         have a larger precision than the bitfield size.
11444         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11446 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
11448         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11450 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11452         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11453         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11454         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11455         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11457 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11459         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11460         Disable -fdelete-null-pointer-checks for ELF toolchain.
11462 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11463             Kito Cheng  <kito.cheng@gmail.com>
11465         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11466         (nds32le-*-*, nds32be-*-*): Integrate checking process.
11467         (nds32*-*-*): Add glibc and uclibc conditions.
11468         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11469         (TARGET_EXCEPT_UNWIND_INFO): Define.
11470         * config/nds32/elf.h: New file.
11471         * config/nds32/linux.h: New file.
11472         * config/nds32/nds32-elf.opt: New file.
11473         * config/nds32/nds32-linux.opt: New file.
11474         * config/nds32/nds32-fp-as-gp.c
11475         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11476         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11477         TARGET_LINUX_ABI.
11478         (nds32_asm_file_end): Ditto.
11479         (nds32_print_operand): Ditto.
11480         (nds32_insert_attributes): Ditto.
11481         (nds32_init_libfuncs): New function.
11482         (TARGET_HAVE_TLS): Define.
11483         (TARGET_INIT_LIBFUNCS): Define.
11484         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11485         spec content.
11486         (TARGET_ELF): Apply different mcmodel setting.
11487         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11488         been migrated into elf.h and linux.h files.
11489         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11490         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11491         (mcmodel): The content has been migrated into nds32-elf.opt and
11492         nds32-linux.opt files.
11493         * config/nds32/t-elf: New file.
11494         * config/nds32/t-linux: New file.
11496 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11497             Shiva Chen  <shiva0217@gmail.com>
11499         * config/nds32/constants.md (unspec_volatile_element): Add
11500         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11501         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11502         optimization.
11503         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11504         (make_pass_nds32_fp_as_gp): Declare.
11505         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11506         optmization pass.
11507         (nds32_asm_function_end_prologue): Remove unused asm output.
11508         (nds32_asm_function_begin_epilogue): Remove unused asm output.
11509         (nds32_asm_file_start): Output necessary fp_as_gp information.
11510         (nds32_option_override): Adjust register usage.
11511         (nds32_expand_prologue): Consider fp_as_gp situation.
11512         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11513         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11514         (epilogue): Ditto.
11515         (return): Ditto.
11516         (simple_return): Ditto.
11517         (omit_fp_begin): Output special directive for fp_as_gp.
11518         (omit_fp_end): Output special directive for fp_as_gp.
11519         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11520         mforbid-fp-as-gp): New options.
11522 2018-06-01  Mark Wielaard  <mark@klomp.org>
11524         * dwarf2out.c (dwarf2out_finish): Remove generation of
11525         DW_AT_loclists_base.
11527 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
11529         * gimple-ssa-store-merging.c: Include gimple-fold.h.
11530         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11531         (struct merged_store_group): Add bit_insertion field.
11532         (dump_char_array): Use standard hexadecimal format.
11533         (merged_store_group::merged_store_group): Set bit_insertion to false.
11534         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
11535         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
11536         also print the mask in the dump file.
11537         (pass_store_merging::gate): Minor tweak.
11538         (imm_store_chain_info::coalesce_immediate): Fix wrong association
11539         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
11540         stores with INTEGER_CST stores.
11541         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11542         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11543         and use it throughout.  Generate bit insertion sequences if need be.
11544         (pass_store_merging::process_store): Remove redundant condition.
11545         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11547 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
11549         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11550         the 128-bit floating point types.  Fix function comment.
11552 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11554         * config/aarch64/aarch64-simd.md
11555         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11556         mnemonics.
11557         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11558         mnemonics.
11560 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
11562         PR tree-optimization/85989
11563         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11564         variable.
11565         (backprop::intersect_uses): Check it when deciding whether this
11566         is a backedge reference.
11567         (backprop::process_block): Add each phi to m_visited_phis
11568         after visiting it, then clear it at the end.
11570 2018-06-01  Richard Biener  <rguenther@suse.de>
11572         * tree-vectorizer.h (vect_dr_stmt): New function.
11573         (vect_get_load_cost): Adjust.
11574         (vect_get_store_cost): Likewise.
11575         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11576         Use vect_dr_stmt instead of DR_SMTT.
11577         (vect_record_base_alignments): Likewise.
11578         (vect_calculate_target_alignment): Likewise.
11579         (vect_compute_data_ref_alignment): Likewise and make static.
11580         (vect_update_misalignment_for_peel): Likewise.
11581         (vect_verify_datarefs_alignment): Likewise.
11582         (vector_alignment_reachable_p): Likewise.
11583         (vect_get_data_access_cost): Likewise.  Pass down
11584         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11585         (vect_get_peeling_costs_all_drs): Likewise.
11586         (vect_peeling_hash_get_lowest_cost): Likewise.
11587         (vect_enhance_data_refs_alignment): Likewise.
11588         (vect_find_same_alignment_drs): Likewise.
11589         (vect_analyze_data_refs_alignment): Likewise.
11590         (vect_analyze_group_access_1): Likewise.
11591         (vect_analyze_group_access): Likewise.
11592         (vect_analyze_data_ref_access): Likewise.
11593         (vect_analyze_data_ref_accesses): Likewise.
11594         (vect_vfa_segment_size): Likewise.
11595         (vect_small_gap_p): Likewise.
11596         (vectorizable_with_step_bound_p): Likewise.
11597         (vect_prune_runtime_alias_test_list): Likewise.
11598         (vect_analyze_data_refs): Likewise.
11599         (vect_supportable_dr_alignment): Likewise.
11600         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11601         (vect_gen_prolog_loop_niters): Likewise.
11602         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11603         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11604         modify DR_STMT.
11605         (vect_recog_mask_conversion_pattern): Likewise.
11606         (vect_try_gather_scatter_pattern): Likewise.
11607         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11608         to vect_get_store_cost.
11609         (vect_get_store_cost): Get stmt_info instead of DR.
11610         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11611         (vect_get_load_cost): Get stmt_info instead of DR.
11613 2018-06-01  Richard Biener  <rguenther@suse.de>
11615         PR middle-end/86017
11616         * gimple-fold.c (var_decl_component_p): Also allow offsetted
11617         vars wrapped in MEM_REFs.
11619 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
11621         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11622         Fix subreg tests so that we only return a choice between
11623         GENERAL_REGS and FP_REGS if the original classes included both.
11625 2018-06-01  Richard Biener  <rguenther@suse.de>
11627         PR ipa/85960
11628         * tree-ssa-structalias.c (get_function_part_constraint):
11629         Handle NULL fi->decl.
11630         (find_func_aliases_for_call): Properly handle indirect
11631         fi from direct call.
11632         (find_func_clobbers): Likewise.
11633         (ipa_pta_execute): Likewise.
11634         (create_variable_info_for): For functions that are ifunc_resolver
11635         resolve to a varinfo that contains the result of the resolver call.
11636         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11637         aliases.
11639 2018-05-31  Michael Collison  <michael.collison@arm.com>
11641         * config/aarch64/aarch64.md:
11642         (*fix_to_zero_extenddfdi2): New pattern.
11643         * gcc.target/aarch64/fix_extend1.c: New testcase.
11645 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
11647         PR middle-end/78809
11648         PR middle-end/83026
11649         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11650         and BUILT_IN_STRNCMP_EQ.
11651         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11652         BUILT_IN_STRNCMP_EQ.
11653         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11654         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11655         (gimple_fold_builtin): Likewise.
11656         * tree-ssa-strlen.c (compute_string_length): New function.
11657         (determine_min_obsize): New function.
11658         (handle_builtin_string_cmp): New function to handle calls to
11659         string compare functions.
11660         (strlen_optimize_stmt): Add handling to builtin string compare
11661         calls.
11662         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11663         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11664         * tree.c (build_common_builtin_nodes): Add new defines of
11665         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11667 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
11669         PR target/85984
11670         * bb-reorder.c (pass_partition_blocks::gate): Return false for
11671         functions with naked attribute.
11673 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
11675         * config/i386/sse.md (avx_vec_concat<mode>):
11676         Substitute concat_tg_mode mode attribute with xtg_mode.
11677         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11678         (concat_tg_mode): Remove mode attribute.
11680 2018-05-31  Martin Sebor  <msebor@redhat.com>
11682         PR c/82063
11683         * calls.c (alloc_max_size): Correct a logic error/typo.
11684         Treat excessive arguments as infinite.  Warn for invalid arguments.
11685         * doc/invoke.texi (-Walloc-size-larger-than): Update.
11687 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
11689         PR target/85829
11690         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11691         and movx for Haswell.
11693 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
11694             Cesar Philippidis  <cesar@codesourcery.com>
11696         PR middle-end/85879
11697         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11698         when emitting error on private/firstprivate reductions.
11699         * omp-low.c (lower_omp_target): Avoid reference-type processing
11700         on pointers for firstprivate clause.
11702 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
11704         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11705         (st1x2): Likewise.
11706         (st1x3): Likewise.
11707         * config/aarch64/aarch64-simd.md
11708         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11709         (aarch64_ld1_x3_<mode>): Likewise
11710         (aarch64_st1x2<VALLDIF:mode>): Likewise
11711         (aarch64_st1_x2_<mode>): Likewise
11712         (aarch64_st1x3<VALLDIF:mode>): Likewise
11713         (aarch64_st1_x3_<mode>): Likewise
11714         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11715         (vld1_s8_x3): Likewise.
11716         (vld1_u16_x3): Likewise.
11717         (vld1_s16_x3): Likewise.
11718         (vld1_u32_x3): Likewise.
11719         (vld1_s32_x3): Likewise.
11720         (vld1_u64_x3): Likewise.
11721         (vld1_s64_x3): Likewise.
11722         (vld1_f16_x3): Likewise.
11723         (vld1_f32_x3): Likewise.
11724         (vld1_f64_x3): Likewise.
11725         (vld1_p8_x3): Likewise.
11726         (vld1_p16_x3): Likewise.
11727         (vld1_p64_x3): Likewise.
11728         (vld1q_u8_x3): Likewise.
11729         (vld1q_s8_x3): Likewise.
11730         (vld1q_u16_x3): Likewise.
11731         (vld1q_s16_x3): Likewise.
11732         (vld1q_u32_x3): Likewise.
11733         (vld1q_s32_x3): Likewise.
11734         (vld1q_u64_x3): Likewise.
11735         (vld1q_s64_x3): Likewise.
11736         (vld1q_f16_x3): Likewise.
11737         (vld1q_f32_x3): Likewise.
11738         (vld1q_f64_x3): Likewise.
11739         (vld1q_p8_x3): Likewise.
11740         (vld1q_p16_x3): Likewise.
11741         (vld1q_p64_x3): Likewise.
11742         (vst1_s64_x2): Likewise.
11743         (vst1_u64_x2): Likewise.
11744         (vst1_f64_x2): Likewise.
11745         (vst1_s8_x2): Likewise.
11746         (vst1_p8_x2): Likewise.
11747         (vst1_s16_x2): Likewise.
11748         (vst1_p16_x2): Likewise.
11749         (vst1_s32_x2): Likewise.
11750         (vst1_u8_x2): Likewise.
11751         (vst1_u16_x2): Likewise.
11752         (vst1_u32_x2): Likewise.
11753         (vst1_f16_x2): Likewise.
11754         (vst1_f32_x2): Likewise.
11755         (vst1_p64_x2): Likewise.
11756         (vst1q_s8_x2): Likewise.
11757         (vst1q_p8_x2): Likewise.
11758         (vst1q_s16_x2): Likewise.
11759         (vst1q_p16_x2): Likewise.
11760         (vst1q_s32_x2): Likewise.
11761         (vst1q_s64_x2): Likewise.
11762         (vst1q_u8_x2): Likewise.
11763         (vst1q_u16_x2): Likewise.
11764         (vst1q_u32_x2): Likewise.
11765         (vst1q_u64_x2): Likewise.
11766         (vst1q_f16_x2): Likewise.
11767         (vst1q_f32_x2): Likewise.
11768         (vst1q_f64_x2): Likewise.
11769         (vst1q_p64_x2): Likewise.
11770         (vst1_s64_x3): Likewise.
11771         (vst1_u64_x3): Likewise.
11772         (vst1_f64_x3): Likewise.
11773         (vst1_s8_x3): Likewise.
11774         (vst1_p8_x3): Likewise.
11775         (vst1_s16_x3): Likewise.
11776         (vst1_p16_x3): Likewise.
11777         (vst1_s32_x3): Likewise.
11778         (vst1_u8_x3): Likewise.
11779         (vst1_u16_x3): Likewise.
11780         (vst1_u32_x3): Likewise.
11781         (vst1_f16_x3): Likewise.
11782         (vst1_f32_x3): Likewise.
11783         (vst1_p64_x3): Likewise.
11784         (vst1q_s8_x3): Likewise.
11785         (vst1q_p8_x3): Likewise.
11786         (vst1q_s16_x3): Likewise.
11787         (vst1q_p16_x3): Likewise.
11788         (vst1q_s32_x3): Likewise.
11789         (vst1q_s64_x3): Likewise.
11790         (vst1q_u8_x3): Likewise.
11791         (vst1q_u16_x3): Likewise.
11792         (vst1q_u32_x3): Likewise.
11793         (vst1q_u64_x3): Likewise.
11794         (vst1q_f16_x3): Likewise.
11795         (vst1q_f32_x3): Likewise.
11796         (vst1q_f64_x3): Likewise.
11797         (vst1q_p64_x3): Likewise.
11799 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11801         * config/msp430/msp430.c (msp430_output_labelref): Prepend
11802         user_label_prefix to name.
11804         * tree-core.h: Update comment about the format of NAME string
11805         passed to handler in attribute_spec.
11807         * config/msp430/msp430.md: Remove erroneous subreg expression from
11808         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11809         zero_extend{q,h}isi2.
11811 2018-05-30  Borislav Petkov  <bp@suse.de>
11813         * doc/extend.texi: Document some architecture specific
11814         constraints and sort entries.
11816 2018-05-30  Martin Sebor  <msebor@redhat.com>
11818         PR middle-end/85369
11819         * builtins.c (expand_builtin_stpcpy_1): New function.
11820         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11821         only if the former succeeds.
11823 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
11825         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11826         in saphira.
11828 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11830         * doc/invoke.texi (-flinker-output): Document
11832 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11834         * passes.c (ipa_write_summaries): Only modify statements if body
11835         is in memory.
11836         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11837         incrementally linking.
11838         (ipa_passes): Likewise.
11839         * lto-cgraph.c (lto_output_node): When incrementally linking do not
11840         pass down resolution info.
11841         * common.opt (flag_incremental_link): Update info.
11842         * gcc.c (plugin specs): Turn flinker-output=* to
11843         -plugin-opt=-linker-output-known
11844         * toplev.c (compile_file): Also cut compilation when doing incremental
11845         link.
11846         * flag-types. (enum lto_partition_model): Add
11847         LTO_LINKER_OUTPUT_NOLTOREL.
11848         (invoke.texi): Add -flinker-output docs.
11849         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11850         link same way as WPA; do not stream in dead initializers.
11852         * dwarf2out.c (dwarf2out_die_ref_for_decl,
11853         darf2out_register_external_decl): Support incremental link.
11855 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11857         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11859 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11861         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11862         it down to simple_object_copy_lto_debug_sections.
11863         (run_gcc): Determine incremental LTO link time and configure
11864         lto1 into non-wpa mode, disable renaming of debug sections.
11866 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11868         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11869         descriptions of various incorrectly documented functions.
11871 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11873         Revert:
11874         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11875         address check not strict.
11877 2018-05-30  Richard Biener  <rguenther@suse.de>
11879         PR tree-optimization/85964
11880         * tracer.c (better_p): Drop initialized count check, we only
11881         call the function with initialized counts now.
11882         (find_best_successor): Do find a best edge if one
11883         has uninitialized count.
11884         (find_best_predecessor): Likewise.  Do BB frequency check only
11885         if count is initialized.
11887 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
11889         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11890         (aarch64_ldrstr_offset_compare): New.
11891         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11892         load/store orderings.
11893         (aarch64_gen_adjusted_ldpstp): Likewise.
11895 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
11897         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11898         Check for subset of GENERAL_REGS and FP_REGS.
11899         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11900         r=w alternative.
11902 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
11904         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11905         and wi::to_poly_offset.  Add the current offset and then check
11906         whether the sum fits, rather than using an unchecked addition of
11907         a checked term.  Check for a shwi rather than a uhwi.
11908         * expr.c (get_bit_range): Use tree_to_poly_uint64.
11909         (store_constructor): Use poly_int_tree_p.
11910         (expand_expr_real_1): Likewise.
11911         * function.c (assign_temp): Likewise.
11912         * fold-const.c (const_binop): Use poly_int_tree_p and
11913         wi::to_poly_offset.
11914         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
11915         division.
11916         * ipa-icf-gimple.c (func_checker::compare_operand): Use
11917         to_poly_offset for MEM offsets.
11918         * ipa-icf.c (sem_variable::equals): Likewise.
11919         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11920         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11921         wi::to_poly_offset for BIT_FIELD_REF offsets.
11922         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11923         wi::to_poly_offset.
11924         * var-tracking.c (emit_note_insn_var_location): Use
11925         tree_to_poly_uint64.
11927 2018-05-29  Jim Wilson  <jimw@sifive.com>
11929         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11931 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
11933         PR target/85950
11934         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11935         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11936         sequence.
11937         (sse4_1_round<mode>2): Use nonimmediate_operand
11938         for operand 1 predicate.
11940 2018-05-29  Martin Sebor  <msebor@redhat.com>
11941             Richard Biener  <rguenther@suse.de>
11943         PR testsuite/85888
11944         * calls.c (get_size_range): Call determine_value_range instead
11945         of get_value_range..
11946         * tree-vrp.h (determine_value_range): Declared new function.
11947         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11949 2018-05-29  Richard Biener  <rguenther@suse.de>
11951         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11952         sure to use non-pattern stmts for get_earlier_stmt arguments.
11953         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11954         called on pattern stmts.
11955         (get_later_stmt): Likewise.
11957 2018-05-29  Martin Liska  <mliska@suse.cz>
11959         PR gcov-profile/85759
11960         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11961         env variables.
11963 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
11965         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11966         VEC_UNPACK_*_EXPR.
11967         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11968         VEC_PACK_*_EXPR.
11970         PR target/85918
11971         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11972         VEC_PACK_FLOAT_EXPR): New tree codes.
11973         * tree-pretty-print.c (op_code_prio): Handle
11974         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11975         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11976         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11977         * tree-inline.c (estimate_operator_cost): Likewise.
11978         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11979         * fold-const.c (const_binop): Likewise.
11980         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11981         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11982         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11983         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11984         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11985         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11986         * expr.c (expand_expr_real_2): Likewise.
11987         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11988         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11989         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11990         optabs.
11991         * optabs.c (expand_widen_pattern_expr): For
11992         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11993         sign from result type rather than operand's type.
11994         (expand_binop_directly): For vec_packu_float_optab and
11995         vec_packs_float_optab allow result type to be different from operand's
11996         type.
11997         * optabs-tree.c (optab_for_tree_code): Handle
11998         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11999         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
12000         * tree-vect-generic.c (expand_vector_operations_1):  Handle
12001         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12002         VEC_PACK_FLOAT_EXPR.
12003         * tree-vect-stmts.c (supportable_widening_operation): Handle
12004         FIX_TRUNC_EXPR.
12005         (supportable_narrowing_operation): Handle FLOAT_EXPR.
12006         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
12007         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
12008         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
12009         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
12010         mode attributes.
12011         (vec_pack<floatprefix>_float_<mode>): New expander.
12012         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
12013         attributes.
12014         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
12015         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
12016         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
12017         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
12018         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
12019         Document.
12020         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
12021         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
12022         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12023         VEC_PACK_FLOAT_EXPR): Document.
12025 2018-05-29  Richard Biener  <rguenther@suse.de>
12027         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
12028         member.
12029         (stmt_vec_info_vec): Make pointer.
12030         (init_stmt_vec_info_vec): Remove.
12031         (free_stmt_vec_info_vec): Likewise.
12032         (set_stmt_vec_info_vec): New function.
12033         (free_stmt_vec_infos): Likewise.
12034         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
12035         (set_vinfo_for_stmt): Likewise.
12036         (get_earlier_stmt): Likewise.
12037         (get_later_stmt): Likewise.
12038         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
12039         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
12040         (vec_info::~vec_info): Free stmt_vec_infos.
12041         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
12042         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
12043         (pass_slp_vectorize::execute): Likewise.
12044         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
12045         (free_stmt_vec_info_vec): Likewise.
12046         (set_stmt_vec_info_vec): New function.
12047         (free_stmt_vec_infos): Likewise.
12048         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
12049         the global stmt_vec_info_vec.
12050         * tree-parloops.c (gather_scalar_reductions): Use
12051         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
12052         vector.
12054 2018-05-29  Richard Biener  <rguenther@suse.de>
12056         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
12058 2018-05-29  Martin Liska  <mliska@suse.cz>
12059             David Malcolm  <dmalcolm@redhat.com>
12061         * vec.c (test_reverse): New.
12062         (vec_c_tests): Add new test.
12063         * vec.h (vl_ptr>::reverse): New function.
12065 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
12067         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
12069         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
12070         and later.
12072 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12074         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
12076 2018-05-28  Richard Biener  <rguenther@suse.de>
12078         PR tree-optimization/85933
12079         * tree-vect-data-refs.c (vect_record_base_alignments): Only
12080         look at stmts marked as vectorizable.
12082 2018-05-28  Richard Biener  <rguenther@suse.de>
12084         PR tree-optimization/85934
12085         * tree-vect-generic.c (expand_vector_operations_1): Hoist
12086         vector boolean check before scalar optimization.
12088 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
12090         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
12091         for armv5te.
12093 2018-05-28  Mark Wielaard  <mark@klomp.org>
12095         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
12096         if it is an expression containing a minus sign.
12098 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
12100         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
12102 2018-05-27  Paul Koning  <ni1d@arrl.net>
12104         * config/pdp11/pdp11.md (truncsihi2): Remove.
12106 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
12107             Chung-Ju Wu  <jasonwucj@gmail.com>
12109         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
12110         implementation.
12111         (unaligned_store_dw): Ditto.
12112         * config/nds32/nds32-memory-manipulation.c
12113         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
12114         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
12115         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
12116         (emit_setmem_word_loop): Rename to ...
12117         (emit_setmem_doubleword_loop): ... this.
12118         (nds32_gen_dup_4_byte_to_word_value): New function.
12119         (nds32_gen_dup_8_byte_to_double_word_value): New function.
12120         (nds32_expand_setmem_loop): Refine implementation.
12121         (nds32_expand_setmem_loop_v3m): Ditto.
12122         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
12123         pattern.
12125 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12127         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
12129 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12131         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
12132         (nds32_init_machine_status): Initialize machine->attr_naked_p and
12133         machine->attr_no_prologue_p.
12134         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
12135         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
12136         (nds32_expand_epilogue): Consider attr_naked_p.
12137         (nds32_expand_epilogue_v3pop): Likewise.
12138         (nds32_can_use_return_insn): Likewise.
12139         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
12140         attr_no_prologue_p fields.
12141         * config/nds32/nds32.opt (mret-in-naked-func): New option.
12143 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
12145         PR target/85918
12146         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
12147         attributes.
12148         * config/i386/sse.md
12149         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
12150         Rename to ...
12151         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
12152         ... this.
12153         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
12154         Rename to ...
12155         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
12156         ... this.
12157         (*<floatsuffix>floatv2div2sf2): Rename to ...
12158         (*float<floatunssuffix>v2div2sf2): ... this.
12159         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
12160         (float<floatunssuffix>v2div2sf2_mask): ... this.
12161         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
12162         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
12163         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
12164         to ...
12165         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
12166         ... this.
12167         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12168         Rename to ...
12169         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12170         ... this.
12171         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12172         Rename to ...
12173         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12174         ... this.
12175         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
12176         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
12177         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
12178         gen_ufix_truncv8dfv8si2.
12179         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
12180         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
12181         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
12182         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
12183         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
12184         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
12185         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
12186         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
12188 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
12190         PR target/85900
12191         PR target/85345
12192         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
12194 2018-05-25  Jim Wilson  <jimw@sifive.com>
12196         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
12197         * config/riscv/riscv.c (struct machine_function): Add
12198         interrupt_handler_p and attribute_checked_p fields.
12199         (riscv_attribute_table): Add interrupt.
12200         (riscv_interrupt_type_p): New.
12201         (riscv_save_reg_p): Save extra regs for interrupt handler.
12202         (riscv_use_save_libcall): Return false  for interrupt handler.
12203         (riscv_first_stack_step): Add forward declaration.
12204         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
12205         for interrupt handler with large frame.  Use it for saved reg list.
12206         (riscv_expand_prologue): Move flag_stack_usage_info support to
12207         eliminate duplication.
12208         (riscv_expand_epilogue): Generate mret for interrupt handler.
12209         (riscv_epilogue_uses): New.
12210         (riscv_can_use_return_insn): Return false for interrupt handler.
12211         (riscv_function_ok_for_sibcall): Likewise.
12212         (riscv_set_current_function): Add interrupt handler support.
12213         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
12214         * config/riscv/riscv.md (UNSPECV_MRET): New.
12215         (GP_REGNUM): New.
12216         (riscv_frflags, riscv_fsflags): Use tab after opcode.
12217         (riscv_mret): New.
12218         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
12220 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
12222         PR tree-optimization/85712
12223         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
12224         this candidate has already been replaced in-situ by a copy.
12226 2018-05-25  Jason Merrill  <jason@redhat.com>
12228         PR c++/80485 - inline function non-zero address.
12229         * symtab.c (nonzero_address): Check DECL_COMDAT.
12231 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
12233         PR target/83628
12234         * config/alpha/alpha.md (ashlsi3): New insn pattern.
12235         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
12236         extension of SImode operation.  Use const123_operand predicate.
12237         (*saddsi_1): Remove.
12238         (*saddl_se_1): Ditto.
12239         (*ssubsi_1): Ditto.
12240         (*ssubl_se_1): Ditto.
12241         * config/alpha/predicates.md (const123_operand): New predicate.
12242         * config/alpha/constraints.md (P): Use IN_RANGE.
12244 2018-05-25  Richard Biener  <rguenther@suse.de>
12246         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
12247         defaulted to true.
12248         (ref_maybe_used_by_stmt_p): Likewise.
12249         (stmt_may_clobber_ref_p): Likewise.
12250         (stmt_may_clobber_ref_p_1): Likewise.
12251         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
12252         and pass it along.
12253         (ref_maybe_used_by_stmt_p): Likewise.
12254         (stmt_may_clobber_ref_p): Likewise.
12255         (stmt_may_clobber_ref_p_1): Likewise.
12256         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
12257         the alias oracle to disambiguate DRs with stmts DR analysis
12258         couldn't handle.
12259         (vect_analyze_data_refs): Do not give up on not analyzable
12260         DRs for BB vectorization.  Remove code truncating the dataref
12261         vector.
12263 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
12265         PR target/85832
12266         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12267         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
12268         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
12270 2018-05-25  Richard Biener  <rguenther@suse.de>
12272         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
12273         function, combining stmt data ref gathering and fatal analysis
12274         parts.
12275         (vect_analyze_data_refs): Remove now redudnant code and simplify.
12276         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
12277         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
12278         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
12279         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
12281 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
12283         PR tree-optimization/85720
12284         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
12285         SCC if all partitions are builtins.
12286         (version_loop_by_alias_check): New parameter.  Generate cancelable
12287         runtime alias check if all partitions are builtins.
12288         (distribute_loop): Update call to above function.
12290 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
12292         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
12293         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
12294         (parm_default_def_partition_arg): Ditto.
12295         (set_parm_default_def_partition): Ditto.
12296         (get_parm_default_def_partitions): Ditto and make it static.
12297         (get_undefined_value_partitions): Ditto and make it static.
12298         (remove_ssa_form): Refactor call to init_var_map here.
12299         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
12300         computation for loop region.
12301         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
12302         (register_default_def): Delete.
12303         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
12304         (parm_default_def_partition_arg): Ditto.
12305         (set_parm_default_def_partition): Ditto.
12306         (get_parm_default_def_partitions): Ditto and make it static.
12307         (get_undefined_value_partitions): Ditto and make it static.
12308         (coalesce_with_default, coalesce_with_default): Update comment.
12309         (create_coalesce_list_for_region): New func factored out from
12310         create_outofssa_var_map.
12311         (populate_coalesce_list_for_outofssa): New func factored out from
12312         create_outofssa_var_map and coalesce_ssa_name.
12313         (create_outofssa_var_map): Delete.
12314         (coalesce_ssa_name): Refactor to support live range computation.
12315         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
12316         (get_parm_default_def_partitions): Delete.
12317         (get_undefined_value_partitions): Ditto.
12318         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
12319         computation for loop region.
12320         (new_tree_live_info, loe_visit_block): Ditto.
12321         (live_worklist, set_var_live_on_entry): Ditto.
12322         (calculate_live_on_exit, verify_live_on_entry): Ditto.
12323         * tree-ssa-live.h (struct _var_map): New fields.
12324         (init_var_map): Change decl.
12325         (region_contains_p): New.
12327 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
12329         * tree-ssa-live.h (live_merge_and_clear): Delete.
12331 2018-05-25  Richard Biener  <rguenther@suse.de>
12333         PR c++/85912
12334         * tree-dump.c (dequeue_and_dump): Remove access to removed
12335         operand 2 of a SWITCH_EXPR.
12337 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12339         * doc/sourcebuild.texi (vect_double_cond_arith): Include
12340         multiplication and division.
12341         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
12342         (cond_udiv@var{m}, cond_umod@var{m}): Document.
12343         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
12344         (cond_udiv_optab, cond_umod_optab): New optabs.
12345         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
12346         (IFN_COND_RDIV): New internal functions.
12347         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
12348         TRUNC_MOD_EXPR and RDIV_EXPR.
12349         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
12350         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
12351         New unspecs.
12352         (SVE_INT_BINARY): Include mult.
12353         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
12354         (optab, sve_int_op): Handle mult.
12355         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
12356         UNSPEC_COND_DIV.
12357         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
12358         for SVE_INT_BINARY_SD.
12360 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12362         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
12363         (optab, sve_int_op): Handle div and udiv.
12364         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
12365         for SVE_INT_BINARY_SD.
12366         (*<optab><mode>3): New insn for the same.
12368 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12370         * tree-vect-patterns.c: Include predict.h.
12371         (vect_recog_divmod_pattern): Restrict check for division support
12372         to when optimizing for size.
12374 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12376         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
12377         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
12378         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
12379         (gimple_match_op::set_op): Likewise.
12380         (gimple_resimplify4): Declare.
12381         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
12382         (expr::gen_transform): Likewise.
12383         (decision_tree::gen): Generate a simplification routine for 4 operands.
12384         * gimple-match-head.c (gimple_simplify): Add an overload for
12385         4 operands.  In the top-level function, handle up to 4 call
12386         arguments and call gimple_resimplify4.
12387         (gimple_resimplify4): New function.
12388         (build_call_internal): Pass a fourth operand.
12389         (maybe_push_to_seq): Likewise.
12390         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
12391         Fold VEC_COND_EXPRs of an operation and a default value into
12392         an IFN_COND_* function if possible.
12393         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
12394         New unspecs.
12395         (SVE_COND_FP_BINARY): Include them.
12396         (optab, sve_fp_op): Handle them.
12397         (SVE_INT_BINARY_REV): New code iterator.
12398         (SVE_COND_FP_BINARY_REV): New int iterator.
12399         (commutative): New int attribute.
12400         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
12401         Declare.
12402         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
12403         function.
12404         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
12405         (*cond_<optab><mode>): New patterns for reversed operands.
12407 2018-05-25  Richard Biener  <rguenther@suse.de>
12409         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
12410         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
12411         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
12412         (STMT_VINFO_GROUPED_ACCESS): Adjust.
12413         * tree-vect-data-refs.c (everywhere): Adjust users.
12414         * tree-vect-loop.c (everywhere): Likewise.
12415         * tree-vect-slp.c (everywhere): Likewise.
12416         * tree-vect-stmts.c (everywhere): Likewise.
12417         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12419 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12421         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
12422         Rename to...
12423         (gcc_cv_as_section_exclude): ... this.
12424         Try Solaris as #exclude syntax.
12425         * configure: Regenerate.
12426         * config.in: Regenerate.
12427         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
12428         SECTION_EXCLUDE.
12429         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
12430         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
12432         * varasm.c (default_elf_asm_named_section): Don't check if
12433         HAVE_GAS_SECTION_EXCLUDE is defined.
12435 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12437         * doc/md.texi: Update the documentation of the cond_* optabs
12438         to mention the new final operand.  Fix GET_MODE_NUNITS call.
12439         Describe the scalar case too.
12440         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12441         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12442         instead of 2.
12443         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12444         (get_conditional_internal_fn): Update comment.
12445         * tree-vect-loop.c (vectorizable_reduction): Pass the original
12446         accumulator value as a final argument to conditional functions.
12447         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12448         a define_expand and add an "else" operand.  Assert for now that
12449         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
12450         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12451         (*cond_<optab><mode>): New patterns.
12452         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12453         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12454         (UNSPEC_COND_EOR): Delete.
12455         (optab): Remove associated mappings.
12456         (SVE_INT_BINARY): New code iterator.
12457         (sve_int_op): Remove int attribute and add "minus" to the code
12458         attribute.
12459         (SVE_COND_INT_OP): Delete.
12460         (SVE_COND_FP_OP): Rename to...
12461         (SVE_COND_FP_BINARY): ...this.
12463 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12465         * optabs.c (can_reuse_operands_p): New function.
12466         (maybe_legitimize_operands): Try to reuse the results for
12467         earlier operands.
12469 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
12471         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12472         Add {q} suffix to insn mnemonic.
12474 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12476         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12477         (msp430_warn_func_return): New.
12479 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
12481         * fold-const.c (tree_nonzero_bits): New function.
12482         * fold-const.h (tree_nonzero_bits): Likewise.
12483         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12484         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12486 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
12488         PR target/85900
12489         PR target/85345
12490         * varasm.c (assemble_alias): Check ifunc_resolver only on
12491         FUNCTION_DECL.
12493 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
12495         PR target/85903
12496         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12497         when memory input operand is handled.
12499 2018-05-24  Luis Machado  <luis.machado@linaro.org>
12501         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12502         global.
12503         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12505 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
12507         * match.pd: Delay FMA folds until after vectorization.
12509 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12511         PR target/83009
12512         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12513         address check not strict.
12515 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
12517         * gimple-match.h (gimple_match_op): New class.
12518         (mprts_hook): Replace parameters with a gimple_match_op *.
12519         (maybe_build_generic_op): Likewise.
12520         (gimple_simplified_result_is_gimple_val): Replace parameters with
12521         a const gimple_match_op *.
12522         (gimple_simplify): Replace code_helper * and tree * parameters with
12523         a gimple_match_op * parameter.
12524         (gimple_resimplify1): Replace code_helper *, tree and tree *
12525         parameters with a gimple_match_op * parameter.
12526         (gimple_resimplify2): Likewise.
12527         (gimple_resimplify3): Likewise.
12528         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12529         parameters with a gimple_match_op * parameter.
12530         * gimple-match-head.c (gimple_simplify): Change prototypes of
12531         auto-generated functions to take a gimple_match_op * instead of
12532         separate code_helper * and tree * parameters.  Make the same
12533         change in the top-level overload and update calls to the
12534         gimple_resimplify routines.  Update calls to the auto-generated
12535         functions and to maybe_push_res_to_seq in the publicly-facing
12536         operation-specific gimple_simplify overloads.
12537         (gimple_match_op::MAX_NUM_OPS): Define.
12538         (gimple_resimplify1): Replace rcode and ops with a single res_op
12539         parameter.  Update call to gimple_simplify.
12540         (gimple_resimplify2): Likewise.
12541         (gimple_resimplify3): Likewise.
12542         (mprts_hook): Replace parameters with a gimple_match_op *.
12543         (maybe_build_generic_op): Likewise.
12544         (build_call_internal): Replace type, nargs and ops with
12545         a gimple_match_op *.
12546         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12547         with a single gimple_match_op *.  Update calls to mprts_hook,
12548         build_call_internal and gimple_simplified_result_is_gimple_val.
12549         Factor out code that is common to the tree_code and combined_fn cases.
12550         * genmatch.c (expr::gen_transform): Replace tem_code and
12551         tem_ops with a gimple_match_op called tem_op.  Update calls
12552         to the gimple_resimplify functions and maybe_push_res_to_seq.
12553         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12554         res_ops.  Update call to the gimple_resimplify functions.
12555         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12556         (decision_tree::gen): Make the functions take a gimple_match_op *
12557         called res_op instead of separate res_code and res_ops parameters.
12558         Update call accordingly.
12559         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12560         and ops with a single res_op parameter.  Update calls to
12561         maybe_build_generic_op and maybe_push_res_to_seq.
12562         (fold_stmt_1): Update calls to gimple_simplify and
12563         replace_stmt_with_simplification.
12564         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12565         and gimple_simplified_result_is_gimple_val.
12566         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12567         gimple_simplify.
12568         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12569         with a gimple_match_op *.
12570         (vn_nary_build_or_lookup): Likewise.  Update call to
12571         vn_nary_build_or_lookup_1.
12572         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12573         gimple_match_op *.  Update calls to the gimple_resimplify routines
12574         and to gimple_simplified_result_is_gimple_val.
12575         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12576         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12577         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12578         (visit_nary_op): Likewise.
12579         (visit_reference_op_load): Likewise.
12581 2018-05-23  Luis Machado  <luis.machado@linaro.org>
12583         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12584         modifier for printing the step amount.
12586 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
12588         PR target/78849
12589         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12590         types.
12592 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
12594         * doc/sourcebuild.texi (Endianness): New subsubsection.
12596 2018-05-23  Luis Machado  <luis.machado@linaro.org>
12598         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12599         <prefetch_dynamic_strides>: New const bool field.
12600         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12601         prefetch_dynamic_strides.
12602         (exynosm1_prefetch_tune): Likewise.
12603         (thunderxt88_prefetch_tune): Likewise.
12604         (thunderx_prefetch_tune): Likewise.
12605         (thunderx2t99_prefetch_tune): Likewise.
12606         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12607         false.
12608         (aarch64_override_options_internal): Update to set
12609         PARAM_PREFETCH_DYNAMIC_STRIDES.
12610         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12611         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12612         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12613         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12614         prefetch-dynamic-strides setting.
12616 2018-05-23  Luis Machado  <luis.machado@linaro.org>
12618         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12619         <minimum_stride>: New const int field.
12620         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12621         minimum_stride field defaulting to -1.
12622         (exynosm1_prefetch_tune): Likewise.
12623         (thunderxt88_prefetch_tune): Likewise.
12624         (thunderx_prefetch_tune): Likewise.
12625         (thunderx2t99_prefetch_tune): Likewise.
12626         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12627         <default_opt_level>: Set to 3.
12628         (aarch64_override_options_internal): Update to set
12629         PARAM_PREFETCH_MINIMUM_STRIDE.
12630         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12631         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12632         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12633         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12634         stride is constant and is below the minimum stride threshold.
12636 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12638         * config/arm/arm-cpus.in (mode26): Delete.
12639         (armv4): Delete mode26 reference.
12640         * config/arm/arm.c (arm_configure_build_target): Delete use of
12641         isa_bit_mode26.
12643 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
12645         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12646         New insn pattern.
12647         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12648         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
12649         for non-SSE modes.
12650         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
12651         (floatunsdidf2): Ditto.
12653 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
12655         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12656         (fixuns_trunc<mode>si2_avx512f): Ditto.
12657         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12658         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12659         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12661 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
12663         PR rtl-optimization/79985
12664         * df-scan.c (df_insn_refs_collect): Remove special case for
12665         global registers and asm statements.
12667 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
12669         * extend.texi (Global Register Variables): Rewrite the bullet list.
12670         Note that the register is available for allocation. Note that access
12671         via inline asm must use constraints. Add note about async-signal
12672         handlers. Remove paragraph about automagic register selection.
12674 2018-05-23  Richard Biener  <rguenther@suse.de>
12676         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12677         of fixed offset from memset VN.
12679 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
12681         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12682         first_interp field.
12683         (alloc_cand_and_find_basis): Initialize first_interp field.
12684         (slsr_process_mul): Modify first_interp field.
12685         (slsr_process_add): Likewise.
12686         (slsr_process_cast): Modify first_interp field for each new
12687         interpretation.
12688         (slsr_process_copy): Likewise.
12689         (dump_candidate): Dump first_interp field.
12690         (replace_mult_candidate): Process all interpretations, not just
12691         subsequent ones.
12692         (replace_rhs_if_not_dup): Likewise.
12693         (replace_one_candidate): Likewise.
12695 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
12697         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12698         Add new boolean.
12699         (aarch64_needs_frame_chain): New function.
12700         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12702 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
12704         PR target/84882
12705         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12706         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12707         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12708         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12709         as true for strict-align.
12710         (aarch64_can_inline_p): Perform checks even when callee has no
12711         attributes to check for strict alignment.
12712         * doc/extend.texi (AArch64 Function Attributes): Document
12713         no-strict-align.
12714         * doc/invoke.texi: (AArch64 Options): Likewise.
12716 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
12718         PR tree-optimization/85853
12719         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12720         the handling of the root of the node to...
12721         (vect_slp_analyze_node_operations_1): ...this new function,
12722         and run the whole thing with the child nodes' def types
12723         set according to their SLP node's def type.
12725 2018-05-23  Richard Biener  <rguenther@suse.de>
12727         PR middle-end/85874
12728         * tree-data-ref.c (create_runtime_alias_checks): Defer
12729         and ignore overflow warnings.
12731 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
12733         PR tree-optimization/85822
12734         * tree-vrp.c (is_masked_range_test): Fix handling of negative
12735         constants.
12737 2018-05-23  Richard Biener  <rguenther@suse.de>
12739         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12740         memset constants via native_interpret_expr.
12742 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
12744         PR target/85345
12745         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12746         attribute.
12747         (cgraph_node::create_alias): Likewise.
12748         (cgraph_node::get_availability): Check ifunc_resolver instead
12749         of looking up ifunc attribute.
12750         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12751         * varasm.c (do_assemble_alias): Likewise.
12752         (assemble_alias): Likewise.
12753         (default_binds_local_p_3): Likewise.
12754         * cgraph.h (cgraph_node): Add ifunc_resolver.
12755         (cgraph_node::only_called_directly_or_aliased_p): Return false
12756         for IFUNC resolver.
12757         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12758         attribute.
12759         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12760         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12761         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12762         instead of looking up ifunc attribute.
12764 2018-05-22  Luis Machado  <luis.machado@linaro.org>
12766         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12768 2018-05-22  Martin Sebor  <msebor@redhat.com>
12770         PR middle-end/85359
12771         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12772         only when expasion succeeds.
12773         (expand_builtin_strcmp): Same.
12774         (expand_builtin_strncmp): Same.
12776 2018-05-22  Martin Sebor  <msebor@redhat.com>
12778         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12780 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
12781             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12783         * config/aarch64/aarch64-ldpstp.md: Replace uses of
12784         aarch64_mem_pair_operand with memory_operand and delete operand swapping
12785         code.
12786         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12787         Add check for legitimate_address.
12788         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12789         (aarch64_swap_ldrstr_operands): New.
12790         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12791         Define prototype.
12793 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
12794             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12796         * config/aarch64/aarch64.md: New patterns to generate stp
12797         and ldp.
12798         (store_pair_sw, store_pair_dw): New patterns to generate stp for
12799         single words and double words.
12800         (load_pair_sw, load_pair_dw): Likewise.
12801         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12802         Delete.
12803         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12804         Delete.
12805         * config/aarch64/aarch64-ldpstp.md: Modify peephole
12806         for different mode ldpstp and add peephole for merged zero stores.
12807         Likewise for loads.
12808         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12809         Add size check.
12810         (aarch64_gen_store_pair): Rename calls to match new patterns.
12811         (aarch64_gen_load_pair): Rename calls to match new patterns.
12812         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12813         (load_pair<DREG:mode><DREG2:mode>): ... This.
12814         (store_pair<mode>): Rename to...
12815         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12816         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12817         New mode iterators.
12818         (V_INT_EQUIV): Handle SImode.
12819         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12820         New predicate.
12822 2018-05-22  Martin Sebor  <msebor@redhat.com>
12824         PR c/85623
12825         * calls.c (maybe_warn_nonstring_arg): Use string length to set
12826         or ajust the presumed bound on an operation to avoid unnecessary
12827         warnings.
12829 2018-05-22  Martin Sebor  <msebor@redhat.com>
12831         PR tree-optimization/85826
12832         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12833         assuming that a DECL necesarily has a constant size.
12835 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
12837         PR middle-end/85862
12838         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12840 2018-05-22  Richard Biener  <rguenther@suse.de>
12842         PR tree-optimization/85834
12843         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12844         non-constant and non-zero memset arguments.
12846 2018-05-22  Martin Liska  <mliska@suse.cz>
12848         PR ipa/85607
12849         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12851 2018-05-22  Richard Biener  <rguenther@suse.de>
12853         PR tree-optimization/85863
12854         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12855         comparisons when vectype is specified.
12856         (vectorizable_condition): Do not specify vectype for
12857         vect_is_simple_cond when SLP vectorizing.
12859 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
12861         PR target/85657
12862         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12863         define __ibm128 as long double.
12864         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12865         as a distinct type when IEEE 128-bit support is enabled.
12866         (init_float128_ieee): Fix up conversions between IFmode and IEEE
12867         128-bit types to use the correct functions.
12868         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12869         convert between 128-bit floating point types that have different
12870         modes but the same representation, instead of using gen_lowpart to
12871         makean alias.
12872         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12873         KFmode.
12874         (IFKF_reg): New attributes to give the register constraints for
12875         IFmode and KFmode.
12876         (extend<mode>tf2_internal): New insns to mark an explicit
12877         conversion between 128-bit floating point types that have a
12878         different mode but share the same representation.
12880 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
12882         PR tree-optimization/85814
12883         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12884         a null return from get_strinfo when unsharing the next
12885         strinfo in the chain.
12887 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12889         PR gcc/84923
12890         * varasm.c (weak_finish): Clean up weak_decls.
12892 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12894         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12895         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12896         UNSPEC_UADALP values.
12897         * config/aarch64/iterators.md (ABAL): New int iterator.
12898         (ABDL2): Likewise.
12899         (ADALP): Likewise.
12900         (sur): Add mappings for the above.
12901         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12902         New define_insn.
12903         (aarch64_<sur>abal<mode>_4): Likewise.
12904         (aarch64_<sur>adalp<mode>_3): Likewise.
12905         (<sur>sadv16qi): New define_expand.
12907 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
12909         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12910         (*movdf_internal): Ditto.
12911         (*rcpsf2_sse): Ditto.
12912         (*rsqrtsf2_sse): Ditto.
12913         (*sqrt<mode>2_sse): Ditto.
12915 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
12917         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12918         eor3q<mode>4.
12919         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12920         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12921         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12922         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12923         vbcaxq_s64): New.
12924         * config/aarch64/arm_neon.h: Likewise.
12925         * config/aarch64/iterators.md (VQ_I): New.
12927 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
12929         * config.gcc: Add arc/t-multilib-linux to tmake_file for
12930         arc*-*-linux*.
12931         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12932         MULTILIB_DIRNAMES
12934 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
12936         * config/nds32/constraints.md (S): New constraint.
12937         * config/nds32/nds32.md (call_internal): Use constraint S.
12938         (call_value_internal): Likewise.
12939         (sibcall_internal): Likewise.
12940         (sibcall_value_internal): Likewise.
12942 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
12943             Chung-Ju Wu  <jasonwucj@gmail.com>
12945         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12946         into consideration.
12948 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
12949             Chung-Ju Wu  <jasonwucj@gmail.com>
12951         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12952         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12953         (nds32_rtx_costs_impl): Simplify.
12954         (nds32_address_cost_impl): Simplify.
12955         (nds32_init_rtx_costs): New function.
12956         (nds32_rtx_costs_speed_prefer): Likewise.
12957         (nds32_rtx_costs_size_prefer): Likewise.
12958         (nds32_address_cost_speed_prefer): Likewise.
12959         (nds32_address_cost_speed_fwprop): Likewise.
12960         (nds32_address_cost_size_prefer): Likewise.
12961         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12962         * config/nds32/nds32.c (nds32_option_override): Use
12963         nds32_init_rtx_costs function.
12965 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
12967         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12968         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12969         (TARGET_PIPELINE_N8): Likewise.
12970         (TARGET_PIPELINE_N10): Likewise.
12971         (TARGET_PIPELINE_N13): Likewise.
12972         (TARGET_PIPELINE_GRAYWOLF): Likewise.
12974 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
12976         * config/nds32/nds32-fpu.md: Update copyright year.
12978 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12980         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12982 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12984         * config/nds32/nds32.c
12985         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12986         * config/nds32/nds32.opt (minline-asm-r15): New option.
12988 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12990         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12991         MASK_HW_ABS.
12992         * config/nds32/nds32.md (abssi2): New pattern.
12994 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
12996         * config/i386/i386.md (rex64namesuffix): New mode attribute.
12997         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12998         Merge insn pattern from sse_cvtsi2ss<round_name> and
12999         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
13000         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
13001         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
13002         using SWI48 mode iterator.
13003         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
13004         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
13005         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
13006         pattern from sse_cvttss2si<round_saeonly_name>
13007         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
13008         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
13009         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
13010         using SWI48 mode iterator.
13011         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
13012         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
13013         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
13014         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
13015         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
13016         using SWI48 mode iterator.
13017         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
13018         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
13019         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
13020         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
13021         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
13022         SWI48 mode iterator.
13023         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
13024         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
13025         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
13026         pattern from sse_cvttsd2si<round_saeonly_name>
13027         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
13029 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13031         * config/nds32/nds32-md-auxiliary.c
13032         (nds32_valid_smw_lwm_base_p): Refine.
13033         (nds32_output_smw_single_word): Refine.
13034         (nds32_output_smw_double_word): New.
13035         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
13037 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13039         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
13040         (nds32_output_stack_pop): Refine.
13041         (nds32_expand_unaligned_load): Refine.
13042         (nds32_expand_unaligned_store): Refine.
13044 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
13045             Chung-Ju Wu  <jasonwucj@gmail.com>
13047         * config/nds32/constants.md: Add TP_REGNUM constant.
13048         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
13049         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
13050         UNSPEC_ADD32.
13051         * config/nds32/nds32-doubleword.md: Consider flag_pic.
13052         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
13053         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
13054         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
13055         and PIC code generation.
13056         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
13057         code generation.
13058         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
13059         optimization.
13060         * config/nds32/nds32.md: Support TLS and PIC.
13061         * config/nds32/nds32.c: Support TLS and PIC.
13062         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
13063         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
13064         predicate.
13066 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13068         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
13069         mode with E_ prefix.
13071 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
13072             Chung-Ju Wu  <jasonwucj@gmail.com>
13074         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
13075         * config/nds32/nds32-md-auxiliary.c
13076         (symbolic_reference_mentioned_p): New.
13077         (nds32_legitimize_ict_address): New.
13078         (nds32_expand_ict_move): New.
13079         (nds32_indirect_call_referenced_p): New.
13080         (nds32_symbol_binds_local_p): Delete.
13081         (nds32_long_call_p): Modify.
13082         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
13083         * config/nds32/nds32-protos.h
13084         (symbolic_reference_mentioned_p): Declare.
13085         (nds32_legitimize_ict_address): Declare.
13086         (nds32_expand_ict_move): Declare.
13087         (nds32_indirect_call_referenced_p): Declare.
13088         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
13089         (nds32_relax_group): Use nds32_ict_const_p as condition.
13090         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
13091         (nds32_asm_file_start): Output ict_model directive in asm code.
13092         (nds32_legitimate_address_p): Consider indirect call.
13093         (nds32_print_operand): Consider indirect call.
13094         (nds32_print_operand_address): Consider indirect call.
13095         (nds32_insert_attributes): Handle "indirect_call" attribute.
13096         (TARGET_LEGITIMATE_ADDRESS_P): Define.
13097         (TARGET_LEGITIMATE_CONSTANT_P): Define.
13098         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
13099         (TARGET_DELEGITIMIZE_ADDRESS): Define.
13100         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
13101         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
13102         (TARGET_ICT_MODEL_SMALL): Define.
13103         (TARGET_ICT_MODEL_LARGE): Define.
13104         * config/nds32/nds32.md (movsi): Consider ict model.
13105         (call, call_value): Consider ict model.
13106         (sibcall, sibcall_value): Consider ict model.
13107         * config/nds32/nds32.opt (mict-model): New option.
13108         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
13109         model.
13111 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
13112             Monk Chiang  <sh.chiang04@gmail.com>
13113             Jim Wilson <jimw@sifive.com>
13115         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
13116         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
13117         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
13118         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
13119         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
13120         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
13121         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
13122         compute save_libcall_adjustment properly.
13123         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
13124         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
13125         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
13126         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
13127         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
13128         (ABI_SPEC): Handle mabi=ilp32e.
13129         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
13130         (RVE): Add RVE mask.
13131         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
13132         <-march>: Add rv32e as an example.
13134 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
13136         PR c++/82899
13137         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
13138         (intra_create_variable_infos): Handle C++ constructors.
13140 2018-05-18  Martin Liska  <mliska@suse.cz>
13142         * passes.def: Remove a redundant pass.
13144 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
13146         PR bootstrap/85838
13147         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
13149 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13151         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
13152         (ARMv4): Update.
13153         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
13154         (ARMv6m): Update.
13155         (armv2, armv2a, armv3, armv3m): Delete architectures.
13156         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
13157         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
13158         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
13159         Delete cpus.
13160         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
13161         (*mulsidi3adddi): Likewise.
13162         (mulsidi3): Likewise.
13163         (*mulsidi3_nov6): Likewise.
13164         (umulsidi3): Likewise.
13165         (umulsidi3_nov6): Likewise.
13166         (umaddsidi4): Likewise.
13167         (*umulsidi3adddi): Likewise.
13168         (smulsi3_highpart): Likewise.
13169         (*smulsi3_highpart_nov6): Likewise.
13170         (umulsi3_highpart): Likewise.
13171         (*umulsi3_highpart_nov6): Likewise.
13172         * config/arm/arm.h (arm_arch3m): Delete.
13173         * config/arm/arm.c (arm_arch3m): Delete.
13174         (arm_option_override_internal): Update armv3-related comment.
13175         (arm_configure_build_target): Delete use of isa_bit_mode32.
13176         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
13177         (arm_rtx_costs_internal): Delete check of arm_arch3m.
13178         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
13179         (mulsa3): Likewise.
13180         (mulusa3): Likewise.
13181         * config/arm/arm-protos.h (arm_arch3m): Delete.
13182         * config/arm/arm-tables.opt: Regenerate.
13183         * config/arm/arm-tune.md: Likewise.
13184         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
13185         deleted architectures.
13187 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13189         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
13190         (armv5t, armv5te): New features.
13191         (ARMv5, ARMv5e): Delete fgroups.
13192         (ARMv5t, ARMv5te): Adjust for above changes.
13193         (ARMv6m): Likewise.
13194         (armv5, armv5e): Delete arches.
13195         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
13196         arm_arch5.
13197         (*call_reg_arm): Likewise.
13198         (*call_value_reg_armv5): Likewise.
13199         (*call_value_reg_arm): Likewise.
13200         (*call_symbol): Likewise.
13201         (*call_value_symbol): Likewise.
13202         (*sibcall_insn): Likewise.
13203         (*sibcall_value_insn): Likewise.
13204         (clzsi2): Likewise.
13205         (prefetch): Likewise.
13206         (define_split and define_peephole2 dependent on arm_arch5):
13207         Likewise.
13208         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
13209         arm_arch5e.
13210         (TARGET_ARM_QBIT): Likewise.
13211         (TARGET_DSP_MULTIPLY): Likewise.
13212         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
13213         (arm_arch5, arm_arch5e): Delete.
13214         (arm_arch5t, arm_arch5te): Declare.
13215         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
13216         (arm_arch5t): Declare.
13217         (arm_option_reconfigure_globals): Update for the above.
13218         (arm_options_perform_arch_sanity_checks): Update comment, replace
13219         use of arm_arch5 with arm_arch5t.
13220         (use_return_insn): Likewise.
13221         (arm_emit_call_insn): Likewise.
13222         (output_return_instruction): Likewise.
13223         (arm_final_prescan_insn): Likewise.
13224         (arm_coproc_builtin_available): Likewise.
13225         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
13226         arm_arch5e with arm_arch5t and arm_arch5te.
13227         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
13228         (arm_arch5t, arm_arch5te): Declare.
13229         * config/arm/arm-tables.opt: Regenerate.
13230         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
13231         * config/arm/t-multilib: Likewise.
13232         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
13233         instead of arm_arch5.
13234         (*call_reg_thumb1): Likewise.
13235         (*call_value_reg_thumb1_v5): Likewise.
13236         (*call_value_reg_thumb1): Likewise.
13237         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
13238         unreachable path.
13239         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
13241 2018-05-18  Martin Liska  <mliska@suse.cz>
13243         PR gcov-profile/84846
13244         * doc/gcov.texi: Document -t option of gcov tool.
13246 2018-05-18  Martin Liska  <mliska@suse.cz>
13248         PR gcov-profile/84846
13249         * gcov.c (print_usage): Add new -t option.
13250         (process_args): Handle the option.
13251         (generate_results): Use stdout as output when requested by
13252         the option.
13254 2018-05-18  Martin Liska  <mliska@suse.cz>
13256         PR gcov-profile/84846
13257         * coverage.c (coverage_init): Write PWD to .gcno file.
13258         * doc/gcov.texi: Document how working directory is printed.
13259         * gcov-dump.c (dump_gcov_file): Print PWD.
13260         * gcov.c (output_intermediate_file): Likewise.
13261         (read_graph_file): Read PWD string.
13262         (output_lines): Print PWD.
13264 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13266         PR middle-end/85817
13267         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
13268         for retval and return false if all args to phi are zero.
13270 2018-05-18  Richard Biener  <rguenther@suse.de>
13272         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
13273         method.
13274         (evrp_dom_walker::before_dom_children): Call it.
13276 2018-05-18  Richard Biener  <rguenther@suse.de>
13278         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
13279         results when processing array refs with variable index.
13281 2018-05-18  Toon Moene  <toon@moene.org>
13283         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
13284         directly after that of -floop-interchange. Indicate that both
13285         options are enabled by default when specifying -O3.
13287 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13289         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
13290         iterator.  Delete separate integer-mode vec_set<mode> expander.
13291         (aarch64_simd_vec_setv2di): Delete.
13292         (vec_setv2di): Delete.
13293         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
13294         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
13295         the "w, r" alternative.
13297 2018-05-18  Martin Liska  <mliska@suse.cz>
13299         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
13300         * tree-pass.h (make_pass_lower_switch_O0): New function.
13301         * tree-switch-conversion.c (node_has_low_bound): Remove.
13302         (node_has_high_bound): Likewise.
13303         (node_is_bounded): Likewise.
13304         (class pass_lower_switch): Make it a template type and create
13305         two instances.
13306         (pass_lower_switch::execute): Add template argument.
13307         (make_pass_lower_switch): New function.
13308         (make_pass_lower_switch_O0): New function.
13309         (do_jump_if_equal): Remove.
13310         (emit_case_nodes): Simplify to just handle all 3 cases and leave
13311         all the hard work to tree optimization passes.
13313 2018-05-18  Martin Liska  <mliska@suse.cz>
13315         * dbgcnt.c (limit_low): Renamed from limit.
13316         (limit_high): New variable.
13317         (dbg_cnt_is_enabled): Check for upper limit.
13318         (dbg_cnt): Adjust dumping.
13319         (dbg_cnt_set_limit_by_index): Add new argument for high
13320         value.
13321         (dbg_cnt_set_limit_by_name): Likewise.
13322         (dbg_cnt_process_single_pair): Parse new format.
13323         (dbg_cnt_process_opt): Use strtok.
13324         (dbg_cnt_list_all_counters): Remove 'value' and add
13325         'limit_high'.
13326         * doc/invoke.texi: Document changes.
13328 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
13330         * doc/sourcebuild.texi (scalar_all_fma): Document.
13331         * tree.def (FMA_EXPR): Delete.
13332         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
13333         * internal-fn.c (ternary_direct): New macro.
13334         (expand_ternary_optab_fn): Likewise.
13335         (direct_ternary_optab_supported_p): Likewise.
13336         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
13337         * builtins.c (fold_builtin_fma): Delete.
13338         (fold_builtin_3): Don't call it.
13339         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
13340         * expr.c (expand_expr_real_2): Likewise.
13341         * fold-const.c (operand_equal_p): Likewise.
13342         (fold_ternary_loc): Likewise.
13343         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
13344         * gimple.c (DEFTREECODE): Likewise.
13345         * gimplify.c (gimplify_expr): Likewise.
13346         * optabs-tree.c (optab_for_tree_code): Likewise.
13347         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13348         * tree-eh.c (operation_could_trap_p): Likewise.
13349         (stmt_could_throw_1_p): Likewise.
13350         * tree-inline.c (estimate_operator_cost): Likewise.
13351         * tree-pretty-print.c (dump_generic_node): Likewise.
13352         (op_code_prio): Likewise.
13353         * tree-ssa-loop-im.c (stmt_cost): Likewise.
13354         * tree-ssa-operands.c (get_expr_operands): Likewise.
13355         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
13356         * fold-const-call.h (fold_fma): Delete.
13357         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
13358         CFN_FNMA and CFN_FNMS.
13359         (fold_fma): Delete.
13360         * genmatch.c (combined_fn): New enum.
13361         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
13362         (commutative_op): New function.
13363         (commutate): Use it.  Handle more than 2 operands.
13364         (dt_operand::gen_gimple_expr): Use commutative_op.
13365         (parser::parse_expr): Allow :c to be used with non-binary
13366         operators if the commutative operand is known.
13367         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
13368         CFN_FMS, CFN_FNMA and CFN_FNMS.
13369         (backprop::process_assign_use): Remove FMA_EXPR handling.
13370         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
13371         (gen_hsa_fma): New function.
13372         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
13373         IFN_FNMA and IFN_FNMS.
13374         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
13375         * gimple-fold.h (follow_all_ssa_edges): Declare.
13376         * gimple-fold.c (follow_all_ssa_edges): New function.
13377         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
13378         gimple_build interface and use follow_all_ssa_edges to fold the result.
13379         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
13380         instead of checking for optabs directly.
13381         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
13382         rather than FMA_EXPRs.
13383         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
13384         call to IFN_FMA instead of an FMA_EXPR.
13386 2018-05-17  Jim Wilson  <jimw@sifive.com>
13388         * expr.c (do_tablejump): When converting index to Pmode, if we have a
13389         sign extended promoted subreg, and the range does not have the sign bit
13390         set, then do a sign extend.
13392         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
13393         test, check for sign extended subreg and/or constant operands, and
13394         do a sign extend in that case.
13396 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
13398         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
13399         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
13400         Add untyped.
13401         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
13402         Change logics_shift_reg to logics_shift_imm.
13403         (thunderx2t99_fp_loadpair_basic): Delete.
13404         (thunderx2t99_fp_storepair_basic): Delete.
13405         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
13406         (thunderx2t99_asimd_polynomial): Delete.
13407         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
13408         and neon_fp_mul_d_scalar_q.
13409         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
13410         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
13411         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
13412         (thunderx2t99_asimd_lut): Add missing tbl types.
13413         (thunderx2t99_asimd_ext): Delete.
13414         (thunderx2t99_asimd_load1_1_mult): Delete.
13415         (thunderx2t99_asimd_load1_2_mult): Delete.
13416         (thunderx2t99_asimd_load1_ldp): New.
13417         (thunderx2t99_asimd_load1): New.
13418         (thunderx2t99_asimd_load2): Add missing *load2* types.
13419         (thunderx2t99_asimd_load3): New.
13420         (thunderx2t99_asimd_load4): New.
13421         (thunderx2t99_asimd_store1_1_mult): Delete.
13422         (thunderx2t99_asimd_store1_2_mult): Delete.
13423         (thunderx2t99_asimd_store2_mult): Delete.
13424         (thunderx2t99_asimd_store2_onelane): Delete.
13425         (thunderx2t99_asimd_store_stp): New.
13426         (thunderx2t99_asimd_store1): New.
13427         (thunderx2t99_asimd_store2): New.
13428         (thunderx2t99_asimd_store3): New.
13429         (thunderx2t99_asimd_store4): New.
13431 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
13433         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13434         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
13436 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
13437             Segher Boessenkool  <segher@kernel.crashing.org>
13439         PR target/85698
13440         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13441         operand.
13443 2018-05-17  Richard Biener  <rguenther@suse.de>
13445         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13446         for pruning loop and prune defs feeding only already visited PHIs.
13448 2018-05-17  Richard Biener  <rguenther@suse.de>
13450         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13452 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
13453             Richard Biener  <rguenther@suse.de>
13455         PR tree-optimization/85793
13456         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13457         for VMAT_ELEMENTWISE.
13459 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
13461         * internal-fn.h (lookup_internal_fn): Declare
13462         * internal-fn.c (lookup_internal_fn): New function.
13463         * gimple.c (gimple_build_call_from_tree): Handle calls to
13464         internal functions.
13465         * gimple-pretty-print.c (dump_gimple_call): Print "." before
13466         internal function names.
13467         * tree-pretty-print.c (dump_generic_node): Likewise.
13468         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13470 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
13472         * gimple-fold.h (gimple_build): Make the function forms take
13473         combined_fn rather than built_in_function.
13474         (gimple_simplify): Likewise.
13475         * gimple-match-head.c (gimple_simplify): Likewise.
13476         * gimple-fold.c (gimple_build): Likewise.
13477         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13478         rather than gimple_build_call_internal.
13479         (get_initial_defs_for_reduction): Likewise.
13480         (vect_create_epilog_for_reduction): Likewise.
13481         (vectorizable_live_operation): Likewise.
13483 2018-05-17  Martin Liska  <mliska@suse.cz>
13485         * gimple-ssa-sprintf.c (format_directive): Do not use
13486         space in between 'G_' and '('.
13488 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
13490         PR target/85323
13491         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13492         even if the mask is not all ones.
13494         PR target/85323
13495         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13496         vector.
13497         (ix86_gimple_fold_builtin): Likewise.
13499         PR target/85323
13500         * config/i386/i386.c: Include tree-vector-builder.h.
13501         (ix86_vector_shift_count): New function.
13502         (ix86_fold_builtin): Fold shift builtins by scalar count.
13503         (ix86_gimple_fold_builtin): Likewise.
13505         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13506         _mm512_setzero): New intrinsics.
13508 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
13509             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13511         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13512         code generation for cases where splatting a value is not useful.
13513         * simplify-rtx.c (simplify_ternary_operation): Simplify
13514         vec_merge across a vec_duplicate and a paradoxical subreg forming
13515         a vector mode to a vec_concat.
13517 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
13519         * config.gcc: Support "goldmont-plus".
13520         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13521         "goldmont-plus".
13522         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13523         PROCESSOR_GOLDMONT_PLUS.
13524         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13525         (processor_target_table): Add "goldmont-plus".
13526         (PTA_GOLDMONT_PLUS): Define.
13527         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13528         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13529         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13530         (fold_builtin_cpu): Add "goldmont-plus".
13531         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13532         (ix86_option_override_internal): Add "goldmont-plus".
13533         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13534         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13535         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13536         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13538 2018-05-17  Richard Biener  <rguenther@suse.de>
13540         PR tree-optimization/85757
13541         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13542         remove defs that only feed that PHI from further processing.
13544 2018-05-16  Jim Wilson  <jimw@sifive.com>
13546         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13547         asterisk to name.
13548         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13550 2018-05-16  Mark Wielaard  <mark@klomp.org>
13552         * dwarf2out.c (count_index_strings): New function.
13553         (output_indirect_strings): Call count_index_strings and generate
13554         header for dwarf_version >= 5.
13556 2018-05-16  Mark Wielaard  <mark@klomp.org>
13558         * dwarf2out.c (dwarf_FORM): New function.
13559         (set_indirect_string): Use dwarf_FORM.
13560         (reset_indirect_string): Likewise.
13561         (size_of_die): Likewise.
13562         (value_format): Likewise.
13563         (output_die): Likewise.
13564         (add_skeleton_AT_string): Likewise.
13565         (output_macinfo_op): Likewise.
13566         (index_string): Likewise.
13567         (output_index_string_offset): Likewise.
13568         (output_index_string): Likewise.
13569         (count_index_strings): Likewise.
13571 2018-05-16  Carl Love  <cel@us.ibm.com>
13573         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13574         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13576 2018-05-16  Martin Jambor  <mjambor@suse.cz>
13578         * ipa-prop.c (ipa_free_all_edge_args): Remove.
13579         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13581 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
13583         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13584         (fnma<mode>4): Likewise.
13585         (fms<mode>4): Likewise.
13586         (fnms<mode>4): Likewise.
13587         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13588         (aarch64_fnma<mode>4): Likewise.
13589         (aarch64_fms<mode>4): Likewise.
13590         (aarch64_fnms<mode>4): Likewise.
13591         (aarch64_fnmadd<mode>4): Likewise.
13593 2018-05-16  Jason Merrill  <jason@redhat.com>
13595         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
13597 2018-05-16  Richard Biener  <rguenther@suse.de>
13599         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13600         (dump_stmt_cost): Declare.
13601         (add_stmt_cost): Dump cost we add.
13602         (add_stmt_costs): New function.
13603         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13604         No longer exported.
13605         (vect_analyze_stmt): Adjust prototype.
13606         (vectorizable_condition): Likewise.
13607         (vectorizable_live_operation): Likewise.
13608         (vectorizable_reduction): Likewise.
13609         (vectorizable_induction): Likewise.
13610         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13611         cost vector to pass to vectorizable_ and record afterwards.
13612         (vect_model_reduction_cost): Take cost vector argument and adjust.
13613         (vect_model_induction_cost): Likewise.
13614         (vectorizable_reduction): Likewise.
13615         (vectorizable_induction): Likewise.
13616         (vectorizable_live_operation): Likewise.
13617         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13618         SLP_TREE_NUMBER_OF_VEC_STMTS.
13619         (vect_analyze_slp_cost_1): Remove.
13620         (vect_analyze_slp_cost): Likewise.
13621         (vect_slp_analyze_node_operations): Take visited args and
13622         a target cost vector.  Avoid processing already visited stmt sets.
13623         (vect_slp_analyze_operations): Use a local cost vector to gather
13624         costs and register those of non-discarded instances.
13625         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13626         (vect_schedule_slp_instance): Remove copying of
13627         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
13628         zero.
13629         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13630         adding cost.  Record cost entry location.
13631         (vect_prologue_cost_for_slp_op): Function to compute cost of
13632         a constant or invariant generated for SLP vect in the prologue,
13633         split out from vect_analyze_slp_cost_1.
13634         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
13635         (vect_model_promotion_demotion_cost): Likewise.
13636         (vect_model_store_cost): Likewise, make static.
13637         (vect_model_load_cost): Likewise.
13638         (vectorizable_bswap): Add cost vector arg and adjust.
13639         (vectorizable_call): Likewise.
13640         (vectorizable_simd_clone_call): Likewise.
13641         (vectorizable_conversion): Likewise.
13642         (vectorizable_assignment): Likewise.
13643         (vectorizable_shift): Likewise.
13644         (vectorizable_operation): Likewise.
13645         (vectorizable_store): Likewise.
13646         (vectorizable_load): Likewise.
13647         (vectorizable_condition): Likewise.
13648         (vectorizable_comparison): Likewise.
13649         (can_vectorize_live_stmts): Likewise.
13650         (vect_analyze_stmt): Likewise.
13651         (vect_transform_stmt): Adjust calls to vectorizable_*.
13652         * tree-vectorizer.c: Include gimple-pretty-print.h.
13653         (dump_stmt_cost): New function.
13655 2018-05-16  Richard Biener  <rguenther@suse.de>
13657         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13658         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13659         * tree-ssa-dse.c: Include tree-ssa-loop.h.
13660         (check_name): New callback.
13661         (dse_classify_store): Track cycles via a visited bitmap of PHI
13662         defs and simplify handling of in-loop and across loop dead stores
13663         and properly fail for loop-variant refs.  Handle byte-tracking with
13664         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13665         limiting the walk.
13667 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
13669         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13670         (vect_get_mask_type_for_stmt): Likewise.
13671         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13672         split out from...
13673         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
13674         to determine the statement's vector type and the vector type that
13675         should be used for calculating nunits.  Deal with cases in which
13676         the type has to be deferred.
13677         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13678         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13679         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13680         (vect_determine_vf_for_stmt): New functions, split out from...
13681         (vect_determine_vectorization_factor): ...here.
13682         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13683         (vect_get_mask_type_for_stmt): New functions, split out from
13684         vect_determine_vectorization_factor.
13686 2018-05-16  Richard Biener  <rguenther@suse.de>
13688         * tree-cfg.c (verify_gimple_assign_ternary): Properly
13689         verify the [VEC_]COND_EXPR embedded comparison.
13691 2018-05-15  Martin Sebor  <msebor@redhat.com>
13693         PR tree-optimization/85753
13694         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13695         RECORD_TYPE in addition to ARRAY_TYPE.
13697 2018-05-15  Martin Sebor  <msebor@redhat.com>
13699         PR middle-end/85643
13700         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13702 2018-05-15  Richard Biener  <rguenther@suse.de>
13704         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13705         add by_clobber_p one.  Change algorithm to collect all defs
13706         representing uses we need to walk and try reducing them to
13707         a single one before failing.
13708         (dse_dom_walker::dse_optimize_stmt): Adjust.
13710 2018-05-13  Mark Wielaard  <mark@klomp.org>
13712         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13713         (size_of_loc_descr): Likewise.
13714         (output_loc_operands): Likewise.
13715         (output_loc_operands_raw): Likewise.
13716         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13717         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13718         (hash_loc_operands): Likewise.
13719         (compare_loc_operands): Likewise.
13721 2018-05-14  Mark Wielaard  <mark@klomp.org>
13723         * dwarf2out.c (count_index_addrs): New function.
13724         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13726 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13728         PR tree-optimization/83648
13729         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13730         return value as malloc candidate.
13732 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13734         PR ipa/85734
13735         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13736         param as true in call to suggest_attribute.
13738 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
13740         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13741         -mreadonly-in-sdata.
13743 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13745         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13746         New pattern.
13747         (aarch64_crypto_aesd_fused): Likewise.
13749 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
13751         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13752         (movsi_aarch64): Likewise.
13753         (load_pairsi): Likewise.
13754         (load_pairdi): Likewise.
13755         (store_pairsi): Likewise.
13756         (store_pairdi): Likewise.
13757         (load_pairsf): Likewise.
13758         (load_pairdf): Likewise.
13759         (store_pairsf): Likewise.
13760         (store_pairdf): Likewise.
13761         (zero_extend): Likewise.
13762         (trunc): Swap alternatives.
13763         (fcvt_target): Add '?' to prefer w over r.
13765 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
13767         PR target/85756
13768         * config/i386/i386.md: Disallow non-commutative arithmetics in
13769         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13770         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
13771         in the peephole2 before it.
13773 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
13775         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13776         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13777         (ix86_handle_option): Handle -mcldemote.
13778         * config.gcc: New header.
13779         * config/i386/cldemoteintrin.h: New file.
13780         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13781         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13782         -mcldemote.
13783         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13784         OPTION_MASK_ISA_CLDEMOTE.
13785         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13786         (ix86_valid_target_attribute_inner_p): Ditto.
13787         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13788         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13789         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13790         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13791         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13792         (cldemote): New.
13793         * config/i386/i386.opt: Add -mcldemote.
13794         * config/i386/x86intrin.h: New header.
13795         * doc/invoke.texi: Add -mcldemote.
13797 2018-05-14  Richard Biener  <rguenther@suse.de>
13799         * doc/match-and-simplify.texi: Adjust :s documentation.
13801 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
13803         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13804         intended memcpy size.
13805         (REORDER_45): Likewise.
13807 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
13809         * sort.cc: New file.
13810         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13811         * vec.c (qsort_chk): Use gcc_qsort.
13812         * Makefile.in (OBJS-libcommon): Add sort.o.
13813         (build/sort.o): New target.  Use it...
13814         (BUILD_RTL): ... here, and...
13815         (build/gencfn-macros): ... here, and...
13816         (build/genmatch): ... here.
13818 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13819             Chung-Ju Wu  <jasonwucj@gmail.com>
13821         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13822         * config/nds32/nds32-graywolf.md: New file.
13823         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13824         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13825         pipeline.
13826         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13827         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13828         * config/nds32/nds32.md (pipeline_model): Add graywolf.
13829         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13830         * config/nds32/pipelines.md: Include n15 settings.
13832 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13833             Chung-Ju Wu  <jasonwucj@gmail.com>
13835         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13836         * config/nds32/nds32-n13.md: New file.
13837         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13838         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13839         pipeline.
13840         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13841         * config/nds32/nds32.md (pipeline_model): Add n13.
13842         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13843         * config/nds32/pipelines.md: Include n13 settings.
13845 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13846             Chung-Ju Wu  <jasonwucj@gmail.com>
13848         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13849         * config/nds32/nds32-n10.md: New file.
13850         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13851         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13852         pipeline.
13853         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13854         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13855         * config/nds32/nds32.md (pipeline_model): Add n10.
13856         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13857         * config/nds32/pipelines.md: Include n10 settings.
13859 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
13860             Kito Cheng  <kito.cheng@gmail.com>
13861             Chung-Ju Wu  <jasonwucj@gmail.com>
13863         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13864         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13865         Add enum values for DSP extension instructions.
13866         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13867         New constraints.
13868         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13869         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13870         New code iterators.
13871         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13872         * config/nds32/nds32-dspext.md: New file for DSP implementation.
13873         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13874         * config/nds32/nds32-intrinsic.md: Likewise.
13875         * config/nds32/nds32_intrinsic.h: Likewise.
13876         * config/nds32/nds32-md-auxiliary.c: Likewise.
13877         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13878         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13879         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13880         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13881         * config/nds32/nds32-protos.h: New declarations for DSP extension.
13882         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13883         TYPE_DMAC in switch statement.
13884         * config/nds32/nds32.c: New checking and implementation for DSP
13885         extension instructions.
13886         * config/nds32/nds32.h: Likewise.
13887         * config/nds32/nds32.md: Likewise.
13888         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13889         * config/nds32/predicates.md: Implement new predicates for DSP
13890         extension.
13892 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
13894         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13895         Reformat alternatives and attributes so it is easier to identify
13896         which constraints/attributes go with which instruction.
13897         (mov<mode>_hardfloat32, FMOVE64): Likewise.
13898         (mov<mode>_softfloat32, FMOVE64): Likewise.
13899         (mov<mode>_hardfloat64, FMOVE64): Likewise.
13900         (mov<mode>_softfloat64, FMOVE64): Likewise.
13902 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13904         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13905         subsection.
13906         (Basic PowerPC Built-in Functions): The new name of the
13907         subsection previously known as "PowerPC Built-in Functions".
13908         (Basic PowerPC Built-in Functions Available on all Configurations):
13909         New subsubsection.
13910         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13911         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13912         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13913         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13915 2018-05-11  Martin Jambor  <mjambor@suse.cz>
13917         PR ipa/85655
13918         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13919         single const.
13921 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
13923         PR target/85733
13924         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13926 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
13928         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13929         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13930         (ix86_handle_option): Handle -mwaitpkg.
13931         * config.gcc: New header.
13932         * config/i386/cpuid.h (bit_WAITPKG): New bit.
13933         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13934         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13935         function type.
13936         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13937         OPTION_MASK_ISA_WAITPKG.
13938         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13939         (ix86_option_override_internal): Add PTA_WAITPKG.
13940         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13941         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13942         IX86_BUILTIN_TPAUSE.
13943         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13944         __builtin_ia32_umwait and __builtin_ia32_tpause.
13945         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13946         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13947         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13948         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13949         UNSPECV_TPAUSE): New.
13950         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13951         * config/i386/i386.opt: Add -mwaitpkg.
13952         * config/i386/waitpkgintrin.h: New file.
13953         * config/i386/x86intrin.h: New header.
13954         * doc/invoke.texi: Add -mwaitpkg.
13956 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
13958         PR target/85606
13959         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13960         equivalent.
13961         (cortex-m0): Use armv6s-m isa.
13962         (cortex-m0plus): Likewise.
13963         (cortex-m1): Likewise.
13964         (cortex-m0.small-multiply): Likewise.
13965         (cortex-m0plus.small-multiply): Likewise.
13966         (cortex-m1.small-multiply): Likewise.
13968 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
13969             Jakub Jelinek  <jakub@redhat.com>
13971         PR tree-optimization/85692
13972         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13973         source permute as well.
13975 2018-05-11  Martin Liska  <mliska@suse.cz>
13977         PR sanitizer/85556
13978         * doc/extend.texi: Document LLVM style format for no_sanitize
13979         attribute.
13981 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
13983         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13984         mode_supports_vsx_dform_quad to mode_supports_dq_form.
13985         (mode_supports_vsx_dform_quad): Likewise.
13986         (mode_supports_vmx_dform): Move these functions to be next to the
13987         other mode_supports functions.
13988         (mode_supports_dq_form): Likewise.
13989         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13990         mode_supports_dq_form.
13991         (reg_offset_addressing_ok_p): Likewise.
13992         (offsettable_ok_by_alignment): Likewise.
13993         (rs6000_legitimate_offset_address_p): Likewise.
13994         (legitimate_lo_sum_address_p): Likewise.
13995         (rs6000_legitimize_address): Likewise.
13996         (rs6000_legitimize_reload_address): Likewise.
13997         (rs6000_secondary_reload_inner): Likewise.
13998         (rs6000_preferred_reload_class): Likewise.
13999         (rs6000_output_move_128bit): Likewise.
14001 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
14003         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
14004         Generate SImode target register for null target.
14005         <case IX86_BUILTIN_XGETBV>: Ditto.
14006         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
14007         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
14009 2018-05-10  Carl Love  <cel@us.ibm.com>
14011         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14012         dcbtt and dcbtstt if operands[2] is 0.
14014 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
14016         PR target/85693
14017         * config/i386/sse.md (usadv64qi): New expander.
14019 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
14021         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
14022         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
14023         -maltivec=be support.
14024         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
14025         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
14026         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
14027         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
14028         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
14029         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
14030         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
14031         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
14032         altivec_vsumsws): Adjust.
14033         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
14034         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
14035         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
14036         support.
14037         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
14038         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
14039         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
14040         (altivec_lve<VI_char>x): Delete expand.
14041         (*altivec_lve<VI_char>x_internal): Rename to...
14042         (altivec_lve<VI_char>x): ... this.
14043         (altivec_lvxl_<mode>): Delete expand.
14044         (*altivec_lvxl_<mode>_internal): Rename to ...
14045         (altivec_lvxl_<mode>): ... this.
14046         (altivec_stvxl_<mode>): Delete expand.
14047         (*altivec_stvxl_<mode>_internal): Rename to ...
14048         (altivec_stvxl_<mode>): ... this.
14049         (altivec_stve<VI_char>x): Delete expand.
14050         (*altivec_stve<VI_char>x_internal): Rename to ...
14051         (altivec_stve<VI_char>x): ... this.
14052         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
14053         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
14054         reduc_plus_scal_<mode>): Adjust.
14055         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
14056         comment.
14057         (rs6000_cpu_cpp_builtins): Adjust.
14058         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
14059         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
14060         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
14061         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
14062         -maltivec=be support.
14063         (rs6000_split_vec_extract_var): Adjust.
14064         (rs6000_split_v4si_init): Adjust.
14065         (swap_selector_for_mode): Delete.
14066         (altivec_expand_lvx_be, altivec_expand_stvx_be,
14067         altivec_expand_stvex_be): Delete.
14068         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
14069         -maltivec=be support.
14070         (rs6000_gimple_fold_builtin): Ditto.
14071         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
14072         Adjust.
14073         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
14074         (TARGET_DIRECT_MOVE_64BIT): Adjust.
14075         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
14076         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
14077         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
14078         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
14079         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
14080         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
14081         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
14082         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
14083         anonymous split): Adjust.
14084         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
14085         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
14087 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
14089         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
14090         when --with-gxx-include-dir is also specified.
14091         * configure: Regenerate.
14093 2018-05-09  Jim Wilson  <jimw@sifive.com>
14095         PR target/84797
14096         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
14097         * config/riscv/t-withmultilib: New.
14098         * config/riscv/withmultilib.h: New.
14099         * doc/install.texi: Document RISC-V --with-multilib-list support.
14101 2018-05-09  Richard Biener  <rguenther@suse.de>
14103         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
14104         vector.
14105         (vect_bb_vectorization_profitable_p): Adjust.  Compute
14106         actual scalar cost using the cost vector and the add_stmt_cost
14107         machinery.
14109 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14111         PR rtl-optimization/85645
14112         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
14113         in the REG_CFA_REGISTER note for LR, don't leave it empty.
14115 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14117         PR rtl-optimization/85645
14118         * shrink-wrap.c (spread_components): Return a boolean saying if
14119         anything was changed.
14120         (try_shrink_wrapping_separate): Iterate spread_components until
14121         nothing changes anymore.
14123 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14125         PR rtl-optimization/85645
14126         * regrename.c (build_def_use): Also kill the chains that include the
14127         destination of a REG_CFA_REGISTER note.
14129 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14131         PR rtl-optimization/85645
14132         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
14133         insn that has a REG_CFA_REGISTER note.
14135 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
14137         * cfgexpand.c (expand_clobber): New function.
14138         (expand_gimple_stmt_1): Use it.
14139         * tree-vect-stmts.c (vect_clobber_variable): New function,
14140         split out from...
14141         (vectorizable_simd_clone_call): ...here.
14142         (vectorizable_store): Emit a clobber either side of an
14143         IFN_STORE_LANES sequence.
14144         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
14146 2018-05-09  Tom de Vries  <tom@codesourcery.com>
14148         PR target/85626
14149         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
14150         (define_insn "trap_if_false"): Add exit after trap.
14152 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
14154         PR rtl-optimization/85638
14155         * bb-reorder.c: Include common/common-target.h.
14156         (create_forwarder_block): New function extracted from...
14157         (fix_up_crossing_landing_pad): ...here.  Rename into...
14158         (dw2_fix_up_crossing_landing_pad): ...this.
14159         (sjlj_fix_up_crossing_landing_pad): New function.
14160         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
14161         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
14162         from both partitions and exit the loop after one iteration.
14164 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14166         Revert:
14167         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14168         subsection.
14169         (Basic PowerPC Built-in Functions): The new name of the
14170         subsection previously known as "PowerPC Built-in Functions".
14171         (Basic PowerPC Built-in Functions Available on all Configurations):
14172         New subsubsection.
14173         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14174         subsubsection.
14175         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14176         subsubsection.
14177         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14178         subsubsection.
14179         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14180         subsubsection.
14182 2018-05-08  Jim Wilson  <jimw@sifive.com>
14184         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
14185         (LD_EMUL_SUFFIX): New.
14186         (LINK_SPEC): Use it.
14188 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14190         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14191         subsection.
14192         (Basic PowerPC Built-in Functions): The new name of the
14193         subsection previously known as "PowerPC Built-in Functions".
14194         (Basic PowerPC Built-in Functions Available on all Configurations):
14195         New subsubsection.
14196         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14197         subsubsection.
14198         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14199         subsubsection.
14200         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14201         subsubsection.
14202         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14203         subsubsection.
14205 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
14207         PR target/85683
14208         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
14209         after cmpelim optimization.
14211 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
14213         * config.gcc: Support "goldmont".
14214         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
14215         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14216         PROCESSOR_GOLDMONT.
14217         * config/i386/i386.c (m_GOLDMONT): Define.
14218         (processor_target_table): Add "goldmont".
14219         (PTA_GOLDMONT): Define.
14220         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
14221         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
14222         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
14223         (fold_builtin_cpu): Add "goldmont".
14224         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
14225         (ix86_option_override_internal): Add "goldmont".
14226         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
14227         (processor_type): Add PROCESSOR_GOLDMONT.
14228         * config/i386/i386.md: Add CPU "glm".
14229         * config/i386/glm.md: New file.
14230         * config/i386/x86-tune.def: Add m_GOLDMONT.
14231         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
14233 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
14235         PR target/85572
14236         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
14237         E_V4DImode.
14238         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
14239         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
14240         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
14242         PR target/85317
14243         * config/i386/i386.c (ix86_fold_builtin): Handle
14244         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
14246         PR target/85480
14247         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
14248         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
14250 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
14252         PR target/85658
14253         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
14254         (check_arch): Likewise.
14255         (check_fpu): Return the result rather than printing it.
14256         (end arch): Fix operator precedence.
14257         (end cpu): Likewise.
14258         (END): Print the result from check_fpu.
14260 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
14261             Alan Hayward  <alan.hayward@arm.com>
14262             David Sherwood  <david.sherwood@arm.com>
14264         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
14265         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
14266         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
14267         (*fcmuo<mode>_and): New patterns.
14269 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
14271         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
14272         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
14273         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
14274         (cmp_op, sve_imm_con): New code attributes.
14275         (SVE_COND_INT_CMP, imm_con): Delete.
14276         (cmp_op): Remove above unspecs from int attribute.
14277         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
14278         to...
14279         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
14280         comparison-specific unspecs.
14281         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
14282         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
14283         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
14284         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
14285         (*vec_fcm<cmp_op><mode>): Rename to...
14286         (*fcm<cmp_op><mode>): ...this and adjust likewise.
14287         (*vec_fcmuo<mode>): Rename to...
14288         (*fcmuo<mode>): ...this and adjust likewise.
14289         (*pred_fcm<cmp_op><mode>): New pattern.
14290         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
14291         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
14292         functions.
14293         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
14294         and UNORDERED.
14295         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
14296         (aarch64_emit_sve_predicated_cond): New function.
14297         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
14298         (aarch64_emit_unspec_cond_or): Replace with...
14299         (aarch64_emit_sve_or_conds): ...this new function.  Use
14300         aarch64_emit_sve_ptrue_op for the individual comparisons and
14301         aarch64_emit_binop to OR them together.
14302         (aarch64_emit_inverted_unspec_cond): Replace with...
14303         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
14304         aarch64_emit_sve_ptrue_op for the comparison and
14305         aarch64_emit_unop to invert the result.
14306         (aarch64_expand_sve_vec_cmp_float): Update after the above
14307         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
14309 2018-05-07  Nathan Sidwell  <nathan@acm.org>
14311         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
14312         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
14313         (Backwards Compatibility): Likewise.
14315 2018-05-07  Luis Machado  <luis.machado@linaro.org>
14317         PR bootstrap/85681
14318         Revert:
14319         2018-05-07  Luis Machado  <luis.machado@linaro.org>
14321         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14322         <prefetch_dynamic_strides>: New const bool field.
14323         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14324         prefetch_dynamic_strides.
14325         (exynosm1_prefetch_tune): Likewise.
14326         (thunderxt88_prefetch_tune): Likewise.
14327         (thunderx_prefetch_tune): Likewise.
14328         (thunderx2t99_prefetch_tune): Likewise.
14329         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14330         to false.
14331         (aarch64_override_options_internal): Update to set
14332         PARAM_PREFETCH_DYNAMIC_STRIDES.
14333         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14334         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14335         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14336         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14337         prefetch-dynamic-strides setting.
14339         2018-05-07  Luis Machado  <luis.machado@linaro.org>
14341         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14342         <minimum_stride>: New const int field.
14343         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14344         minimum_stride field.
14345         (exynosm1_prefetch_tune): Likewise.
14346         (thunderxt88_prefetch_tune): Likewise.
14347         (thunderx_prefetch_tune): Likewise.
14348         (thunderx2t99_prefetch_tune): Likewise.
14349         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14350         (aarch64_override_options_internal): Update to set
14351         PARAM_PREFETCH_MINIMUM_STRIDE.
14352         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14353         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14354         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14355         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14356         stride is constant and is below the minimum stride threshold.
14358 2018-05-07  Luis Machado  <luis.machado@linaro.org>
14360         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
14361         to 512.
14363 2018-05-07  Luis Machado  <luis.machado@linaro.org>
14365         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14366         <prefetch_dynamic_strides>: New const bool field.
14367         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14368         prefetch_dynamic_strides.
14369         (exynosm1_prefetch_tune): Likewise.
14370         (thunderxt88_prefetch_tune): Likewise.
14371         (thunderx_prefetch_tune): Likewise.
14372         (thunderx2t99_prefetch_tune): Likewise.
14373         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14374         to false.
14375         (aarch64_override_options_internal): Update to set
14376         PARAM_PREFETCH_DYNAMIC_STRIDES.
14377         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14378         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14379         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14380         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14381         prefetch-dynamic-strides setting.
14383 2018-05-07  Luis Machado  <luis.machado@linaro.org>
14385         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14386         <minimum_stride>: New const int field.
14387         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14388         minimum_stride field.
14389         (exynosm1_prefetch_tune): Likewise.
14390         (thunderxt88_prefetch_tune): Likewise.
14391         (thunderx_prefetch_tune): Likewise.
14392         (thunderx2t99_prefetch_tune): Likewise.
14393         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14394         (aarch64_override_options_internal): Update to set
14395         PARAM_PREFETCH_MINIMUM_STRIDE.
14396         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14397         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14398         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14399         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14400         stride is constant and is below the minimum stride threshold.
14402 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
14404         PR c++/85659
14405         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
14406         the type is addressable.  Don't force op into register if it has
14407         BLKmode.
14409 2018-05-05  Roland McGrath  <mcgrathr@google.com>
14411         PR other/77609
14412         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
14413         any section for which we don't know a specific type it should have,
14414         regardless of name.  Previously this was done only for the exact
14415         names ".init_array", ".fini_array", and ".preinit_array".
14416         (default_elf_asm_named_section): Add comment about
14417         relationship with default_section_type_flags and SECTION_NOTYPE.
14418         (get_section): Don't consider it a type conflict if one side has
14419         SECTION_NOTYPE and the other doesn't, as long as neither has the
14420         SECTION_BSS et al used in the default_section_type_flags logic.
14422 2018-05-05  Tom de Vries  <tom@codesourcery.com>
14424         PR target/85653
14425         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
14426         (workaround_barsyncs): New function.
14427         (nvptx_reorg): Use workaround_barsyncs.
14428         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14429         (define_expand "nvptx_membar_cta"): New define_expand.
14430         (define_insn "*nvptx_membar_cta"): New insn.
14432 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
14434         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14435         To improve optimization opportunities.
14436         * builtin-types.def: The new needed builtin types for the above.
14438 2018-05-04  Richard Biener  <rguenther@suse.de>
14440         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14441         * gimple-ssa-store-merging.c
14442         (imm_store_chain_info::output_merged_store): Remove redundant create,
14443         release split_store vector contents on failure.
14444         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14445         scalar stmt vector on cache hit.
14447 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
14449         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14450         Xilinx FP support.
14451         * config.gcc (powerpc-xilinx-eabi*): Remove.
14452         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14453         support.
14454         (fusion_addis_mem_combo_load): Ditto.
14455         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14456         FP support.
14457         (rs6000_cpu_cpp_builtins): Ditto.
14458         * config/rs6000/rs6000-linux.c
14459         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14460         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14461         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14462         support.
14463         (rs6000_setup_reg_addr_masks): Ditto.
14464         (rs6000_init_hard_regno_mode_ok): Ditto.
14465         (rs6000_option_override_internal): Ditto.
14466         (legitimate_lo_sum_address_p): Ditto.
14467         (rs6000_legitimize_address): Ditto.
14468         (rs6000_legitimize_reload_address): Ditto.
14469         (rs6000_legitimate_address_p): Ditto.
14470         (abi_v4_pass_in_fpr): Ditto.
14471         (setup_incoming_varargs): Ditto.
14472         (rs6000_gimplify_va_arg): Ditto.
14473         (rs6000_split_multireg_move): Ditto.
14474         (rs6000_savres_strategy): Ditto.
14475         (rs6000_emit_prologue_components): Ditto.
14476         (rs6000_emit_epilogue_components): Ditto.
14477         (rs6000_emit_prologue): Ditto.
14478         (rs6000_emit_epilogue): Ditto.
14479         (rs6000_elf_file_end): Ditto.
14480         (rs6000_function_value): Ditto.
14481         (rs6000_libcall_value): Ditto.
14482         * config/rs6000/rs6000.h: Ditto.
14483         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14484         (TARGET_MINMAX): ... this.  New.
14485         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14486         * config/rs6000/rs6000.md: Remove Xilinx FP support.
14487         (*movsi_internal1_single): Delete.
14488         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14489         mfpu=, mxilinx-fpu): Delete.
14490         * config/rs6000/singlefp.h: Delete.
14491         * config/rs6000/sysv4.h: Remove Xilinx FP support.
14492         * config/rs6000/t-rs6000: Ditto.
14493         * config/rs6000/t-xilinx: Delete.
14494         * config/rs6000/titan.md: Adjust for fp_type removal.
14495         * config/rs6000/vsx.md: Remove Xilinx FP support.
14496         (VStype_simple): Delete.
14497         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14498         * config/rs6000/xfpu.h: Delete.
14499         * config/rs6000/xfpu.md: Delete.
14500         * config/rs6000/xilinx.h: Delete.
14501         * config/rs6000/xilinx.opt: Delete.
14502         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14503         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14505 2018-05-04  Tom de Vries  <tom@codesourcery.com>
14507         PR libgomp/85639
14508         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14509         if ignore == 0.
14511 2018-05-04  Richard Biener  <rguenther@suse.de>
14513         PR middle-end/85627
14514         * tree-complex.c (update_complex_assignment): We are always in SSA form.
14515         (expand_complex_div_wide): Likewise.
14516         (expand_complex_operations_1): Likewise.
14517         (expand_complex_libcall): Preserve EH info of the original stmt.
14518         (tree_lower_complex): Handle removed blocks.
14519         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14520         on complex multiplication and division libcall builtins.
14522 2018-05-04  Richard Biener  <rguenther@suse.de>
14524         PR middle-end/85574
14525         * fold-const.c (negate_expr_p): Restrict negation of operand
14526         zero of a division to when we know that can happen without
14527         overflow.
14528         (fold_negate_expr_1): Likewise.
14530 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
14532         PR libstdc++/85466
14533         * real.h (real_nextafter): Declare.
14534         * real.c (real_nextafter): New function.
14535         * fold-const-call.c (fold_const_nextafter): New function.
14536         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14537         CASE_CFN_NEXTTOWARD.
14538         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14539         even when arg1_mode is different from arg0_mode.
14541 2018-05-03  Nathan Sidwell  <nathan@acm.org>
14543         * doc/extend.texi (Deprecated Features): Remove
14544         -ffriend-injection.
14545         (Backwards Compatibility): Likewise.
14546         * doc/invoke.texi (C++ Language Options): Likewise.
14547         (C++ Dialect Options): Likewise.
14549 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
14551         PR target/85530
14552         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14553         _mm512_mask_mullox_epi64): New intrinsics.
14555 2018-05-03  Tom de Vries  <tom@codesourcery.com>
14557         PR testsuite/85106
14558         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14559         dump files): Add offload-tree.
14561 2018-05-03  Richard Biener  <rguenther@suse.de>
14563         PR tree-optimization/85615
14564         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14565         to loops not nested in BBs loop father to avoid creating multi-entry
14566         loops.
14568 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14570         PR tree-optimization/70291
14571         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14572         arguments.  Change return type to tree.  Emit libcall as a new
14573         statement rather than replacing existing one when inplace_p is true.
14574         (expand_complex_multiplication_components): New function.
14575         (expand_complex_multiplication): Expand floating-point complex
14576         multiplication using the above.
14577         (expand_complex_division): Rename inner_type parameter to type.
14578         Update expand_complex_libcall call-site.
14579         (expand_complex_operations_1): Update expand_complex_multiplication
14580         and expand_complex_division call-sites.
14582 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
14584         PR target/85582
14585         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14586         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14587         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14588         the highest significant bit of the shift count mask is clear.  In
14589         check whether and[sq]i3 is needed verify that all significant bits
14590         of the shift count other than the highest are set.
14592 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14594         PR libgomp/82428
14595         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14596         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14597         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14598         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14599         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14600         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14601         __builtin_goacc_parlevel_size.
14603 2018-05-02  Richard Biener  <rguenther@suse.de>
14605         PR tree-optimization/85597
14606         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14607         do not use split vect_get_vec_defs call but call vect_get_slp_defs
14608         directly.
14610 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14612         PR testsuite/85106
14613         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14614         dump files): Add ltrans-tree.
14616 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14618         PR testsuite/85106
14619         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14620         dump files): Add wpa-ipa.
14622 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
14624         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
14625         powerpc*-*-linux*paired* target.
14626         * config/rs6000/750cl.h: Delete.
14627         * config/rs6000/paired.h: Delete.
14628         * config/rs6000/paired.md: Delete.
14629         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14630         float support.
14631         * config/rs6000/rs6000-builtin.def: Remove paired float support.
14632         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14633         comment.  Remove paired float support.
14634         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14635         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14636         VECTOR_PAIRED.
14637         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14638         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14639         declarations.
14640         * config/rs6000/rs6000.c: Remove paired float support.
14641         (paired_expand_vector_init, paired_expand_vector_move,
14642         paired_emit_vector_compare, paired_emit_vector_cond_expr,
14643         (paired_expand_lv_builtin, paired_expand_stv_builtin,
14644         paired_expand_builtin, paired_expand_predicate_builtin,
14645         paired_init_builtins): Delete.
14646         * config/rs6000/rs6000.h: Remove paired float support.
14647         * config/rs6000/rs6000.md: Remove paired float support.
14648         (move_from_CR_ov_bit): Delete.
14649         * config/rs6000/rs6000.opt (mpaired): Delete.
14650         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14651         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14653 2018-05-02  Richard Biener  <rguenther@suse.de>
14655         PR middle-end/85567
14656         * gimplify.c (gimplify_save_expr): When in SSA form allow
14657         SAVE_EXPRs to compute to SSA vars.
14659 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
14661         PR target/85582
14662         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14663         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14664         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14665         clobber operands[2], instead use a new pseudo.  Formatting fixes.
14667 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
14669         PR tree-optimization/85586
14670         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14671         exit early for statements in the same group if the accesses are
14672         not strided.
14674 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14676         PR lto/85451
14677         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14678         error message.
14680 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
14682         PR tree-optimization/85143
14683         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14685 2018-05-01  Tom de Vries  <tom@codesourcery.com>
14687         PR lto/85451
14688         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14689         not found" error message.
14691 2018-05-01  Tom de Vries  <tom@codesourcery.com>
14693         PR other/83786
14694         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14695         * vec.c (test_ordered_remove_if): New function.
14696         (vec_c_tests): Call test_ordered_remove_if.
14697         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14698         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14699         * tree-vect-patterns.c (vect_pattern_recog_1): Use
14700         VEC_ORDERED_REMOVE_IF.
14702 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14704         PR tree-optimization/82665
14705         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14706         pointer subtraction where arguments come from a memchr call.
14708 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
14710         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14711         --push-state --as-needed and --pop-state instead of --as-needed and
14712         --no-as-needed if ld supports it.
14713         * configure: Regenerated.
14715         PR web/85578
14716         * doc/install.texi2html: Replace _002d with - and _002a with * in
14717         generated html files using sed.
14719 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14721         PR c++/85523
14722         * gcc-rich-location.c (blank_line_before_p): New function.
14723         (use_new_line): New function.
14724         (gcc_rich_location::add_fixit_insert_formatted): New function.
14725         * gcc-rich-location.h
14726         (gcc_rich_location::add_fixit_insert_formatted): New function.
14728 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14730         * selftest.c (assert_streq): Rename "expected" and "actual" to
14731         "val1" and "val2".  Extend NULL-handling to cover both inputs
14732         symmetrically, while still requiring both to be non-NULL for a pass.
14733         * selftest.h (assert_streq): Rename "expected" and "actual" to
14734         "val1" and "val2".
14735         (ASSERT_EQ): Likewise.
14736         (ASSERT_EQ_AT): Likewise.
14737         (ASSERT_KNOWN_EQ): Likewise.
14738         (ASSERT_KNOWN_EQ_AT): Likewise.
14739         (ASSERT_NE): Likewise.
14740         (ASSERT_MAYBE_NE): Likewise.
14741         (ASSERT_MAYBE_NE_AT): Likewise.
14742         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
14743         the assertion to pass.
14744         (ASSERT_STREQ_AT): Likewise.
14746 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
14748         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14749         interaction with -pie.
14751 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14753         * selftest.h: Fix alphabetization of per-source-file selftest
14754         declarations.
14756 2018-04-30  Jason Merrill  <jason@redhat.com>
14758         PR c++/61982 - dead stores to destroyed objects.
14759         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14760         of clobber.
14762 2018-04-30  Jason Merrill  <jason@redhat.com>
14764         * tree.c (build_clobber): New.
14765         * tree.h: Declare it.
14766         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14768 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14770         * diagnostic-show-locus.c (layout::layout): Update for
14771         location_get_source_line returning a char_span.
14772         (struct char_span): Move to input.h.
14773         (struct correction): Update for fields in char_span becoming
14774         private.
14775         (struct source_line): Update for location_get_source_line
14776         returning a char_span.
14777         (layout::print_line): Likewise.
14778         * edit-context.c (edited_file::print_content): Likewise.
14779         (edited_file::print_diff_hunk): Likewise.
14780         (edited_file::print_run_of_changed_lines): Likewise.
14781         (edited_file::get_num_lines): Likewise.
14782         (edited_line::edited_line): Likewise.
14783         * final.c (asm_show_source): Likewise.
14784         * input.c (location_get_source_line): Convert return type
14785         from const char * to char_span, losing the final "line_len"
14786         param.
14787         (dump_location_info): Update for the above.
14788         (get_substring_ranges_for_loc): Likewise.  Use a char_span
14789         when handling the literal within the line.
14790         (test_reading_source_line): Update for location_get_source_line
14791         returning a char_span.
14792         * input.h (class char_span): Move here from
14793         diagnostic-show-locus.c, converting from a struct to a class.
14794         Make data members private.
14795         (char_span::operator bool): New.
14796         (char_span::length): New.
14797         (char_span::get_buffer): New.
14798         (char_span::operator[]): New.
14799         (char_span::subspan): Make const.
14800         (char_span::xstrdup): New.
14801         (location_get_source_line): Convert return type from const char *
14802         to char_span, losing the final "line_size" param.
14804 2018-04-30  Jan Hubicka  <jh@suse.cz>
14806         * lto-wrapper.c (ltrans_priorities): New static var.
14807         (cmp_priority): New.
14808         (run_gcc): Read priorities and if doing parallel build order
14809         the Makefile by them.
14811 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14813         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14815 2018-04-30  Richard Biener  <rguenther@suse.de>
14817         * tree-cfg.c (verify_address): Remove base argument, add
14818         flag whether to check TREE_ADDRESSABLE and do that.
14819         (verify_expr): Remove.
14820         (verify_types_in_gimple_reference): Add pieces from verify_expr.
14821         (verify_gimple_assign_single): Likewise.
14822         (verify_gimple_switch): Likewise.
14823         (verify_expr_location_1): Dereference tp once.  Add (disabled)
14824         piece from verify_expr.
14825         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14827 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14829         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14831 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14833         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14834         (small_data_pattern): Likewise.
14835         (arc_rewrite_small_data): Likewise.
14836         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14837         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14838         (get_symbol_alignment): New function.
14839         (legitimate_small_data_address_p): Likewise.
14840         (legitimate_scaled_address): Update, call
14841         legitimate_small_data_address_p.
14842         (output_sdata): New static variable.
14843         (arc_print_operand): Update how we handle small data operands.
14844         (arc_print_operand_address): Likewise.
14845         (arc_legitimate_address_p): Update, use
14846         legitimate_small_data_address_p.
14847         (arc_rewrite_small_data_p): Remove.
14848         (arc_rewrite_small_data_1): Likewise.
14849         (arc_rewrite_small_data): Likewise.
14850         (small_data_pattern): Likewise.
14851         (compact_sda_memory_operand): Update to use
14852         legitimate_small_data_address_p and get_symbol_alignment.
14853         (prepare_move_operands): Don't rewite sdata pattern.
14854         (prepare_extend_operands): Remove.
14855         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14856         pattern.
14857         (zero_extendqisi2): Likewise.
14858         (zero_extendhisi2): Likewise.
14859         (extendqihi2): Likewise.
14860         (extendqisi2): Likewise.
14861         (extendhisi2): Likewise.
14862         (addsi3): Likewise.
14863         (subsi3): Likewise.
14864         (andsi3): Likewise.
14865         * config/arc/constraints.md (Usd): Change it to memory constraint.
14867 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14869         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14870         as source of std instructions.
14871         * config/arc/arc.md (movsi_insn): Update pattern predicate to
14872         allow 6-bit constants as source for store instructions.
14873         (movdi_insn): Update instruction pattern to allow 6-bit constants
14874         as source for store instructions.
14876 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
14878         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14880 2018-04-30  Nathan Sidwell  <nathan@acm.org>
14881             Sandra Loosemore <sandra@codesourcery.com>
14883         * dumpfile.c (dump_open): Allow '-' for stdout.
14884         * doc/invoke.texi (Developer Options): Document dump filename
14885         determination early.  Document stdin/stdout selection.
14887 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
14889         Microblaze Target: PIC data text relative
14891         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14892         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14893         Add declaration.
14894         * config/microblaze/microblaze.h (microblaze_constant_address_p):
14895         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14896         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14897         New addressing mode for data-text relative position indepenedent code.
14898         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14899         'ADDRESS_SYMBOLIC_TXT_REL'.
14900         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14901         (microblaze_legitimate_pic_operand): Exclude function calls from
14902         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14903         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14904         addresses cases.
14905         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14906         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14907         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14908         for 'address + offset'.
14909         (microblaze_expand_prologue): Add new function prologue call for
14910         'r20' assignation.
14911         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14912         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14913         table in case of TARGET_PIC_DATA_TEXT_REL.
14914         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14915         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14916         Add new macros 'UNSPEC_TEXT',
14917         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14918         + exclude function calls from 'UNSPEC_PLT' in case of data text
14919         relative mode.
14920         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14921         new target hook for generating address diff vector tables in case of
14922         flag_pic.
14923         * doc/tm.texi : Regenerate.
14924         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14925         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14926         of addr diff vector generation.
14927         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14928         target hook definition.
14929         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14930         Add default function for generate_pic_addr_diff_vec -> flag_pic.
14931         * doc/invoke.texi (Add new pic option): Add new microblaze pic
14932         option for data text relative.
14934 2018-04-30  Richard Biener  <rguenther@suse.de>
14936         * tree-chrec.h (evolution_function_is_constant_p): Remove
14937         redundant check.
14938         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14940 2018-04-30  Richard Biener  <rguenther@suse.de>
14942         PR bootstrap/85571
14943         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14945 2018-04-30  Richard Biener  <rguenther@suse.de>
14947         PR tree-optimization/28364
14948         PR tree-optimization/85275
14949         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14950         copying first exit test.
14952 2018-04-28  Mark Wielaard  <mark@klomp.org>
14954         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14955         dwarf_version >= 5.
14956         (dwarf_AT): Handle DW_AT_addr_base.
14957         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14959 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
14961         PR target/84431
14962         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14963         (*ashl<dwi>3_doubleword_mask_1): Ditto.
14964         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14965         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14967 2018-04-28  Richard Biener  <rguenther@suse.de>
14969         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14970         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14971         to reflect use.  Only add interesting stmts.
14973 2018-04-27  Martin Jambor  <mjambor@suse.cz>
14975         PR ipa/85549
14976         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14977         the jump function allows for passing through aggregate values.
14979 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
14981         * input.h (in_system_header_at): Convert from macro to inline
14982         function.
14983         (from_macro_expansion_at): Likewise.
14984         (from_macro_definition_at): Likewise.
14986 2018-04-27  Jeff Law  <law@redhat.com>
14988         * config.gcc: Mark tile* targets as deprecated/obsolete.
14990 2018-04-27  Richard Biener  <rguenther@suse.de>
14992         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14993         fix for ILP32.
14995 2018-04-27  Richard Biener  <rguenther@suse.de>
14997         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14999 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
15001         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
15002         with Yd constraint. Set "preferred_for_speed" attribute from
15003         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
15004         with Yd constraint.
15005         (*movdi_internal): Ditto.
15006         (movti_interunit splitters): Remove
15007         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
15008         (movdi_interunit splitters): Ditto.
15009         * config/i386/constraints.md (Ye): Remove.
15010         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
15012 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15014         PR target/85512
15015         * config/aarch64/constraints.md (Usg): Limit to 31.
15016         (Usj): Limit to 63.
15018 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
15020         PR tree-optimization/85529
15021         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
15022         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
15023         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
15024         zero extension or masking of the MSB bit.
15025         (optimize_range_tests): Add FIRST_BB argument, pass it through
15026         to optimize_range_tests_var_bound.
15027         (maybe_optimize_range_tests, reassociate_bb): Adjust
15028         optimize_range_tests callers.
15030 2018-04-26  Richard Biener  <rguenther@suse.de>
15031             Jakub Jelinek  <jakub@redhat.com>
15033         * cgraph.h (symbol_table): Just declare debug method here.
15034         * symtab.c (symbol_table::debug): Define.
15036 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
15038         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
15040 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
15042         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
15043         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
15044         (*movdi_internal): Substitute Yi and Yj constraint with x
15045         and Ym and Yn constraint with y constraint.  Update "isa"
15046         attribute and set "preferred_for_speed" attribute from
15047         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
15048         (*movsi_internal): Ditto.
15049         (*movdf_internal): Ditto.
15050         (*movsf_internal): Ditto.
15051         (*zero_extendsidi2): Ditto.
15052         * config/i386/sse.md (vec_set<mode>_0): Ditto.
15053         (sse2_loadld): Ditto.
15054         (*vec_extract<ssevecmodelower>_0): Ditto.
15055         (*vec_extractv4si_0_zext_sse4): Ditto.
15056         (vec_concatv2di): Ditto.
15057         (*vec_dup<mode>): Ditto.
15058         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
15059         * config/i386/constraints.md (Yi): Remove.
15060         (Yj): Remove.
15061         (Ym): Remove.
15062         (Yn): Remove.
15064 2018-04-26  Nathan Sidwell  <nathan@acm.org>
15066         * dumpfile.c (dump_open): New.
15067         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
15068         (dump_finish): Detect stdio/stderr by value not name.
15070 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
15072         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
15074 2018-04-26  Tom de Vries  <tom@codesourcery.com>
15076         PR target/84952
15077         * config/nvptx/nvptx.c (verify_neutering_jumps)
15078         (verify_neutering_labels): New function
15079         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
15081 2018-04-26  Tom de Vries  <tom@codesourcery.com>
15083         PR target/84025
15084         * config/nvptx/nvptx.c (needs_neutering_p): New function.
15085         (nvptx_single): Use needs_neutering_p to skip over insns that do not
15086         need neutering.
15088 2018-04-26  Richard Biener <rguenther@suse.de>
15089             Tom de Vries  <tom@codesourcery.com>
15091         PR lto/85422
15092         * lto-streamer-out.c (output_function): Fixup loops if required to match
15093         discovery done in the reader.
15095 2018-04-26  Richard Biener  <rguenther@suse.de>
15097         PR tree-optimization/85116
15098         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
15099         have a loop exit from the single latch predecessor.  Remove
15100         case of header with just condition.
15101         (ch_base::copy_headers): Exclude infinite loops from any
15102         processing.
15103         (pass_ch::execute): Record exits.
15105 2018-04-26  Richard Biener  <rguenther@suse.de>
15107         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
15108         prologue cost vector and pass it to vect_get_load_cost.
15109         (vect_get_peeling_costs_all_drs): Likewise.
15110         (vect_peeling_hash_get_lowest_cost): Likewise.
15111         (vect_enhance_data_refs_alignment): Likewise.
15113 2018-04-26  Richard Biener  <rguenther@suse.de>
15115         PR middle-end/85450
15116         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
15117         checking of integer<->pointer conversions.
15118         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
15119         sign-/zero-extending pointer types.
15120         (expand_omp_for_static_chunk): Likewise.
15122 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
15123             Jean Lee  <xiaoyur347@gmail.com>
15125         * config/mips/mips.c (mips_asan_shadow_offset): New function.
15126         (TARGET_ASAN_SHADOW_OFFSET): Define.
15127         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
15128         true for -fsanitize=address.
15130 2018-04-25  Mark Wielaard  <mark@klomp.org>
15132         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
15133         shorter ones.
15135 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
15137         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
15138         than "alu", remove explicit "memory" and "imm_disp" attributes.
15139         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
15141         PR middle-end/85414
15142         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
15143         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
15144         gen_lowpart_no_emit.
15146 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
15148         PR target/85473
15149         * config/i386/i386.c (ix86_expand_builtin): Change memory
15150         operand to XI, extend p0 to Pmode.
15151         * config/i386/i386.md: Change unspec volatile and operand
15152         1 mode to XI, change operand 0 mode to P.
15154 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15156         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
15157         GET_MODE_MASK before any checking.
15158         (nds32_can_use_bset_p): Likewise.
15159         (nds32_can_use_btgl_p): Likewise.
15161 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15163         * config/nds32/nds32-doubleword.md: New define_split pattern for
15164         illegal register number.
15166 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15168         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
15170 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15172         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
15174 2018-04-25  Richard Biener  <rguenther@suse.de>
15176         * lto-streamer.h (LTO_major_version): Bump to 8.
15178 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
15180         * BASE-VER: Set to 9.0.0.
15182 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
15184         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
15185         in __abskf2 and __powikf2.
15187 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15189         PR target/85512
15190         * config/aarch64/constraints.md (Usg, Usj): New constraints.
15191         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
15192         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
15193         Use the above on operand 2.  Reindent.
15194         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
15196 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
15198         PR target/85485
15199         * common/config/i386/i386-common.c (ix86_handle_option): Don't
15200         handle OPT_mcet.
15201         * config/i386/i386.opt (mcet): Removed.
15202         * doc/install.texi: Remove -mcet documentation.
15203         * doc/invoke.texi: Likewise.
15205 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
15207         PR target/85485
15208         * doc/install.texi: Remove -mcet from bootstrap-cet.
15210 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15212         PR target/85511
15213         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
15214         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
15215         if TARGET_64BIT.
15217         PR target/85503
15218         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
15219         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
15220         containing a CONST_VECTOR.
15222 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
15224         * doc/install.texi: Update newlib dependency for nvptx.
15226 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15228         PR target/85508
15229         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
15230         instead of INTVAL when shifting x left.
15232 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
15234         PR tree-optimization/85478
15235         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
15236         vect_grouped_store_supported for single element vectors.
15238 2018-04-24  Richard Biener  <rguenther@suse.de>
15240         PR target/85491
15241         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
15242         load cost increase to the case of non-constant step.
15244 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15246         PR target/84828
15247         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
15248         destination if any_malformed_asm.
15250 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
15252         PR middle-end/85496
15253         * expr.c (store_field): In the bitfield case, if the value comes from
15254         a function call and is returned in registers by means of a PARALLEL,
15255         do not change the mode of the temporary unless BLKmode and VOIDmode.
15257 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
15259         PR rtl-optimization/85423
15260         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
15261         dependencies to debug insns when the previous insn is non-debug.
15263 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
15265         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
15266         enums into a single definition.
15267         (fls): Fix predicates and printing.
15268         (seti): Likewise.
15270 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
15272         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
15273         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
15274         and short u6 immediate.
15275         (check_if_valid_sleep_operand): Remove.
15276         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
15278 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15280         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
15281         flag_always_save_lp condition.
15282         * config/nds32/nds32.opt (malways-save-lp): New option.
15284 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
15286         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
15287         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
15288         * config/nds32/nds32.h
15289         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
15290         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
15292 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
15294         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
15295         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
15297 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
15298             Chung-Ju Wu  <jasonwucj@gmail.com>
15300         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
15301         Declare.
15302         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
15303         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
15305 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15307         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
15309 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15311         * config/nds32/nds32-protos.h (nds32_data_alignment,
15312         nds32_local_alignment): Declare.
15313         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
15314         nds32_local_alignment): New functions.
15315         (TARGET_CONSTANT_ALIGNMENT): Define.
15316         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
15318 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15320         * config/nds32/nds32.c
15321         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
15322         (TARGET_MODES_TIEABLE_P): Likewise.
15324 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15326         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
15327         level Ofast and Og.
15329 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
15330             Chung-Ju Wu  <jasonwucj@gmail.com>
15332         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15333         for unaligned access.
15334         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15335         unaligned access.
15336         * config/nds32/nds32-intrinsic.md: Likewise.
15337         * config/nds32/nds32_intrinsic.h: Likewise.
15338         * config/nds32/nds32.h (nds32_builtins): Likewise.
15339         * config/nds32/nds32.opt (munaligned-access): New option.
15340         * config/nds32/nds32.c (nds32_asm_file_start): Display
15341         flag_unaligned_access status.
15343 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
15345         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
15346         -mno-relax is present.
15347         * config/riscv/linux.h (LINK_SPEC): Ditto.
15349 2018-04-20  Martin Sebor  <msebor@redhat.com>
15351         PR c/85365
15352         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
15353         for null pointers.
15354         (gimple_fold_builtin_stxcpy_chk): Same.
15355         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
15357 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
15359         PR target/85456
15360         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
15361         __powikf2 when long double is IEEE 128-bit.
15363 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
15365         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
15366         step to make sure stack always aligned.
15368 2018-04-20  Carl Love  <cel@us.ibm.com>
15370         PR target/83402
15371         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
15372         size check for arg0.
15374 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15375             Tom de Vries  <tom@codesourcery.com>
15377         PR target/85445
15378         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
15379         Emit insns for calls too.
15380         (nvptx_find_par): Always look for worker-level predecessor insn.
15381         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
15382         calls.
15383         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
15384         (nvptx_process_pars): Propagate frames for calls.
15386 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
15388         PR target/85469
15389         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
15390         Removed.
15391         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
15392         (ix86_handle_option): Don't handle OPT_mibt.
15393         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
15394         __SHSTK__.
15395         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
15396         has_ibt and ibt.
15397         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
15398         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
15399         (ix86_target_macros): Define __CET__ with flag_cf_protection
15400         for -fcf-protection.
15401         * config/i386/i386.c (isa2_opts): Remove -mibt.
15402         * config/i386/i386.h (TARGET_IBT): Removed.
15403         (TARGET_IBT_P): Likewise.
15404         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
15405         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
15406         * config/i386/i386.opt (mcet): Update help message.
15407         (mshstk): Likewise.
15408         (mibt): Removed.
15409         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
15410         -mcet as an alias for -mshstk.
15412 2018-04-20  Richard Biener <rguenther@suse.de>
15414         PR middle-end/85475
15415         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
15416         complexity by forcing a single use of the multiply operand.
15418 2018-04-20  Martin Jambor  <mjambor@suse.cz>
15420         ipa/85449
15421         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
15422         recursion dependency to only apply to non-clones.
15424 2018-04-20  Martin Jambor  <mjambor@suse.cz>
15426         ipa/85447
15427         * ipa-cp.c (create_specialized_node): Check that clones of
15428         self-recursive edges exist during IPA-CP.
15430 2018-04-19  Toon Moene  <toon@moene.org>
15432         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15433         by -O3.
15435 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
15437         PR tree-optimization/85467
15438         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15439         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
15440         VECTOR_CST element to type.
15442 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
15444         PR target/85397
15445         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15446         * config/i386/i386.md (builtin_setjmp_setup): Removed.
15447         (builtin_longjmp): Likewise.
15448         (save_stack_nonlocal): New pattern.
15449         (restore_stack_nonlocal): Likewise.
15451 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
15453         PR target/85404
15454         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15455         Replace ASM_OUTPUT_LABEL with fprintf.
15457 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
15459         PR target/85417
15460         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15461         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15462         * config/i386/i386-c.c (ix86_target_macros_internal): Also
15463         define __IBT__ and __SHSTK__ for -fcf-protection.
15464         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15465         TARGET_IBT.
15466         (ix86_trampoline_init): Likewise.
15467         (x86_output_mi_thunk): Likewise.
15468         (ix86_notrack_prefixed_insn_p): Likewise.
15469         (ix86_option_override_internal): Don't disallow -fcf-protection.
15470         * config/i386/i386.md (rdssp<mode>): Also enable for
15471         -fcf-protection.
15472         (incssp<mode>): Likewise.
15473         (nop_endbr): Likewise.
15474         * config/i386/i386.opt (mcet): Change help message to built-in
15475         functions only.
15476         (mibt): Likewise.
15477         (mshstk): Likewise.
15478         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15479         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
15480         enable CET built-in functions.
15482 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
15484         * common/config/i386/i386-common.c
15485         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15486         OPTION_MASK_ISA_MOVDIRI_UNSET,
15487         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15488         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15489         * config.gcc (movdirintrin.h): New header.
15490         * config/i386/cpuid.h (bit_MOVDIRI,
15491         bit_MOVDIR64B): New bits.
15492         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15493         and -mmvodir64b.
15494         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15495         (VOID, PVOID, PCVOID)): New function types.
15496         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15497         __builtin_ia32_directstoreu_u64,
15498         __builtin_ia32_movdir64b): New builtins.
15499         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15500         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15501         and -mmovdiri.
15502         (ix86_valid_target_attribute_inner_p): Ditto.
15503         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15504         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15505         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15506         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15507         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15508         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15509         (movdiri<mode>, movdir64b_<mode>): New.
15510         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15511         * config/i386/immintrin.h: Include movdirintrin.h.
15512         * config/i386/movdirintrin.h: New file.
15513         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15515 2018-04-19  Richard Biener  <rguenther@suse.de>
15517         PR middle-end/85455
15518         * cfg.c (clear_bb_flags): When loop state says we have
15519         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15521 2018-04-19  Richard Biener  <rguenther@suse.de>
15523         PR tree-optimization/84737
15524         * tree-vect-data-refs.c (vect_copy_ref_info): New function
15525         copying restrict info.
15526         (vect_setup_realignment): Use it.
15527         * tree-vectorizer.h (vect_copy_ref_info): Declare.
15528         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15529         the first DR to all generated stores.
15530         (vectorizable_load): Likewise for loads.
15532 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
15534         PR tree-optimization/85446
15535         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15536         the integral and pointer types to have the same precision.
15538         * doc/install.texi: Document --disable-cet being the default and
15539         --enable-cet=auto.
15541 2018-04-18  Martin Liska  <mliska@suse.cz>
15543         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15544         style.
15546 2018-04-18  Martin Liska  <mliska@suse.cz>
15548         Revert
15549         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15551         PR ipa/83983
15552         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15553         arguments if they are comparable.
15555 2018-04-18  Martin Liska  <mliska@suse.cz>
15557         Revert
15558         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15560         PR lto/84805
15561         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15562         incomplete types.
15564 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
15566         PR target/85388
15567         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15568         ENDBR after calling __morestack.
15570 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
15572         PR jit/85384
15573         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15574         by using gcc_base_ver to generate a gcc_driver_version, and use
15575         it when generating GCC_DRIVER_NAME.
15576         * configure: Regenerate.
15578 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
15580         PR target/81084
15581         * config.gcc: Obsolete powerpc*-*-*spe*.
15583 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15585         PR debug/84637
15586         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15587         (stabstr_D): Change type of unum from unsigned int to
15588         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
15589         type.
15591 2018-04-17  Jim Wilson  <jimw@sifive.com>
15593         PR 84856
15594         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15595         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15596         Set arg_pointer_offset after using pretend_args_size.
15598 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15600         PR rtl-optimization/85431
15601         * dse.c (record_store): Ignore zero width stores.
15603         PR sanitizer/85230
15604         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
15605         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15606         __builtin_stack_restore rather than after it.
15607         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15608         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15609         argument instead of virtual_dynamic_stack_rtx.
15611 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15613         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15614         New prototype.
15615         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15616         Add note to error message to explain internal mapping of overloaded
15617         built-in function name to non-overloaded built-in function name.
15618         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15619         function.
15621 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
15623         PR target/85424
15624         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15625         where the inputs overlap with the output.
15627 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15629         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15630         (=v, v) alternative and explicit "memory" attribute.
15631         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
15632         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15633         attributes.
15634         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15635         "sselog1" type instead of "sselog".
15636         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15637         "sselog".  Remove explicit "memory" attribute.
15638         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15639         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15640         attributes.
15641         (vec_extract_hi_v32hi): Merge all alternatives into one, use
15642         "sselog1" type instead of "sselog".  Remove explicit "memory"
15643         attribute.
15644         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15645         use "sselog1" type instead of "sselog".  Remove explicit "memory"
15646         attribute.
15647         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15648         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15649         attributes.
15650         (vec_extract_hi_v64qi): Merge all alternatives into one, use
15651         "sselog1" type instead of "sselog".  Remove explicit "memory"
15652         attribute.
15653         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15654         use "sselog1" type instead of "sselog".  Remove explicit "memory"
15655         attribute.
15657         PR target/85430
15658         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15660         PR middle-end/85414
15661         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15662         on a SUBREG.
15664 2018-04-17  Martin Jambor  <mjambor@suse.cz>
15666         PR ipa/85421
15667         * ipa-cp.c (create_specialized_node): Call
15668         expand_all_artificial_thunks if necessary.
15670 2018-04-17  Martin Liska  <mliska@suse.cz>
15672         PR lto/85405
15673         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15674         in message, remote space in between '_G' and '('.
15676 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15678         PR target/85281
15679         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15680         avx512f_vmcmp<mode>3<round_saeonly_name>,
15681         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15682         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15683         avx512f_rndscale<mode><round_saeonly_name>,
15684         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15685         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15686         Use %<iptr>2 instead of %2 for -masm=intel.
15687         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15688         avx512f_vcvttss2usi<round_saeonly_name>,
15689         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15690         -masm=intel.
15691         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15692         avx512f_vcvttsd2usi<round_saeonly_name>,
15693         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15694         Use %q1 instead of %1 for -masm=intel.
15695         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15696         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15697         of %3 for -masm=intel.
15698         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15699         -masm=intel.
15700         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15701         -masm=intel.
15702         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15703         -masm=intel.
15704         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15705         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15706         %g1.
15707         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15708         -masm=intel.
15709         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15710         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15711         %g1 and one with %0 and %1.
15712         (avx512er_vmrcp28<mode><round_saeonly_name>,
15713         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15714         %1 for -masm=intel.
15715         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15716         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15717         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15718         of %0 and %{%4%} for -masm=intel.
15719         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15720         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15721         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15722         order of %0 and %{%5%}%{z%} for -masm=intel.
15724 2018-04-17  Jan Hubicka  <jh@suse.cz>
15726         PR lto/85405
15727         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15729 2018-04-17  Martin Liska  <mliska@suse.cz>
15731         PR ipa/85329
15732         * multiple_target.c (create_dispatcher_calls): Set apostrophes
15733         for target_clone error message.  Make default implementation
15734         clone to be a local declaration.
15735         (separate_attrs): Add new argument and check for an empty
15736         string.
15737         (expand_target_clones): Handle it.
15738         (ipa_target_clone): Make redirection just for target_clones
15739         functions.
15741 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
15742             Tom de Vries  <tom@codesourcery.com>
15744         PR middle-end/84955
15745         * omp-expand.c (expand_oacc_for): Add dummy false branch for
15746         tiled basic blocks without omp continue statements.
15748 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
15750         PR target/83660
15751         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15752         vec_extract expression as having side effects to make sure it gets
15753         a cleanup point.
15755 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
15757         PR target/85403
15758         * config/i386/i386.c (get_builtin_code_for_version): Check
15759         error_mark_node.
15761 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
15763         PR target/84331
15764         * config.gcc: Support "skylake".
15765         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15766         PROCESSOR_SKYLAKE.
15767         * config/i386/i386.c (m_SKYLAKE): Define.
15768         (processor_target_table): Add "skylake".
15769         (ix86_option_override_internal): Add "skylake".
15770         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15771         PROCESSOR_CANNONLAKE.
15772         (get_builtin_code_for_version): Fix priority for
15773         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15774         PROCESSOR_SKYLAKE-AVX512.
15775         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15776         (processor_type): Add PROCESSOR_SKYLAKE.
15778 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
15779             Jason Merrill  <jason@redhat.com>
15781         PR c++/85112
15782         * convert.c (convert_to_integer_1): Use direct recursion for
15783         enumeral types and types with a precision less than the number
15784         of bits in their mode.
15786 2018-04-16  Julia Koval  <julia.koval@intel.com>
15788         PR target/84413
15789         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15790         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15792 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
15794         PR target/85293
15795         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15796         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15797         and -mno-direct-move.
15799 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
15801         PR target/83402
15802         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15803         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15804         Ensure negative shifts result in {0}.
15806 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
15808         PR rtl-optimization/79916
15809         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15810         regs (if any) to define how to gnerate SD moves when LRA is in
15811         progress.
15813 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
15815         PR rtl-optimization/85393
15816         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15817         * except.c (expand_dw2_landing_pad_for_region): Make static.
15818         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15819         a label and unconditional jump to old_bb, rather than
15820         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15821         basic block.
15823         PR rtl-optimization/85376
15824         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15825         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15826         instead of a specific value.
15828 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
15829             Bin Cheng  <bin.cheng@arm.com>
15831         PR tree-optimization/82965
15832         PR tree-optimization/83991
15833         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15834         by_profile_only parameter.
15835         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15836         information if the loop was predicted to iterate too many times.
15837         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15839 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
15841         PR lto/71991
15842         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15843         always inline.
15845 2018-04-13  Martin Liska  <mliska@suse.cz>
15846             Jakub Jelinek  <jakub@redhat.com>
15848         PR middle-end/81657
15849         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15850         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15851         * builtins.c (expand_builtin_memory_copy_args): Use
15852         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15853         handle dest_addr == pc_rtx.
15855 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
15857         PR target/85291
15858         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15859         asked to not generate direct moves.
15860         (fix_trunc<mode>si2_stfiwx): Similar.
15861         (fix_trunc<mode>si2_internal): Similar.
15863 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15865         PR debug/83157
15866         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15867         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15868         lookup if dest in some wider mode is known to be const0_rtx and
15869         if so, record permanent equivalence for it to be ZERO_EXTEND of
15870         the narrower mode destination.
15872 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
15874         * lto-streamer-out.c (output_function): Revert 259346.
15875         * omp-expand.c (expand_oacc_for): Likewise.
15877 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
15879         PR rtl-optimization/85354
15880         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15881         * sel-sched.c (sel_global_init): ... here.
15883 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
15885         PR target/85238
15886         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15887         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15888         mode for PE-COFF targets.
15889         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15890         (i386_pe_asm_lto_end): Likewise.
15891         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15892         (TARGET_ASM_LTO_END): Likewise.
15893         * config/i386/winnt.c (saved_debug_info_level): New static variable.
15894         (i386_pe_asm_lto_start): New function.
15895         (i386_pe_asm_lto_end): Likewise.
15897 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
15898             Richard Biener  <rguenther@suse.de>
15900         PR middle-end/84955
15901         * lto-streamer-out.c (output_function): Fix CFG loop state before
15902         streaming out.
15903         * omp-expand.c (expand_oacc_for): Handle calls to internal
15904         functions like regular functions.
15906 2018-04-12  Richard Biener  <rguenther@suse.de>
15908         PR lto/85371
15909         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15910         for the early LTO debug to properly generate references to it
15911         during DIE emission.  Do not re-use that for the skeleton for
15912         split-dwarf.
15913         (dwarf2out_early_finish): Likewise.
15915 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15917         PR target/85328
15918         * config/i386/sse.md
15919         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15920         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15921         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15922         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15923         and output is a reg, avoid creating invalid lowpart subreg, but
15924         instead split into a 512-bit move.  Don't split if not AVX512VL,
15925         input is xmm16+ reg and output is a mem.
15926         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15927         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15928         xmm16+ reg and output is a mem.
15930 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15932         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15933         also for flag_dwarf2_cfi_asm.
15935 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15937         PR rtl-optimization/85342
15938         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15939         a bool scalar var inside of the loop instead.  Don't try to update
15940         recog_data.operand after failed apply_change_group.
15942 2018-04-12  Tom de Vries  <tom@codesourcery.com>
15944         PR target/85296
15945         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15946         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
15947         array with flexible array member as array without given dimension.
15948         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15949         argument for undefined param to true.
15951 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
15953         PR target/85321
15954         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15955         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15956         from PowerPC section.
15957         * config/rs6000/sysv4.opt (mcall-): Improve help text.
15958         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15959         help text that is too long.
15960         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15961         help text that is too long.
15962         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15963         help text that is too long.
15965 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
15967         * config/alpha/alpha.md (stack_probe_internal): Rename
15968         from "probe_stack".  Update all callers.
15970 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15972         PR rtl-optimization/84566
15973         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15974         sched_macro_fuse_insns.
15976 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15978         PR target/84301
15979         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15980         (compute_block_dependences): ... from here.
15982 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15984         PR tree-optimization/85331
15985         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15986         from int to HOST_WIDE_INT.
15988 2018-04-11  Martin Jambor  <mjambor@suse.cz>
15990         PR ipa/84149
15991         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15992         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15993         not the same as the source val.
15994         (cgraph_edge_brings_value_p): New parameter.
15995         (gather_edges_for_value): Pass destination value to
15996         cgraph_edge_brings_value_p.
15997         (perhaps_add_new_callers): Likewise.
15998         (get_info_about_necessary_edges): Likewise and exclude values brought
15999         only by self-recursive edges.
16000         (create_specialized_node): Redirect only clones of self-calling edges.
16001         (+self_recursive_pass_through_p): New function.
16002         (find_more_scalar_values_for_callers_subset): Use it.
16003         (find_aggregate_values_for_callers_subset): Likewise.
16004         (known_aggs_to_agg_replacement_list): Removed.
16005         (decide_whether_version_node): Re-calculate known constants for all
16006         remaining context clones.
16008 2018-04-11  Richard Biener  <rguenther@suse.de>
16010         PR lto/85339
16011         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
16012         from early DWARF output.
16013         (dwarf2out_early_finish): Output line info unconditionally into
16014         early DWARF and add reference to it.
16016 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16018         PR target/85281
16019         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
16020         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
16021         other than V2DFmode using iptr mode attribute.
16022         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
16024 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16026         PR rtl-optimization/84659
16027         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
16029 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16031         PR debug/85302
16032         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
16033         SIZEP is NULL.
16034         (output_loc_list): Pass address of a dummy size variable even in the
16035         locview handling loop.
16036         (index_location_lists): Add comment on why skip_loc_list_entry can't
16037         call size_of_locs.
16039 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16041         PR target/85261
16042         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
16043         into register.
16045 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
16047         PR target/85321
16048         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16049         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
16050         and -mstring-compare-inline-limit.
16052 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16054         PR target/85287
16055         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
16056         for stack clash protection in a register whenever we need it to be in
16057         a register.
16059 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16061         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
16062         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
16064 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16066         PR target/85321
16067         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
16068         the help text.
16069         (mlong-double-): Ditto.
16070         * config/rs6000/sysv4.opt (msdata=): Ditto.
16071         (mtls-size=): Ditto.
16073 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16075         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16076         erroneous entries for
16077         "vector int vec_ldl (int, long int *)", and
16078         "vector unsigned int vec_ldl (int, unsigned long int *)".
16079         Add comments and entries for
16080         "vector bool char vec_ldl (int, bool char *)",
16081         "vector bool short vec_ldl (int, bool short *)",
16082         "vector bool int vec_ldl (int, bool int *)",
16083         "vector bool long long vec_ldl (int, bool long long *)",
16084         "vector pixel vec_ldl (int, pixel *)",
16085         "vector long long vec_ldl (int, long long *)",
16086         "vector unsigned long long vec_ldl (int, unsigned long long *)".
16087         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
16088         type tree bool_long_long_type_node and correct definition of
16089         bool_V2DI_type_node to make reference to this new type tree.
16090         (rs6000_mangle_type): Replace erroneous reference to
16091         bool_long_type_node with bool_long_long_type_node.
16092         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
16093         comments to emphasize sign distinctions for char and int types and
16094         replace RS6000_BTI_bool_long constant with
16095         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
16096         use of RS6000_BTI_pixel.
16097         (bool_long_type_node): Remove this macro definition.
16098         (bool_long_long_type_node): New macro definition
16100 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
16102         PR rtl-optimization/85300
16103         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
16104         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
16105         simplify_unary_operation fails.
16107 2018-04-10  Martin Liska  <mliska@suse.cz>
16109         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
16110         cgraph_edge and ipa_ref.
16112 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
16114         PR target/85177
16115         PR target/85255
16116         * config/i386/sse.md
16117         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
16118         computation of the VEC_MERGE selector from mask.
16119         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
16120         Fix decoding of the VEC_MERGE selector into mask.
16122 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
16124         PR tree-optimization/85286
16125         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
16127 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
16129         * final.c (final_1): Set insn_last_address as well as
16130         insn_current_address.
16132 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16134         PR target/85173
16135         * explow.c (emit_stack_probe): Call validize_mem on memory location
16136         before passing it to gen_probe_stack.  Create address operand and
16137         legitimize it for the probe_stack_address case.
16139 2018-04-09  Jan Hubicka  <jh@suse.cz>
16141         PR lto/85078
16142         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
16143         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
16144         * tree.c (free_lang_data_in_type): Fix handling of binfos;
16145         walk basetypes.
16146         (free_lang_data): Rebuild type inheritance graph.
16148 2018-04-09  Martin Sebor  <msebor@redhat.com>
16150         * invoke.texi (-finline-small-functions): Mention other optimization
16151         options.
16152         (-findirect-inlining, -fpartial-inlining): Same.
16153         (-finline-functions-called-once): Same.
16154         (-freorder-blocks-and-partition): Same.
16156 2018-04-09  Jan Hubicka  <jh@suse.cz>
16158         PR rtl/84058
16159         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
16160         jumps; choose last target that matches the criteria (i.e.
16161         no partition changes for non-crossing jumps).
16162         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
16163         support for redirecting crossing jumps to non-crossing.
16165 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
16167         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
16168         also for naked functions.
16170 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
16172         * config/arc/arc.md (add_shift): New pattern.
16173         (add_shift2): Likewise.
16174         (sub_shift): Likewise.
16175         (sub_shift_cmp0_noout): Likewise.
16176         (compare_si_ashiftsi): Likewise.
16177         (xbfu_cmp0_noout): New combine pattern.
16178         (xbfu_cmp0"): Likewise.
16179         (movsi_set_cc_insn): Place the predicable variant first.
16180         (commutative_binary_cmp0_noout): Remove clobber.
16181         (commutative_binary_cmp0): New pattern.
16182         (noncommutative_binary_cmp0): Likewise.
16183         (noncommutative_binary_cmp0_noout): Likewise.
16184         (noncommutative_binary_comparison_result_used): Removed.
16185         (rsub_cmp0): New pattern.
16186         (rsub_cmp0_noout): Likewise.
16187         (extzvsi): Changed, keep only meaningful variants.
16188         (SQH, SEZ): New iterators.
16189         (SQH_postfix): New mode attribute.
16190         (SEZ_prefix): New code attribute.
16191         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
16192         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
16193         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
16194         of numerical value.
16195         (noncommutative_operator): Check the availability of barrel
16196         shifter option.
16198 2018-04-09  Richard Biener  <rguenther@suse.de>
16200         PR tree-optimization/85284
16201         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
16202         Only use the niter constraining form of simple_iv when the exit
16203         is always executed.
16205 2018-04-09  Tom de Vries  <tom@codesourcery.com>
16207         PR target/84041
16208         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16209         (define_expand "*memory_barrier"): New define_expand.
16210         (define_insn "memory_barrier"): New insn.
16212 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16214         PR rtl-optimization/80463
16215         PR rtl-optimization/83972
16216         PR rtl-optimization/83480
16218         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
16219         correct producer for the insn.
16220         (tidy_control_flow): Fixup seqnos in case of debug insns.
16222 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16224         PR rtl-optimization/83913
16226         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
16227         different sched-times when merging exprs.
16229 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16231         PR rtl-optimization/83962
16233         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
16234         tidy_fallthru_edge and tidy_control_flow.
16236 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16238         PR rtl-optimization/83530
16240         * sel-sched.c (force_next_insn): New global variable.
16241         (remove_insn_for_debug): When force_next_insn is true, also leave only
16242         next insn in the ready list.
16243         (sel_sched_region): When the region wasn't scheduled, make another pass
16244         over it with force_next_insn set to 1.
16246 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
16248         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
16249         into tm_file.
16250         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16251         for interrupt control.
16252         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16253         functions for interrupt control.
16254         * config/nds32/nds32-intrinsic.md: Likewise.
16255         * config/nds32/nds32_intrinsic.h: Likewise.
16256         * config/nds32/nds32.h (nds32_builtins): Likewise.
16258 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
16260         * config/nds32/nds32.c (nds32_init_machine_status,
16261         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
16262         strict_aligned_p field.
16263         (nds32_expand_to_rtl_hook): New function.
16264         (TARGET_EXPAND_TO_RTL_HOOK): Define.
16265         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
16267 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16268             Chung-Ju Wu  <jasonwucj@gmail.com>
16270         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
16271         * config/nds32/nds32-n7.md: New file.
16272         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
16273         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
16274         pipeline.
16275         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
16276         * config/nds32/nds32.md (pipeline_model): Add n7.
16277         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
16278         * config/nds32/pipelines.md: Include n7 settings.
16280 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16281             Chung-Ju Wu  <jasonwucj@gmail.com>
16283         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
16284         * config/nds32/nds32-e8.md: New file.
16285         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
16286         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
16287         pipeline.
16288         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
16289         * config/nds32/nds32.md (pipeline_model): Add e8.
16290         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
16291         * config/nds32/pipelines.md: Include e8 settings.
16293 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16294             Chung-Ju Wu  <jasonwucj@gmail.com>
16296         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
16297         * config/nds32/nds32-n8.md: New file.
16298         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
16299         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
16300         pipeline.
16301         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
16302         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
16303         * config/nds32/nds32.md (pipeline_model): Add n8.
16304         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
16305         * config/nds32/pipelines.md: Include n8 settings.
16307 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16308             Chung-Ju Wu  <jasonwucj@gmail.com>
16310         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
16311         * config/nds32/nds32-n9-2r1w.md: New file.
16312         * config/nds32/nds32-n9-3r2w.md: New file.
16313         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
16314         nds32_register_ports): New or modify for cpu n9.
16315         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
16316         pipeline.
16317         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
16318         * config/nds32/nds32-utils.c: New file.
16319         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
16320         TARGET_MUL_SLOW): Define.
16321         * config/nds32/nds32.md (pipeline_model): New attribute.
16322         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
16323         New options that support cpu n9.
16324         * config/nds32/pipelines.md: Include n9 settings.
16325         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
16327 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
16329         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
16330         information if necessary.
16331         (output_cond_branch_compare_zero): Likewise.
16332         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
16333         (nds32_target_alignment): Refine for alignment.
16334         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
16335         (FUNCTION_BOUNDARY): Modify.
16336         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
16337         align case.
16338         * config/nds32/nds32.opt (malways-align, malign-functions): New.
16340 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
16342         * config/nds32/constants.md (unspec_volatile_element): Add values for
16343         TLB operation and data prefetch.
16344         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16345         functions for TLB operation and data prefetch.
16346         * config/nds32/nds32-intrinsic.md: Likewise.
16347         * config/nds32/nds32_intrinsic.h: Likewise.
16348         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
16349         (nds32_print_operand): Likewise.
16350         * config/nds32/nds32.h (nds32_builtins): Likewise.
16352 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
16353         Andrew Pinski <pinsika@gcc.gnu.org>
16355         PR middle-end/82976
16356         * match.pd: Use constant_boolean_node of correct type instead of
16357         boolean_true_node or boolean_false_node for simplifying
16358         pointer comparisons to zero.
16360 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
16362         PR tree-optimization/80021
16363         * tree.c (verify_type_variant): Make error call in verify_variant_match
16364         translatable and remove final full stop.
16366 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16368         * config/nds32/constants.md (unspec_volatile_element): Add
16369         UNSPEC_VOLATILE_EH_RETURN.
16370         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
16371         nds32_output_stack_pop): Support dwarf exception handling process.
16372         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
16373         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
16374         exception handling process.
16375         (nds32_compute_stack_frame): Likewise.
16376         (nds32_return_addr_rtx): Likewise.
16377         (nds32_initial_elimination_offset): Likewise.
16378         (nds32_expand_prologue): Likewise.
16379         (nds32_expand_epilogue): Likewise.
16380         (nds32_dynamic_chain_address): New function.
16381         * config/nds32/nds32.h (machine_function): Add fields for dwarf
16382         exception handling.
16383         (DYNAMIC_CHAIN_ADDRESS): Define.
16384         (EH_RETURN_DATA_REGNO): Define.
16385         (EH_RETURN_STACKADJ_RTX): Define.
16386         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
16387         patterns for dwarf exception handling.
16389 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16391         * config/nds32/nds32.h: Clean up obsolete macros.
16393 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16395         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16396         Add enum values for particular instructions.
16397         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16398         particular intrinsic functions.
16399         * config/nds32/nds32-intrinsic.md: Likewise.
16400         * config/nds32/nds32_intrinsic.h: Likewise.
16401         * config/nds32/nds32.h (nds32_builtins): Likewise.
16402         * config/nds32/nds32.md (type): Add pbsad and pbsada.
16403         (btst, ave): New patterns for particular instructions.
16405 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16407         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16408         Add enum values for atomic load/store and memory sync.
16409         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
16410         and memory sync.
16411         * config/nds32/nds32-intrinsic.md: Likewise.
16412         * config/nds32/nds32_intrinsic.h: Likewise.
16413         * config/nds32/nds32.h (nds32_builtins): Likewise.
16415 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
16417         PR tree-optimization/85257
16418         * fold-const.c (native_encode_vector): If not all elts could fit
16419         and off is -1, return 0 rather than offset.
16420         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
16421         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
16422         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
16423         adjust buffer in native_interpret_expr call.
16425 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16427         * config/nds32/constants.md (unspec_volatile_element): Add cache
16428         control enum values.
16429         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
16430         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
16431         * config/nds32/nds32.c (nds32_cctl_names): New.
16432         (nds32_print_operand): Handle cache control register names.
16433         * config/nds32/nds32.h (nds32_builtins): New enum values.
16434         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16435         macros.
16436         * config/nds32/nds32.md (type): Add mmu.
16437         * config/nds32/pipelines.md (simple_insn): Add mmu.
16439 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16441         * config/nds32/nds32.md (type): Remove call.
16442         * config/nds32/pipelines.md (simple_insn): Likewise.
16444 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16446         * config/nds32/constants.md (unspec_volatile_element): Add
16447         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16448         UNSPEC_VOLATILE_FMFCFG.
16449         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16450         description for fmfcfg and fmfcsr.
16451         (bdesc_1arg): Add fmtcsr.
16452         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16453         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16454         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16455         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16456         unspec_fmfcfg): New patterns.
16457         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16458         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16459         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16460         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16461         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16462         __nds32__fmfcfg): Define.
16464 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16466         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16467         intrinsic register names.
16468         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16469         intrinsic register enum values and macros.
16471 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16473         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16474         for load/store addressing form.
16475         (nds32_print_operand_address): Likewise.
16477 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
16479         PR target/85196
16480         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16481         based on LABEL_REF.  Remove useless assertion.
16482         (pic_address_needs_scratch): Fix formatting.
16483         (sparc_legitimize_pic_address): Minor tweaks.
16484         (sparc_delegitimize_address): Adjust assertion accordingly.
16485         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16486         into symbolic_operand.
16487         (movsi_high_pic_label_ref): Likewise.
16488         (movsi_lo_sum_pic_label_ref): Likewise.
16489         (movdi_pic_label_ref): Likewise.
16490         (movdi_high_pic_label_ref): Likewise.
16491         (movdi_lo_sum_pic_label_ref): Likewise.
16493 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
16495         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16496         custom LIB_SPEC setup.
16498 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
16499             Kito Cheng  <kito.cheng@gmail.com>
16501         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16502         * config/riscv/freebsd.h: New.
16504 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
16506         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16507         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16508         file.
16510 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
16511             Kito Cheng  <kito.cheng@gmail.com>
16513         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16514         nds32_output_call, nds32_symbol_binds_local_p): New functions.
16515         * config/nds32/nds32-protos.h (nds32_output_call,
16516         nds32_output_return): Declare.
16517         * config/nds32/nds32.md: Refine all the call and return patterns.
16519 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
16521         PR debug/85252
16522         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16523         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16525         PR rtl-optimization/84872
16526         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16527         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16528         EDGE_CROSSING edge.
16530 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
16532         * expr.c (copy_blkmode_to_reg): Revert 254862.
16533         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16535 2018-04-06  Richard Biener  <rguenther@suse.de>
16537         PR middle-end/85244
16538         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16539         after seeing a component reference with an adjacent field.  Treat
16540         refs to arrays at struct end of external decls similar to
16541         refs to unconstrained commons.
16543 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
16545         PR sanitizer/85213
16546         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16547         look through SAVE_EXPRs with non-side-effects argument.  Adjust
16548         recursive calls.
16549         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16550         save_p here.
16552 2018-04-06  Richard Biener  <rguenther@suse.de>
16554         PR middle-end/85180
16555         * alias.c (find_base_term): New wrapper around find_base_term
16556         unwinding CSELIB_VAL_PTR changes.
16557         (find_base_term): Do not restore CSELIB_VAL_PTR during the
16558         recursion.
16560 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16562         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16563         instructions.
16564         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16565         constant definitions.
16566         ("nop"): lr 0,0 -> nopr r0
16567         ("nop_lr0", "nop_lr1"): New insn definitions.
16569 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
16571         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16572         NDS32_V3PUSH_AVAILABLE_P macro.
16574 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
16575             Chung-Ju Wu  <jasonwucj@gmail.com>
16577         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16578         (nds32*-*-*): Add float and fpu_config into supported_defaults.
16579         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16580         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16581         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16582         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16583         * config/nds32/constraints.md: New constraints and checking for hard
16584         float configuration.
16585         * config/nds32/iterators.md: New mode iterator and attribute for hard
16586         float configuration.
16587         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16588         patterns.
16589         * config/nds32/nds32-fpu.md: New file.
16590         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16591         deal with hard float code generation.
16592         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16593         ARCH_V3S.
16594         (abi_type, float_reg_number): New enum type.
16595         * config/nds32/nds32-predicates.c: New predicates for hard float.
16596         * config/nds32/nds32-protos.h: Declare functions for hard float.
16597         * config/nds32/nds32.c: Implementation for hard float configuration.
16598         * config/nds32/nds32.h: Definitions for hard float configuration.
16599         * config/nds32/nds32.md: Include hard float machine description and
16600         modify patterns for hard float configuration.
16601         * config/nds32/nds32.opt: New options for hard float configuration.
16602         * config/nds32/predicates.md: New predicates for hard float
16603         configuration.
16605 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
16607         * common/config/nds32/nds32-common.c
16608         (nds32_option_optimization_table): Enable -mreleax-hint by default.
16610 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
16612         PR middle-end/85195
16613         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16614         CONSTRUCTOR_ELT (ctor, ...)->value.
16616 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
16618         PR target/85193
16619         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16621 2018-04-05  Tom de Vries  <tom@codesourcery.com>
16623         PR target/85204
16624         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16625         cond jump.
16627 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
16628             Kito Cheng  <kito.cheng@gmail.com>
16630         * config/nds32/constraints.md (U33): Fine-tune checking condition.
16631         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16632         * config/nds32/nds32.h (nds32_16bit_address_type): Add
16633         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16635 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
16636             Kito Cheng  <kito.cheng@gmail.com>
16638         * config/nds32/constraints.md (Ufe): New memory constraint.
16639         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16640         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16641         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16642         operands.
16643         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16644         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16646 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16648         * config/nds32/nds32.md: Use optimize_size in the condition for
16649         alu-shift instructions.
16651 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16653         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16655 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16657         * config/nds32/nds32.md (negsi2): Refine pattern.
16659 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
16660             Chung-Ju Wu  <jasonwucj@gmail.com>
16662         * config/nds32/iterators.md (shift_rotate): New code iterator.
16663         (shift): New code attribute.
16664         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16665         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16666         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16667         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16668         bit-wise operations.
16669         (andsi3, *andsi3): Ditto.
16670         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16671         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16672         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16673         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16674         nds32_ior_operand, nds32_xor_operand): New predicates.
16676 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16678         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16679         (addsi3, subsi3): ... this.
16681 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16683         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16685 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16687         * config/nds32/nds32.md: Adjust indention.
16689 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
16691         * config/nds32/nds32.md (feature): New attribute.
16693 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16695         * config/nds32/nds32.md (subtype): New attribute.
16697 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16699         PR target/85203
16700         * config/arm/arm-builtins.c (arm_expand_builtin): Change
16701         expansion to perform a bitwise AND of the argument followed by a
16702         boolean negation of the result.
16704 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
16706         PR rtl-optimization/84878
16707         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16708         the basic block.  Assert the use reference is not artificial and that
16709         it has an associated insn.
16711 2018-04-04  Michael Matz  <matz@suse.de>
16713         * builtins.c (compute_objsize): Pass correct operand
16714         to array_at_struct_end_p.
16716 2018-04-04  Richard Biener  <rguenther@suse.de>
16718         PR lto/85176
16719         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16720         from contexts for DINFO_LEVEL_TERSE and below.
16722 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
16724         * config/nds32/nds32-doubleword.md (move_<mode>): Require
16725         resiter_operand condition.
16726         * config/nds32/nds32.md (*move<mode>): Ditto.
16728 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
16729             Monk Chiang  <sh.chiang04@gmail.com>
16731         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16733 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16735         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16737 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16738             Kito Cheng  <kito.cheng@gmail.com>
16740         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16741         nds32_cond_code_str, output_cond_branch,
16742         output_cond_branch_compare_zero, nds32_expand_cbranch,
16743         nds32_expand_cstore, nds32_expand_movcc,
16744         nds32_output_cbranchsi4_equality_zero,
16745         nds32_output_cbranchsi4_equality_reg,
16746         nds32_output_cbranchsi4_equality_reg_or_const_int,
16747         nds32_output_cbranchsi4_greater_less_zero: New functions.
16748         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16749         nds32_expand_cstore, nds32_expand_movcc,
16750         nds32_output_cbranchsi4_equality_zero,
16751         nds32_output_cbranchsi4_equality_reg,
16752         nds32_output_cbranchsi4_equality_reg_or_const_int,
16753         nds32_output_cbranchsi4_greater_less_zero): Declare.
16754         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16755         nds32_rimm11s_operand): New predicates.
16756         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16757         * config/nds32/nds32.md: Rewrite all the branch and conditional move
16758         patterns.
16760 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
16762         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16763         * config/nds32/nds32.md: Ditto.
16764         * config/nds32/pipelines.md: Ditto.
16766 2018-04-04  Richard Biener  <rguenther@suse.de>
16768         PR tree-optimization/85168
16769         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16770         propagating abnormals.
16772 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16774         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16776 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16777             Kito Cheng  <kito.cheng@gmail.com>
16779         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16780         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16781         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16782         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16783         * config/nds32/nds32.md (sibcall_internal): New.
16784         (sibcall_register): Remove.
16785         (sibcall_immediate): Remove.
16786         (sibcall_value_internal): New.
16787         (sibcall_value_register): Remove.
16788         (sibcall_value_immediate): Remove.
16789         * config/nds32/predicates.md (nds32_general_register_operand): New.
16790         (nds32_call_address_operand): New.
16792 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
16794         PR rtl-optimization/85167
16795         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16796         bb_defs if *split_p, instead preinitialize it to NULL.
16798         PR tree-optimization/85156
16799         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16800         evaluating the argument multiple times.
16802 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
16804         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16805         than vector.
16806         (_mm_cvtpd_ps): Likewise.
16807         (_mm_cvttpd_epi32): Likewise.
16808         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16809         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16810         vector, pixel, and bool following altivec.h include.
16812 2018-04-03  Martin Sebor  <msebor@redhat.com>
16814         * doc/extend.texi (Common Function Attributes): Clarify.
16815         (const attribute): Likewise.
16816         (pure attribute): Likewise.
16818 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
16820         PR target/85169
16821         * config/i386/i386.c (ix86_expand_vector_set): Use
16822         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
16824 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
16826         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16827         instructions when changing rounding bits to preserve precision bits
16828         in the x87 control word.
16830 2018-04-03  Martin Liska  <mliska@suse.cz>
16832         PR tree-optimization/82491
16833         * rtl.h (strip_offset_and_add): Replace += suboffset with
16834         poly_uint64 () + suboffset.
16836 2018-03-29  Martin Liska  <mliska@suse.cz>
16837             Martin Jambor  <mjambor@suse.cz>
16839         PR ipa/84947
16840         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16841         param_type is not an integral or pointer type.
16843 2018-04-03  Richard Biener  <rguenther@suse.de>
16845         * sese.h (recompute_all_dominators): Remove.
16847 2018-04-02  Martin Sebor  <msebor@redhat.com>
16849         * doc/invoke.texi (-Wrestrict): Fix typos.
16851 2018-04-02  Jim Wilson  <jimw@sifive.com>
16853         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16854         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16855         (<optab>di3, <optab>si3_extend): Likewise.
16856         (<optab>si3_mask, <optab>si3_mask_1): New.
16857         (<optab>di3_mask, <optab>di3_mask_1): New.
16858         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16859         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16860         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16862 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
16864         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16865         example.
16867 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16869         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16870         (nds32_canonicalize_comparison): New function.
16872 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16873             Kito Cheng  <kito.cheng@gmail.com>
16874             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
16876         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16877         * config/nds32/constants.md (unspec_volatile_element): Add
16878         UNSPEC_VOLATILE_RELAX_GROUP.
16879         * config/nds32/nds32-relax-opt.c: New file.
16880         * config/nds32/nds32-predicates.c
16881         (nds32_symbol_load_store_p): New function.
16882         * config/nds32/nds32-protos.h
16883         (nds32_symbol_load_store_p): Declare function.
16884         (make_pass_nds32_relax_opt): Declare new rtl pass function.
16885         * config/nds32/nds32.c
16886         (nds32_register_pass): New function to register pass.
16887         (nds32_register_passes): New function to register passes.
16888         * config/nds32/nds32.md (relax_group): New pattern.
16889         * config/nds32/nds32.opt (mrelax-hint): New option.
16890         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16892 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
16894         * config/nds32/t-nds32: Modify files dependency.
16896 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16898         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16899         (PROFILE_HOOK): Define its implementation.
16901 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16903         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16904         type and 32-bit size.
16906 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
16908         PR middle-end/85090
16909         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16910         (V_128_256): New mode iterator.
16911         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16912         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16913         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16914         of V.
16915         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16916         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16918 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
16920         PR target/83315
16921         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16922         NaN inputs correctly.
16924 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
16926         PR target/80546
16927         * config/rs6000/vsx.md (??r): New mode attribute.
16928         (*vsx_mov<mode>_64bit): Use it.
16929         (*vsx_mov<mode>_32bit): Likewise.
16931 2018-03-30  Martin Sebor  <msebor@redhat.com>
16933         PR tree-optimization/84818
16934         * builtins.c (check_access): Use warning_n.
16936 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16938         PR target/83822
16939         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16940         condition.
16941         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16942         condition.
16944 2018-03-30  Julia Koval  <julia.koval@intel.com>
16946         PR target/84413
16947         * x86-tune.def (movx, partial_reg_dependency): Enable for
16948         m_SKYLAKE_AVX512.
16950 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
16952         PR inline-asm/84985
16953         * lra-constraints.c (process_alt_operands): Move setting
16954         this_alternative_matches below.
16956 2018-03-29  Martin Liska  <mliska@suse.cz>
16958         PR lto/84995.
16959         * doc/invoke.texi: Document how LTO works with debug info.
16960         Describe auto-load support of binutils.  Mention 'x86-64'
16961         as valid option value of -march option.
16963 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
16965         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16967         PR c/85094
16968         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16969         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16970         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16971         checking.
16973 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
16975         PR target/84912
16976         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16977         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16978         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16979         for RS6000_BTM_POWERPC64.
16980         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16981         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16982         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16983         definition.
16984         (DIVDE): Use it.
16985         (DIVDEU): Likewise.
16987 2018-03-28  Carl Love  <cel@us.ibm.com>
16989         Revert
16990         2017-09-27  Carl Love  <cel@us.ibm.com>
16992         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16993         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16994         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16995         fctiw instruction.
16997 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16999         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
17000         instead of __vector bool.
17001         (_mm_max_pu8): Likewise.
17002         (_mm_min_pi16): Likewise.
17004 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
17006         PR target/84912
17007         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
17008         (DIVWEUO): Likewise.
17009         (DIVDEO): Likewise.
17010         (DIVDEUO): Likewise.
17011         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
17012         DIVWEUO and DIVDEUO.
17013         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
17014         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
17015         (div_extend): Likewise.
17016         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
17017         builtin function.
17018         (__builtin_divweuo): Likewise.
17019         (__builtin_divdeo): Likewise.
17020         (__builtin_divdeuo): Likewise.
17022 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
17024         PR target/85095
17025         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
17026         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
17028         PR tree-optimization/82004
17029         * gimple-match-head.c (optimize_pow_to_exp): New function.
17030         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
17031         Don't fold to exp if optimize_pow_to_exp is false.
17033 2018-03-28  Martin Liska  <mliska@suse.cz>
17035         PR other/84819
17036         * calls.c (initialize_argument_information): Fix trailing space.
17037         * common.opt: Fix typo and provide better explanation for
17038         -fsanitize-coverage option.
17039         * config/i386/i386.opt: Fix typo.
17041 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
17042             Martin Liska  <mliska@suse.cz>
17044         PR sanitizer/85081
17045         * gimplify.c (asan_poison_variable): Don't do the check for
17046         gimplify_omp_ctxp here.
17047         (gimplify_decl_expr): Do it here.
17048         (gimplify_target_expr): Likewise.
17050 2018-03-28  Martin Liska  <mliska@suse.cz>
17052         PR target/84988
17053         * config/i386/i386.c (ix86_function_arg_advance): Do not call
17054         chkp_type_bounds_count if MPX is not enabled.
17056 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17058         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
17060 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
17062         PR target/84914
17063         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
17064         function to create the function decl for complex long double
17065         multiply and divide for -mabi=ieeelongdouble.
17066         (init_float128_ieee): Call it.
17068 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
17070         PR target/85044
17071         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
17072         -fcf-protection=branch -mibt.
17073         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
17075 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17077         PR target/81863
17078         * config/arm/arm.c (arm_valid_symbolic_address): Handle
17079         arm_word_relocations.
17081 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
17083         PR target/85056
17084         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
17085         extern array declarations.
17087 2018-03-27  Richard Biener  <rguenther@suse.de>
17089         PR middle-end/84067
17090         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
17091         explicit single_use checks.
17093 2018-03-27  Richard Biener  <rguenther@suse.de>
17095         PR tree-optimization/85082
17096         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
17097         Valueize the VUSE.
17099 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17101         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
17102         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
17103         Turn on fasynchronous-unwind-tables and funwind-tables.
17105 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
17107         PR target/85073
17108         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
17109         (*bmi_blsr_<mode>_ccz): Ditto.
17111 2018-03-26  Tom de Vries  <tom@codesourcery.com>
17113         PR tree-optimization/85063
17114         * omp-general.c (offloading_function_p): New function.  Factor out
17115         of ...
17116         * omp-offload.c (pass_omp_target_link::gate): ... here.
17117         * omp-general.h (offloading_function_p): Declare.
17118         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
17119         with attribute omp declare target for offloading functions.
17121 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
17123         PR tree-optimization/84005
17124         * tree-data-ref.h (get_base_for_alignment): Declare.
17125         * tree-data-ref.c (get_base_for_alignment_1): New function.
17126         (get_base_for_alignment): Likewise.
17127         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
17128         get_base_for_alignment to find a suitable base object, instead
17129         of always using drb->base_address.
17131 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
17133         PR inline-asm/85022
17134         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
17135         known size by default.
17137 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
17139         PR inline-asm/85030
17140         * lra-constraints.c (process_alt_operands): Don't match BLKmode
17141         and non BLKmode operands.
17143 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17145         PR target/85026
17146         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
17147         Clean up attributes.
17149 2018-03-23  Richard Biener  <rguenther@suse.de>
17151         PR debug/85020
17152         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
17153         we are going to emit early debug for LTO.
17155 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
17157         PR inline-asm/85034
17158         * function.c (match_asm_constraints_1): Don't optimize if input
17159         doesn't satisfy general_operand predicate for output's mode.
17161         PR inline-asm/85022
17162         * alias.c (write_dependence_p): Don't require for x_canonicalized
17163         non-VOIDmode if x has VOIDmode.
17165         PR sanitizer/85029
17166         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
17167         just don't try to optimize it rather than assert it never happens.
17169 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17171         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
17172         macro expansions for definition of ST_INTERNAL_<mode> and
17173         LD_INTERNAL_<mode> builtins.
17174         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
17175         Remove prototype.
17176         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
17177         function.
17178         (altivec_expand_st_builtin): Likewise.
17179         (altivec_expand_builtin): Remove calls to deleted functions.
17180         (rs6000_address_for_altivec): Delete this function.
17181         * config/rs6000/vector.md: Remove expands for
17182         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
17184 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
17186         PR target/84826
17187         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
17188         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
17189         re-computing once computed.
17190         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
17191         (arm_init_machine_status): Initialize
17192         machine->static_chain_stack_bytes.
17194 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17196         PR target/84760
17197         * doc/extend.texi: Add four new prototypes for vec_ld.
17198         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
17199         definitions for more logical presentation.
17200         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
17201         entries for V1TI variants of __builtin_altivec_ld builtin.
17202         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
17203         handling of V1TI variant of LVX icode pattern.
17204         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
17205         (rs6000_gimple_fold_builtin): Likewise.
17206         (altivec_init_builtins): Add code to define
17207         __builtin_altivec_lvx_v1ti function.
17209 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
17211         PR inline-asm/84941
17212         * function.c (match_asm_constraints_1): Don't do the optimization
17213         if input isn't a REG, SUBREG, MEM or constant.
17215 2018-03-22  Tom de Vries  <tom@codesourcery.com>
17217         PR tree-optimization/84956
17218         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
17219         bb_has_abnormal_pred.
17221 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
17223         PR sanitizer/85018
17224         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
17225         DECL_INITIAL (decl) to decl at the end.
17226         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
17227         adjust the comment.
17229 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
17231         * doc/extend.texi (__builtin_tgmath): Document when complex
17232         integer types are treated as _Complex _Float64.
17234 2018-03-21  Tom de Vries  <tom@codesourcery.com>
17236         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
17238 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
17240         PR tree-optimization/84960
17241         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
17242         if it is ENTRY block, move them into single succ of ENTRY in that case.
17244 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
17246         PR tree-optimization/84811
17247         * poly-int.h (poly_span_traits): Remove the T3 parameter and
17248         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
17249         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
17250         (known_subrange_p): Update accordingly.  Cast each value involved
17251         in the size comparison, rather than casting the result of the
17252         subtraction.
17254 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
17256         PR tree-optimization/84982
17257         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
17258         by flipping the least significant bit rather than all bits from
17259         bitpos to bitpos + bitsize - 1.
17261 2018-03-21  Nathan Sidwell  <nathan@acm.org>
17263         * doc/extend.texi (Deprecated Features): Remove mention of
17264         long-deleted deprecations.
17266 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17268         PR jit/84288
17269         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
17270         * configure: Regenerate.
17272 2018-03-21  Tom de Vries  <tom@codesourcery.com>
17274         PR tree-optimization/83126
17275         * tree-parloops.c (num_phis): New function.
17276         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
17278 2018-03-21  Nathan Sidwell  <nathan@acm.org>
17280         * doc/extend.texi (Deprecated Features): Update deprecated flags,
17281         mention anon-struct/union members and trailing attributes.
17283 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
17285         PR tree-optimization/84969
17286         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
17287         builtin memset partitions if they set different rhs values.
17289 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
17291         PR rtl-optimization/84989
17292         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
17293         VEC_DUPLICATE with scalar result mode.
17295 2018-03-21  Martin Liska  <mliska@suse.cz>
17297         PR ipa/84963
17298         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
17299         not intended return statement.
17301 2018-03-21  Martin Liska  <mliska@suse.cz>
17303         PR target/84988
17304         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
17305         (chkp_find_bound_slots_1): Limit number of iterations.
17307 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
17309         PR target/84838
17310         * Minor grammar fixes for x86 options.
17312 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
17314         PR debug/84875
17315         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
17316         holding REG_CFA_RESTORE notes, instead turn them into a USE.
17318 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
17320         PR target/83789
17321         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
17322         (altivec_lvx_<mode>_1op): Likewise.
17323         (altivec_stvx_<mode>_2op): Likewise.
17324         (altivec_stvx_<mode>_1op): Likewise.
17325         (altivec_lvx_<VM2:mode>): New define_expand.
17326         (altivec_stvx_<VM2:mode>): Likewise.
17327         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
17328         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17329         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
17330         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17331         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
17332         (rs6000_gen_lvx): Likewise.
17333         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
17334         (altivec_expand_stv_builtin): Likewise.
17335         (altivec_expand_builtin): Likewise.
17336         * config/rs6000/vector.md: Likewise.
17338 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17340         PR target/82518
17341         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
17342         BYTES_BIG_ENDIAN.
17344 2018-03-20  Richard Biener  <rguenther@suse.de>
17346         PR target/84986
17347         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
17348         sign-conversions as zero, fall back to standard scalar_stmt
17349         cost for the rest.
17351 2018-03-20  Martin Liska  <mliska@suse.cz>
17353         PR ipa/84825
17354         * predict.c (rebuild_frequencies): Handle case when we have
17355         PROFILE_ABSENT, but flag_guess_branch_prob is false.
17357 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
17359         PR target/84990
17360         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
17361         flag_section_anchors.
17362         * varasm.c (use_blocks_for_decl_p): Remove hack for
17363         dw2_force_const_mem.
17365         PR target/84845
17366         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
17367         to ...
17368         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
17369         be created, use lowpart_subreg of operands[0] rather than operands[0]
17370         itself.
17371         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
17372         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
17373         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
17374         and n constraint instead of aarch64_shift_imm_di and Usd.
17375         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
17376         (*aarch64_<optab>_reg_minus<mode>3): ... this.
17378 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
17380         PR target/82989
17381         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
17382         to favor GPR over NEON registers.
17383         (<shift>di3_neon): Likewise.
17385 2018-03-20  Tom de Vries  <tom@codesourcery.com>
17387         PR target/84952
17388         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
17389         (nvptx_process_pars): Emit bar.sync asap and alap.
17391 2018-03-20  Tom de Vries  <tom@codesourcery.com>
17393         PR target/84954
17394         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
17395         seen_label if seen_label is already set.
17397 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
17399         PR target/84945
17400         * config/i386/i386.c (fold_builtin_cpu): For features above 31
17401         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
17402         Use 1U instead of 1.  Formatting fixes.
17404         PR c/84953
17405         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
17406         instead of TREE_TYPE (s1) for the return value.
17408 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
17410         PR tree-optimization/84946
17411         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
17412         bitsize + bitsize in poly_uint64 rather than poly_int64.
17414         PR sanitizer/78651
17415         * dwarf2asm.c: Include fold-const.c.
17416         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
17417         of decl rather than decl itself.
17419         PR rtl-optimization/84643
17420         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
17422 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
17424         PR sanitizer/78651
17425         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
17426         calling assemble_variable.
17428 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
17430         PR target/81647
17431         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17432         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17434 2018-03-19  Jim Wilson  <jimw@sifive.com>
17436         PR bootstrap/84856
17437         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17438         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17439         (riscv_first_stack_step): Likewise.
17440         (riscv_option_override): Use STACK_BOUNDARY instead of
17441         MIN_STACK_BOUNDARY.
17442         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17443         MIN_STACK_BOUNDARY.
17444         (BIGGEST_ALIGNMENT): Set to 128.
17445         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17446         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17447         STACK_BOUNDARY.
17449 2018-03-19  Richard Biener  <rguenther@suse.de>
17451         PR tree-optimization/84933
17452         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17453         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17455 2018-03-19  Richard Biener  <rguenther@suse.de>
17457         PR tree-optimization/84859
17458         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17459         (cond_if_else_store_replacement): Perform sinking operation on
17460         single-store BBs regardless of MAX_STORES_TO_SINK setting.
17461         Generalize what a BB with a single eligible store is.
17463 2018-03-19  Richard Biener  <rguenther@suse.de>
17465         PR tree-optimization/84929
17466         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17467         chrec_is_positive against non-chrec arg.
17469 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
17471         PR target/84711
17472         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17474 2018-03-18  Martin Liska  <mliska@suse.cz>
17476         PR rtl-optimization/84635
17477         * regrename.c (build_def_use): Use matches_mode only when
17478         matches >= 0.
17480 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
17482         PR tree-optimization/84913
17483         * tree-vect-loop.c (vectorizable_reduction): Don't try to
17484         vectorize chains of COND_EXPRs.
17486 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
17488         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17490 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
17492         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17494 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
17496         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17498 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
17499             Kito Cheng  <kito.cheng@gmail.com>
17501         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17502         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17503         (nds32_adjust_reg_alloc_order): New function.
17504         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17506 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
17508         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17509         nds32_print_operand, nds32_print_operand_address): Use
17510         HOST_WIDE_INT_PRINT_DEC instead.
17512 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
17514         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17516 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
17518         PR target/84902
17519         * config/i386/i386.c (initial_ix86_tune_features,
17520         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17521         unsigned long long.
17522         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17523         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17524         rather than 1u << ix86_tune.  Formatting fix.
17525         (ix86_option_override_internal): Change ix86_arch_mask from
17526         unsigned int to unsigned HOST_WIDE_INT, initialize to
17527         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17528         (ix86_function_specific_restore): Likewise.
17530 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
17532         PR target/84899
17533         * postreload.c (reload_combine_recognize_pattern): Perform
17534         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17535         truncate_int_for_mode the result for the destination's mode.
17537         PR c/84909
17538         * hsa-gen.c (mem_type_for_type): Fix comment typo.
17539         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17540         Likewise.
17541         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17542         Likewise.
17544 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
17546         PR target/84876
17547         * lra-assigns.c (lra_split_hard_reg_for): Don't use
17548         regno_allocno_class_array and sorted_pseudos.
17549         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17550         insns where regno is used.
17552 2018-03-16  Martin Liska  <mliska@suse.cz>
17554         PR ipa/84833
17555         * multiple_target.c (create_dispatcher_calls): Redirect
17556         reference in the symbol table.
17558 2018-03-16  Martin Liska  <mliska@suse.cz>
17560         PR ipa/84722
17561         * multiple_target.c (create_dispatcher_calls): Redirect also
17562         an alias.
17564 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
17566         PR c++/79937
17567         PR c++/82410
17568         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17569         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17570         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17572 2018-03-16  Julia Koval  <julia.koval@intel.com>
17574         * doc/invoke.texi (Skylake Server): Add CLWB.
17575         Cannonlake): Remove CLWB.
17577 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
17579         PR tree-optimization/84841
17580         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17581         1 << 3.
17582         (FLOAT_ONE_CONST_TYPE): Define.
17583         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17584         (sort_by_operand_rank): Put entries with higher constant_type last
17585         rather than first to match comments.
17587 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
17589         * config/nios2/nios2.md (movsi_internal): Fix thinko in
17590         split predicate.
17592 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
17594         PR c++/79085
17595         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17596         check and use address of target always.
17598 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
17600         PR target/84574
17601         * config/i386/i386.c (indirect_thunk_needed): Update comments.
17602         (indirect_thunk_bnd_needed): Likewise.
17603         (indirect_thunks_used): Likewise.
17604         (indirect_thunks_bnd_used): Likewise.
17605         (indirect_return_needed): New.
17606         (indirect_return_bnd_needed): Likewise.
17607         (output_indirect_thunk_function): Add a bool argument for
17608         function return.
17609         (output_indirect_thunk_function): Don't generate alias for
17610         function return thunk.
17611         (ix86_code_end): Call output_indirect_thunk_function to generate
17612         function return thunks.
17613         (ix86_output_function_return): Set indirect_return_bnd_needed
17614         and indirect_return_needed instead of indirect_thunk_bnd_needed
17615         and indirect_thunk_needed.
17617 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
17619         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17620         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17621         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17623 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
17624             Paul Hua <paul.hua.gm@gmail.com>
17626         PR c/84852
17627         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17629 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
17631         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17632         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17633         resp. SFmode cases.
17635 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
17637         PR target/84711
17638         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17639         instead of GET_MODE_SIZE when comparing Units.
17641 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
17643         PR target/68256
17644         * varasm.c (hash_section): Return an unchangeble hash value
17645         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17646         Return !aarch64_can_use_per_function_literal_pools_p ().
17648 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
17650         PR target/84860
17651         * optabs.c (emit_conditional_move): Pass address of cmode's copy
17652         rather than address of cmode as last argument to prepare_cmp_insn.
17654 2018-03-15  Julia Koval  <julia.koval@intel.com>
17656         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17657         F_AVX512VNNI, F_AVX512BITALG): New.
17659 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
17661         PR target/83451
17662         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
17663         insn for floating-point loads and stores.
17665 2018-03-14  Carl Love  <cel@us.ibm.com>
17667         * config/rs6000/rs6000-c.c: Add macro definitions for
17668         ALTIVEC_BUILTIN_VEC_PERMXOR.
17669         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17670         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17671         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17672         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17673         UNSPEC_VPERMXOR.
17674         * config/doc/extend.texi: Add prototypes for vec_permxor.
17676 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
17678         PR c/84852
17679         * diagnostic-show-locus.c (class layout_point): Convert m_line
17680         from int to linenum_type.
17681         (line_span::comparator): Use linenum "compare" function when
17682         comparing line numbers.
17683         (test_line_span): New function.
17684         (layout_range::contains_point): Convert param "row" from int to
17685         linenum_type.
17686         (layout_range::intersects_line_p): Likewise.
17687         (layout::will_show_line_p): Likewise.
17688         (layout::print_source_line): Likewise.
17689         (layout::should_print_annotation_line_p): Likewise.
17690         (layout::print_annotation_line): Likewise.
17691         (layout::print_leading_fixits): Likewise.
17692         (layout::annotation_line_showed_range_p): Likewise.
17693         (struct line_corrections): Likewise for field m_row.
17694         (line_corrections::line_corrections): Likewise for param "row".
17695         (layout::print_trailing_fixits): Likewise.
17696         (layout::get_state_at_point): Likewise.
17697         (layout::get_x_bound_for_row): Likewise.
17698         (layout::print_line): Likewise.
17699         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17700         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17701         * input.c (selftest::test_linenum_comparisons): New function.
17702         (selftest::input_c_tests): Call it.
17703         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17704         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17705         * selftest.h (ASSERT_GT): New macro.
17706         (ASSERT_GT_AT): New macro.
17707         (ASSERT_LT): New macro.
17708         (ASSERT_LT_AT): New macro.
17710 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
17712         PR rtl-optimization/84780
17713         * combine.c (distribute_links): Don't make a link based on pc_rtx.
17715 2018-03-14  Martin Liska  <mliska@suse.cz>
17717         * tree.c (record_node_allocation_statistics): Use
17718         get_stats_node_kind.
17719         (get_stats_node_kind): New function extracted from
17720         record_node_allocation_statistics.
17721         (free_node): Use get_stats_node_kind.
17723 2018-03-14  Richard Biener  <rguenther@suse.de>
17725         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17726         that the value-set of ANTIC_IN doesn't grow.
17728         Revert
17729         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17730         member.
17731         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17732         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17734 2018-03-14  Julia Koval  <julia.koval@intel.com>
17736         * config.gcc (icelake-client, icelake-server): New.
17737         (icelake): Remove.
17738         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17739         (initial_ix86_arch_features): Ditto.
17740         (PTA_SKYLAKE): Add SGX.
17741         (PTA_ICELAKE): Remove.
17742         (PTA_ICELAKE_CLIENT): New.
17743         (PTA_ICELAKE_SERVER): New.
17744         (ix86_option_override_internal): Split up icelake on icelake client and
17745         icelake server.
17746         (get_builtin_code_for_version): Ditto.
17747         (fold_builtin_cpu): Ditto.
17748         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17749         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17750         * config/i386/i386.h (processor_type): Ditto.
17751         * doc/invoke.texi: Ditto.
17753 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
17755         PR sanitizer/83392
17756         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17757         INTEGER_CST offset, add it together with bitpos / 8 and
17758         sign extend based on POINTER_SIZE.
17760         PR target/84844
17761         Revert
17762         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
17764         PR target/78090
17765         * config/i386/constraints.md (Yc): New register constraint.
17766         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17767         Use Yc constraint for alternative 2 of operand 0.  Remove
17768         preferred_for_speed attribute.
17770 2018-03-14  Richard Biener  <rguenther@suse.de>
17772         PR tree-optimization/84830
17773         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17774         with the old one to avoid oscillations.
17776 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
17778         PR target/83712
17779         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17780         pseudos.
17781         (assign_by_spills): Return a flag of reload assignment failure.
17782         Do not process the reload assignment failures.  Do not spill other
17783         reload pseudos if they has the same reg class.  Update n if
17784         necessary.
17785         (lra_assign): Add a return arg.  Set up from the result of
17786         assign_by_spills call.
17787         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17788         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17789         usage_insns if it is not NULL.
17790         (spill_hard_reg_in_range): New function.
17791         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17792         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17793         function prototypes.
17794         (lra_assign): Change prototype.
17795         * lra.c (lra): Add code to deal with fails by splitting hard reg
17796         live ranges.
17798 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
17800         * config/riscv/riscv.opt (mrelax): New option.
17801         * config/riscv/riscv.c (riscv_file_start): Emit ".option
17802         "norelax" when riscv_mrelax is disabled.
17803         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17805 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17807         PR target/84743
17808         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17809         reassociation for int modes.
17811 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17813         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17814         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17815         for big-endian.
17816         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17817         * config/aarch64/aarch64-sve.md
17818         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17819         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17820         (*extend<mode><Vwide>2): Rename to...
17821         (aarch64_sve_extend<mode><Vwide>2): ...this.
17822         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17823         renaming the old pattern to...
17824         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
17825         unsigned packs.
17826         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17827         define_expand, renaming the old pattern to...
17828         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17829         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17830         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17831         account when deciding which SVE instruction the optab should use.
17832         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17834 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17836         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17837         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17838         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17839         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17840         (tlsdesc_small_<mode>): Turn a define_expand and use
17841         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
17842         (tlsdesc_small_advsimd_<mode>): ...this.
17843         (tlsdesc_small_sve_<mode>): New pattern.
17845 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17847         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17848         (UNSPEC_UMUL_HIGHPART): New constants.
17849         (MUL_HIGHPART): New int iteraor.
17850         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17851         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17852         define_expand.
17853         (*<su>mul<mode>3_highpart): New define_insn.
17855 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17857         PR lto/84805
17858         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17859         incomplete types.
17861 2018-03-13  Martin Liska  <mliska@suse.cz>
17863         PR ipa/84658.
17864         * (sem_item_optimizer::sem_item_optimizer): Initialize new
17865         vector.
17866         (sem_item_optimizer::~sem_item_optimizer): Release it.
17867         (sem_item_optimizer::merge_classes): Register variable aliases.
17868         (sem_item_optimizer::fixup_pt_set): New function.
17869         (sem_item_optimizer::fixup_points_to_sets): Likewise.
17870         * ipa-icf.h: Declare new variables and functions.
17872 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
17874         PR middle-end/84834
17875         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17876         integer_pow2p@2 and test integer_pow2p in condition.
17877         (A < 0 ? C : 0): Similarly for @1.
17879         PR middle-end/84831
17880         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17881         characters starting at p contain '\0' character, don't look beyond
17882         that.
17884         PR target/84827
17885         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17886         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17888         PR target/84828
17889         * reg-stack.c (change_stack): Change update_end var from int to
17890         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17891         also call set_block_for_insn on the newly added insns and rescan.
17893         PR target/84786
17894         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17895         on the last operand.
17897         PR c++/84704
17898         * tree.c (stabilize_reference_1): Return save_expr (e) for
17899         STATEMENT_LIST even if it doesn't have side-effects.
17901 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
17903         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17905 2018-03-12  Renlin Li  <renlin.li@arm.com>
17907         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17908         aarch64_output_scalar_simd_mov_immediate.
17910 2018-03-12  Martin Sebor  <msebor@redhat.com>
17912         PR tree-optimization/83456
17913         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17914         for perfectly overlapping calls to memcpy.
17915         (gimple_fold_builtin_memory_chk): Same.
17916         (gimple_fold_builtin_strcpy): Handle no-warning.
17917         (gimple_fold_builtin_stxcpy_chk): Same.
17918         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17920 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
17922         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17923         parameter.  Use it for SFmode.
17924         (rs6000_function_arg_advance_1): Adjust.
17925         (rs6000_function_arg): Adjust.
17926         (rs6000_gimplify_va_arg): Pass false for that new parameter.
17928 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
17930         PR rtl-optimization/84169
17931         PR rtl-optimization/84780
17932         * combine.c (can_combine_p): Check for a 2-insn combination whether
17933         the destination register is used between the two insns, too.
17935 2018-03-12  Richard Biener  <rguenther@suse.de>
17937         PR tree-optimization/84803
17938         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17939         for refs DR analysis didn't process.
17941 2018-03-12  Richard Biener  <rguenther@suse.de>
17943         PR tree-optimization/84777
17944         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17945         force-vectorize loops ignore whether we are optimizing for size.
17947 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17949         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17950         (TARGET_MD_ASM_ADJUST): Define.
17952 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
17953             Kito Cheng  <kito.cheng@gmail.com>
17954             Chung-Ju Wu  <jasonwucj@gmail.com>
17956         * config/nds32/nds32.c (nds32_compute_stack_frame,
17957         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17958         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17959         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17960         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17961         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17962         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17963         * config/nds32/nds32.md (prologue, epilogue): Use macro
17964         NDS32_V3PUSH_AVAILABLE_P to do checking.
17966 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
17968         PR debug/58150
17969         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17970         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17971         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
17972         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
17973         addition of most attributes on !orig_type_die or the attribute not
17974         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17976 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17977             Chung-Ju Wu  <jasonwucj@gmail.com>
17979         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17980         __NDS32_VH__ macro.
17981         * config/nds32/nds32.opt (mvh): New option.
17983 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17984             Chung-Ju Wu  <jasonwucj@gmail.com>
17986         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17987         function.
17988         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17989         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17990         definition.
17992 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17993             Chung-Ju Wu  <jasonwucj@gmail.com>
17995         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17996         function.
17997         * config/nds32/nds32-multiple.md (strlensi): New pattern.
17998         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
18000 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
18001             Kito Cheng  <kito.cheng@gmail.com>
18002             Chung-Ju Wu  <jasonwucj@gmail.com>
18004         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
18005         UNSPEC_FFMISM and UNSPEC_FLMISM.
18006         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
18007         for ffb, ffmism and flmism.
18008         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
18009         (unspec_ffmism): Ditto.
18010         (unspec_flmism): Ditto.
18011         (nds32_expand_builtin_impl): Check if string extension is available.
18012         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
18013         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
18015 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
18017         Reverting patch:
18018         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
18020         PR target/83712
18021         * lra-assigns.c (assign_by_spills): Return a flag of reload
18022         assignment failure.  Do not process the reload assignment
18023         failures.  Do not spill other reload pseudos if they has the same
18024         reg class.
18025         (lra_assign): Add a return arg.  Set up from the result of
18026         assign_by_spills call.
18027         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18028         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18029         usage_insns if it is not NULL.
18030         (spill_hard_reg_in_range): New function.
18031         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18032         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18033         function prototypes.
18034         (lra_assign): Change prototype.
18035         * lra.c (lra): Add code to deal with fails by splitting hard reg
18036         live ranges.
18038 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
18040         PR target/84807
18041         * config/i386/i386.opt: Replace Enforcment with Enforcement.
18043 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
18045         PR debug/84620
18046         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
18047         (dw_val_node): Add val_symbolic_view.
18048         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
18049         (symview_upper_bound): New.
18050         (new_line_info_table): Initialize symviews_since_reset.
18051         (dwarf2out_source_line): Count symviews_since_reset and set
18052         symview_upper_bound.
18053         (dw_val_equal_p): Handle symview.
18054         (add_AT_symview): New.
18055         (print_dw_val): Handle symview.
18056         (attr_checksum, attr_checksum_ordered): Likewise.
18057         (same_dw_val_p, size_of_die): Likewise.
18058         (value_format, output_die): Likewise.
18059         (add_high_low_attributes): Use add_AT_symview for entry_view.
18060         (dwarf2out_finish): Reset symview_upper_bound, clear
18061         zero_view_p.
18063 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
18065         PR target/83969
18066         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
18067         Add strict argument and use it.
18068         (rs6000_split_multireg_move): Update for new strict argument.
18069         (mem_operand_gpr): Disallow all non-offsettable addresses.
18070         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
18072 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
18074         PR target/84772
18075         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
18076         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
18077         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
18079         PR c++/84767
18080         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
18081         decl, use remap_type if we want to use the type.
18083 2018-03-09  Martin Sebor  <msebor@redhat.com>
18085         PR tree-optimization/84526
18086         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18087         Remove dead code.
18088         (builtin_access::generic_overlap): Be prepared to handle non-array
18089         base objects.
18091 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
18093         PR rtl-optimization/84682
18094         * lra-constraints.c (process_address_1): Check is_address flag
18095         for address constraints.
18096         (process_alt_operands): Likewise.
18097         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
18098         preprocess_constraints.
18099         * recog.h (preprocess_constraints): Add oploc parameter.
18100         Adjust callers.
18101         * recog.c (preprocess_constraints): Test address_operand for
18102         CT_ADDRESS constraints.
18104 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
18106         PR target/83712
18107         * lra-assigns.c (assign_by_spills): Return a flag of reload
18108         assignment failure.  Do not process the reload assignment
18109         failures.  Do not spill other reload pseudos if they has the same
18110         reg class.
18111         (lra_assign): Add a return arg.  Set up from the result of
18112         assign_by_spills call.
18113         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18114         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18115         usage_insns if it is not NULL.
18116         (spill_hard_reg_in_range): New function.
18117         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18118         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18119         function prototypes.
18120         (lra_assign): Change prototype.
18121         * lra.c (lra): Add code to deal with fails by splitting hard reg
18122         live ranges.
18124 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18126         PR target/83193
18127         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
18128         Accept complain bool parameter.  Only emit errors if it is true.
18129         (arm_parse_cpu_option_name): Likewise.
18130         (arm_target_thumb_only): Adjust callers of the above.
18131         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
18132         prototype to take a default true bool parameter.
18133         (arm_parse_arch_option_name): Likewise.
18135 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
18136             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
18138         PR jit/64089
18139         PR jit/84288
18140         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
18141         * configure: Regenerate.
18142         * configure.ac ("linker --version-script option"): New.
18143         ("linker soname option"): New.
18145 2018-03-09  Richard Biener  <rguenther@suse.de>
18147         PR tree-optimization/84775
18148         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
18149         immediate uses of predicate stmts and mark them modified.
18151         Revert
18152         PR tree-optimization/84178
18153         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18154         to caller.
18155         (version_loop_for_if_conversion): Delay update_ssa call.
18156         (tree_if_conversion): Delay update_ssa until after predicate
18157         insertion.
18159 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
18161         PR target/84763
18162         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
18163         when the function accesses prior frames.
18165 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
18167         PR debug/84456
18168         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
18169         gen_llsym, otherwise call maybe_gen_llsym.
18171         PR inline-asm/84742
18172         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
18173         has ',' character inside of it.
18175 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18177         PR target/84748
18178         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
18179         as clobbering CC_REGNUM.
18181 2018-03-08  Richard Biener  <rguenther@suse.de>
18183         PR middle-end/84552
18184         * tree-scalar-evolution.c: Include tree-into-ssa.h.
18185         (follow_copies_to_constant): Do not follow SSA names registered
18186         for update.
18188 2018-03-08  Richard Biener  <rguenther@suse.de>
18190         PR tree-optimization/84178
18191         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18192         to caller.
18193         (version_loop_for_if_conversion): Delay update_ssa call.
18194         (tree_if_conversion): Delay update_ssa until after predicate
18195         insertion.
18197 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
18199         PR tree-optimization/84178
18200         * tree-if-conv.c (release_bb_predicate): Remove the
18201         the assertion that the stmts have NULL use_ops.
18202         Discard the statements, asserting that they haven't
18203         yet been added to a BB.
18205 2018-03-08  Richard Biener  <rguenther@suse.de>
18207         PR tree-optimization/84746
18208         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
18209         (phi_translate): Pass in destination ANTIC_OUT set.
18210         (phi_translate_1): Likewise.  For a simplified result lookup
18211         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
18212         (phi_translate_set): Adjust.
18213         (do_pre_regular_insertion): Likewise.
18214         (do_pre_partial_partial_insertion): Likewise.
18216 2018-03-08  Martin Liska  <mliska@suse.cz>
18218         PR gcov-profile/84735
18219         * doc/gcov.texi: Document usage of profile files.
18220         * gcov-io.h: Document changes in the format.
18222 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
18224         PR debug/84404
18225         PR debug/84408
18226         * dwarf2out.c (struct dw_line_info_table): Update comments for
18227         view == -1.
18228         (FORCE_RESET_NEXT_VIEW): New.
18229         (FORCE_RESETTING_VIEW_P): New.
18230         (RESETTING_VIEW_P): Check for -1 too.
18231         (ZERO_VIEW_P): Likewise.
18232         (new_line_info_table): Force-reset next view.
18233         (dwarf2out_begin_function): Likewise.
18234         (dwarf2out_source_line): Simplify zero_view_p initialization.
18235         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
18236         view directly.  Omit view when omitting .loc at line 0.
18238 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
18240         PR tree-optimization/84740
18241         * tree-switch-conversion.c (process_switch): Call build_constructors
18242         only if info.phi_count is non-zero.
18244         PR tree-optimization/84739
18245         * tree-tailcall.c (find_tail_calls): Check call arguments against
18246         DECL_ARGUMENTS (current_function_decl) rather than
18247         DECL_ARGUMENTS (func) when checking for tail recursion.
18249 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
18251         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
18252         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
18253         Volker Reichelt's entry and add entries for people that perform
18254         GCC fuzzy testing and report numerous bugs.
18256 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
18258         PR target/82411
18259         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
18260         readonly data in sdata, if that is disabled.
18261         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
18262         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
18263         -mreadonly-in-sdata option.
18265 2018-03-07  Martin Sebor  <msebor@redhat.com>
18267         PR tree-optimization/84468
18268         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
18269         basic block when looking for nul assignment.
18271 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
18273         PR target/84277
18274         * except.h (output_function_exception_table): Adjust prototype.
18275         * except.c (output_function_exception_table): Remove FNNAME parameter
18276         and add SECTION parameter.  Ouput one part of the table at a time.
18277         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
18278         the first part of the exception table and emit unwind directives.
18279         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
18280         (i386_pe_seh_cold_init): Likewise.
18281         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
18282         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
18283         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
18284         (ix86_output_call_insn): Emit a nop in one more case for SEH.
18285         * config/i386/winnt.c: Include except.h.
18286         (struct seh_frame_state): Add reg_offset, after_prologue and
18287         in_cold_section fields.
18288         (i386_pe_seh_end_prologue): Set seh->after_prologue.
18289         (i386_pe_seh_cold_init): New function.
18290         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
18291         to seh->in_cold_section.
18292         (seh_emit_push): Record the offset of the push.
18293         (seh_emit_save): Record the offet of the save.
18294         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
18295         Test seh->after_prologue to disregard the epilogue.
18296         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
18297         (i386_pe_end_cold_function): New function.
18299 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
18301         PR fortran/84565
18302         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
18303         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
18305         PR c++/84704
18306         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
18307         on tmp_var.
18308         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
18309         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
18311         PR middle-end/84723
18312         * multiple_target.c: Include tree-inline.h and intl.h.
18313         (expand_target_clones): Diagnose and fail if node->definition and
18314         !tree_versionable_function_p (node->decl).
18316 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
18318         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
18319         sprint_ul.
18320         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
18321         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18322         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
18324 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
18326         PR target/84710
18327         * combine.c (try_combine): Use reg_or_subregno instead of handling
18328         just paradoxical SUBREGs and REGs.
18330 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
18332         * config/arc/arc.c (arc_finalize_pic): Remove function.
18333         (arc_must_save_register): We use single base PIC register, remove
18334         checks to save/restore the PIC register.
18335         (arc_expand_prologue): Likewise.
18336         * config/arc/arc-protos.h (arc_set_default_type_attributes):
18337         Remove.
18338         (arc_verify_short): Likewise.
18339         (arc_attr_type): Likewise.
18340         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
18341         (walk_stores): Likewise.
18342         (arc_address_cost): Make it static.
18343         (arc_verify_short): Likewise.
18344         (branch_dest): Likewise.
18345         (arc_attr_type): Likewise.
18346         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
18347         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
18348         (arc_final_prescan_insn): Remove inserting the nops due to
18349         hardware hazards.  It is done in reorg step.
18350         (insn_length_variant_t): Remove.
18351         (insn_length_parameters_t): Likewise.
18352         (arc_insn_length_parameters): Likewise.
18353         (arc_get_insn_variants): Likewise.
18354         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
18356 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
18358         PR inline-asm/84683
18359         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
18360         assertion failure.
18362         PR tree-optimization/84687
18363         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
18364         on new_node->decl.
18365         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
18367 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18369         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
18370         Rename to ppc_speculation_barrier.
18371         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
18372         __builtin_ppc_speculation_barrier.
18374 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
18376         PR target/84700
18377         * combine.c (combine_simplify_rtx): Don't try to simplify if
18378         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
18379         are equal to x.
18381 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
18383         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
18384         to 32 bytes when compiling for POWER9.
18386 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
18388         PR target/84564
18389         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
18390         regparm >= 3 with no arg reg available also for calls with
18391         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
18393         PR target/84524
18394         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
18395         orig,vex.
18396         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
18398 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
18400         PR target/84264
18401         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
18403 2018-03-05  Richard Biener  <rguenther@suse.de>
18405         PR tree-optimization/84486
18406         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
18407         When inserting a __builtin_assume_aligned call set the LHS
18408         SSA name alignment info accordingly.
18410 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
18412         PR tree-optimization/84114
18413         * config/aarch64/aarch64.c (aarch64_reassociation_width)
18414         Avoid reassociation of FLOAT_MODE addition.
18416 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
18418         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
18419         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
18420         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
18421         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
18422         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
18423         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
18424         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
18425         and -mwbnoinvd.
18426         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
18427         __builtin_ia32_wbinvd): New builtins.
18428         (SPECIAL_ARGS2): New.
18429         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
18430         (SPECIAL_ARGS2): New.
18431         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18432         (ix86_valid_target_attribute_inner_p): Ditto.
18433         (ix86_init_mmx_sse_builtins): Add special_args2.
18434         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18435         TARGET_WBNOINVD_P): New.
18436         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18437         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18438         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18439         * config/i386/immintrin.h (_wbinvd): New intrinsic.
18440         * config/i386/pconfigintrin.h: New file.
18441         * config/i386/wbnoinvdintrin.h: Ditto.
18442         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18443         wbnoinvdintrin.h.
18444         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18446 2018-03-05  Richard Biener  <rguenther@suse.de>
18448         PR tree-optimization/84670
18449         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18450         member.
18451         (BB_VISITED_WITH_VISITED_SUCCS): New define.
18452         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18453         (compute_antic_aux): Only assert the number of values in ANTIC_IN
18454         doesn't grow if all successors (recursively) were visited at least
18455         once.
18457 2018-03-05  Richard Biener  <rguenther@suse.de>
18459         PR tree-optimization/84650
18460         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18461         if executed in the loop pipeline.
18463 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
18465         * doc/configfiles.texi (Configuration Files): Move info about
18466         conditionalizing $target-protos.h to...
18467         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
18468         differs from $target-protos.h.
18470 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
18471             Chung-Ju Wu  <jasonwucj@gmail.com>
18473         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18474         * config/nds32/nds32-multiple.md (setmemsi): Define.
18475         * config/nds32/nds32-memory-manipulation.c
18476         (nds32_gen_dup_4_byte_to_word_value): New.
18477         (emit_setmem_word_loop): New.
18478         (emit_setmem_byte_loop): New.
18479         (nds32_expand_setmem_loop): New.
18480         (nds32_expand_setmem_loop_v3m): New.
18481         (nds32_expand_setmem_unroll): New.
18482         (nds32_expand_setmem): New.
18484 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
18485             Chung-Ju Wu  <jasonwucj@gmail.com>
18487         * config/nds32/nds32-memory-manipulation.c
18488         (nds32_emit_load_store): New.
18489         (nds32_emit_post_inc_load_store): New.
18490         (nds32_emit_mem_move): New.
18491         (nds32_emit_mem_move_block): New.
18492         (nds32_expand_movmemsi_loop_unknown_size): New.
18493         (nds32_expand_movmemsi_loop_known_size): New.
18494         (nds32_expand_movmemsi_loop): New.
18495         (nds32_expand_movmemsi_unroll): New.
18496         (nds32_expand_movmemqi): Rename ...
18497         (nds32_expand_movmemsi): ... to this.
18498         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18499         (movmemsi): ... to this.
18500         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18501         (nds32_expand_movmemsi): ... to this.
18503 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
18504             Monk Chiang  <sh.chiang04@gmail.com>
18505             Chung-Ju Wu  <jasonwucj@gmail.com>
18507         * config/nds32/nds32-protos.h
18508         (nds32_expand_load_multiple): New arguments.
18509         (nds32_expand_store_multiple): Ditto.
18510         (nds32_valid_multiple_load_store): Rename ...
18511         (nds32_valid_multiple_load_store_p): ... to this.
18512         * config/nds32/nds32-memory-manipulation.c
18513         (nds32_expand_load_multiple): Refine implementation.
18514         (nds32_expand_store_multiple): Ditto.
18515         * config/nds32/nds32-multiple.md
18516         (load_multiple): Update nds32_expand_load_multiple interface.
18517         (store_multiple): Update nds32_expand_store_multiple interface.
18518         * config/nds32/nds32-predicates.c
18519         (nds32_valid_multiple_load_store): Rename ...
18520         (nds32_valid_multiple_load_store_p): ... to this and refine
18521         implementation.
18522         * config/nds32/predicates.md
18523         (nds32_load_multiple_and_update_address_operation): New predicate.
18524         (nds32_store_multiple_and_update_address_operation): New predicate.
18526 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
18527             Chung-Ju Wu  <jasonwucj@gmail.com>
18529         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18530         (combo): New attribute.
18531         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18533 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
18535         * config/nds32/nds32.opt: Change -mcmodel= default value.
18537 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
18538             Monk Chiang  <sh.chiang04@gmail.com>
18539             Chung-Ju Wu  <jasonwucj@gmail.com>
18541         * config/nds32/constants.md (unspec_element): New enum.
18542         * config/nds32/constraints.md (Umw): New constraint.
18543         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18544         * config/nds32/nds32-intrinsic.md: Likewise.
18545         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18546         (nds32_valid_smw_lwm_base_p): New.
18547         (nds32_output_smw_single_word): New.
18548         (nds32_output_lmw_single_word): New.
18549         (nds32_expand_unaligned_load): New.
18550         (nds32_expand_unaligned_store): New.
18551         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18552         (nds32_output_smw_single_word): Declare.
18553         (nds32_output_lmw_single_word): Declare.
18554         (nds32_expand_unaligned_load): Declare.
18555         (nds32_expand_unaligned_store): Declare.
18556         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18557         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18558         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18559         NDS32_BUILTIN_UASTORE_DW.
18560         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18561         predicate.
18563 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
18564             Kito Cheng  <kito.cheng@gmail.com>
18565             Chung-Ju Wu  <jasonwucj@gmail.com>
18567         * config/nds32/nds32-intrinsic.c
18568         (nds32_expand_builtin_null_ftype_reg): Delete.
18569         (nds32_expand_builtin_reg_ftype_imm): Ditto.
18570         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18571         (nds32_read_argument): New.
18572         (nds32_legitimize_target): Ditto.
18573         (nds32_legitimize_argument): Ditto.
18574         (nds32_check_constant_argument): Ditto.
18575         (nds32_expand_unop_builtin): Ditto.
18576         (nds32_expand_unopimm_builtin): Ditto.
18577         (nds32_expand_binop_builtin): Ditto.
18578         (nds32_builtin_decl_impl): Ditto.
18579         (builtin_description): Ditto.
18580         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18581         (nds32_init_builtins_impl): Ditto.
18582         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18583         (nds32_builtin_decl): New.
18584         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18585         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18587 2018-03-02  Jeff Law  <law@redhat.com>
18589         * reorg.c (stop_search_p): Handle DEBUG_INSN.
18590         (redundant_insn, fill_simple_delay_slots): Likewise.
18591         (fill_slots_from_thread): Likewise.
18592         * resource.c (mark_referenced_resources): Likewise.
18593         (mark_set_resources, find_dead_or_set_registers): Likewise.
18595 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18597         * substring-locations.h (format_warning_va): Formatting fix for
18598         ATTRIBUTE_GCC_DIAG.
18599         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18600         argument.
18601         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18602         * substring-locations.c: Include intl.h.
18603         (format_warning_va): Turned into small wrapper around
18604         format_warning_n_va, renamed to ...
18605         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18606         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18607         use ngettext.
18608         (format_warning_at_substring_n): New function.
18609         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18610         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
18611         format_warning_at_substring with just a shorter name instead of
18612         const function pointer.
18613         (fmtwarn_n): New function.
18614         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18615         appropriate, get rid of all the fmtstr temporaries, move conditionals
18616         with G_() wrapped string literals directly into fmtwarn arguments,
18617         cast dir.len to (int), formatting fixes.
18619 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
18621         * doc/invoke.texi: Remove "Cilk Plus" references.
18623 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18624             Richard Biener  <rguenther@suse.de>
18626         PR ipa/84628
18627         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18628         for error or warning attributes if CALL_FROM_THUNK_P is set.
18629         Formatting fixes.
18631 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18633         PR target/56540
18634         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18635         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18637         PR target/56540
18638         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18639         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18641         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18642         instead of -1U in last predictors element's probability member.
18644 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
18646         PR ipa/83983
18647         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18648         arguments if they are comparable.
18650 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
18652         PR tree-optimization/84634
18653         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18654         masks and masked_loop_p with a single loop_masks, making sure it's
18655         null for bb vectorization.
18657 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
18659         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18660         (vect_analyze_data_ref_access): Use loop->safe_len rather than
18661         loop->force_vectorize to check whether there is no alias.
18663 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18665         PR target/84614
18666         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18667         prototypes.
18668         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18669         comments.
18670         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18671         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18672         instead of a loop around prev_real_insn.
18673         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18674         prev_real_insn.
18676         PR inline-asm/84625
18677         * config/i386/i386.c (ix86_print_operand): Use conditional
18678         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18679         zero vector.
18681 2018-03-02  Richard Biener  <rguenther@suse.de>
18683         PR tree-optimization/84427
18684         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18685         (bitmap_set_subtract_values): Rewrite to handle multiple
18686         exprs per value.
18687         (clean): Likewise.
18688         (prune_clobbered_mems): Likewise.
18689         (phi_translate): Take edge instead of pred/phiblock.
18690         (phi_translate_1): Likewise.
18691         (phi_translate_set): Likewise.  Insert all translated
18692         exprs for a value into the set, keeping possibly multiple
18693         expressions per value.
18694         (compute_antic_aux): Adjust for phi_translate changes.
18695         When intersecting union the expressions and prune those
18696         not in the final value set, keeping possibly multiple
18697         expressions per value.  Do not use value-insertion
18698         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18699         all expressions.  Add verification that the value-sets
18700         only shrink during iteration.
18701         (compute_partial_antic_aux): Adjust for the phi_translate changes.
18702         (do_pre_regular_insertion): Likewise.
18703         (do_pre_partial_partial_insertion): Likewise.
18705 2018-03-02  Richard Biener  <rguenther@suse.de>
18707         PR target/82005
18708         * config/darwin.c (saved_debug_info_level): New static global.
18709         (darwin_asm_lto_start): Disable debug info generation for LTO out.
18710         (darwin_asm_lto_end): Restore debug info generation settings.
18712 2018-03-01  Martin Liska  <mliska@suse.cz>
18714         PR sanitizer/82484
18715         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18716         volatile arguments.
18718 2018-03-01  Richard Biener  <rguenther@suse.de>
18720         PR debug/84645
18721         * dwarf2out.c (gen_variable_die): Properly handle late VLA
18722         type annotation with LTO when debug was disabled at compile-time.
18724 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
18726         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18727         XINT with INTVAL.
18728         (mips_final_postscan_insn): Likewise.
18730 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
18732         PR rtl-optimization/84528
18733         * alias.c (init_alias_target): Add commentary.
18734         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18735         a unique base value if the frame pointer is not eliminated
18736         to the stack pointer.
18738 2018-03-01  Tom de Vries  <tom@codesourcery.com>
18740         PR rtl-optimization/83327
18741         * lra-int.h (hard_regs_spilled_into): Declare.
18742         * lra.c (hard_regs_spilled_into): Define.
18743         (init_reg_info): Init hard_regs_spilled_into.
18744         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18745         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18746         (process_bb_lives): Handle hard_regs_spilled_into.
18747         (lra_create_live_ranges_1): Before doing liveness propagation, clear
18748         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18750 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
18752         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18753         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18754         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18755         * config/rs6000/aix72.h: New file.
18757 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
18759         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18760         instead of warning_at with conditional singular and plural messages
18761         where possible.
18763         PR target/52991
18764         * stor-layout.c (update_alignment_for_field): For
18765         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18766         && !DECL_PACKED (field), do the alignment update, just use
18767         only desired_align instead of MAX (type_align, desired_align)
18768         as the alignment.
18769         (place_field): Don't do known_align < desired_align handling
18770         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18771         is non-NULL, instead do it after rli->prev_field handling and
18772         only if not within a bitfield word.  For DECL_PACKED (field)
18773         use type_align of BITS_PER_UNIT.
18775 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
18777         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18778         superfluous parentheses and trailing spaces.
18780 2018-02-28  Richard Biener  <rguenther@suse.de>
18782         PR tree-optimization/84584
18783         * graphite-scop-detection.c (scop_detection::add_scop): Discard
18784         SCoPs with fake exit edge.
18786 2018-02-28  Martin Liska  <mliska@suse.cz>
18788         PR testsuite/84597
18789         * timevar.c (timer::print): Fix format to properly print 100%
18790         values.
18792 2018-02-28  Richard Biener  <rguenther@suse.de>
18794         PR middle-end/84607
18795         * genmatch.c (capture_info::walk_match): Do not mark
18796         captured expressions without operands as expr_p given
18797         they act more like predicates and should be subject to
18798         "lost tail" side-effect preserving.
18800 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
18802         PR rtl-optimization/81611
18803         * auto-inc-dec.c (attempt_change): Move dead note from
18804         mem_insn if it's the next use of regno
18805         (find_address): Take address use of reg holding
18806         non-incremented value.  Add parm to limit search to the named
18807         reg only.
18808         (merge_in_block): Attempt to use a mem insn that is the next
18809         use of the original regno.
18811 2018-02-27  Martin Sebor  <msebor@redhat.com>
18813         PR c++/83871
18814         * doc/invoke.texi (-Wmissing-attributes): New option.
18815         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18817 2018-02-27  Martin Sebor  <msebor@redhat.com>
18819         PR translation/84207
18820         * diagnostic-core.h (warning_n, error_n, inform_n): Change
18821         n argument to unsigned HOST_WIDE_INT.
18822         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18823         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
18824         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18825         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18827 2018-02-27  Richard Biener  <rguenther@suse.de>
18829         PR tree-optimization/84512
18830         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18831         Do not use the estimate returned from record_stmt_cost for
18832         the scalar iteration cost but sum properly using add_stmt_cost.
18834 2018-02-27  Richard Biener  <rguenther@suse.de>
18836         PR tree-optimization/84466
18837         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18838         Adjust last change to less strictly validate use operands.
18840 2018-02-27  Martin Liska  <mliska@suse.cz>
18842         PR gcov-profile/84548
18843         * gcov.c (process_file): Allow partial overlap and consider it
18844         also as group functions.
18845         (output_lines): Properly calculate range of lines for a group.
18847 2018-02-27  Martin Liska  <mliska@suse.cz>
18849         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18850         'ggc' suffixes.  Change first column width.
18851         (timer::print): Fix formatting of the column.
18853 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
18855         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18856         preserve inline entry blocks for the sake of debug inline
18857         entry point markers alone.
18858         (remove_unused_locals): Suggest in comments a better place to
18859         force the preservation of inline entry blocks that are
18860         otherwise unused, but do not preserve them.
18862 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18864         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18866 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18868         PR target/84039
18869         * config/i386/constraints.md (Bs): Replace
18870         ix86_indirect_branch_register with
18871         TARGET_INDIRECT_BRANCH_REGISTER.
18872         (Bw): Likewise.
18873         * config/i386/i386.md (indirect_jump): Likewise.
18874         (tablejump): Likewise.
18875         (*sibcall_memory): Likewise.
18876         (*sibcall_value_memory): Likewise.
18877         Peepholes of indirect call and jump via memory: Likewise.
18878         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18879         (*sibcall_value_GOT_32): Likewise.
18880         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18881         (GOT_memory_operand): Likewise.
18882         (call_insn_operand): Likewise.
18883         (sibcall_insn_operand): Likewise.
18884         (GOT32_symbol_operand): Likewise.
18885         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18887 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
18889         PR rtl-optimization/83496
18890         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18891         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
18892         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18893         redundant insn, if any.
18894         (relax_delay_slots): Likewise.
18895         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18897 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
18899         PR tree-optimization/83965
18900         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18901         that grouped statements are part of a reduction chain.  Return
18902         true if the statement is not marked as a reduction itself but
18903         is part of a group.
18904         (vect_recog_dot_prod_pattern): Don't check whether the statement
18905         is part of a group here.
18906         (vect_recog_sad_pattern): Likewise.
18907         (vect_recog_widen_sum_pattern): Likewise.
18909 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
18911         PR debug/84545
18912         * final.c (rest_of_clean_state): Also look for calls inside sequences.
18914 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18916         PR target/84530
18917         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18918         the bool argument.
18919         (ix86_output_indirect_function_return): New prototype.
18920         (ix86_split_simple_return_pop_internal): Likewise.
18921         * config/i386/i386.c (indirect_return_via_cx): New.
18922         (indirect_return_via_cx_bnd): Likewise.
18923         (indirect_thunk_name): Handle return va CX_REG.
18924         (output_indirect_thunk_function): Create alias for
18925         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18926         (ix86_output_indirect_jmp): Remove the bool argument.
18927         (ix86_output_indirect_function_return): New function.
18928         (ix86_split_simple_return_pop_internal): Likewise.
18929         * config/i386/i386.md (*indirect_jump): Don't pass false
18930         to ix86_output_indirect_jmp.
18931         (*tablejump_1): Likewise.
18932         (simple_return_pop_internal): Change it to define_insn_and_split.
18933         Call ix86_split_simple_return_pop_internal to split it for
18934         -mfunction-return=.
18935         (simple_return_indirect_internal): Call
18936         ix86_output_indirect_function_return instead of
18937         ix86_output_indirect_jmp.
18939 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
18941         PR bootstrap/84405
18942         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18943         memset and value initialization afterwards.
18945 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
18947         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18949 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18951         PR target/84521
18952         * common/config/aarch64/aarch64-common.c
18953         (aarch_option_optimization_table[]): Switch
18954         off fomit-frame-pointer
18956 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
18957             Chung-Ju Wu  <jasonwucj@gmail.com>
18959         * config/nds32/nds32-multiple.md (load_multiple): Disallow
18960         volatile memory.
18961         (store_multiple): Ditto.
18963 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
18965         * config.gcc: Add --with-cpu support for nds32 target.
18966         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18967         * config/nds32/nds32.opt: Add -mcpu= option.
18969 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
18971         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18972         isel=yes): Warn for these deprecated options.
18974 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
18976         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18977         ISA_2_5_MASKS_EMBEDDED.
18979 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
18981         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18982         p->max as pointers rather than using iterative_hash_expr.
18984 2018-02-23  Carl Love  <cel@us.ibm.com>
18986         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18987         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18988         BU_P8V_OVERLOAD_2.
18989         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18990         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18991         P8V_BUILTIN_VEC_VUNSIGNED2.
18993 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
18995         PR target/81572
18996         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18997         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18998         LRA_UNKNOWN_ALT.
18999         * lra-constraints.c (curr_insn_transform): Set up
19000         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
19001         LRA_UNKNOWN_ALT.
19002         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
19003         * lra-eliminations.c (spill_pseudos): Ditto.
19004         (process_insn_for_elimination): Ditto.
19005         * lra-lives.c (reg_early_clobber_p): Use the new macros.
19006         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
19007         LRA_NON_CLOBBERED_ALT.
19009 2018-02-22  Martin Sebor  <msebor@redhat.com>
19011         PR tree-optimization/84480
19012         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
19013         to maybe_diag_stxncpy_trunc.  Call it.
19014         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
19015         from gimple_fold_builtin_strcpy.  Print inlining stack.
19016         (handle_builtin_stxncpy): Print inlining stack.
19017         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
19019 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
19021         PR target/84176
19022         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
19023         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
19024         and -fcheck-pointer-bounds are used together.
19025         (indirect_thunk_prefix): New enum.
19026         (indirect_thunk_need_prefix): New function.
19027         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
19028         "_nt" instead of "_bnd" for NOTRACK prefix.
19029         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
19030         (output_indirect_thunk_function): Likewise.
19031         (): Likewise.
19032         (ix86_code_end): Update output_indirect_thunk_function calls.
19033         (ix86_output_indirect_branch_via_reg): Replace
19034         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
19035         (ix86_output_indirect_branch_via_push): Likewise.
19036         (ix86_output_function_return): Likewise.
19037         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
19038         incompatible with -fcf-protection=branch and
19039         -fcheck-pointer-bounds.
19041 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
19043         PR target/83335
19044         * config/aarch64/aarch64.c (aarch64_print_address_internal):
19045         Change gcc_assert call to output_operand_lossage.
19047 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
19049         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
19051 2018-02-22  DJ Delorie  <dj@redhat.com>
19052             Sebastian Perta  <sebastian.perta@renesas.com>
19053             Oleg Endo  <olegendo@gcc.gnu.org>
19055         * config/rx/rx.c (rx_rtx_costs): New function.
19056         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
19058 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19060         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
19062 2018-02-22  Martin Liska  <mliska@suse.cz>
19064         PR driver/83193
19065         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
19066         Add "native" as a possible value.
19068 2018-02-22  Martin Liska  <mliska@suse.cz>
19070         PR driver/83193
19071         * config/i386/i386.c (ix86_option_override_internal):
19072         Add "native" as a possible value for -march and -mtune.
19074 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
19076         PR target/84502
19077         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
19078         to all type variants.
19080         PR tree-optimization/84503
19081         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
19082         width as info->bitpos + info->bitsize - start.
19083         (merged_store_group::merge_overlapping): Simplify width computation.
19084         (check_no_overlap): New function.
19085         (imm_store_chain_info::try_coalesce_bswap): Compute expected
19086         start + width and last_order of the group, fail if check_no_overlap
19087         fails.
19088         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
19089         to group if check_no_overlap fails.
19091 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
19093         * config/rs6000/altivec.md: Delete contraint arguments to
19094         define_expand, define_split, and define_peephole2, and in
19095         define_insn_and_split if always unused.
19096         * config/rs6000/darwin.md: Ditto.
19097         * config/rs6000/dfp.md: Ditto.
19098         * config/rs6000/rs6000.md: Ditto.
19099         * config/rs6000/sync.md: Ditto.
19100         * config/rs6000/vector.md: Ditto.
19101         * config/rs6000/vsx.md: Ditto.
19103 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
19105         * config/rs6000/altivec.md: Write output control strings as braced
19106         blocks instead of double-quoted strings.
19107         * config/rs6000/darwin.md: Ditto.
19108         * config/rs6000/rs6000.md: Ditto.
19109         * config/rs6000/vector.md: Ditto.
19110         * config/rs6000/vsx.md: Ditto.
19112 2018-02-21  Jason Merrill  <jason@redhat.com>
19114         PR c++/84314 - ICE with templates and fastcall attribute.
19115         * attribs.c (build_type_attribute_qual_variant): Remove assert.
19117 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
19119         * ipa-cp.c (determine_versionability): Fix comment typos.
19121 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
19123         PR c/84229
19124         * ipa-cp.c (determine_versionability): Do not version functions caling
19125         va_arg_pack.
19127 2018-02-21  Martin Liska  <mliska@suse.cz>
19129         PR driver/83193
19130         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
19131         Add "native" as a possible value.
19132         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
19133         the macro when native cpu detection is available.
19135 2018-02-21  Martin Liska  <mliska@suse.cz>
19137         PR driver/83193
19138         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
19139         Add "native" as a possible value.
19140         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
19141         when native cpu detection is available.
19143 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
19144             Martin Sebor  <msebor@redhat.com>
19146         PR tree-optimization/84478
19147         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
19148         false.
19149         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
19150         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
19151         support which is conservatively correct, for 2 only stay conservative
19152         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
19153         argument to the 2 argument get_range_strlen, adjust 6 arg
19154         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
19155         false.
19156         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
19157         (gimple_fold_builtin_strlen): Pass true as last argument to
19158         get_range_strlen.
19160 2018-02-20  Martin Sebor  <msebor@redhat.com>
19162         PR middle-end/84095
19163         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
19164         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
19165         (builtin_memref::builtin_memref): Factor out parts into
19166         set_base_and_offset and call it.
19168 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
19170         PR middle-end/84406
19171         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
19172         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
19173         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
19174         search at the associated MODE_INT.
19176 2018-02-20  Jeff Law  <law@redhat.com>
19178         PR middle-end/82123
19179         PR tree-optimization/81592
19180         PR middle-end/79257
19181         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
19182         for range data rather than using global data.
19183         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
19184         range data rather than using global data.
19185         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
19186         pass it to children as needed.
19187         (struct directive::fmtresult): Similarly.
19188         (struct directive::set_width): Similarly.
19189         (struct directive::set_precision): Similarly.
19190         (format_integer, format_directive, parse_directive): Similarly.
19191         (format_none): Accept unnamed vr_values parameter.
19192         (format_percent, format_floating, format_character): Similarly.
19193         (format_string, format_plain): Similarly.
19194         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
19195         the EVRP range analyzer for range data rather than using global data.
19196         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
19197         gimple-ssa-evrp-analyze.h
19198         (class sprintf_dom_walker): Add after_dom_children member function.
19199         Add evrp_range_analyzer member.
19200         (sprintf_dom_walker::before_dom_children): Call into the EVRP
19201         range analyzer as needed.
19202         (sprintf_dom_walker::after_dom_children): New member function.
19203         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
19204         if not optimizing.
19205         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
19206         (evrp_range_analyzer::pop_to_marker): Likewise.
19208 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
19210         PR tree-optimization/84419
19211         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
19212         with the required type if its current type is compatible but
19213         different.
19215 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
19217         PR middle-end/82004
19218         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
19219         after vectorization.
19221 2018-02-20  Martin Liska  <mliska@suse.cz>
19223         PR driver/83193
19224         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
19225         possible values if we don't have a hint.
19227 2018-02-20  Martin Liska  <mliska@suse.cz>
19229         PR c/84310
19230         PR target/79747
19231         * final.c (shorten_branches): Build align_tab array with one
19232         more element.
19233         * opts.c (finish_options): Add alignment option limit check.
19234         (MAX_CODE_ALIGN): Likewise.
19235         (MAX_CODE_ALIGN_VALUE): Likewise.
19236         * doc/invoke.texi: Document maximum allowed option value for
19237         all -falign-* options.
19239 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
19241         PR target/84146
19242         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
19243         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
19244         * var-tracking.c (emit_note_insn_var_location): Remove all references
19245         to NOTE_INSN_CALL_ARG_LOCATION.
19246         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
19247         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
19248         Use copy_rtx_if_shared.
19249         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
19250         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
19251         (dwarf2out_var_location): Remove handling of
19252         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
19253         on call_insn.
19254         * final.c (final_scan_insn): Remove all references to
19255         NOTE_INSN_CALL_ARG_LOCATION.
19256         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
19257         before dumping final insns.
19258         * except.c (emit_note_eh_region_end): Remove all references to
19259         NOTE_INSN_CALL_ARG_LOCATION.
19260         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
19261         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
19262         * config/arc/arc.c (hwloop_optimize): Likewise.
19263         * config/arm/arm.c (create_fix_barrier): Likewise.
19264         * config/s390/s390.c (s390_chunkify_start): Likewise.
19265         * config/sh/sh.c (find_barrier): Likewise.
19266         * config/i386/i386.c (rest_of_insert_endbranch,
19267         ix86_seh_fixup_eh_fallthru): Likewise.
19268         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
19269         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
19270         * config/frv/frv.c (frv_function_prologue): Likewise.
19271         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
19272         reg note.
19273         (note_outside_basic_block_p): Remove all references to
19274         NOTE_INSN_CALL_ARG_LOCATION.
19275         * gengtype.c (adjust_field_rtx_def): Likewise.
19276         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
19277         Likewise.
19278         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
19279         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
19281         PR c++/84444
19282         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
19283         is ADDR_EXPR.
19285         PR tree-optimization/84452
19286         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
19287         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
19288         is NULL.
19290 2018-02-19  Martin Liska  <mliska@suse.cz>
19292         PR sanitizer/82183
19293         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
19295 2018-02-19  Martin Liska  <mliska@suse.cz>
19296             Richard Sandiford  <richard.sandiford@linaro.org>
19298         PR tree-optimization/82491
19299         * gimple-fold.c (get_base_constructor): Make earlier bail out
19300         to prevent ubsan.
19302 2018-02-19  Carl Love  <cel@us.ibm.com>
19304         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
19305         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
19306         BU_P8V_OVERLOAD_1.
19307         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
19308         P8V_BUILTIN_VEC_NEG.
19310 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
19312         * config/rl78/rl78.md (movdf): New define expand.
19314 2018-02-19  Martin Liska  <mliska@suse.cz>
19316         PR other/80589
19317         * doc/invoke.texi: Fix typo.
19318         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
19320 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
19322         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
19323         handle rs6000_single_float and rs6000_double_float specially for
19324         e500 family CPUs.
19326 2018-02-16  Jeff Law  <law@redhat.com>
19328         * config/rx/rx.c (add_pop_cfi_notes): New function.;
19329         (pop_regs): Use it.
19331 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
19333         PR ipa/84425
19334         * ipa-inline.c (inline_small_functions): Fix a typo.
19336 2018-02-16  Nathan Sidwell  <nathan@acm.org>
19338         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
19340 2018-02-16  Carl Love  <cel@us.ibm.com>
19342         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
19343         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
19344         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
19345         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
19346         expansion to P8V_BUILTIN_VEC_FLOAT2.
19348 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
19350         PR rtl-optimization/70023
19351         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
19352         src_regno into account.
19354 2018-02-16  Carl Love  <cel@us.ibm.com>
19356         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
19357         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
19358         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
19359         * config/rs6000/rs6000.c: Remove case statements for
19360         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
19361         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
19362         and P9V_BUILTIN_VEC_VINSERT4B.
19363         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
19364         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
19365         * config/rs6000/vsx.md:
19366         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
19367         vec_insert4b.
19369 2018-02-16  Carl Love  <cel@us.ibm.com>
19371         * config/rs6000/altivec.h: Add builtin names vec_extract4b
19372         vec_insert4b.
19373         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
19374         definitions.
19375         * config/rs6000/rs6000-c.c: Add the definitions for
19376         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
19377         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
19378         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
19379         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
19380         definition for insert4b and define insn *insert3b_internal.
19381         * doc/extend.texi: Add documentation for vec_extract4b.
19383 2018-02-16  Nathan Sidwell  <nathan@acm.org>
19385         * doc/extend.texi (Backwards Compatibility): Mention friend
19386         injection.  Note for-scope is deprecated.
19387         * doc/invoke.texi (-ffriend-injection): Deprecate.
19389 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
19391         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
19392         that moved to I2, also allow destinations that are a paradoxical
19393         subreg (instead of a normal reg).
19395 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
19397         PR target/83831
19398         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
19399         to QImode.
19401 2018-02-16  Richard Biener  <rguenther@suse.de>
19403         PR tree-optimization/84037
19404         PR tree-optimization/84016
19405         PR target/82862
19406         * config/i386/i386.c (ix86_builtin_vectorization_cost):
19407         Adjust vec_construct for the fact we need additional higher latency
19408         128bit inserts for AVX256 and AVX512 vector builds.
19409         (ix86_add_stmt_cost): Scale vector construction cost for
19410         elementwise loads.
19412 2018-02-16  Richard Biener  <rguenther@suse.de>
19414         PR tree-optimization/84417
19415         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
19416         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
19417         (non_rewritable_lvalue_p): Likewise, use poly-ints.
19419 2018-02-16  Martin Liska  <mliska@suse.cz>
19421         PR sanitizer/84307
19422         * internal-fn.def (ASAN_CHECK): Set proper flags.
19423         (ASAN_MARK): Likewise.
19425 2018-02-16  Julia Koval  <julia.koval@intel.com>
19427         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
19428         from PTA_CANNONLAKE.
19430 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
19432         PR target/84272
19433         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19434         Use ++iter rather than iter++ for std::list iterators.
19435         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
19436         defer deleting them until all nodes in the forest are processed.  Do
19437         free even leaf nodes.  Change to_process into auto_vec.
19439         PR bootstrap/84405
19440         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19441         * vec.h (vec_default_construct): Use memset instead of placement new
19442         if BROKEN_VALUE_INITIALIZATION is defined.
19443         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19444         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19445         is defined.
19447         PR rtl-optimization/83723
19448         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19449         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
19450         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
19451         recursive calls.
19452         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19453         callers.
19454         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19456 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
19458         PR rtl-optimization/81443
19459         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19460         from inner REGs to paradoxical SUBREGs.
19462 2018-02-16  Richard Biener  <rguenther@suse.de>
19464         PR tree-optimization/84399
19465         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19466         For operands we can analyze at their definition make sure we can
19467         analyze them at each use as well.
19469 2018-02-16  Richard Biener  <rguenther@suse.de>
19471         PR tree-optimization/84190
19472         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19473         volatile accesses if the decl isn't volatile.
19475 2018-02-15  Jason Merrill  <jason@redhat.com>
19477         PR c++/84314 - ICE with templates and fastcall attribute.
19478         * attribs.c (build_type_attribute_qual_variant): Don't clobber
19479         TYPE_CANONICAL on an existing type.
19481 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
19483         PR tree-optimization/84383
19484         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19485         dstoff nor call operand_equal_p if dstbase is NULL.
19487         PR tree-optimization/84334
19488         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19489         also a CONSTANT_CLASS_P, punt.
19491 2018-02-14  Jim Wilson  <jimw@sifive.com>
19493         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19494         first SMALL_OPERAND check.  New local min_second_step.  Move assert
19495         to where locals are set.  Add TARGET_RVC support.
19496         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19498 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
19500         * doc/invoke.texi: Correct -Wformat-overflow code sample.
19502 2018-02-14  Martin Sebor  <msebor@redhat.com>
19504         PR tree-optimization/83698
19505         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19506         arrays constrain the offset range to their bounds.
19507         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19508         (builtin_access::overlap): Avoid setting the size of overlap if it's
19509         already been set.
19510         (maybe_diag_overlap): Also consider arrays when deciding what values
19511         of offsets to include in diagnostics.
19513 2018-02-14  Martin Sebor  <msebor@redhat.com>
19515         PR c/84108
19516         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19517         that correspond to the kind of a declaration.
19519 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
19521         PR target/83984
19522         * config/pa/pa.md: Load address of PIC label using the linkage table
19523         if the label is nonlocal.
19525 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19527         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19528         warning message if user requests -maltivec=be.
19529         * doc/invoke.texi: Document deprecation of -maltivec=be.
19531 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
19533         PR target/84220
19534         * config/rs6000/rs6000-c.c: Update definitions for
19535         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19536         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19538 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19540         PR target/84239
19541         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19542         add _get_ssp intrinsics. Remove argument from
19543         __builtin_ia32_rdssp[d|q].
19544         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19545         * config/i386/i386-builtin.def: Remove argument from
19546         __builtin_ia32_rdssp[d|q].
19547         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19548         ix86_expand_special_args_builtin for _rdssp[d|q].
19549         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19550         Clear register before usage.
19551         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19552         Add documentation for new _get_ssp and _inc_ssp intrinsics.
19554 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
19556         PR tree-optimization/84357
19557         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19558         operand 1 of an ARRAY_REF too.
19560 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
19562         PR target/83831
19563         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19564         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19565         declarations.
19566         (set_of_reg): New struct.
19567         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19568         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19569         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19570         functions.
19571         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19572         Split into bitclr, bitset, bitinvert patterns if appropriate.
19573         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19574         use rx_fuse_in_memory_bitop.
19575         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19576         to named insn, correct maximum insn length.
19578 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
19580         PR target/79242
19581         * machmode.def: Define a complex mode for PARTIAL_INT.
19582         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19583         MODE_PARTIAL_INT.
19584         * doc/rtl.texi: Document CSPImode.
19585         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19586         handling.
19587         (msp430_hard_regno_nregs_with_padding): Likewise.
19589 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
19591         PR target/84279
19592         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19594 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
19596         PR rtl-optimization/84169
19597         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
19598         we generated a parallel as new i3 and we split that to new i2 and i3
19599         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
19600         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
19601         those to i2, not i1.  Partially rewrite this scan code.
19603 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
19605         PR c/82210
19606         * stor-layout.c (place_field): For variable length fields, adjust
19607         offset_align afterwards not just based on the field's alignment,
19608         but also on the size.
19610         PR middle-end/84309
19611         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19612         of exps and logs in the use_exp2 case.
19614 2018-02-13  Jeff Law  <law@redhat.com>
19616         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19617         entry for "vector".
19619         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19620         ARGS as unused.
19622 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
19624         PR debug/84342
19625         PR debug/84319
19626         * common.opt (gas-loc-support, gas-locview-support): New.
19627         (ginline-points, ginternal-reset-location-views): New.
19628         * doc/invoke.texi: Document them.  Use @itemx where intended.
19629         (gvariable-location-views): Adjust.
19630         * target.def (reset_location_view): New.
19631         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19632         (TARGET_RESET_LOCATION_VIEW): New.
19633         * doc/tm.texi: Rebuilt.
19634         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19635         (dwarf2out_default_as_locview_support): New.
19636         (output_asm_line_debug_info): Use option variables.
19637         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19638         (output_loc_list): Likewise.
19639         (add_high_low_attributes): Check option variables.
19640         Don't output entry view attribute in strict mode.
19641         (gen_inlined_subroutine_die): Check option variables.
19642         (dwarf2out_inline_entry): Likewise.
19643         (init_sections_and_labels): Likewise.
19644         (dwarf2out_early_finish): Likewise.
19645         (maybe_reset_location_view): New, from...
19646         (dwarf2out_var_location): ... here.  Call it.
19647         * debug.h (dwarf2out_default_as_loc_support): Declare.
19648         (dwarf2out_default_as_locview_support): Declare.
19649         * hooks.c (hook_int_rtx_insn_0): New.
19650         * hooks.h (hook_int_rtx_insn_0): Declare.
19651         * toplev.c (process_options): Take -gas-loc-support and
19652         -gas-locview-support from dwarf2out.  Enable
19653         -gvariable-location-views by default only with locview
19654         assembler support.  Enable -ginternal-reset-location-views by
19655         default only if the target defines the corresponding hook.
19656         Enable -ginline-points by default if location views are
19657         enabled; force it disabled if statement frontiers are
19658         disabled.
19659         * tree-inline.c (expand_call_inline): Check option variables.
19660         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19662 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
19664         PR tree-optimization/84321
19665         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19666         handling.  Also check whether the anti-range contains any values
19667         that satisfy the mask; switch to a VR_RANGE if not.
19669 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
19671         PR sanitizer/84340
19672         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19674 2018-02-13  Martin Jambor  <mjambor@suse.cz>
19676         PR c++/83990
19677         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19678         of call statements, also set location of a load to a temporary.
19680 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
19682         * config/rl78/rl78.c (add_vector_labels): New function.
19683         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19684         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19685         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19686         which checks that no arguments are passed.
19687         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19688         * doc/extend.texi: Documentation for the new attribute.
19690 2018-02-13  Andreas Schwab  <schwab@suse.de>
19692         * config/riscv/linux.h (CPP_SPEC): Define.
19694 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
19696         PR target/84335
19697         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19698         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19699         OPTION_MASK_ISA_AES as first argument to def_builtin_const
19700         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19701         instead of OPTION_MASK_ISA_PCLMUL as first argument to
19702         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19703         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19704         temporarily for AES and PCLMUL builtins.
19706         PR tree-optimization/84339
19707         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19708         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19709         Formatting fixes.
19711         PR middle-end/84309
19712         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19713         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19714         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19715         inline function.
19716         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19717         inline function.
19718         * omp-simd-clone.h: New file.
19719         * omp-simd-clone.c: Include omp-simd-clone.h.
19720         (expand_simd_clones): No longer static.
19721         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19722         cgraph.h and omp-simd-clone.h.
19723         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19724         (vect_recog_widen_shift_pattern): Formatting fix.
19725         (vect_pattern_recog_1): Don't check optab for calls.
19727         PR target/84336
19728         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19729         operands[2] into a REG before using gen_lowpart on it.
19731 2018-02-12  Jeff Law  <law@redhat.com>
19733         PR target/83760
19734         * config/sh/sh.c (find_barrier): Consider a sibling call
19735         a barrier as well.
19737         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19738         successfully back substituting a reg.
19740 2018-02-12  Richard Biener  <rguenther@suse.de>
19742         PR tree-optimization/84037
19743         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19744         parameter, move visited init to caller.
19745         (vect_slp_analyze_operations): Separate cost from validity
19746         check, initialize visited once for all instances.
19747         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19748         for all instances.
19749         * tree-vect-stmts.c (vect_model_simple_cost): Make early
19750         out an assert.
19751         (vect_model_promotion_demotion_cost): Likewise.
19752         (vectorizable_bswap): Guard cost modeling with !slp_node
19753         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19754         SLP stmts.
19755         (vectorizable_call): Likewise.
19756         (vectorizable_conversion): Likewise.
19757         (vectorizable_assignment): Likewise.
19758         (vectorizable_shift): Likewise.
19759         (vectorizable_operation): Likewise.
19760         (vectorizable_store): Likewise.
19761         (vectorizable_load): Likewise.
19762         (vectorizable_condition): Likewise.
19763         (vectorizable_comparison): Likewise.
19765 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
19767         PR sanitizer/84307
19768         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19769         (ASAN_MARK): Fix fnspec to account for return value, change pointer
19770         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19772 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19774         PR middle-end/83665
19775         * params.def (inline-min-speedup): Increase from 8 to 15.
19776         (max-inline-insns-auto): Decrease from 40 to 30.
19777         * ipa-split.c (consider_split): Add some buffer for function to
19778         be considered inlining candidate.
19779         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19780         default values.
19782 2018-02-12  Richard Biener  <rguenther@suse.de>
19784         PR tree-optimization/84037
19785         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19786         matched stmts if we cannot swap the non-matched ones.
19788 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
19790         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19791         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19792         _mm_maskz_scalef_round_ss): New intrinsics.
19793         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19794         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19795         __builtin_ia32_scalefss_round): Remove.
19796         (__builtin_ia32_scalefsd_mask_round,
19797         __builtin_ia32_scalefss_mask_round): New intrinsics.
19798         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19799         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19800         ((match_operand:VF_128 2 "<round_nimm_predicate>"
19801         "<round_constraint>")): Changed to ...
19802         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19803         "<round_scalar_constraint>")): ... this.
19804         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19805         %0, %1, %2<round_op3>}"): Changed to ...
19806         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19807         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19808         %2<round_scalar_mask_op3>}"): ... this.
19809         * config/i386/subst.md (round_scalar_nimm_predicate): New.
19811 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
19813         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19814         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19815         (_mm_maskz_sqrt_round_ss): New intrinsics.
19816         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19817         (__builtin_ia32_sqrtsd_mask_round)
19818         (__builtin_ia32_sqrtss_mask_round): New builtins.
19819         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19820         (__builtin_ia32_sqrtss_round): Remove.
19821         (__builtin_ia32_sqrtsd_mask_round)
19822         (__builtin_ia32_sqrtss_mask_round): New builtins.
19823         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19824         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19825         ((match_operand:VF_128 1 "vector_operand"
19826         "xBm,<round_constraint>")): Changed to ...
19827         ((match_operand:VF_128 1 "vector_operand"
19828         "xBm,<round_scalar_constraint>")): ... this.
19829         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19830         %0, %2, %<iptr>1<round_op3>}): Changed to ...
19831         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19832         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19833         %<iptr>1<round_scalar_mask_op3>}): ... this.
19834         ((set_attr "prefix" "<round_prefix>")): Changed to ...
19835         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19837 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
19839         PR target/84266
19840         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19841         Cast vec_cmpeq result to correct type.
19842         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19843         Cast vec_cmpgt result to correct type.
19845 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
19847         * final.c (final_scan_insn_1): Renamed from...
19848         (final_scan_insn): ... this.  New wrapper, to recover
19849         seen from the outermost call in recursive ones.
19850         * config/sparc/sparc.c (output_return): Drop seen from call.
19851         (output_sibcall): Likewise.
19852         * config/visium/visium.c (output_branch): Likewise.
19854 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
19856         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19857         function label.
19859 2018-02-10  Alan Modra  <amodra@gmail.com>
19861         PR target/84300
19862         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19863         Specify LR as an input.
19865 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
19867         PR sanitizer/83987
19868         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19869         remove_member_access_dummy_vars): New functions.
19870         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19871         lower_omp_1, execute_lower_omp): Use them.
19873         PR rtl-optimization/84308
19874         * shrink-wrap.c (spread_components): Release todo vector.
19876 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
19878         PR rtl-optimization/57193
19879         * ira-color.c (struct allocno_color_data): Add member
19880         conflict_allocno_hard_prefs.
19881         (update_conflict_allocno_hard_prefs): New.
19882         (bucket_allocno_compare_func): Add a preference based on
19883         conflict_allocno_hard_prefs.
19884         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19885         (color_allocnos): Remove a dead code.  Initiate
19886         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
19888 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
19890         PR target/84226
19891         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19892         constraint from =wa to wa.  Avoid a subreg on the output operand,
19893         instead use a pseudo and subreg it in a move.
19894         (p9_xxbrd_<mode>): Changed to ...
19895         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19896         (p9_xxbrd_v2df): New expander.
19897         (p9_xxbrw_<mode>): Changed to ...
19898         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19899         (p9_xxbrw_v4sf): New expander.
19901 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
19903         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19905 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
19907         PR target/83926
19908         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19909         multiply in 32-bit mode.
19910         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19911         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19912         mode.
19914 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
19916         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19917         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19918         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19919         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19921 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
19923         PR lto/84213
19924         * dwarf2out.c (is_trivial_indirect_ref): New function.
19925         (dwarf2out_late_global_decl): Do not generate a location
19926         attribute for variables that have a non-trivial DECL_VALUE_EXPR
19927         and that are not defined in the current unit.
19929 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
19931         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19932         instead of a libcall for UNORDERED.
19934 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
19936         PR target/82641
19937         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19938         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19940 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19942         PR target/PR84295
19943         * config/s390/s390.c (s390_set_current_function): Invoke
19944         s390_indirect_branch_settings also if fndecl didn't change.
19946 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
19948         * config/rs6000/rs6000.md (blockage): Set length to zero.
19950 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
19952         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19954 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
19956         PR sanitizer/84285
19957         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19958         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19959         -static-lib*san.
19961         PR debug/84252
19962         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19963         PARALLEL incoming that failed vt_get_decl_and_offset check.
19965         PR middle-end/84237
19966         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19967         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19968         TREE_READONLY bit.
19969         (get_variable_section): For decls in named .bss* sections pass true as
19970         second argument to bss_initializer_p.
19972 2018-02-09  Marek Polacek  <polacek@redhat.com>
19973             Jakub Jelinek  <jakub@redhat.com>
19975         PR c++/83659
19976         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19977         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
19978         Sync some changes from cxx_fold_indirect_ref.
19980 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
19982         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19983         markers.
19984         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19985         (BLOCK_INLINE_ENTRY_LABEL): New.
19986         (dwarf2out_var_location): Disregard inline entry markers.
19987         (inline_entry_data): New struct.
19988         (inline_entry_data_hasher): New hashtable type.
19989         (inline_entry_data_hasher::hash): New.
19990         (inline_entry_data_hasher::equal): New.
19991         (inline_entry_data_table): New variable.
19992         (add_high_low_attributes): Add DW_AT_entry_pc and
19993         DW_AT_GNU_entry_view attributes if a pending entry is found
19994         in inline_entry_data_table.  Add old entry_pc attribute only
19995         if debug nonbinding markers are disabled.
19996         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19997         markers are enabled.
19998         (block_within_block_p, dwarf2out_inline_entry): New.
19999         (dwarf2out_finish): Check that no entries remained in
20000         inline_entry_data_table.
20001         * final.c (reemit_insn_block_notes): Handle inline entry notes.
20002         (final_scan_insn, notice_source_line): Likewise.
20003         (rest_of_clean_state): Skip inline entry markers.
20004         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
20005         markers.
20006         * gimple.c (gimple_build_debug_inline_entry): New.
20007         * gimple.h (enum gimple_debug_subcode): Add
20008         GIMPLE_DEBUG_INLINE_ENTRY.
20009         (gimple_build_debug_inline_entry): Declare.
20010         (gimple_debug_inline_entry_p): New.
20011         (gimple_debug_nonbind_marker_p): Adjust.
20012         * insn-notes.def (INLINE_ENTRY): New.
20013         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
20014         inline entry marker notes.
20015         (print_insn): Likewise.
20016         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
20017         (INSN_DEBUG_MARKER_KIND): Likewise.
20018         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
20019         * tree-inline.c (expand_call_inline): Build and insert
20020         debug_inline_entry stmt.
20021         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
20022         inline entry blocks early, if nonbind markers are enabled.
20023         (dump_scope_block): Dump fragment info.
20024         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
20025         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
20026         (gimple_build_debug_inline_entry): New.
20027         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
20028         Enable/disable inline entry points too.
20029         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
20030         (DEBUG_INSN): Describe inline entry markers.
20032         * common.opt (gvariable-location-views): New.
20033         (gvariable-location-views=incompat5): New.
20034         * config.in: Rebuilt.
20035         * configure: Rebuilt.
20036         * configure.ac: Test assembler for view support.
20037         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
20038         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
20039         * dwarf2out.c (var_loc_view): New typedef.
20040         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
20041         (dwarf2out_locviews_in_attribute): New.
20042         (dwarf2out_locviews_in_loclist): New.
20043         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
20044         (enum dw_line_info_opcode): Add LI_adv_address.
20045         (struct dw_line_info_table): Add view.
20046         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
20047         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
20048         (zero_view_p): New variable.
20049         (ZERO_VIEW_P): New macro.
20050         (output_asm_line_debug_info): New.
20051         (struct var_loc_node): Add view.
20052         (add_AT_view_list, AT_loc_list): New.
20053         (add_var_loc_to_decl): Add view param.  Test it against last.
20054         (new_loc_list): Add view params.  Record them.
20055         (AT_loc_list_ptr): Handle loc and view lists.
20056         (view_list_to_loc_list_val_node): New.
20057         (print_dw_val): Handle dw_val_class_view_list.
20058         (size_of_die): Likewise.
20059         (value_format): Likewise.
20060         (loc_list_has_views): New.
20061         (gen_llsym): Set vl_symbol too.
20062         (maybe_gen_llsym, skip_loc_list_entry): New.
20063         (dwarf2out_maybe_output_loclist_view_pair): New.
20064         (output_loc_list): Output view list or entries too.
20065         (output_view_list_offset): New.
20066         (output_die): Handle dw_val_class_view_list.
20067         (output_dwarf_version): New.
20068         (output_compilation_unit_header): Use it.
20069         (output_skeleton_debug_sections): Likewise.
20070         (output_rnglists, output_line_info): Likewise.
20071         (output_pubnames, output_aranges): Update version comments.
20072         (output_one_line_info_table): Output view numbers in asm comments.
20073         (dw_loc_list): Determine current endview, pass it to new_loc_list.
20074         Call maybe_gen_llsym.
20075         (loc_list_from_tree_1): Adjust.
20076         (add_AT_location_description): Create view list attribute if
20077         needed, check it's absent otherwise.
20078         (convert_cfa_to_fb_loc_list): Adjust.
20079         (maybe_emit_file): Call output_asm_line_debug_info for test.
20080         (dwarf2out_var_location): Reset views as needed.  Precompute
20081         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
20082         attribute.  Set view.
20083         (new_line_info_table): Reset next view.
20084         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
20085         (dwarf2out_source_line): Likewise.  Output view resets and labels to
20086         the assembler, or select appropriate line info opcodes.
20087         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
20088         (optimize_string_length): Catch it.  Adjust.
20089         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
20090         dw_val_class_view_list, and remove it if no longer needed.
20091         (hash_loc_list): Hash view numbers.
20092         (loc_list_hasher::equal): Compare them.
20093         (optimize_location_lists): Check whether a view list symbol is
20094         needed, and whether the locview attribute is present, and
20095         whether they match.  Remove the locview attribute if no longer
20096         needed.
20097         (index_location_lists): Call skip_loc_list_entry for test.
20098         (dwarf2out_finish): Call output_asm_line_debug_info for test.
20099         Use output_dwarf_version.
20100         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
20101         (struct dw_val_node): Add val_view_list.
20102         * final.c (SEEN_NEXT_VIEW): New.
20103         (set_next_view_needed): New.
20104         (clear_next_view_needed): New.
20105         (maybe_output_next_view): New.
20106         (final_start_function): Rename to...
20107         (final_start_function_1): ... this.  Take pointer to FIRST,
20108         add SEEN parameter.  Emit param bindings in the initial view.
20109         (final_start_function): Reintroduce SEEN-less interface.
20110         (final): Rename to...
20111         (final_1): ... this.  Take SEEN parameter.  Output final pending
20112         next view at the end.
20113         (final): Reintroduce seen-less interface.
20114         (final_scan_insn): Output pending next view before switching
20115         sections or ending a block.  Mark the next view as needed when
20116         outputting variable locations.  Notify debug backend of section
20117         changes, and of location view changes.
20118         (rest_of_handle_final): Adjust.
20119         * toplev.c (process_options): Autodetect value for debug variable
20120         location views option.  Warn on incompat5 without -gdwarf-5.
20121         * doc/invoke.texi (gvariable-location-views): New.
20122         (gvariable-location-views=incompat5): New.
20123         (gno-variable-location-views): New.
20125 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
20127         PR tree-optimization/84136
20128         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
20129         that the result of find_edge is non-NULL.
20131 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
20133         PR target/83008
20134         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
20135         storing integer register in SImode.  Fix cost of 256 and 512
20136         byte aligned SSE register store.
20138 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
20140         * config/i386/i386.c (ix86_multiplication_cost): Fix
20141         multiplication cost for TARGET_AVX512DQ.
20143 2018-02-08  Marek Polacek  <polacek@redhat.com>
20145         PR tree-optimization/84238
20146         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
20147         get_range_strlen.
20149 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20151         PR tree-optimization/84265
20152         * tree-vect-stmts.c (vectorizable_store): Don't treat
20153         VMAT_CONTIGUOUS accesses as grouped.
20154         (vectorizable_load): Likewise.
20156 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20158         PR tree-optimization/81635
20159         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
20160         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
20161         (test_round_for_mask): New functions.
20162         (wide_int_cc_tests): Call test_round_for_mask.
20163         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
20164         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
20165         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
20166         range returned by get_range_info.
20168 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
20170         PR ipa/81360
20171         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
20172         * symtab.c: Include builtins.h
20173         (symtab_node::output_to_lto_symbol_table_p): Move here
20174         from lto-streamer-out.c:output_symbol_p.
20175         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
20176         (output_symbol_p): Move all logic to symtab.c
20177         (produce_symtab): Update.
20179 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20181         * config/s390/s390-opts.h (enum indirect_branch): Define.
20182         * config/s390/s390-protos.h (s390_return_addr_from_memory)
20183         (s390_indirect_branch_via_thunk)
20184         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
20185         (enum s390_indirect_branch_type): Define.
20186         * config/s390/s390.c (struct s390_frame_layout, struct
20187         machine_function): Remove.
20188         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
20189         (indirect_branch_table_label_no, indirect_branch_table_name):
20190         Define variables.
20191         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
20192         (enum s390_indirect_branch_option): Define.
20193         (s390_return_addr_from_memory): New function.
20194         (s390_handle_string_attribute): New function.
20195         (s390_attribute_table): Add new attribute handler.
20196         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
20197         (s390_indirect_branch_via_thunk): New function.
20198         (s390_indirect_branch_via_inline_thunk): New function.
20199         (s390_function_ok_for_sibcall): When jumping via thunk disallow
20200         sibling call optimization for non z10 compiles.
20201         (s390_emit_call): Force indirect branch target to be a single
20202         register.  Add r1 clobber for non-z10 compiles.
20203         (s390_emit_epilogue): Emit return jump via return_use expander.
20204         (s390_reorg): Handle JUMP_INSNs as execute targets.
20205         (s390_option_override_internal): Perform validity checks for the
20206         new command line options.
20207         (s390_indirect_branch_attrvalue): New function.
20208         (s390_indirect_branch_settings): New function.
20209         (s390_set_current_function): Invoke s390_indirect_branch_settings.
20210         (s390_output_indirect_thunk_function):  New function.
20211         (s390_code_end): Implement target hook.
20212         (s390_case_values_threshold): Implement target hook.
20213         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
20214         macros.
20215         * config/s390/s390.h (struct s390_frame_layout)
20216         (struct machine_function): Move here from s390.c.
20217         (TARGET_INDIRECT_BRANCH_NOBP_RET)
20218         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
20219         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
20220         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
20221         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
20222         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
20223         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
20224         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
20225         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
20226         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
20227         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
20228         (mnemonic attribute): Add values which aren't recognized
20229         automatically.
20230         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
20231         pattern for branch conversion.  Fix mnemonic attribute.
20232         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
20233         indirect branch via thunk if requested.
20234         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
20235         ("*indirect_jump"): Disable for branch conversion using out of
20236         line thunks.
20237         ("indirect_jump_via_thunk<mode>_z10")
20238         ("indirect_jump_via_thunk<mode>")
20239         ("indirect_jump_via_inlinethunk<mode>_z10")
20240         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
20241         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
20242         ("casesi_jump_via_inlinethunk<mode>_z10")
20243         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
20244         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
20245         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
20246         ("*indirect2_jump"): Disable for branch conversion.
20247         ("casesi_jump"): Turn into expander and expand patterns for branch
20248         conversion.
20249         ("return_use"): New expander.
20250         ("*return"): Emit return via thunk and rename it to ...
20251         ("*return<mode>"): ... this one.
20252         * config/s390/s390.opt: Add new options and and enum for the
20253         option values.
20255 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20257         * lra-constraints.c (match_reload): Unconditionally use
20258         gen_lowpart_SUBREG, rather than selecting between that
20259         and equivalent gen_rtx_SUBREG code.
20261 2018-02-08  Richard Biener  <rguenther@suse.de>
20263         PR tree-optimization/84233
20264         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
20265         changed flag instead of boguously re-using phi_inserted.
20267 2018-02-08  Martin Jambor  <mjambor@suse.cz>
20269         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
20270         static local variables.
20272 2018-02-08  Richard Biener  <rguenther@suse.de>
20274         PR tree-optimization/84278
20275         * tree-vect-stmts.c (vectorizable_store): When looking for
20276         smaller vector types to perform grouped strided loads/stores
20277         make sure the mode is supported by the target.
20278         (vectorizable_load): Likewise.
20280 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
20282         * config/aarch64/aarch64.c (aarch64_components_for_bb):
20283         Increase LDP/STP opportunities by adding adjacent callee-saves.
20285 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
20287         PR rtl-optimization/84068
20288         PR rtl-optimization/83459
20289         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
20291 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
20293         PR tree-optimization/84224
20294         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
20295         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
20296         non-zero arguments.
20298 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
20300         PR target/84113
20301         * config/rs6000/altivec.md (*restore_world): Remove LR use.
20302         * config/rs6000/predicates.md (restore_world_operation): Adjust op
20303         count, remove one USE.
20305 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
20307         * doc/install.texi (Configuration): Document the
20308         --with-long-double-format={ibm,ieee} PowerPC configuration
20309         options.
20311         PR target/84154
20312         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
20313         Convert from define_expand to be define_insn_and_split.  Rework
20314         float/double/_Float128 conversions to QI/HI/SImode to work with
20315         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
20316         conversions to QI/HImode types did a store and then a load to
20317         truncate the value.  For conversions to VSX registers, don't split
20318         the insn, instead emit the code directly.  Use the code iterator
20319         any_fix to combine signed and unsigned conversions.
20320         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
20321         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
20322         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20323         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
20324         (fix_<mode>di2_hw): Likewise.
20325         (fixuns_<mode>di2_hw): Likewise.
20326         (fix_<mode>si2_hw): Likewise.
20327         (fixuns_<mode>si2_hw): Likewise.
20328         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
20329         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20330         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
20331         fix<uns>_trunc<SFDF:mode>si2_p8.
20332         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
20333         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20334         (fix<uns>_<mode>_mem): Likewise.
20335         (fctiw<u>z_<mode>_mem): Likewise.
20336         (fix<uns>_<mode>_mem): Likewise.
20337         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
20338         the register allocator from doing a direct move to the GPRs to do
20339         a store, and instead use the ISA 3.0 store byte/half-word from
20340         vector register instruction.  For IEEE 128-bit floating point,
20341         also optimize stores of 32-bit ints.
20342         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
20344 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
20346         * genextract.c (push_pathstr_operand): New function to support
20347         [a-zA-Z].
20348         (walk_rtx): Call push_pathstr_operand.
20349         (print_path): Support [a-zA-Z].
20351 2018-02-07  Richard Biener  <rguenther@suse.de>
20353         PR tree-optimization/84037
20354         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
20355         (cse_and_gimplify_to_preheader): Declare.
20356         (vect_get_place_in_interleaving_chain): Likewise.
20357         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20358         ivexpr_map.
20359         (_loop_vec_info::~_loop_vec_info): Delete it.
20360         (cse_and_gimplify_to_preheader): New function.
20361         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
20362         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
20363         (vectorizable_load): Likewise.  For grouped stores always base
20364         the IV on the first element.
20365         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
20366         condition before gimplifying.
20368 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
20370         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
20371         *DIV_EXPR and *MOD_EXPR.
20373 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
20375         PR target/84248
20376         * config/i386/i386.c (ix86_option_override_internal): Mask out
20377         the CF_SET bit when checking -fcf-protection.
20379 2018-02-07  Tom de Vries  <tom@codesourcery.com>
20381         PR libgomp/84217
20382         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
20383         enough.
20385 2018-02-07  Richard Biener  <rguenther@suse.de>
20387         PR tree-optimization/84204
20388         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
20389         this place.
20391         PR tree-optimization/84205
20392         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
20393         special-case isl_ast_op_zdiv_r.
20395         PR tree-optimization/84223
20396         * graphite-scop-detection.c (gather_bbs::before_dom_children):
20397         Only add conditions from within the region.
20398         (gather_bbs::after_dom_children): Adjust.
20400 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
20402         PR target/84209
20403         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
20404         * config/avr/avr.md: Only post-reload split REG-REG moves if
20405         either register is GENERAL_REG_P.
20407 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
20409         PR tree-optimization/84235
20410         * tree-ssa-scopedtables.c
20411         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
20412         if the subtraction is performed in floating point type where NaNs are
20413         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
20414         build 1.  Formatting fix.
20416 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
20418         PR target/84146
20419         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
20420         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
20421         and skip it regardless of bb boundaries.  Use CALL_P macro,
20422         don't test INSN_P (insn) together with CALL_P or JUMP_P check
20423         unnecessarily, formatting fix.
20425 2018-02-06  Michael Collison  <michael.collison@arm.com>
20427         * config/arm/thumb2.md:
20428         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
20429         (*thumb_mov_notscc): Ditto.
20431 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
20433         PR target/84154
20434         * config/rs6000/rs6000.md (su code attribute): Use "u" for
20435         unsigned_fix, not "s".
20437 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20439         * configure.ac (gcc_fn_eh_frame_ro): New function.
20440         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20441         correct .eh_frame permissions.
20442         * configure: Regenerate.
20444 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
20446         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20447         irrelevant options.
20449 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20451         * config/rs6000/rs6000.c (rs6000_option_override_internal):
20452         Display warning message for -mno-speculate-indirect-jumps.
20454 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
20456         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20457         Undocumented.
20458         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20460 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
20462         PR tree-optimization/84225
20463         * tree-eh.c (find_trapping_overflow): Only call
20464         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20466 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20468         PR target/84145
20469         * config/i386/i386.c: Reimplement the check of possible options
20470         -mibt/-mshstk conbination. Change error messages.
20471         * doc/invoke.texi: Fix a typo: remove extra '='.
20473 2018-02-06  Marek Polacek  <polacek@redhat.com>
20475         PR tree-optimization/84228
20476         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20478 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
20480         PR target/82641
20481         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20482         emitted arch directives.
20483         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20484         __ARM_FEATURE_COPROC before changing architectures.
20486 2018-02-06  Richard Biener  <rguenther@suse.de>
20488         * config/i386/i386.c (print_reg): Fix typo.
20489         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20491 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
20493         * configure: Regenerate.
20495 2018-02-05  Martin Sebor  <msebor@redhat.com>
20497         PR tree-optimization/83369
20498         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20499         inlining context.
20501 2018-02-05  Martin Liska  <mliska@suse.cz>
20503         * doc/invoke.texi: Cherry-pick upstream r323995.
20505 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
20507         * ira.c (ira_init_register_move_cost): Adjust comment.
20509 2018-02-05  Martin Liska  <mliska@suse.cz>
20511         PR gcov-profile/84137
20512         * doc/gcov.texi: Fix typo in documentation.
20514 2018-02-05  Martin Liska  <mliska@suse.cz>
20516         PR gcov-profile/83879
20517         * doc/gcov.texi: Document necessity of --dynamic-list-data when
20518         using dlopen functionality.
20520 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
20522         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20523         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20524         _mm_maskz_range_ss, _mm_mask_range_round_ss,
20525         _mm_maskz_range_round_ss): New intrinsics.
20526         (__builtin_ia32_rangesd128_round)
20527         (__builtin_ia32_rangess128_round): Remove.
20528         (__builtin_ia32_rangesd128_mask_round,
20529         __builtin_ia32_rangess128_mask_round): New builtins.
20530         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20531         __builtin_ia32_rangess128_round): Remove.
20532         (__builtin_ia32_rangesd128_mask_round,
20533         __builtin_ia32_rangess128_mask_round): New builtins.
20534         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20535         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20536         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20537         "<round_saeonly_constraint>")): Changed to ...
20538         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20539         "<round_saeonly_scalar_constraint>")): ... this.
20540         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20541         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20542         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20543         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20544         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20546 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
20548         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20549         options.
20550         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20551         Remove all values except native, 8540 and 8548.
20553 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
20555         * config/i386/i386.c (ix86_output_function_return): Pass
20556         INVALID_REGNUM, instead of -1, as invalid register number to
20557         indirect_thunk_name and output_indirect_thunk.
20559 2018-02-02  Julia Koval  <julia.koval@intel.com>
20561         * config.gcc: Add -march=icelake.
20562         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20563         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20564         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20565         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20566         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20567         (processor_target_table): Add icelake.
20568         (ix86_option_override_internal): Handle new PTAs.
20569         (get_builtin_code_for_version): Handle icelake.
20570         (M_INTEL_COREI7_ICELAKE): New.
20571         (fold_builtin_cpu): Handle icelake.
20572         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20573         * doc/invoke.texi: Add -march=icelake.
20575 2018-02-02  Julia Koval  <julia.koval@intel.com>
20577         * config/i386/i386.c (ix86_option_override_internal): Change flags type
20578         to wide_int_bitmask.
20579         * wide-int-bitmask.h: New.
20581 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20583         PR target/84066
20584         * config/i386/i386.md: Replace Pmode with word_mode in
20585         builtin_setjmp_setup and builtin_longjmp to support x32.
20587 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
20589         PR target/56010
20590         PR target/83743
20591         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20592         #include "opts.h".
20593         (rs6000_supported_cpu_names): New static variable.
20594         (linux_cpu_translation_table): Likewise.
20595         (elf_platform) <cpu>: Define new static variable and use it.
20596         Translate kernel AT_PLATFORM name to canonical name if needed.
20597         Error if platform name is unknown.
20599 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
20601         PR target/84089
20602         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20604 2018-02-01  Jeff Law  <law@redhat.com>
20606         PR target/84128
20607         * config/i386/i386.c (release_scratch_register_on_entry): Add new
20608         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
20609         the scratch if RELEASE_VIA_POP is false.
20610         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20611         If we have to save a temporary register, decrement SIZE appropriately.
20612         Pass new arguments to release_scratch_register_on_entry.
20613         (ix86_adjust_stack_and_probe): Likewise.
20614         (ix86_emit_probe_stack_range): Pass new arguments to
20615         release_scratch_register_on_entry.
20617 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
20619         PR rtl-optimization/84157
20620         * combine.c (change_zero_ext): Use REG_P predicate in
20621         front of HARD_REGISTER_P predicate.
20623 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
20625         * config/avr/avr.c (avr_option_override): Move disabling of
20626         -fdelete-null-pointer-checks to...
20627         * common/config/avr/avr-common.c (avr_option_optimization_table):
20628         ...here.
20630 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20632         PR tree-optimization/81635
20633         * tree-data-ref.c (split_constant_offset_1): For types that
20634         wrap on overflow, try to use range info to prove that wrapping
20635         cannot occur.
20637 2018-02-01  Renlin Li  <renlin.li@arm.com>
20639         PR target/83370
20640         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20641         TAILCALL_ADDR_REGS.
20642         (aarch64_register_move_cost): Likewise.
20643         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20644         TAILCALL_ADDR_REGS.
20645         (REG_CLASS_NAMES): Likewise.
20646         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20647         TAILCALL_ADDR_REGS. Remove IP registers.
20648         * config/aarch64/aarch64.md (Ucs): Update register constraint.
20650 2018-02-01  Richard Biener  <rguenther@suse.de>
20652         * domwalk.h (dom_walker::dom_walker): Add additional constructor
20653         for specifying RPO order and allow NULL for that.
20654         * domwalk.c (dom_walker::dom_walker): Likewise.
20655         (dom_walker::walk): Handle NULL RPO order.
20656         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20657         in RPO order.
20658         (rewrite_update_dom_walker): Likewise.
20659         (mark_def_dom_walker): Likewise.
20661 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20663         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20664         (aarch64_maybe_expand_sve_subreg_move): Declare.
20665         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20666         * config/aarch64/predicates.md (aarch64_any_register_operand): New
20667         predicate.
20668         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20669         that are semantically a reverse operation.
20670         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20671         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20672         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20673         functions.
20674         (aarch64_can_change_mode_class): For big-endian, forbid changes
20675         between two SVE modes if they have different element sizes.
20677 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20679         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20680         the TImode handling for big-endian targets.
20682 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20684         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20685         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
20686         not just bytes.
20687         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20688         Remove BSWAP handing for big-endian targets and use the form of
20689         LD1RQ appropariate for the mode.
20691 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20693         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20694         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20695         duplicated element.
20697 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20699         PR tearget/83845
20700         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20701         check for operands that need to go through aarch64_sve_reload_be.
20703 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
20705         PR tree-optimization/81661
20706         PR tree-optimization/84117
20707         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20708         * tree-eh.c: Include gimplify.h.
20709         (find_trapping_overflow, replace_trapping_overflow,
20710         rewrite_to_non_trapping_overflow): New functions.
20711         * tree-vect-loop.c: Include tree-eh.h.
20712         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20713         * tree-data-ref.c: Include tree-eh.h.
20714         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20716 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
20718         PR rtl-optimization/84123
20719         * combine.c (change_zero_ext): Check if hard register satisfies
20720         can_change_dest_mode before calling gen_lowpart_SUBREG.
20722 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
20724         PR target/82444
20725         * ira.c (ira_init_register_move_cost): Remove assert.
20727 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
20729         PR rtl-optimization/84071
20730         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20731         * doc/tm.texi: Regenerate.
20733 2018-01-31  Richard Biener  <rguenther@suse.de>
20735         PR tree-optimization/84132
20736         * tree-data-ref.c (analyze_miv_subscript): Properly
20737         check whether evolution_function_is_affine_multivariate_p
20738         before calling gcd_of_steps_may_divide_p.
20740 2018-01-31  Julia Koval  <julia.koval@intel.com>
20742         PR target/83618
20743         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20744         * config/i386/i386.md (rdpid_rex64) New.
20745         (rdpid): Make 32bit only.
20747 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
20749         PR lto/84105
20750         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20751         an IDENTIFIER_NODE for FUNCTION_TYPE's.
20753 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
20755         Revert
20756         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20758         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20760 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
20762         PR rtl-optimization/84071
20763         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20764         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20766 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
20768         * config/arc/arc.c (arc_handle_aux_attribute): New function.
20769         (arc_attribute_table): Add 'aux' attribute.
20770         (arc_in_small_data_p): Consider aux like variables.
20771         (arc_is_aux_reg_p): New function.
20772         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20773         (arc_get_aux_arg): New function.
20774         (prepare_move_operands): Handle aux-register access.
20775         (arc_handle_aux_attribute): New function.
20776         * doc/extend.texi (ARC Variable attributes): Add subsection.
20778 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
20780         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20781         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20782         (arc_attribute_table): Add 'uncached' attribute.
20783         (arc_print_operand): Print '.di' flag for uncached memory
20784         accesses.
20785         (arc_in_small_data_p): Do not consider for small data the uncached
20786         types.
20787         (arc_is_uncached_mem_p): New function.
20788         * config/arc/predicates.md (compact_store_memory_operand): Check
20789         for uncached memory accesses.
20790         (nonvol_nonimm_operand): Likewise.
20791         * doc/extend.texi (ARC Type Attribute): New subsection.
20793 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
20795         PR c/84100
20796         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20797         falign-loops=): Add Optimization flag.
20799 2018-01-30  Jeff Law  <law@redhat.com>
20801         PR target/84064
20802         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20803         INT_REGISTERS_SAVED.  Check it prior to calling
20804         get_scratch_register_on_entry.
20805         (ix86_adjust_stack_and_probe): Similarly.
20806         (ix86_emit_probe_stack_range): Similarly.
20807         (ix86_expand_prologue): Corresponding changes.
20809 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20811         PR target/40411
20812         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20813         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20815 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
20817         PR target/84112
20818         * lra-constraints.c (curr_insn_transform): Process AND in the
20819         address.
20821 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
20823         PR rtl-optimization/83986
20824         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20825         dependence against last_pending_memory_flush in addition to
20826         pending_jump_insns.
20828 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
20830         PR tree-optimization/81611
20831         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20832         copies.
20834 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20836         PR target/83758
20837         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20838         a reg rtx.
20840 2018-01-30  Richard Biener  <rguenther@suse.de>
20841             Jakub Jelinek  <jakub@redhat.com>
20843         PR tree-optimization/84111
20844         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20845         inner loops added during recursion, as they don't have up-to-date
20846         SSA form.
20848 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
20850         PR ipa/81360
20851         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20852         (can_inline_edge_by_limits_p): ... here.
20853         (can_early_inline_edge_p, check_callers,
20854         update_caller_keys, update_callee_keys, recursive_inlining,
20855         add_new_edges_to_heap, speculation_useful_p,
20856         inline_small_functions,
20857         inline_small_functions, flatten_function,
20858         inline_to_all_callers_1): Update.
20860 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
20862         * profile-count.c (profile_count::combine_with_ipa_count): Handle
20863         zeros correctly.
20865 2018-01-30  Richard Biener  <rguenther@suse.de>
20867         PR tree-optimization/83008
20868         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20869         invariant and constant vector uses in stmts when they need
20870         more than one stmt.
20872 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20874         PR bootstrap/84017
20875         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20876         * configure: Regenerate.
20878 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20880         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20881         pattern.
20882         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20883         Use gen_rtx_REG rather than gen_lowpart.
20885 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20887         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20888         rather than 0 when creating partial subregs.
20890 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20892         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20893         of usage.
20895 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
20897         PR target/81550
20898         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20899         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20900         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20901         flags.  This restores the settings used before the 2017-07-24.
20902         Turning off pre increment/decrement/modify allows IVOPTS to
20903         optimize DF/SF loops where the index is an int.
20905 2018-01-29  Richard Biener  <rguenther@suse.de>
20906             Kelvin Nilsen  <kelvin@gcc.gnu.org>
20908         PR bootstrap/80867
20909         * tree-vect-stmts.c (vectorizable_call): Don't call
20910         targetm.vectorize_builtin_md_vectorized_function if callee is
20911         NULL.
20913 2018-01-22  Carl Love  <cel@us.ibm.com>
20915         * doc/extend.tex: Fix typo in second arg in
20916         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20918 2018-01-29  Richard Biener  <rguenther@suse.de>
20920         PR tree-optimization/84086
20921         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20922         (flush_ssaname_freelist): When SSA names were released reset
20923         the SCEV hash table.
20925 2018-01-29  Richard Biener  <rguenther@suse.de>
20927         PR tree-optimization/84057
20928         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20929         removed paths when removing edges.
20931 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
20933         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20934         -mfunction-return=@var{choice}.
20936 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20938         PR diagnostic/84034
20939         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20940         Handle CR like TAB.
20941         (layout::print_source_line): Likewise.
20942         (test_get_line_width_without_trailing_whitespace): Add test cases.
20944 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
20946         PR middle-end/84040
20947         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20948         debug insns.
20950 2018-01-26  Jim Wilson  <jimw@sifive.com>
20952         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20954         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20955         specified.
20957 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20959         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20960         and CMP + SUB-immediate -> SUBS.
20962 2018-01-26  Martin Sebor  <msebor@redhat.com>
20964         PR tree-optimization/83896
20965         * tree-ssa-strlen.c (get_string_len): Rename...
20966         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
20967         Avoid assuming length is constant.
20968         (handle_char_store): Use HOST_WIDE_INT for string length.
20970 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
20972         PR target/81763
20973         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20974         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20976 2018-01-26  Richard Biener  <rguenther@suse.de>
20978         PR rtl-optimization/84003
20979         * dse.c (record_store): Only record redundant stores when
20980         the earlier store aliases at least all accesses the later one does.
20982 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
20984         PR rtl-optimization/83985
20985         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20986         REG_CFA_RESTORE insns.
20987         (delete_unmarked_insns): Don't ignore separate shrink wrapping
20988         REG_CFA_RESTORE insns here.
20990         PR c/83989
20991         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20992         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20994 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20996         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20997         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20998         (arc_init): Likewise.
20999         (arc_override_options): Likewise.
21000         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
21001         value.
21002         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
21003         support.
21004         * config/arc/arc.h (TARGET_DBNZ): Define.
21005         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
21006         properly set the tune attribute.
21007         (dbnz): Use TARGET_DBNZ guard.
21008         * config/arc/arc.opt (mtune): Add core3 option.
21010 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21012         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
21013         recognize new pic like addresses.
21014         (arc_delegitimize_address): Clean up.
21016 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21018         * config/arc/arc-arches.def: Option mrf16 valid for all
21019         architectures.
21020         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
21021         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
21022         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
21023         * config/arc/arc-tables.opt: Regenerate.
21024         * config/arc/arc.c (arc_conditional_register_usage): Handle
21025         reduced register file case.
21026         (arc_file_start): Set must have build attributes.
21027         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
21028         mrf16 option value.
21029         * config/arc/arc.opt (mrf16): Add new option.
21030         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
21031         * config/arc/genmultilib.awk: Handle new mrf16 option.
21032         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
21033         * config/arc/t-multilib: Regenerate.
21034         * doc/invoke.texi (ARC Options): Document mrf16 option.
21036 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21038         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
21039         * config/arc/arc.c (arc_handle_secure_attribute): New function.
21040         (arc_attribute_table): Add 'secure_call' attribute.
21041         (arc_print_operand): Print secure call operand.
21042         (arc_function_ok_for_sibcall): Don't optimize tail calls when
21043         secure.
21044         (arc_is_secure_call_p): New function.  * config/arc/arc.md
21045         (call_i): Add support for sjli instruction.
21046         (call_value_i): Likewise.
21047         * config/arc/constraints.md (Csc): New constraint.
21049 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21050             John Eric Martin  <John.Martin@emmicro-us.com>
21052         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
21053         * config/arc/arc.c (_arc_jli_section): New struct.
21054         (arc_jli_section): New type.
21055         (rc_jli_sections): New static variable.
21056         (arc_handle_jli_attribute): New function.
21057         (arc_attribute_table): Add jli_always and jli_fixed attribute.
21058         (arc_file_end): New function.
21059         (TARGET_ASM_FILE_END): Define.
21060         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
21061         (arc_add_jli_section): New function.
21062         (jli_call_scan): Likewise.
21063         (arc_reorg): Call jli_call_scan.
21064         (arc_output_addsi): Remove 'S' from printing asm operand.
21065         (arc_is_jli_call_p): New function.
21066         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
21067         operand.
21068         (movhi_insn): Likewise.
21069         (movsi_insn): Likewise.
21070         (movsi_set_cc_insn): Likewise.
21071         (loadqi_update): Likewise.
21072         (load_zeroextendqisi_update): Likewise.
21073         (load_signextendqisi_update): Likewise.
21074         (loadhi_update): Likewise.
21075         (load_zeroextendhisi_update): Likewise.
21076         (load_signextendhisi_update): Likewise.
21077         (loadsi_update): Likewise.
21078         (loadsf_update): Likewise.
21079         (movsicc_insn): Likewise.
21080         (bset_insn): Likewise.
21081         (bxor_insn): Likewise.
21082         (bclr_insn): Likewise.
21083         (bmsk_insn): Likewise.
21084         (bicsi3_insn): Likewise.
21085         (cmpsi_cc_c_insn): Likewise.
21086         (movsi_ne): Likewise.
21087         (movsi_cond_exec): Likewise.
21088         (clrsbsi2): Likewise.
21089         (norm_f): Likewise.
21090         (normw): Likewise.
21091         (swap): Likewise.
21092         (divaw): Likewise.
21093         (flag): Likewise.
21094         (sr): Likewise.
21095         (kflag): Likewise.
21096         (ffs): Likewise.
21097         (ffs_f): Likewise.
21098         (fls): Likewise.
21099         (call_i): Remove 'S' asm letter, add jli instruction.
21100         (call_value_i): Likewise.
21101         * config/arc/arc.op (mjli-always): New option.
21102         * config/arc/constraints.md (Cji): New constraint.
21103         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
21104         operand.
21105         (subsf3_fpx): Likewise.
21106         (mulsf3_fpx): Likewise.
21107         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
21108         asm operand.
21109         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
21110         function attrbutes.
21111         * doc/invoke.texi (ARC): Document mjli-always option.
21113 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
21115         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
21116         avoid addition with 0 and use incw and decw where possible.
21118 2018-01-26  Richard Biener  <rguenther@suse.de>
21120         PR tree-optimization/81082
21121         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
21122         association if it requires casting to unsigned.
21123         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
21124         from fold_plusminus_mult_expr to catch important cases late when
21125         range info is available.
21127 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21129         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
21130         * configure.ac (hidden_linkonce): New test.
21131         * configure: Regenerate.
21132         * config.in: Regenerate.
21134 2018-01-26  Julia Koval  <julia.koval@intel.com>
21136         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
21137         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
21138         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
21139         _mm_mask_bitshuffle_epi64_mask): Fix type.
21140         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
21141         USI_FTYPE_V4DI_V4DI_USI): Remove.
21142         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
21143         __builtin_ia32_vpshufbitqmb256_mask,
21144         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
21145         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
21146         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
21148 2018-01-26  Alan Modra  <amodra@gmail.com>
21150         PR target/84033
21151         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
21152         UNSPEC_VBPERMQ.  Sort other unspecs.
21154 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
21156         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
21158 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
21160         PR middle-end/83055
21161         * predict.c (drop_profile): Do not push/pop cfun; update also
21162         node->count.
21163         (handle_missing_profiles): Fix logic looking for zero profiles.
21165 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
21167         PR middle-end/83977
21168         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
21169         on functions with #pragma omp declare simd or functions with simd
21170         attribute.
21171         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
21172         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
21173         Remove trailing \n from warning_at calls.
21175 2018-01-25  Tom de Vries  <tom@codesourcery.com>
21177         PR target/84028
21178         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21179         for neutered workers.
21181 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
21183         PR target/68467
21184         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
21185         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
21187 2018-01-24  Jeff Law  <law@redhat.com>
21189         PR target/83994
21190         * i386.c (get_probe_interval): Move to earlier point.
21191         (ix86_compute_frame_layout): If -fstack-clash-protection and
21192         the frame is larger than the probe interval, then use pushes
21193         to save registers rather than reg->mem moves.
21194         (ix86_expand_prologue): Remove conditional for int_registers_saved
21195         assertion.
21197 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
21199         PR target/84014
21200         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
21201         min/max for never referenced object.
21203 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
21205         PR middle-end/83977
21206         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
21207         here.
21208         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
21209         attributes from DECL_ATTRIBUTES (decl) without affecting
21210         DECL_ATTRIBUTES (current_function_decl).
21211         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
21212         functions with non-NULL DECL_ABSTRACT_ORIGIN.
21214 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
21216         PR tree-optimization/83979
21217         * fold-const.c (fold_comparison): Use constant_boolean_node
21218         instead of boolean_{true,false}_node.
21220 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
21222         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
21223         with zero counts.
21225 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21227         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21228         Simplify the clause that sets the length attribute.
21229         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21230         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
21231         clause that sets the length attribute.
21232         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21234 2018-01-24  Tom de Vries  <tom@codesourcery.com>
21236         PR target/83589
21237         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
21238         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
21239         Add strict parameter.
21240         (prevent_branch_around_nothing): Insert dummy insn between branch to
21241         label and label with no ptx insn inbetween.
21242         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
21244 2018-01-24  Tom de Vries  <tom@codesourcery.com>
21246         PR target/81352
21247         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21248         for neutered threads in warp.
21249         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
21251 2018-01-24  Richard Biener  <rguenther@suse.de>
21253         PR tree-optimization/83176
21254         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
21255         operands.
21257 2018-01-24  Richard Biener  <rguenther@suse.de>
21259         PR tree-optimization/82819
21260         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
21261         code generating pluses that are no-ops in the target precision.
21263 2018-01-24  Richard Biener  <rguenther@suse.de>
21265         PR middle-end/84000
21266         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
21268 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
21270         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
21271         to merge probabilities.
21272         * predict.c (probably_never_executed): Also mark as cold functions
21273         with global 0 profile and guessed local profile.
21274         * profile-count.c (profile_probability::combine_with_count): New
21275         member function.
21276         * profile-count.h (profile_probability::operator*,
21277         profile_probability::operator*=, profile_probability::operator/,
21278         profile_probability::operator/=): Reduce precision to adjusted
21279         and set value to guessed on contradictory divisions.
21280         (profile_probability::combine_with_freq): Remove.
21281         (profile_probability::combine_wiht_count): Declare.
21282         (profile_count::force_nonzero):: Set to adjusted.
21283         (profile_count::probability_in):: Set quality to adjusted.
21284         * tree-ssa-tail-merge.c (replace_block_by): Use
21285         combine_with_count.
21287 2018-01-23  Andrew Waterman  <andrew@sifive.com>
21288             Jim Wilson  <jimw@sifive.com>
21290         * config/riscv/riscv.c (riscv_stack_boundary): New.
21291         (riscv_option_override): Set riscv_stack_boundary.  Handle
21292         riscv_preferred_stack_boundary_arg.
21293         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
21294         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
21295         (STACK_BOUNDARY): Set to riscv_stack_boundary.
21296         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
21297         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
21298         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
21300 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
21302         PR target/83905
21303         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
21304         of struct ix86_frame.
21305         (ix86_expand_epilogue): Likewise.  Add a local variable for
21306         the reg_save_offset field in struct ix86_frame.
21308 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
21310         PR tree-optimization/82604
21311         * tree-loop-distribution.c (enum partition_kind): New enum item
21312         PKIND_PARTIAL_MEMSET.
21313         (partition_builtin_p): Support above new enum item.
21314         (generate_code_for_partition): Ditto.
21315         (compute_access_range): Differentiate cases that equality can be
21316         proven at all loops, the innermost loops or no loops.
21317         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
21318         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
21319         (finalize_partitions, distribute_loop): Don't fuse partition of
21320         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
21321         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
21322         parloop is enabled.
21324 2018-01-23  Martin Liska  <mliska@suse.cz>
21326         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
21327         order to ignore the predictor.
21328         (PRED_POLYMORPHIC_CALL): Likewise.
21329         (PRED_RECURSIVE_CALL): Likewise.
21331 2018-01-23  Martin Liska  <mliska@suse.cz>
21333         * tree-profile.c (tree_profiling): Print function header to
21334         aware reader which function we are working on.
21335         * value-prof.c (gimple_find_values_to_profile): Do not print
21336         not interesting value histograms.
21338 2018-01-23  Martin Liska  <mliska@suse.cz>
21340         * profile-count.h (enum profile_quality): Add
21341         profile_uninitialized as the first value. Do not number values
21342         as they are zero based.
21343         (profile_count::verify): Update sanity check.
21344         (profile_probability::verify): Likewise.
21346 2018-01-23  Nathan Sidwell  <nathan@acm.org>
21348         * doc/invoke.texi (ffor-scope): Deprecate.
21350 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
21352         PR tree-optimization/83510
21353         * domwalk.c (set_all_edges_as_executable): New function.
21354         (dom_walker::dom_walker): Convert bool param
21355         "skip_unreachable_blocks" to enum reachability.  Move setup of
21356         edge flags to set_all_edges_as_executable and only do it when
21357         reachability is REACHABLE_BLOCKS.
21358         * domwalk.h (enum dom_walker::reachability): New enum.
21359         (dom_walker::dom_walker): Convert bool param
21360         "skip_unreachable_blocks" to enum reachability.
21361         (set_all_edges_as_executable): New decl.
21362         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
21363         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
21364         "reachability".
21365         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
21366         but converting true to REACHABLE_BLOCKS.
21367         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
21368         * tree-vrp.c
21369         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
21370         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
21371         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
21372         REACHABLE_BLOCKS.
21373         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
21374         if check_all_array_refs will be called.
21376 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
21378         * tree.c (selftest::test_location_wrappers): Add more test
21379         coverage.
21381 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
21383         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
21384         (selftest::test_bit_in_range): Likewise.
21386 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
21388         PR testsuite/83888
21389         * doc/sourcebuild.texi (vect_float): Say that the selector
21390         only describes the situation when -funsafe-math-optimizations is on.
21391         (vect_float_strict): Document.
21393 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
21395         PR tree-optimization/83965
21396         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
21397         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
21398         instead of checking only for a reduction.
21399         (vect_recog_widen_sum_pattern): Likewise.
21401 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
21403         * predict.c (probably_never_executed): Only use precise profile info.
21404         (compute_function_frequency): Skip after inlining hack since we now
21405         have quality checking.
21407 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
21409         * profile-count.h (profile_probability::very_unlikely,
21410         profile_probability::unlikely, profile_probability::even): Set
21411         precision to guessed.
21413 2018-01-23  Richard Biener  <rguenther@suse.de>
21415         PR tree-optimization/83963
21416         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
21417         Properly terminate dominator walk when crossing the exit edge not
21418         when visiting its source block.
21420 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
21422         PR c++/83918
21423         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
21424         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
21426 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
21428         PR tree-optimization/83957
21429         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
21430         semicolon after for body surrounded by braces.
21432         PR tree-optimization/83081
21433         * profile-count.h (profile_probability::split): New method.
21434         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21435         Use profile_probability::split.
21436         (do_compare_rtx_and_jump): Fix adjustment of probabilities
21437         when splitting a single conditional jump into 2.
21439 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
21441         PR tree-optimization/69452
21442         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21443         decl.
21445 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21447         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21448         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21449         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21451 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21453         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21454         declaration.
21455         * config/rl78/rl78.md (movdi): New define_expand.
21456         * config/rl78/rl78.c (rl78_split_movdi): New function.
21458 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
21460         PR target/83862
21461         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21462         no longer used.
21463         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21464         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21465         128-bit to produce an UNSPEC move to get the double word with the
21466         signbit and then a shift directly to do signbit.
21467         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21468         implementation with a new version that just does either a direct
21469         move or a regular move.  Move memory interface to separate insns.
21470         Move insns so they are next to the expander.
21471         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21472         with signbit move.  Split big and little endian case.
21473         (signbit<mode>2_dm_mem_le): Likewise.
21474         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21475         (signbit<mode>2_dm2): Likewise.
21477 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21479         * config/rl78/rl78.md (anddi3): New define_expand.
21481 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21483         * config/rl78/rl78.md (umindi3): New define_expand.
21485 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21487         * config/rl78/rl78.md (smindi3): New define_expand.
21489 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21491         * config/rl78/rl78.md (smaxdi3): New define_expand.
21493 2018-01-22  Carl Love  <cel@us.ibm.com>
21495         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21496         LVX_V1TI): Add macro expansion.
21497         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21498         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21499         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21500         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21501         Change check to determine if the instruction is a byte reversing
21502         entry.  Fix typo in comment.
21503         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21504         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21505         Add def_builtin calls for new builtins.
21506         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21507         Add define_insn expansion.
21509 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21511         * config/rl78/rl78.md (umaxdi3): New define_expand.
21513 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21515         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21516         for non-QImode registers.
21518 2018-01-22  Richard Biener  <rguenther@suse.de>
21520         PR tree-optimization/83963
21521         * graphite-scop-detection.c (scop_detection::get_sese): Delay
21522         including the loop exit block.
21523         (scop_detection::merge_sese): Likewise.
21524         (scop_detection::add_scop): Do it here instead.
21526 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21528         * doc/sourcebuild.texi (arm_softfloat): Document.
21530 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
21532         PR gcc/77734
21533         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21534         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21535         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21537 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21538             David Edelsohn  <dje.gcc@gmail.com>
21540         PR target/83946
21541         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21542         Change "crset eq" to "crset 2".
21543         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21544         (*call_indirect_aix<mode>_nospec): Likewise.
21545         (*call_value_indirect_aix<mode>_nospec): Likewise.
21546         (*call_indirect_elfv2<mode>_nospec): Likewise.
21547         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21548         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21549         change assembly output from . to $.
21550         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21551         (indirect_jump<mode>_nospec): Change assembly output from . to $.
21552         (*tablejump<mode>_internal1_nospec): Likewise.
21554 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
21556         PR target/80870
21557         * config/sh/sh_optimize_sett_clrt.cc:
21558         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21560 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
21562         PR tree-optimization/83940
21563         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21564         offset_dt to vect_constant_def rather than vect_unknown_def_type.
21565         (vect_check_load_store_mask): Add a mask_dt_out parameter and
21566         use it to pass back the definition type.
21567         (vect_check_store_rhs): Likewise rhs_dt_out.
21568         (vect_build_gather_load_calls): Add a mask_dt argument and use
21569         it instead of a call to vect_is_simple_use.
21570         (vectorizable_store): Update calls to vect_check_load_store_mask
21571         and vect_check_store_rhs.  Use the dt returned by the latter instead
21572         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
21573         instead of calls to vect_is_simple_use.  Pass the scalar rather
21574         than the vector operand to vect_is_simple_use when handling
21575         second and subsequent copies of an rhs value.
21576         (vectorizable_load): Update calls to vect_check_load_store_mask
21577         and vect_build_gather_load_calls.  Use the cached mask_dt and
21578         gs_info.offset_dt instead of calls to vect_is_simple_use.
21580 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
21582         PR middle-end/83945
21583         * tree-emutls.c: Include gimplify.h.
21584         (lower_emutls_2): New function.
21585         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21586         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21587         it before further processing.
21589         PR target/83930
21590         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21591         UINTVAL (trueop1) instead of INTVAL (op1).
21593 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
21595         PR debug/81570
21596         PR debug/83728
21597         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21598         INCOMING_FRAME_SP_OFFSET if not defined.
21599         (scan_trace): Add ENTRY argument.  If true and
21600         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21601         emit a note to adjust the CFA offset.
21602         (create_cfi_notes): Adjust scan_trace callers.
21603         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21604         INCOMING_FRAME_SP_OFFSET in the CIE.
21605         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21606         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21607         Likewise.
21608         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21609         * doc/tm.texi: Regenerated.
21611 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21613         PR rtl-optimization/83147
21614         * lra-constraints.c (remove_inheritance_pseudos): Use
21615         lra_substitute_pseudo_within_insn.
21617 2018-01-19  Tom de Vries  <tom@codesourcery.com>
21618             Cesar Philippidis  <cesar@codesourcery.com>
21620         PR target/83920
21621         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21623 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
21625         PR target/83790
21626         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21627         spaces for function labels.
21629 2018-01-19  Martin Liska  <mliska@suse.cz>
21631         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21632         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21633         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21634         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21635         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21636         (PRED_CONST_RETURN): Change from 69 to 65.
21637         (PRED_NULL_RETURN): Change from 91 to 71.
21638         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21639         (PRED_LOOP_GUARD): Change from 66 to 73.
21641 2018-01-19  Martin Liska  <mliska@suse.cz>
21643         * predict.c (predict_insn_def): Add new assert.
21644         (struct branch_predictor): Change type to signed integer.
21645         (test_prediction_value_range): Amend test to cover
21646         PROB_UNINITIALIZED.
21647         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21648         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21649         (PRED_LOOP_ITERATIONS_MAX): Likewise.
21650         (PRED_LOOP_IV_COMPARE): Likewise.
21651         * predict.h (PROB_UNINITIALIZED): Define new constant.
21653 2018-01-19  Martin Liska  <mliska@suse.cz>
21655         * predict.c (dump_prediction): Add new format for
21656         analyze_brprob.py script which is enabled with -details
21657         suboption.
21658         * profile-count.h (precise_p): New function.
21660 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
21662         PR tree-optimization/83922
21663         * tree-vect-loop.c (vect_verify_full_masking): Return false if
21664         there are no statements that need masking.
21665         (vect_active_double_reduction_p): New function.
21666         (vect_analyze_loop_operations): Use it when handling phis that
21667         are not in the loop header.
21669 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
21671         PR tree-optimization/83914
21672         * tree-vect-loop.c (vectorizable_induction): Don't convert
21673         init_expr or apply the peeling adjustment for inductions
21674         that are nested within the vectorized loop.
21676 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21678         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21679         instead of NEG.
21681 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
21683         PR sanitizer/81715
21684         PR testsuite/83882
21685         * function.h (gimplify_parameters): Add gimple_seq * argument.
21686         * function.c: Include gimple.h and options.h.
21687         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21688         for the added local temporaries if needed.
21689         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21690         if there are any parameter cleanups, wrap whole body into a
21691         try/finally with the cleanups.
21693 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
21695         PR target/82964
21696         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21697         Use GET_MODE_CLASS for scalar floating point.
21699 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
21701         PR ipa/82256
21702         patch by PaX Team
21703         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21704         Fix call of call_cgraph_insertion_hooks.
21706 2018-01-18  Martin Sebor  <msebor@redhat.com>
21708         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21710 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
21712         PR ipa/83619
21713         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21714         frequencies.
21716 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
21718         PR other/70268
21719         * common.opt: (-ffile-prefix-map): New option.
21720         * opts.c (common_handle_option): Defer it.
21721         * opts-global.c (handle_common_deferred_options): Handle it.
21722         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21723         * file-prefix-map.h: New file.
21724         (remap_debug_filename, add_debug_prefix_map): ...here.
21725         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21726         * final.c (debug_prefix_map, add_debug_prefix_map
21727         remap_debug_filename): Move to...
21728         * file-prefix-map.c: New file.
21729         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21730         generalize, get rid of alloca(), use strrchr() instead of strchr().
21731         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21732         Implement in terms of add_prefix_map().
21733         (remap_macro_filename, remap_debug_filename): Implement in term of
21734         remap_filename().
21735         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21736         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21737         * dbxout.c: Include file-prefix-map.h.
21738         * varasm.c: Likewise.
21739         * vmsdbgout.c: Likewise.
21740         * xcoffout.c: Likewise.
21741         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21742         * doc/cppopts.texi (-fmacro-prefix-map): Document.
21743         * doc/invoke.texi (-ffile-prefix-map): Document.
21744         (-fdebug-prefix-map): Update description.
21746 2018-01-18  Martin Liska  <mliska@suse.cz>
21748         * config/i386/i386.c (indirect_thunk_name): Document that also
21749         lfence is emitted.
21750         (output_indirect_thunk): Document why both instructions
21751         (pause and lfence) are generated.
21753 2018-01-18  Richard Biener  <rguenther@suse.de>
21755         PR tree-optimization/83887
21756         * graphite-scop-detection.c
21757         (scop_detection::get_nearest_dom_with_single_entry): Remove.
21758         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21759         (scop_detection::merge_sese): Re-implement with a flood-fill
21760         algorithm that properly finds a SESE region if it exists.
21762 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
21764         PR c/61240
21765         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21766         pointer_diff optimizations use view_convert instead of convert.
21768 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21770         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21771         Generate different code for -mno-speculate-indirect-jumps.
21772         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21773         (*call_indirect_aix<mode>): Disable for
21774         -mno-speculate-indirect-jumps.
21775         (*call_indirect_aix<mode>_nospec): New define_insn.
21776         (*call_value_indirect_aix<mode>): Disable for
21777         -mno-speculate-indirect-jumps.
21778         (*call_value_indirect_aix<mode>_nospec): New define_insn.
21779         (*sibcall_nonlocal_sysv<mode>): Generate different code for
21780         -mno-speculate-indirect-jumps.
21781         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21783 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21785         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21786         long double type, set the flags for noting the default long double
21787         type, even if we don't pass or return a long double type.
21789 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
21791         PR ipa/83051
21792         * ipa-inline.c (flatten_function): Do not overwrite final inlining
21793         failure.
21795 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
21797         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21798         support for merge[hl].
21799         (fold_mergehl_helper): New helper function.
21800         (tree-vector-builder.h): New #include for tree_vector_builder usage.
21801         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21802         (altivec_vmrglw_direct): Add xxmrglw insn.
21804 2018-01-17  Andrew Waterman  <andrew@sifive.com>
21806         * config/riscv/riscv.c (riscv_conditional_register_usage): If
21807         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21809 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
21811         PR lto/83121
21812         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21813         call the lto_location_cache before reading the
21814         DECL_SOURCE_LOCATION of the types.
21816 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
21817             Richard Sandiford  <richard.sandiford@linaro.org>
21819         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21820         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21821         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21822         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21823         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21824         Add declaration.
21825         * config/aarch64/constraints.md (aarch64_movti_operand):
21826         Limit immediates.
21827         * config/aarch64/predicates.md (Uti): Add new constraint.
21829 2018-01-17  Carl Love  <cel@us.ibm.com>
21831         * config/rs6000/vsx.md (define_expand xl_len_r,
21832         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21833         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21834         lxvll.
21835         (define_expand, define_insn): Move the shift left from  the
21836         define_insn to the define_expand for lxvl and stxvl instructions.
21837         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21838         and XL_LEN_R definitions to PURE.
21840 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
21842         * config/i386/i386.c (indirect_thunk_name): Declare regno
21843         as unsigned int.  Compare regno with INVALID_REGNUM.
21844         (output_indirect_thunk): Ditto.
21845         (output_indirect_thunk_function): Ditto.
21846         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
21847         in the call to output_indirect_thunk_function.
21849 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
21851         PR middle-end/83884
21852         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21853         rather than the size of inner_type to determine the stack slot size
21854         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21856 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
21858         PR target/83546
21859         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21860         to PTA_SILVERMONT.
21862 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
21864         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21865         endian Linux systems to optionally enable multilibs for selecting
21866         the long double type if the user configured an explicit type.
21867         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21868         have no long double multilibs if not defined.
21869         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21870         warn if the user used -mabi={ieee,ibm}longdouble and we built
21871         multilibs for long double.
21872         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21873         appropriate multilib option.
21874         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21875         multilib options.
21876         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21877         for building long double multilibs.
21878         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21880 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
21882         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21883         copies.
21885         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21886         64 bits.
21887         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21888         128 bits.
21890         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21891         variables.
21893         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21894         return value.
21896 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
21898         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21899         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21901 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21903         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21904         different rtl trees depending on TARGET_64BIT.
21905         (rs6000_gen_lvx): Likewise.
21907 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
21909         * config/visium/visium.md (nop): Tweak comment.
21910         (hazard_nop): Likewise.
21912 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21914         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21915         -mspeculate-indirect-jumps.
21916         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21917         for -mno-speculate-indirect-jumps.
21918         (*call_indirect_elfv2<mode>_nospec): New define_insn.
21919         (*call_value_indirect_elfv2<mode>): Disable for
21920         -mno-speculate-indirect-jumps.
21921         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21922         (indirect_jump): Emit different RTL for
21923         -mno-speculate-indirect-jumps.
21924         (*indirect_jump<mode>): Disable for
21925         -mno-speculate-indirect-jumps.
21926         (*indirect_jump<mode>_nospec): New define_insn.
21927         (tablejump): Emit different RTL for
21928         -mno-speculate-indirect-jumps.
21929         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21930         (tablejumpsi_nospec): New define_expand.
21931         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21932         (tablejumpdi_nospec): New define_expand.
21933         (*tablejump<mode>_internal1): Disable for
21934         -mno-speculate-indirect-jumps.
21935         (*tablejump<mode>_internal1_nospec): New define_insn.
21936         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21937         option.
21939 2018-01-16  Artyom Skrobov tyomitch@gmail.com
21941         * caller-save.c (insert_save): Drop unnecessary parameter.  All
21942         callers updated.
21944 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21945             Richard Biener  <rguenth@suse.de>
21947         PR libgomp/83590
21948         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21949         return early, inline manually is_gimple_sizepos.  Make sure if we
21950         call gimplify_expr we don't end up with a gimple constant.
21951         * tree.c (variably_modified_type_p): Don't return true for
21952         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
21953         * gimplify.h (is_gimple_sizepos): Remove.
21955 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21957         PR tree-optimization/83857
21958         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21959         vectorizable_live_operation for pure SLP statements.
21960         (vectorizable_live_operation): Handle PHIs.
21962 2018-01-16  Richard Biener  <rguenther@suse.de>
21964         PR tree-optimization/83867
21965         * tree-vect-stmts.c (vect_transform_stmt): Precompute
21966         nested_in_vect_loop_p since the scalar stmt may get invalidated.
21968 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21970         PR c/83844
21971         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21972         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21973         If off is not INTEGER_CST, issue a may not be aligned warning
21974         rather than isn't aligned.  Use isn%'t rather than isn't.
21975         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21976         into MULT_EXPR.
21977         <case MULT_EXPR>: Improve the case when bottom and one of the
21978         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21979         operand, in that case check if the other operand is multiple of
21980         bottom divided by the INTEGER_CST operand.
21982 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21984         PR target/83858
21985         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21986         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21987         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21988         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21989         * config/pa/pa.c (pa_function_arg_advance): Likewise.
21990         (pa_function_arg, pa_arg_partial_bytes): Likewise.
21991         (pa_function_arg_size): New function.
21993 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21995         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21996         in a separate statement.
21998 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22000         PR tree-optimization/83847
22001         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
22002         group gathers and scatters.
22004 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22006         PR rtl-optimization/86620
22007         * params.def (max-sched-ready-insns): Bump minimum value to 1.
22009         PR rtl-optimization/83213
22010         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
22011         to last if both are JUMP_INSNs.
22013         PR tree-optimization/83843
22014         * gimple-ssa-store-merging.c
22015         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
22016         store_immediate_info for bswap/nop orig_stores.
22018 2018-01-15  Andrew Waterman  <andrew@sifive.com>
22020         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
22021         !TARGET_MUL.
22022         <UDIV>: Increase cost if !TARGET_DIV.
22024 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
22026         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
22027         (define_attr "cr_logical_3op"): New.
22028         (cceq_ior_compare): Adjust.
22029         (cceq_ior_compare_complement): Adjust.
22030         (*cceq_rev_compare): Adjust.
22031         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
22032         (is_cracked_insn): Adjust.
22033         (insn_must_be_first_in_group): Adjust.
22034         * config/rs6000/40x.md: Adjust.
22035         * config/rs6000/440.md: Adjust.
22036         * config/rs6000/476.md: Adjust.
22037         * config/rs6000/601.md: Adjust.
22038         * config/rs6000/603.md: Adjust.
22039         * config/rs6000/6xx.md: Adjust.
22040         * config/rs6000/7450.md: Adjust.
22041         * config/rs6000/7xx.md: Adjust.
22042         * config/rs6000/8540.md: Adjust.
22043         * config/rs6000/cell.md: Adjust.
22044         * config/rs6000/e300c2c3.md: Adjust.
22045         * config/rs6000/e500mc.md: Adjust.
22046         * config/rs6000/e500mc64.md: Adjust.
22047         * config/rs6000/e5500.md: Adjust.
22048         * config/rs6000/e6500.md: Adjust.
22049         * config/rs6000/mpc.md: Adjust.
22050         * config/rs6000/power4.md: Adjust.
22051         * config/rs6000/power5.md: Adjust.
22052         * config/rs6000/power6.md: Adjust.
22053         * config/rs6000/power7.md: Adjust.
22054         * config/rs6000/power8.md: Adjust.
22055         * config/rs6000/power9.md: Adjust.
22056         * config/rs6000/rs64.md: Adjust.
22057         * config/rs6000/titan.md: Adjust.
22059 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22061         * config/i386/predicates.md (indirect_branch_operand): Rewrite
22062         ix86_indirect_branch_register logic.
22064 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22066         * config/i386/constraints.md (Bs): Update
22067         ix86_indirect_branch_register check.  Don't check
22068         ix86_indirect_branch_register with GOT_memory_operand.
22069         (Bw): Likewise.
22070         * config/i386/predicates.md (GOT_memory_operand): Don't check
22071         ix86_indirect_branch_register here.
22072         (GOT32_symbol_operand): Likewise.
22074 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22076         * config/i386/predicates.md (constant_call_address_operand):
22077         Rewrite ix86_indirect_branch_register logic.
22078         (sibcall_insn_operand): Likewise.
22080 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22082         * config/i386/constraints.md (Bs): Replace
22083         ix86_indirect_branch_thunk_register with
22084         ix86_indirect_branch_register.
22085         (Bw): Likewise.
22086         * config/i386/i386.md (indirect_jump): Likewise.
22087         (tablejump): Likewise.
22088         (*sibcall_memory): Likewise.
22089         (*sibcall_value_memory): Likewise.
22090         Peepholes of indirect call and jump via memory: Likewise.
22091         * config/i386/i386.opt: Likewise.
22092         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22093         (GOT_memory_operand): Likewise.
22094         (call_insn_operand): Likewise.
22095         (sibcall_insn_operand): Likewise.
22096         (GOT32_symbol_operand): Likewise.
22098 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
22100         PR middle-end/83837
22101         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
22102         type rather than type addr's type points to.
22103         (expand_omp_atomic_mutex): Likewise.
22104         (expand_omp_atomic): Likewise.
22106 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22108         PR target/83839
22109         * config/i386/i386.c (output_indirect_thunk_function): Use
22110         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
22111         for  __x86_return_thunk.
22113 2018-01-15  Richard Biener  <rguenther@suse.de>
22115         PR middle-end/83850
22116         * expmed.c (extract_bit_field_1): Fix typo.
22118 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22120         PR target/83687
22121         * config/arm/iterators.md (VF): New mode iterator.
22122         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
22123         Remove integer-related logic from pattern.
22124         (neon_vabd<mode>_3): Likewise.
22126 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
22128         PR middle-end/82694
22129         * common.opt (fstrict-overflow): No longer an alias.
22130         (fwrapv-pointer): New option.
22131         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
22132         also for pointer types based on flag_wrapv_pointer.
22133         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
22134         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
22135         opts->x_flag_wrapv got set.
22136         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
22137         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
22138         POINTER_TYPE_OVERFLOW_UNDEFINED.
22139         * match.pd: Likewise in address comparison pattern.
22140         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
22142 2018-01-15  Richard Biener  <rguenther@suse.de>
22144         PR lto/83804
22145         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
22146         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
22147         Reset type names to their identifier if their TYPE_DECL doesn't
22148         have linkage (and thus is used for ODR and devirt).
22149         (save_debug_info_for_decl): Remove.
22150         (save_debug_info_for_type): Likewise.
22151         (add_tree_to_fld_list): Adjust.
22152         * tree-pretty-print.c (dump_generic_node): Make dumping of
22153         type names more robust.
22155 2018-01-15  Richard Biener  <rguenther@suse.de>
22157         * BASE-VER: Bump to 8.0.1.
22159 2018-01-14  Martin Sebor  <msebor@redhat.com>
22161         PR other/83508
22162         * builtins.c (check_access): Avoid warning when the no-warning bit
22163         is set.
22165 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
22167         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
22168         * ira-color (allocno_hard_regs_compare): Likewise.
22170 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
22172         PR target/83013
22173         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
22174         Use .pushsection/.popsection.
22176 2018-01-14  Martin Sebor  <msebor@redhat.com>
22178         PR c++/81327
22179         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
22181 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
22183         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
22184         entry from extra_headers.
22185         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
22186         extra_headers, make the list bitwise identical to the i?86-*-* one.
22188 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22190         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
22191         -mcmodel=large with -mindirect-branch=thunk,
22192         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
22193         -mfunction-return=thunk-extern.
22194         * doc/invoke.texi: Document -mcmodel=large is incompatible with
22195         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
22196         -mfunction-return=thunk and -mfunction-return=thunk-extern.
22198 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22200         * config/i386/i386.c (print_reg): Print the name of the full
22201         integer register without '%'.
22202         (ix86_print_operand): Handle 'V'.
22203         * doc/extend.texi: Document 'V' modifier.
22205 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22207         * config/i386/constraints.md (Bs): Disallow memory operand for
22208         -mindirect-branch-register.
22209         (Bw): Likewise.
22210         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22211         (GOT_memory_operand): Likewise.
22212         (call_insn_operand): Likewise.
22213         (sibcall_insn_operand): Likewise.
22214         (GOT32_symbol_operand): Likewise.
22215         * config/i386/i386.md (indirect_jump): Call convert_memory_address
22216         for -mindirect-branch-register.
22217         (tablejump): Likewise.
22218         (*sibcall_memory): Likewise.
22219         (*sibcall_value_memory): Likewise.
22220         Disallow peepholes of indirect call and jump via memory for
22221         -mindirect-branch-register.
22222         (*call_pop): Replace m with Bw.
22223         (*call_value_pop): Likewise.
22224         (*sibcall_pop_memory): Replace m with Bs.
22225         * config/i386/i386.opt (mindirect-branch-register): New option.
22226         * doc/invoke.texi: Document -mindirect-branch-register option.
22228 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22230         * config/i386/i386-protos.h (ix86_output_function_return): New.
22231         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
22232         set function_return_type.
22233         (indirect_thunk_name): Add ret_p to indicate thunk for function
22234         return.
22235         (output_indirect_thunk_function): Pass false to
22236         indirect_thunk_name.
22237         (ix86_output_indirect_branch_via_reg): Likewise.
22238         (ix86_output_indirect_branch_via_push): Likewise.
22239         (output_indirect_thunk_function): Create alias for function
22240         return thunk if regno < 0.
22241         (ix86_output_function_return): New function.
22242         (ix86_handle_fndecl_attribute): Handle function_return.
22243         (ix86_attribute_table): Add function_return.
22244         * config/i386/i386.h (machine_function): Add
22245         function_return_type.
22246         * config/i386/i386.md (simple_return_internal): Use
22247         ix86_output_function_return.
22248         (simple_return_internal_long): Likewise.
22249         * config/i386/i386.opt (mfunction-return=): New option.
22250         (indirect_branch): Mention -mfunction-return=.
22251         * doc/extend.texi: Document function_return function attribute.
22252         * doc/invoke.texi: Document -mfunction-return= option.
22254 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22256         * config/i386/i386-opts.h (indirect_branch): New.
22257         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
22258         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
22259         with local indirect jump when converting indirect call and jump.
22260         (ix86_set_indirect_branch_type): New.
22261         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
22262         (indirectlabelno): New.
22263         (indirect_thunk_needed): Likewise.
22264         (indirect_thunk_bnd_needed): Likewise.
22265         (indirect_thunks_used): Likewise.
22266         (indirect_thunks_bnd_used): Likewise.
22267         (INDIRECT_LABEL): Likewise.
22268         (indirect_thunk_name): Likewise.
22269         (output_indirect_thunk): Likewise.
22270         (output_indirect_thunk_function): Likewise.
22271         (ix86_output_indirect_branch_via_reg): Likewise.
22272         (ix86_output_indirect_branch_via_push): Likewise.
22273         (ix86_output_indirect_branch): Likewise.
22274         (ix86_output_indirect_jmp): Likewise.
22275         (ix86_code_end): Call output_indirect_thunk_function if needed.
22276         (ix86_output_call_insn): Call ix86_output_indirect_branch if
22277         needed.
22278         (ix86_handle_fndecl_attribute): Handle indirect_branch.
22279         (ix86_attribute_table): Add indirect_branch.
22280         * config/i386/i386.h (machine_function): Add indirect_branch_type
22281         and has_local_indirect_jump.
22282         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
22283         to true.
22284         (tablejump): Likewise.
22285         (*indirect_jump): Use ix86_output_indirect_jmp.
22286         (*tablejump_1): Likewise.
22287         (simple_return_indirect_internal): Likewise.
22288         * config/i386/i386.opt (mindirect-branch=): New option.
22289         (indirect_branch): New.
22290         (keep): Likewise.
22291         (thunk): Likewise.
22292         (thunk-inline): Likewise.
22293         (thunk-extern): Likewise.
22294         * doc/extend.texi: Document indirect_branch function attribute.
22295         * doc/invoke.texi: Document -mindirect-branch= option.
22297 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
22299         PR ipa/83051
22300         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
22302 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
22304         * ipa-inline.c (want_inline_small_function_p): Return false if
22305         inlining has already failed with CIF_FINAL_ERROR.
22306         (update_caller_keys): Call want_inline_small_function_p before
22307         can_inline_edge_p.
22308         (update_callee_keys): Likewise.
22310 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22312         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
22313         New function.
22314         (rs6000_quadword_masked_address_p): Likewise.
22315         (quad_aligned_load_p): Likewise.
22316         (quad_aligned_store_p): Likewise.
22317         (const_load_sequence_p): Add comment to describe the outer-most loop.
22318         (mimic_memory_attributes_and_flags): New function.
22319         (rs6000_gen_stvx): Likewise.
22320         (replace_swapped_aligned_store): Likewise.
22321         (rs6000_gen_lvx): Likewise.
22322         (replace_swapped_aligned_load): Likewise.
22323         (replace_swapped_load_constant): Capitalize argument name in
22324         comment describing this function.
22325         (rs6000_analyze_swaps): Add a third pass to search for vector loads
22326         and stores that access quad-word aligned addresses and replace
22327         with stvx or lvx instructions when appropriate.
22328         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
22329         New function prototype.
22330         (rs6000_quadword_masked_address_p): Likewise.
22331         (rs6000_gen_lvx): Likewise.
22332         (rs6000_gen_stvx): Likewise.
22333         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
22334         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
22335         when memory address is aligned.
22336         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
22337         this split to select lvx instruction when memory address is aligned.
22338         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
22339         instruction when memory address is aligned.
22340         (*vsx_le_perm_load_v16qi): Likewise.
22341         (four unnamed splitters): Modify to select the stvx instruction
22342         when memory is aligned.
22344 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
22346         * predict.c (determine_unlikely_bbs): Handle correctly BBs
22347         which appears in the queue multiple times.
22349 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22350             Alan Hayward  <alan.hayward@arm.com>
22351             David Sherwood  <david.sherwood@arm.com>
22353         * tree-vectorizer.h (vec_lower_bound): New structure.
22354         (_loop_vec_info): Add check_nonzero and lower_bounds.
22355         (LOOP_VINFO_CHECK_NONZERO): New macro.
22356         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
22357         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
22358         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
22359         fields.  Make seg_len the distance travelled, not including the
22360         access size.
22361         (dr_direction_indicator): Declare.
22362         (dr_zero_step_indicator): Likewise.
22363         (dr_known_forward_stride_p): Likewise.
22364         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
22365         tree-ssanames.h.
22366         (runtime_alias_check_p): Allow runtime alias checks with
22367         variable strides.
22368         (operator ==): Compare access_size and align.
22369         (prune_runtime_alias_test_list): Rework for new distinction between
22370         the access_size and seg_len.
22371         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
22372         segment lengths.
22373         (get_segment_min_max): New function.
22374         (create_intersect_range_checks): Use it.
22375         (dr_step_indicator): New function.
22376         (dr_direction_indicator): Likewise.
22377         (dr_zero_step_indicator): Likewise.
22378         (dr_known_forward_stride_p): Likewise.
22379         * tree-loop-distribution.c (data_ref_segment_size): Return
22380         DR_STEP * (niters - 1).
22381         (compute_alias_check_pairs): Update call to the dr_with_seg_len
22382         constructor.
22383         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
22384         (vect_preserves_scalar_order_p): New function, split out from...
22385         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
22386         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
22387         (vect_vfa_access_size): New function.
22388         (vect_vfa_align): Likewise.
22389         (vect_compile_time_alias): Take access_size_a and access_b arguments.
22390         (dump_lower_bound): New function.
22391         (vect_check_lower_bound): Likewise.
22392         (vect_small_gap_p): Likewise.
22393         (vectorizable_with_step_bound_p): Likewise.
22394         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
22395         depencies if the vectorization factor is 1.  Convert the checks
22396         for nonzero steps into checks on the bounds of DR_STEP.  Try using
22397         a bunds check for variable steps if the minimum required step is
22398         relatively small. Update calls to the dr_with_seg_len
22399         constructor and to vect_compile_time_alias.
22400         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
22401         function.
22402         (vect_loop_versioning): Call it.
22403         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
22404         when retrying.
22405         (vect_estimate_min_profitable_iters): Account for any bounds checks.
22407 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22408             Alan Hayward  <alan.hayward@arm.com>
22409             David Sherwood  <david.sherwood@arm.com>
22411         * doc/sourcebuild.texi (vect_scatter_store): Document.
22412         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
22413         optabs.
22414         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
22415         Document.
22416         * genopinit.c (main): Add supports_vec_scatter_store and
22417         supports_vec_scatter_store_cached to target_optabs.
22418         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
22419         IFN_MASK_SCATTER_STORE.
22420         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
22421         functions.
22422         * internal-fn.h (internal_store_fn_p): Declare.
22423         (internal_fn_stored_value_index): Likewise.
22424         * internal-fn.c (scatter_store_direct): New macro.
22425         (expand_scatter_store_optab_fn): New function.
22426         (direct_scatter_store_optab_supported_p): New macro.
22427         (internal_store_fn_p): New function.
22428         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
22429         IFN_MASK_SCATTER_STORE.
22430         (internal_fn_mask_index): Likewise.
22431         (internal_fn_stored_value_index): New function.
22432         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22433         for scatter stores.
22434         * optabs-query.h (supports_vec_scatter_store_p): Declare.
22435         * optabs-query.c (supports_vec_scatter_store_p): New function.
22436         * tree-vectorizer.h (vect_get_store_rhs): Declare.
22437         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22438         true for scatter stores.
22439         (vect_gather_scatter_fn_p): Handle scatter stores too.
22440         (vect_check_gather_scatter): Consider using scatter stores if
22441         supports_vec_scatter_store_p.
22442         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22443         scatter stores too.
22444         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22445         internal_fn_stored_value_index.
22446         (check_load_store_masking): Handle scatter stores too.
22447         (vect_get_store_rhs): Make public.
22448         (vectorizable_call): Use internal_store_fn_p.
22449         (vectorizable_store): Handle scatter store internal functions.
22450         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22451         when deciding whether the end of the group has been reached.
22452         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22453         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22454         (mask_scatter_store<mode>): New insns.
22456 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22457             Alan Hayward  <alan.hayward@arm.com>
22458             David Sherwood  <david.sherwood@arm.com>
22460         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22461         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22462         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22463         function.
22464         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22465         Use vect_truncate_gather_scatter_offset if we can't treat the
22466         operation as a normal gather load or scatter store.
22467         (get_group_load_store_type): Take the gather_scatter_info
22468         as argument.  Try using a gather load or scatter store for
22469         single-element groups.
22470         (get_load_store_type): Update calls to get_group_load_store_type
22471         and vect_use_strided_gather_scatters_p.
22473 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22474             Alan Hayward  <alan.hayward@arm.com>
22475             David Sherwood  <david.sherwood@arm.com>
22477         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22478         optional tree argument.
22479         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22480         null target hooks.
22481         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22482         but continue to use the current value as a fallback.
22483         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22484         to compare the updates.
22485         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22486         (get_load_store_type): Use it when handling a strided access.
22487         (vect_get_strided_load_store_ops): New function.
22488         (vect_get_data_ptr_increment): Likewise.
22489         (vectorizable_load): Handle strided gather loads.  Always pass
22490         a step to vect_create_data_ref_ptr and bump_vector_ptr.
22492 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22493             Alan Hayward  <alan.hayward@arm.com>
22494             David Sherwood  <david.sherwood@arm.com>
22496         * doc/md.texi (gather_load@var{m}): Document.
22497         (mask_gather_load@var{m}): Likewise.
22498         * genopinit.c (main): Add supports_vec_gather_load and
22499         supports_vec_gather_load_cached to target_optabs.
22500         * optabs-tree.c (init_tree_optimization_optabs): Use
22501         ggc_cleared_alloc to allocate target_optabs.
22502         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22503         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22504         functions.
22505         * internal-fn.h (internal_load_fn_p): Declare.
22506         (internal_gather_scatter_fn_p): Likewise.
22507         (internal_fn_mask_index): Likewise.
22508         (internal_gather_scatter_fn_supported_p): Likewise.
22509         * internal-fn.c (gather_load_direct): New macro.
22510         (expand_gather_load_optab_fn): New function.
22511         (direct_gather_load_optab_supported_p): New macro.
22512         (direct_internal_fn_optab): New function.
22513         (internal_load_fn_p): Likewise.
22514         (internal_gather_scatter_fn_p): Likewise.
22515         (internal_fn_mask_index): Likewise.
22516         (internal_gather_scatter_fn_supported_p): Likewise.
22517         * optabs-query.c (supports_at_least_one_mode_p): New function.
22518         (supports_vec_gather_load_p): Likewise.
22519         * optabs-query.h (supports_vec_gather_load_p): Declare.
22520         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22521         and memory_type field.
22522         (NUM_PATTERNS): Bump to 15.
22523         * tree-vect-data-refs.c: Include internal-fn.h.
22524         (vect_gather_scatter_fn_p): New function.
22525         (vect_describe_gather_scatter_call): Likewise.
22526         (vect_check_gather_scatter): Try using internal functions for
22527         gather loads.  Recognize existing calls to a gather load function.
22528         (vect_analyze_data_refs): Consider using gather loads if
22529         supports_vec_gather_load_p.
22530         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22531         (vect_get_gather_scatter_offset_type): Likewise.
22532         (vect_convert_mask_for_vectype): Likewise.
22533         (vect_add_conversion_to_patterm): Likewise.
22534         (vect_try_gather_scatter_pattern): Likewise.
22535         (vect_recog_gather_scatter_pattern): New pattern recognizer.
22536         (vect_vect_recog_func_ptrs): Add it.
22537         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22538         internal_fn_mask_index and internal_gather_scatter_fn_p.
22539         (check_load_store_masking): Take the gather_scatter_info as an
22540         argument and handle gather loads.
22541         (vect_get_gather_scatter_ops): New function.
22542         (vectorizable_call): Check internal_load_fn_p.
22543         (vectorizable_load): Likewise.  Handle gather load internal
22544         functions.
22545         (vectorizable_store): Update call to check_load_store_masking.
22546         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22547         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22548         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22549         (aarch64_gather_scale_operand_d): New predicates.
22550         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22551         (mask_gather_load<mode>): New insns.
22553 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22554             Alan Hayward  <alan.hayward@arm.com>
22555             David Sherwood  <david.sherwood@arm.com>
22557         * optabs.def (fold_left_plus_optab): New optab.
22558         * doc/md.texi (fold_left_plus_@var{m}): Document.
22559         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22560         * internal-fn.c (fold_left_direct): Define.
22561         (expand_fold_left_optab_fn): Likewise.
22562         (direct_fold_left_optab_supported_p): Likewise.
22563         * fold-const-call.c (fold_const_fold_left): New function.
22564         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22565         * tree-parloops.c (valid_reduction_p): New function.
22566         (gather_scalar_reductions): Use it.
22567         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22568         (vect_finish_replace_stmt): Declare.
22569         * tree-vect-loop.c (fold_left_reduction_fn): New function.
22570         (needs_fold_left_reduction_p): New function, split out from...
22571         (vect_is_simple_reduction): ...here.  Accept reductions that
22572         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22573         (vect_force_simple_reduction): Also store the reduction type in
22574         the assignment's STMT_VINFO_REDUC_TYPE.
22575         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22576         (merge_with_identity): New function.
22577         (vect_expand_fold_left): Likewise.
22578         (vectorize_fold_left_reduction): Likewise.
22579         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
22580         scalar phi in place for it.  Check for target support and reject
22581         cases that would reassociate the operation.  Defer the transform
22582         phase to vectorize_fold_left_reduction.
22583         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22584         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22585         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22587 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22589         * tree-if-conv.c (predicate_mem_writes): Remove redundant
22590         call to ifc_temp_var.
22592 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22593             Alan Hayward  <alan.hayward@arm.com>
22594             David Sherwood  <david.sherwood@arm.com>
22596         * target.def (legitimize_address_displacement): Take the original
22597         offset as a poly_int.
22598         * targhooks.h (default_legitimize_address_displacement): Update
22599         accordingly.
22600         * targhooks.c (default_legitimize_address_displacement): Likewise.
22601         * doc/tm.texi: Regenerate.
22602         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22603         as an argument, moving assert of ad->disp == ad->disp_term to...
22604         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
22605         Try calling targetm.legitimize_address_displacement before expanding
22606         the address rather than afterwards, and adjust for the new interface.
22607         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22608         Match the new hook interface.  Handle SVE addresses.
22609         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22610         new hook interface.
22612 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22614         * Makefile.in (OBJS): Add early-remat.o.
22615         * target.def (select_early_remat_modes): New hook.
22616         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22617         * doc/tm.texi: Regenerate.
22618         * targhooks.h (default_select_early_remat_modes): Declare.
22619         * targhooks.c (default_select_early_remat_modes): New function.
22620         * timevar.def (TV_EARLY_REMAT): New timevar.
22621         * passes.def (pass_early_remat): New pass.
22622         * tree-pass.h (make_pass_early_remat): Declare.
22623         * early-remat.c: New file.
22624         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22625         function.
22626         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22628 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22629             Alan Hayward  <alan.hayward@arm.com>
22630             David Sherwood  <david.sherwood@arm.com>
22632         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22633         vfm1 with a bound_epilog parameter.
22634         (vect_do_peeling): Update calls accordingly, and move the prologue
22635         call earlier in the function.  Treat the base bound_epilog as 0 for
22636         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
22637         this base when peeling for gaps.
22638         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22639         with fully-masked loops.
22640         (vect_estimate_min_profitable_iters): Handle the single peeled
22641         iteration in that case.
22643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22644             Alan Hayward  <alan.hayward@arm.com>
22645             David Sherwood  <david.sherwood@arm.com>
22647         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22648         single-element interleaving even if the size is not a power of 2.
22649         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22650         accesses for single-element interleaving if the group size is
22651         not a power of 2.
22653 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22654             Alan Hayward  <alan.hayward@arm.com>
22655             David Sherwood  <david.sherwood@arm.com>
22657         * doc/md.texi (fold_extract_last_@var{m}): Document.
22658         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22659         * optabs.def (fold_extract_last_optab): New optab.
22660         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22661         * internal-fn.c (fold_extract_direct): New macro.
22662         (expand_fold_extract_optab_fn): Likewise.
22663         (direct_fold_extract_optab_supported_p): Likewise.
22664         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22665         * tree-vect-loop.c (vect_model_reduction_cost): Handle
22666         EXTRACT_LAST_REDUCTION.
22667         (get_initial_def_for_reduction): Do not create an initial vector
22668         for EXTRACT_LAST_REDUCTION reductions.
22669         (vectorizable_reduction): Leave the scalar phi in place for
22670         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
22671         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
22672         epilogue code for EXTRACT_LAST_REDUCTION and defer the
22673         transform phase to vectorizable_condition.
22674         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22675         split out from...
22676         (vect_finish_stmt_generation): ...here.
22677         (vect_finish_replace_stmt): New function.
22678         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22679         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22680         pattern.
22681         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22683 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22684             Alan Hayward  <alan.hayward@arm.com>
22685             David Sherwood  <david.sherwood@arm.com>
22687         * doc/md.texi (extract_last_@var{m}): Document.
22688         * optabs.def (extract_last_optab): New optab.
22689         * internal-fn.def (EXTRACT_LAST): New internal function.
22690         * internal-fn.c (cond_unary_direct): New macro.
22691         (expand_cond_unary_optab_fn): Likewise.
22692         (direct_cond_unary_optab_supported_p): Likewise.
22693         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22694         loops using EXTRACT_LAST.
22695         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22696         (extract_last_<mode>): ...this optab.
22697         (vec_extract<mode><Vel>): Update accordingly.
22699 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22700             Alan Hayward  <alan.hayward@arm.com>
22701             David Sherwood  <david.sherwood@arm.com>
22703         * target.def (empty_mask_is_expensive): New hook.
22704         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22705         * doc/tm.texi: Regenerate.
22706         * targhooks.h (default_empty_mask_is_expensive): Declare.
22707         * targhooks.c (default_empty_mask_is_expensive): New function.
22708         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22709         if the target says that empty masks are expensive.
22710         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22711         New function.
22712         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22714 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22715             Alan Hayward  <alan.hayward@arm.com>
22716             David Sherwood  <david.sherwood@arm.com>
22718         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22719         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22720         (vect_use_loop_mask_for_alignment_p): New function.
22721         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22722         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22723         niters_skip argument.  Make sure that the first niters_skip elements
22724         of the first iteration are inactive.
22725         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22726         Update call to vect_set_loop_masks_directly.
22727         (get_misalign_in_elems): New function, split out from...
22728         (vect_gen_prolog_loop_niters): ...here.
22729         (vect_update_init_of_dr): Take a code argument that specifies whether
22730         the adjustment should be added or subtracted.
22731         (vect_update_init_of_drs): Likewise.
22732         (vect_prepare_for_masked_peels): New function.
22733         (vect_do_peeling): Skip prologue peeling if we're using a mask
22734         instead.  Update call to vect_update_inits_of_drs.
22735         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22736         mask_skip_niters.
22737         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22738         alignment.  Do not include the number of peeled iterations in
22739         the minimum threshold in that case.
22740         (vectorizable_induction): Adjust the start value down by
22741         LOOP_VINFO_MASK_SKIP_NITERS iterations.
22742         (vect_transform_loop): Call vect_prepare_for_masked_peels.
22743         Take the number of skipped iterations into account when calculating
22744         the loop bounds.
22745         * tree-vect-stmts.c (vect_gen_while_not): New function.
22747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22748             Alan Hayward  <alan.hayward@arm.com>
22749             David Sherwood  <david.sherwood@arm.com>
22751         * doc/sourcebuild.texi (vect_fully_masked): Document.
22752         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22753         default value to 0.
22754         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22755         split out from...
22756         (vect_analyze_loop_2): ...here. Don't check the vectorization
22757         factor against the number of loop iterations if the loop is
22758         fully-masked.
22760 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22761             Alan Hayward  <alan.hayward@arm.com>
22762             David Sherwood  <david.sherwood@arm.com>
22764         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22765         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22766         (dump_groups): Update accordingly.
22767         (iv_use::mem_type): New member variable.
22768         (address_p): New function.
22769         (record_use): Add a mem_type argument and initialize the new
22770         mem_type field.
22771         (record_group_use): Add a mem_type argument.  Use address_p.
22772         Remove obsolete null checks of base_object.  Update call to record_use.
22773         (find_interesting_uses_op): Update call to record_group_use.
22774         (find_interesting_uses_cond): Likewise.
22775         (find_interesting_uses_address): Likewise.
22776         (get_mem_type_for_internal_fn): New function.
22777         (find_address_like_use): Likewise.
22778         (find_interesting_uses_stmt): Try find_address_like_use before
22779         calling find_interesting_uses_op.
22780         (addr_offset_valid_p): Use the iv mem_type field as the type
22781         of the addressed memory.
22782         (add_autoinc_candidates): Likewise.
22783         (get_address_cost): Likewise.
22784         (split_small_address_groups_p): Use address_p.
22785         (split_address_groups): Likewise.
22786         (add_iv_candidate_for_use): Likewise.
22787         (autoinc_possible_for_pair): Likewise.
22788         (rewrite_groups): Likewise.
22789         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22790         (determine_group_iv_cost): Update after split of USE_ADDRESS.
22791         (get_alias_ptr_type_for_ptr_address): New function.
22792         (rewrite_use_address): Rewrite address uses in calls that were
22793         identified by find_address_like_use.
22795 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22796             Alan Hayward  <alan.hayward@arm.com>
22797             David Sherwood  <david.sherwood@arm.com>
22799         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22800         TARGET_MEM_REFs.
22801         * gimple-expr.h (is_gimple_addressable: Likewise.
22802         * gimple-expr.c (is_gimple_address): Likewise.
22803         * internal-fn.c (expand_call_mem_ref): New function.
22804         (expand_mask_load_optab_fn): Use it.
22805         (expand_mask_store_optab_fn): Likewise.
22807 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22808             Alan Hayward  <alan.hayward@arm.com>
22809             David Sherwood  <david.sherwood@arm.com>
22811         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22812         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22813         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22814         (cond_umax@var{mode}): Document.
22815         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22816         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22817         (cond_umin_optab, cond_umax_optab): New optabs.
22818         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22819         (COND_IOR, COND_XOR): New internal functions.
22820         * internal-fn.h (get_conditional_internal_fn): Declare.
22821         * internal-fn.c (cond_binary_direct): New macro.
22822         (expand_cond_binary_optab_fn): Likewise.
22823         (direct_cond_binary_optab_supported_p): Likewise.
22824         (get_conditional_internal_fn): New function.
22825         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22826         Cope with reduction statements that are vectorized as calls rather
22827         than assignments.
22828         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22829         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22830         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22831         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22832         (UNSPEC_COND_EOR): New unspecs.
22833         (optab): Add mappings for them.
22834         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22835         (sve_int_op, sve_fp_op): New int attributes.
22837 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22838             Alan Hayward  <alan.hayward@arm.com>
22839             David Sherwood  <david.sherwood@arm.com>
22841         * optabs.def (while_ult_optab): New optab.
22842         * doc/md.texi (while_ult@var{m}@var{n}): Document.
22843         * internal-fn.def (WHILE_ULT): New internal function.
22844         * internal-fn.h (direct_internal_fn_supported_p): New override
22845         that takes two types as argument.
22846         * internal-fn.c (while_direct): New macro.
22847         (expand_while_optab_fn): New function.
22848         (convert_optab_supported_p): Likewise.
22849         (direct_while_optab_supported_p): New macro.
22850         * wide-int.h (wi::udiv_ceil): New function.
22851         * tree-vectorizer.h (rgroup_masks): New structure.
22852         (vec_loop_masks): New typedef.
22853         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22854         and fully_masked_p.
22855         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22856         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22857         (vect_max_vf): New function.
22858         (slpeel_make_loop_iterate_ntimes): Delete.
22859         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22860         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22861         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22862         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22863         internal-fn.h, stor-layout.h and optabs-query.h.
22864         (vect_set_loop_mask): New function.
22865         (add_preheader_seq): Likewise.
22866         (add_header_seq): Likewise.
22867         (interleave_supported_p): Likewise.
22868         (vect_maybe_permute_loop_masks): Likewise.
22869         (vect_set_loop_masks_directly): Likewise.
22870         (vect_set_loop_condition_masked): Likewise.
22871         (vect_set_loop_condition_unmasked): New function, split out from
22872         slpeel_make_loop_iterate_ntimes.
22873         (slpeel_make_loop_iterate_ntimes): Rename to..
22874         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
22875         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22876         (vect_do_peeling): Update call accordingly.
22877         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22878         loops.
22879         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22880         mask_compare_type, can_fully_mask_p and fully_masked_p.
22881         (release_vec_loop_masks): New function.
22882         (_loop_vec_info): Use it to free the loop masks.
22883         (can_produce_all_loop_masks_p): New function.
22884         (vect_get_max_nscalars_per_iter): Likewise.
22885         (vect_verify_full_masking): Likewise.
22886         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22887         retries, and free the mask rgroups before retrying.  Check loop-wide
22888         reasons for disallowing fully-masked loops.  Make the final decision
22889         about whether use a fully-masked loop or not.
22890         (vect_estimate_min_profitable_iters): Do not assume that peeling
22891         for the number of iterations will be needed for fully-masked loops.
22892         (vectorizable_reduction): Disable fully-masked loops.
22893         (vectorizable_live_operation): Likewise.
22894         (vect_halve_mask_nunits): New function.
22895         (vect_double_mask_nunits): Likewise.
22896         (vect_record_loop_mask): Likewise.
22897         (vect_get_loop_mask): Likewise.
22898         (vect_transform_loop): Handle the case in which the final loop
22899         iteration might handle a partial vector.  Call vect_set_loop_condition
22900         instead of slpeel_make_loop_iterate_ntimes.
22901         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22902         (check_load_store_masking): New function.
22903         (prepare_load_store_mask): Likewise.
22904         (vectorizable_store): Handle fully-masked loops.
22905         (vectorizable_load): Likewise.
22906         (supportable_widening_operation): Use vect_halve_mask_nunits for
22907         booleans.
22908         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22909         (vect_gen_while): New function.
22910         * config/aarch64/aarch64.md (umax<mode>3): New expander.
22911         (aarch64_uqdec<mode>): New insn.
22913 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22914             Alan Hayward  <alan.hayward@arm.com>
22915             David Sherwood  <david.sherwood@arm.com>
22917         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22918         (reduc_xor_scal_optab): New optabs.
22919         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22920         (reduc_xor_scal_@var{m}): Document.
22921         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22922         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22923         internal functions.
22924         * fold-const-call.c (fold_const_call): Handle them.
22925         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22926         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22927         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22928         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22929         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22930         (UNSPEC_XORV): New unspecs.
22931         (optab): Add entries for them.
22932         (BITWISEV): New int iterator.
22933         (bit_reduc_op): New int attributes.
22935 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22936             Alan Hayward  <alan.hayward@arm.com>
22937             David Sherwood  <david.sherwood@arm.com>
22939         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22940         * internal-fn.def (VEC_SHL_INSERT): New internal function.
22941         * optabs.def (vec_shl_insert_optab): New optab.
22942         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22943         (duplicate_and_interleave): Likewise.
22944         * tree-vect-loop.c: Include internal-fn.h.
22945         (neutral_op_for_slp_reduction): New function, split out from
22946         get_initial_defs_for_reduction.
22947         (get_initial_def_for_reduction): Handle option 2 for variable-length
22948         vectors by loading the neutral value into a vector and then shifting
22949         the initial value into element 0.
22950         (get_initial_defs_for_reduction): Replace the code argument with
22951         the neutral value calculated by neutral_op_for_slp_reduction.
22952         Use gimple_build_vector for constant-length vectors.
22953         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22954         but the first group_size elements have a neutral value.
22955         Use duplicate_and_interleave otherwise.
22956         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22957         Update call to get_initial_defs_for_reduction.  Handle SLP
22958         reductions for variable-length vectors by creating one vector
22959         result for each scalar result, with the elements associated
22960         with other scalar results stubbed out with the neutral value.
22961         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22962         Require IFN_VEC_SHL_INSERT for double reductions on
22963         variable-length vectors, or SLP reductions that have
22964         a neutral value.  Require can_duplicate_and_interleave_p
22965         support for variable-length unchained SLP reductions if there
22966         is no neutral value, such as for MIN/MAX reductions.  Also require
22967         the number of vector elements to be a multiple of the number of
22968         SLP statements when doing variable-length unchained SLP reductions.
22969         Update call to vect_create_epilog_for_reduction.
22970         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22971         and remove initial values.
22972         (duplicate_and_interleave): Make public.
22973         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22974         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22976 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22977             Alan Hayward  <alan.hayward@arm.com>
22978             David Sherwood  <david.sherwood@arm.com>
22980         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22981         (can_duplicate_and_interleave_p): New function.
22982         (vect_get_and_check_slp_defs): Take the vector of statements
22983         rather than just the current one.  Remove excess parentheses.
22984         Restriction rejectinon of vect_constant_def and vect_external_def
22985         for variable-length vectors to boolean types, or types for which
22986         can_duplicate_and_interleave_p is false.
22987         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22988         (duplicate_and_interleave): New function.
22989         (vect_get_constant_vectors): Use gimple_build_vector for
22990         constant-length vectors and suitable variable-length constant
22991         vectors.  Use duplicate_and_interleave for other variable-length
22992         vectors.  Don't defer the update when inserting new statements.
22994 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22995             Alan Hayward  <alan.hayward@arm.com>
22996             David Sherwood  <david.sherwood@arm.com>
22998         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22999         min_profitable_iters doesn't go negative.
23001 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23002             Alan Hayward  <alan.hayward@arm.com>
23003             David Sherwood  <david.sherwood@arm.com>
23005         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
23006         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
23007         * optabs.def (vec_mask_load_lanes_optab): New optab.
23008         (vec_mask_store_lanes_optab): Likewise.
23009         * internal-fn.def (MASK_LOAD_LANES): New internal function.
23010         (MASK_STORE_LANES): Likewise.
23011         * internal-fn.c (mask_load_lanes_direct): New macro.
23012         (mask_store_lanes_direct): Likewise.
23013         (expand_mask_load_optab_fn): Handle masked operations.
23014         (expand_mask_load_lanes_optab_fn): New macro.
23015         (expand_mask_store_optab_fn): Handle masked operations.
23016         (expand_mask_store_lanes_optab_fn): New macro.
23017         (direct_mask_load_lanes_optab_supported_p): Likewise.
23018         (direct_mask_store_lanes_optab_supported_p): Likewise.
23019         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
23020         parameter.
23021         (vect_load_lanes_supported): Likewise.
23022         * tree-vect-data-refs.c (strip_conversion): New function.
23023         (can_group_stmts_p): Likewise.
23024         (vect_analyze_data_ref_accesses): Use it instead of checking
23025         for a pair of assignments.
23026         (vect_store_lanes_supported): Take a masked_p parameter.
23027         (vect_load_lanes_supported): Likewise.
23028         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
23029         vect_store_lanes_supported and vect_load_lanes_supported.
23030         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
23031         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
23032         parameter.  Don't allow gaps for masked accesses.
23033         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
23034         and vect_load_lanes_supported.
23035         (get_load_store_type): Take a masked_p parameter and update
23036         call to get_group_load_store_type.
23037         (vectorizable_store): Update call to get_load_store_type.
23038         Handle IFN_MASK_STORE_LANES.
23039         (vectorizable_load): Update call to get_load_store_type.
23040         Handle IFN_MASK_LOAD_LANES.
23042 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23043             Alan Hayward  <alan.hayward@arm.com>
23044             David Sherwood  <david.sherwood@arm.com>
23046         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
23047         modes for SVE.
23048         * config/aarch64/aarch64-protos.h
23049         (aarch64_sve_struct_memory_operand_p): Declare.
23050         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
23051         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
23052         (VPRED, vpred): Handle SVE structure modes.
23053         * config/aarch64/constraints.md (Utx): New constraint.
23054         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
23055         (aarch64_sve_struct_nonimmediate_operand): New predicates.
23056         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
23057         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
23058         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
23059         structure modes.  Split into pieces after RA.
23060         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
23061         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
23062         New patterns.
23063         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
23064         SVE structure modes.
23065         (aarch64_classify_address): Likewise.
23066         (sizetochar): Move earlier in file.
23067         (aarch64_print_operand): Handle SVE register lists.
23068         (aarch64_array_mode): New function.
23069         (aarch64_sve_struct_memory_operand_p): Likewise.
23070         (TARGET_ARRAY_MODE): Redefine.
23072 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23073             Alan Hayward  <alan.hayward@arm.com>
23074             David Sherwood  <david.sherwood@arm.com>
23076         * target.def (array_mode): New target hook.
23077         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
23078         * doc/tm.texi: Regenerate.
23079         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
23080         * hooks.c (hook_optmode_mode_uhwi_none): New function.
23081         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
23082         targetm.array_mode.
23083         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
23084         type sizes.
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         * fold-const.c (fold_binary_loc): Check the argument types
23091         rather than the result type when testing for a vector operation.
23093 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23095         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
23096         * doc/tm.texi: Regenerate.
23098 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23099             Alan Hayward  <alan.hayward@arm.com>
23100             David Sherwood  <david.sherwood@arm.com>
23102         * doc/invoke.texi (-msve-vector-bits=): Document new option.
23103         (sve): Document new AArch64 extension.
23104         * doc/md.texi (w): Extend the description of the AArch64
23105         constraint to include SVE vectors.
23106         (Upl, Upa): Document new AArch64 predicate constraints.
23107         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
23108         enum.
23109         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
23110         (msve-vector-bits=): New option.
23111         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
23112         SVE when these are disabled.
23113         (sve): New extension.
23114         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
23115         modes.  Adjust their number of units based on aarch64_sve_vg.
23116         (MAX_BITSIZE_MODE_ANY_MODE): Define.
23117         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
23118         aarch64_addr_query_type.
23119         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
23120         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
23121         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
23122         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
23123         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
23124         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
23125         (aarch64_simd_imm_zero_p): Delete.
23126         (aarch64_check_zero_based_sve_index_immediate): Declare.
23127         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23128         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23129         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23130         (aarch64_sve_float_mul_immediate_p): Likewise.
23131         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23132         rather than an rtx.
23133         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
23134         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
23135         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
23136         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
23137         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
23138         (aarch64_regmode_natural_size): Likewise.
23139         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
23140         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
23141         left one place.
23142         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
23143         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
23144         for VG and the SVE predicate registers.
23145         (V_ALIASES): Add a "z"-prefixed alias.
23146         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
23147         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
23148         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
23149         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
23150         (REG_CLASS_NAMES): Add entries for them.
23151         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
23152         and the predicate registers.
23153         (aarch64_sve_vg): Declare.
23154         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
23155         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
23156         (REGMODE_NATURAL_SIZE): Define.
23157         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
23158         SVE macros.
23159         * config/aarch64/aarch64.c: Include cfgrtl.h.
23160         (simd_immediate_info): Add a constructor for series vectors,
23161         and an associated step field.
23162         (aarch64_sve_vg): New variable.
23163         (aarch64_dbx_register_number): Handle VG and the predicate registers.
23164         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
23165         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
23166         (VEC_ANY_DATA, VEC_STRUCT): New constants.
23167         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
23168         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
23169         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
23170         (aarch64_get_mask_mode): New functions.
23171         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
23172         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
23173         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
23174         predicate modes and predicate registers.  Explicitly restrict
23175         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
23176         to store a vector mode if it is recognized by
23177         aarch64_classify_vector_mode.
23178         (aarch64_regmode_natural_size): New function.
23179         (aarch64_hard_regno_caller_save_mode): Return the original mode
23180         for predicates.
23181         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
23182         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
23183         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
23184         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
23185         functions.
23186         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
23187         does not overlap dest if the function is frame-related.  Handle
23188         SVE constants.
23189         (aarch64_split_add_offset): New function.
23190         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
23191         them aarch64_add_offset.
23192         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
23193         and update call to aarch64_sub_sp.
23194         (aarch64_add_cfa_expression): New function.
23195         (aarch64_expand_prologue): Pass extra temporary registers to the
23196         functions above.  Handle the case in which we need to emit new
23197         DW_CFA_expressions for registers that were originally saved
23198         relative to the stack pointer, but now have to be expressed
23199         relative to the frame pointer.
23200         (aarch64_output_mi_thunk): Pass extra temporary registers to the
23201         functions above.
23202         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
23203         IP0 and IP1 values for SVE frames.
23204         (aarch64_expand_vec_series): New function.
23205         (aarch64_expand_sve_widened_duplicate): Likewise.
23206         (aarch64_expand_sve_const_vector): Likewise.
23207         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
23208         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
23209         into the register, rather than emitting a SET directly.
23210         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
23211         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
23212         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
23213         (offset_9bit_signed_scaled_p): New functions.
23214         (aarch64_replicate_bitmask_imm): New function.
23215         (aarch64_bitmask_imm): Use it.
23216         (aarch64_cannot_force_const_mem): Reject expressions involving
23217         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
23218         (aarch64_classify_index): Handle SVE indices, by requiring
23219         a plain register index with a scale that matches the element size.
23220         (aarch64_classify_address): Handle SVE addresses.  Assert that
23221         the mode of the address is VOIDmode or an integer mode.
23222         Update call to aarch64_classify_symbol.
23223         (aarch64_classify_symbolic_expression): Update call to
23224         aarch64_classify_symbol.
23225         (aarch64_const_vec_all_in_range_p): New function.
23226         (aarch64_print_vector_float_operand): Likewise.
23227         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
23228         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
23229         and the FP immediates 1.0 and 0.5.
23230         (aarch64_print_address_internal): Handle SVE addresses.
23231         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
23232         (aarch64_regno_regclass): Handle predicate registers.
23233         (aarch64_secondary_reload): Handle big-endian reloads of SVE
23234         data modes.
23235         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
23236         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
23237         (aarch64_convert_sve_vector_bits): New function.
23238         (aarch64_override_options): Use it to handle -msve-vector-bits=.
23239         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23240         rather than an rtx.
23241         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
23242         Handle SVE vector and predicate modes.  Accept VL-based constants
23243         that need only one temporary register, and VL offsets that require
23244         no temporary registers.
23245         (aarch64_conditional_register_usage): Mark the predicate registers
23246         as fixed if SVE isn't available.
23247         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
23248         Return true for SVE vector and predicate modes.
23249         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
23250         rather than an unsigned int.  Handle SVE modes.
23251         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
23252         SVE modes.
23253         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
23254         if SVE is enabled.
23255         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23256         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23257         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23258         (aarch64_sve_float_mul_immediate_p): New functions.
23259         (aarch64_sve_valid_immediate): New function.
23260         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
23261         Explicitly reject structure modes.  Check for INDEX constants.
23262         Handle PTRUE and PFALSE constants.
23263         (aarch64_check_zero_based_sve_index_immediate): New function.
23264         (aarch64_simd_imm_zero_p): Delete.
23265         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
23266         vector modes.  Accept constants in the range of CNT[BHWD].
23267         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
23268         ask for an Advanced SIMD mode.
23269         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
23270         (aarch64_simd_vector_alignment): Handle SVE predicates.
23271         (aarch64_vectorize_preferred_vector_alignment): New function.
23272         (aarch64_simd_vector_alignment_reachable): Use it instead of
23273         the vector size.
23274         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
23275         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
23276         functions.
23277         (MAX_VECT_LEN): Delete.
23278         (expand_vec_perm_d): Add a vec_flags field.
23279         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
23280         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
23281         (aarch64_evpc_ext): Don't apply a big-endian lane correction
23282         for SVE modes.
23283         (aarch64_evpc_rev): Rename to...
23284         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
23285         (aarch64_evpc_rev_global): New function.
23286         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
23287         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
23288         MAX_VECT_LEN.
23289         (aarch64_evpc_sve_tbl): New function.
23290         (aarch64_expand_vec_perm_const_1): Update after rename of
23291         aarch64_evpc_rev.  Handle SVE permutes too, trying
23292         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
23293         than aarch64_evpc_tbl.
23294         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
23295         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
23296         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
23297         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
23298         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
23299         (aarch64_expand_sve_vcond): New functions.
23300         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
23301         of aarch64_vector_mode_p.
23302         (aarch64_dwarf_poly_indeterminate_value): New function.
23303         (aarch64_compute_pressure_classes): Likewise.
23304         (aarch64_can_change_mode_class): Likewise.
23305         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
23306         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
23307         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
23308         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
23309         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
23310         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
23311         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
23312         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
23313         constraints.
23314         (Dn, Dl, Dr): Accept const as well as const_vector.
23315         (Dz): Likewise.  Compare against CONST0_RTX.
23316         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
23317         of "vector" where appropriate.
23318         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
23319         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
23320         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
23321         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
23322         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
23323         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
23324         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
23325         (v_int_equiv): Extend to SVE modes.
23326         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
23327         mode attributes.
23328         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
23329         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
23330         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
23331         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
23332         (SVE_COND_FP_CMP): New int iterators.
23333         (perm_hilo): Handle the new unpack unspecs.
23334         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
23335         attributes.
23336         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
23337         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
23338         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
23339         (aarch64_equality_operator, aarch64_constant_vector_operand)
23340         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
23341         (aarch64_sve_nonimmediate_operand): Likewise.
23342         (aarch64_sve_general_operand): Likewise.
23343         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
23344         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
23345         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
23346         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
23347         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
23348         (aarch64_sve_float_arith_immediate): Likewise.
23349         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
23350         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
23351         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
23352         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
23353         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
23354         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
23355         (aarch64_sve_float_arith_operand): Likewise.
23356         (aarch64_sve_float_arith_with_sub_operand): Likewise.
23357         (aarch64_sve_float_mul_operand): Likewise.
23358         (aarch64_sve_vec_perm_operand): Likewise.
23359         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
23360         (aarch64_mov_operand): Accept const_poly_int and const_vector.
23361         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
23362         as well as const_vector.
23363         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
23364         in file.  Use CONST0_RTX and CONSTM1_RTX.
23365         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
23366         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
23367         Use aarch64_simd_imm_zero.
23368         * config/aarch64/aarch64-sve.md: New file.
23369         * config/aarch64/aarch64.md: Include it.
23370         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
23371         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
23372         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
23373         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
23374         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
23375         (sve): New attribute.
23376         (enabled): Disable instructions with the sve attribute unless
23377         TARGET_SVE.
23378         (movqi, movhi): Pass CONST_POLY_INT operaneds through
23379         aarch64_expand_mov_immediate.
23380         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
23381         CNT[BHSD] immediates.
23382         (movti): Split CONST_POLY_INT moves into two halves.
23383         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
23384         Split additions that need a temporary here if the destination
23385         is the stack pointer.
23386         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
23387         (*add<mode>3_poly_1): New instruction.
23388         (set_clobber_cc): New expander.
23390 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23392         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
23393         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
23394         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
23395         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
23396         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
23397         Change innermode from fixed_mode_size to machine_mode.
23398         (simplify_subreg): Update call accordingly.  Handle a constant-sized
23399         subreg of a variable-length CONST_VECTOR.
23401 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23402             Alan Hayward  <alan.hayward@arm.com>
23403             David Sherwood  <david.sherwood@arm.com>
23405         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
23406         (add_offset_to_base): New function, split out from...
23407         (create_mem_ref): ...here.  When handling a scale other than 1,
23408         check first whether the address is valid without the offset.
23409         Add it into the base if so, leaving the index and scale as-is.
23411 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
23413         PR c++/83778
23414         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
23415         fold_for_warn before checking if arg2 is INTEGER_CST.
23417 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
23419         * config/rs6000/predicates.md (load_multiple_operation): Delete.
23420         (store_multiple_operation): Delete.
23421         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
23422         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
23423         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
23424         guarded by TARGET_STRING.
23425         (rs6000_output_load_multiple): Delete.
23426         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23427         OPTION_MASK_STRING / TARGET_STRING handling.
23428         (print_operand) <'N', 'O'>: Add comment that these are unused now.
23429         (const rs6000_opt_masks) <"string">: Change mask to 0.
23430         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
23431         (MASK_STRING): Delete.
23432         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23433         parts.  Simplify.
23434         (load_multiple): Delete.
23435         (*ldmsi8): Delete.
23436         (*ldmsi7): Delete.
23437         (*ldmsi6): Delete.
23438         (*ldmsi5): Delete.
23439         (*ldmsi4): Delete.
23440         (*ldmsi3): Delete.
23441         (store_multiple): Delete.
23442         (*stmsi8): Delete.
23443         (*stmsi7): Delete.
23444         (*stmsi6): Delete.
23445         (*stmsi5): Delete.
23446         (*stmsi4): Delete.
23447         (*stmsi3): Delete.
23448         (movmemsi_8reg): Delete.
23449         (corresponding unnamed define_insn): Delete.
23450         (movmemsi_6reg): Delete.
23451         (corresponding unnamed define_insn): Delete.
23452         (movmemsi_4reg): Delete.
23453         (corresponding unnamed define_insn): Delete.
23454         (movmemsi_2reg): Delete.
23455         (corresponding unnamed define_insn): Delete.
23456         (movmemsi_1reg): Delete.
23457         (corresponding unnamed define_insn): Delete.
23458         * config/rs6000/rs6000.opt (mno-string): New.
23459         (mstring): Replace by deprecation warning stub.
23460         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23462 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
23464         * regrename.c (regrename_do_replace): If replacing the same
23465         reg multiple times, try to reuse last created gen_raw_REG.
23467         PR debug/81155
23468         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23469         main to workaround a bug in GDB.
23471 2018-01-12  Tom de Vries  <tom@codesourcery.com>
23473         PR target/83737
23474         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23476 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
23478         PR rtl-optimization/80481
23479         * ira-color.c (get_cap_member): New function.
23480         (allocnos_conflict_by_live_ranges_p): Use it.
23481         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23482         (setup_slot_coalesced_allocno_live_ranges): Ditto.
23484 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
23486         PR target/83628
23487         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23488         (*saddl_se_1): Ditto.
23489         (*ssubsi_1): Ditto.
23490         (*ssubl_se_1): Ditto.
23492 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
23494         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23495         rather than wi::to_widest for DR_INITs.
23496         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23497         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23498         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23499         INTEGER_CSTs.
23500         (vect_analyze_group_access_1): Note that here.
23502 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
23504         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23505         polynomial type sizes.
23507 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
23509         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23510         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23511         (gimple_add_tmp_var): Likewise.
23513 2018-01-12  Martin Liska  <mliska@suse.cz>
23515         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23516         (gimple_alloc_sizes): Likewise.
23517         (dump_gimple_statistics): Use PRIu64 in printf format.
23518         * gimple.h: Change uint64_t to int.
23520 2018-01-12  Martin Liska  <mliska@suse.cz>
23522         * tree-core.h: Use uint64_t instead of int.
23523         * tree.c (tree_node_counts): Likewise.
23524         (tree_node_sizes): Likewise.
23525         (dump_tree_statistics): Use PRIu64 in printf format.
23527 2018-01-12  Martin Liska  <mliska@suse.cz>
23529         * Makefile.in: As qsort_chk is implemented in vec.c, add
23530         vec.o to linkage of gencfn-macros.
23531         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23532         passing the info to record_node_allocation_statistics.
23533         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23534         and pass the info.
23535         * ggc-common.c (struct ggc_usage): Add operator== and use
23536         it in operator< and compare function.
23537         * mem-stats.h (struct mem_usage): Likewise.
23538         * vec.c (struct vec_usage): Remove operator< and compare
23539         function. Can be simply inherited.
23541 2018-01-12  Martin Jambor  <mjambor@suse.cz>
23543         PR target/81616
23544         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23545         * tree-ssa-math-opts.c: Include domwalk.h.
23546         (convert_mult_to_fma_1): New function.
23547         (fma_transformation_info): New type.
23548         (fma_deferring_state): Likewise.
23549         (cancel_fma_deferring): New function.
23550         (result_of_phi): Likewise.
23551         (last_fma_candidate_feeds_initial_phi): Likewise.
23552         (convert_mult_to_fma): Added deferring logic, split actual
23553         transformation to convert_mult_to_fma_1.
23554         (math_opts_dom_walker): New type.
23555         (math_opts_dom_walker::after_dom_children): New method, body moved
23556         here from pass_optimize_widening_mul::execute, added deferring logic
23557         bits.
23558         (pass_optimize_widening_mul::execute): Moved most of code to
23559         math_opts_dom_walker::after_dom_children.
23560         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23561         * config/i386/i386.c (ix86_option_override_internal): Added
23562         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23564 2018-01-12  Richard Biener  <rguenther@suse.de>
23566         PR debug/83157
23567         * dwarf2out.c (gen_variable_die): Do not reset old_die for
23568         inline instance vars.
23570 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
23572         PR target/81819
23573         * config/rx/rx.c (rx_is_restricted_memory_address):
23574         Handle SUBREG case.
23576 2018-01-12  Richard Biener  <rguenther@suse.de>
23578         PR tree-optimization/80846
23579         * target.def (split_reduction): New target hook.
23580         * targhooks.c (default_split_reduction): New function.
23581         * targhooks.h (default_split_reduction): Declare.
23582         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23583         target requests first reduce vectors by combining low and high
23584         parts.
23585         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23586         (get_vectype_for_scalar_type_and_size): Export.
23587         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23588         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23589         * doc/tm.texi: Regenerate.
23590         * config/i386/i386.c (ix86_split_reduction): Implement
23591         TARGET_VECTORIZE_SPLIT_REDUCTION.
23593 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23595         PR target/83368
23596         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23597         in PIC mode except for TARGET_VXWORKS_RTP.
23598         * config/sparc/sparc.c: Include cfgrtl.h.
23599         (TARGET_INIT_PIC_REG): Define.
23600         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23601         (sparc_pic_register_p): New predicate.
23602         (sparc_legitimate_address_p): Use it.
23603         (sparc_legitimize_pic_address): Likewise.
23604         (sparc_delegitimize_address): Likewise.
23605         (sparc_mode_dependent_address_p): Likewise.
23606         (gen_load_pcrel_sym): Remove 4th parameter.
23607         (load_got_register): Adjust call to above.  Remove obsolete stuff.
23608         (sparc_expand_prologue): Do not call load_got_register here.
23609         (sparc_flat_expand_prologue): Likewise.
23610         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23611         (sparc_use_pseudo_pic_reg): New function.
23612         (sparc_init_pic_reg): Likewise.
23613         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23614         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23616 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
23618         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23619         Add item for branch_cost.
23621 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23623         PR rtl-optimization/83565
23624         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23625         not extend the result to a larger mode for rotate operations.
23626         (num_sign_bit_copies1): Likewise.
23628 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23630         PR target/40411
23631         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23632         -symbolic.
23633         Use values-Xc.o for -pedantic.
23634         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23636 2018-01-12  Martin Liska  <mliska@suse.cz>
23638         PR ipa/83054
23639         * ipa-devirt.c (final_warning_record::grow_type_warnings):
23640         New function.
23641         (possible_polymorphic_call_targets): Use it.
23642         (ipa_devirt): Likewise.
23644 2018-01-12  Martin Liska  <mliska@suse.cz>
23646         * profile-count.h (enum profile_quality): Use 0 as invalid
23647         enum value of profile_quality.
23649 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
23651         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23652         -mext-string options.
23654 2018-01-12  Richard Biener  <rguenther@suse.de>
23656         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23657         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23658         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23659         Likewise.
23660         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23662 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
23664         * configure.ac (--with-long-double-format): Add support for the
23665         configuration option to change the default long double format on
23666         PowerPC systems.
23667         * config.gcc (powerpc*-linux*-*): Likewise.
23668         * configure: Regenerate.
23669         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23670         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23671         used without modification.
23673 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23675         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23676         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23677         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23678         MISC_BUILTIN_SPEC_BARRIER.
23679         (rs6000_init_builtins): Likewise.
23680         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23681         enum value.
23682         (speculation_barrier): New define_insn.
23683         * doc/extend.texi: Document __builtin_speculation_barrier.
23685 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
23687         PR target/83203
23688         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23689         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23690         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23691         iterators.
23692         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
23693         integral modes instead of "ss" and "sd".
23694         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23695         vectors with 32-bit and 64-bit elements.
23696         (vecdupssescalarmodesuffix): New mode attribute.
23697         (vec_dup<mode>): Use it.
23699 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
23701         PR target/83330
23702         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23703         frame if argument is passed on stack.
23705 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
23707         PR target/82682
23708         * ree.c (combine_reaching_defs): Optimize also
23709         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23710         reg2=any_extend(exp); reg1=reg2;, formatting fix.
23712 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
23714         PR middle-end/83189
23715         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23717 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
23719         PR middle-end/83718
23720         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23721         after they are computed.
23723 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
23725         PR tree-optimization/83695
23726         * gimple-loop-linterchange.cc
23727         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23728         reset cached scev information after interchange.
23729         (pass_linterchange::execute): Remove call to scev_reset_htab.
23731 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23733         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23734         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23735         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23736         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23737         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23738         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23739         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23740         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23741         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23742         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23743         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23744         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23745         (V_lane_reg): Likewise.
23746         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23747         New define_expand.
23748         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23749         (vfmal_lane_low<mode>_intrinsic,
23750         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23751         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23752         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23753         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23754         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23755         vfmsl_lane_high<mode>_intrinsic): New define_insns.
23757 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23759         * config/arm/arm-cpus.in (fp16fml): New feature.
23760         (ALL_SIMD): Add fp16fml.
23761         (armv8.2-a): Add fp16fml as an option.
23762         (armv8.3-a): Likewise.
23763         (armv8.4-a): Add fp16fml as part of fp16.
23764         * config/arm/arm.h (TARGET_FP16FML): Define.
23765         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23766         when appropriate.
23767         * config/arm/arm-modes.def (V2HF): Define.
23768         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23769         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23770         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23771         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23772         vfmsl_low, vfmsl_high): New set of builtins.
23773         * config/arm/iterators.md (PLUSMINUS): New code iterator.
23774         (vfml_op): New code attribute.
23775         (VFMLHALVES): New int iterator.
23776         (VFML, VFMLSEL): New mode attributes.
23777         (V_reg): Define mapping for V2HF.
23778         (V_hi, V_lo): New mode attributes.
23779         (VF_constraint): Likewise.
23780         (vfml_half, vfml_half_selector): New int attributes.
23781         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23782         define_expand.
23783         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23784         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23785         New define_insn.
23786         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23787         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23788         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23789         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
23790         documentation.
23791         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23792         Document new effective target and option set.
23794 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23796         * config/arm/arm-cpus.in (armv8_4): New feature.
23797         (ARMv8_4a): New fgroup.
23798         (armv8.4-a): New arch.
23799         * config/arm/arm-tables.opt: Regenerate.
23800         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23801         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23802         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23803         Add matching rules for -march=armv8.4-a and extensions.
23804         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23806 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
23808         PR target/81821
23809         * config/rx/rx.md (BW): New mode attribute.
23810         (sync_lock_test_and_setsi): Add mode suffix to insn output.
23812 2018-01-11  Richard Biener  <rguenther@suse.de>
23814         PR tree-optimization/83435
23815         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23816         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23817         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23819 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23820             Alan Hayward  <alan.hayward@arm.com>
23821             David Sherwood  <david.sherwood@arm.com>
23823         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23824         field.
23825         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
23826         (aarch64_print_address_internal): Use it to check for a zero offset.
23828 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23829             Alan Hayward  <alan.hayward@arm.com>
23830             David Sherwood  <david.sherwood@arm.com>
23832         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23833         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23834         Return a poly_int64 rather than a HOST_WIDE_INT.
23835         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23836         rather than a HOST_WIDE_INT.
23837         * config/aarch64/aarch64.h (aarch64_frame): Protect with
23838         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
23839         hard_fp_offset, frame_size, initial_adjust, callee_offset and
23840         final_offset from HOST_WIDE_INT to poly_int64.
23841         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23842         to_constant when getting the number of units in an Advanced SIMD
23843         mode.
23844         (aarch64_builtin_vectorized_function): Check for a constant number
23845         of units.
23846         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23847         GET_MODE_SIZE.
23848         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23849         attribute instead of GET_MODE_NUNITS.
23850         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23851         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23852         GET_MODE_SIZE for fixed-size registers.
23853         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23854         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23855         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23856         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23857         (aarch64_print_operand, aarch64_print_address_internal)
23858         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23859         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23860         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23861         Handle polynomial GET_MODE_SIZE.
23862         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
23863         wider than SImode without modification.
23864         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23865         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23866         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23867         passing and returning SVE modes.
23868         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23869         rather than GEN_INT.
23870         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23871         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23872         (aarch64_allocate_and_probe_stack_space): Likewise.
23873         (aarch64_layout_frame): Cope with polynomial offsets.
23874         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23875         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
23876         polynomial offsets.
23877         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23878         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23879         poly_int64 rather than a HOST_WIDE_INT.
23880         (aarch64_get_separate_components, aarch64_process_components)
23881         (aarch64_expand_prologue, aarch64_expand_epilogue)
23882         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23883         (aarch64_anchor_offset): New function, split out from...
23884         (aarch64_legitimize_address): ...here.
23885         (aarch64_builtin_vectorization_cost): Handle polynomial
23886         TYPE_VECTOR_SUBPARTS.
23887         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23888         GET_MODE_NUNITS.
23889         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23890         number of elements from the PARALLEL rather than the mode.
23891         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23892         rather than GET_MODE_BITSIZE.
23893         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23894         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23895         (aarch64_expand_vec_perm_const_1): Handle polynomial
23896         d->perm.length () and d->perm elements.
23897         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
23898         Apply to_constant to d->perm elements.
23899         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23900         polynomial CONST_VECTOR_NUNITS.
23901         (aarch64_move_pointer): Take amount as a poly_int64 rather
23902         than an int.
23903         (aarch64_progress_pointer): Avoid temporary variable.
23904         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23905         the mode attribute instead of GET_MODE.
23907 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23908             Alan Hayward  <alan.hayward@arm.com>
23909             David Sherwood  <david.sherwood@arm.com>
23911         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23912         x exists before using it.
23913         (aarch64_add_constant_internal): Rename to...
23914         (aarch64_add_offset_1): ...this.  Replace regnum with separate
23915         src and dest rtxes.  Handle the case in which they're different,
23916         including when the offset is zero.  Replace scratchreg with an rtx.
23917         Use 2 additions if there is no spare register into which we can
23918         move a 16-bit constant.
23919         (aarch64_add_constant): Delete.
23920         (aarch64_add_offset): Replace reg with separate src and dest
23921         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
23922         Use aarch64_add_offset_1.
23923         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23924         an rtx rather than an int.  Take the delta as a poly_int64
23925         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
23926         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23927         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23928         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23929         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23930         and aarch64_add_sp.
23931         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23932         aarch64_add_constant.
23934 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23936         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23937         Use scalar_float_mode.
23939 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23941         * config/aarch64/aarch64-simd.md
23942         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23943         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23944         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23945         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23946         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23947         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23948         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23949         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23950         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23951         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23953 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23955         PR target/83514
23956         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23957         targ_options->x_arm_arch_string is non NULL.
23959 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
23961         * config/aarch64/aarch64.h
23962         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
23964 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
23966         PR target/82096
23967         * expmed.c (emit_store_flag_force): Swap if const op0
23968         and change VOIDmode to mode of op0.
23970 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23972         PR rtl-optimization/83761
23973         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23974         than bytes to mode_for_size.
23976 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23978         PR middle-end/83189
23979         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23980         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23981         profile.
23983 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23985         PR middle-end/83575
23986         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23987         when in layout mode.
23988         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23989         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23990         partition fixup.
23992 2018-01-10  Michael Collison  <michael.collison@arm.com>
23994         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23995         * config/aarch64/aarch64-option-extension.def: Add
23996         AARCH64_OPT_EXTENSION of 'fp16fml'.
23997         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23998         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23999         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
24000         * config/aarch64/constraints.md (Ui7): New constraint.
24001         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
24002         (VFMLA_SEL_W): Ditto.
24003         (f16quad): Ditto.
24004         (f16mac1): Ditto.
24005         (VFMLA16_LOW): New int iterator.
24006         (VFMLA16_HIGH): Ditto.
24007         (UNSPEC_FMLAL): New unspec.
24008         (UNSPEC_FMLSL): Ditto.
24009         (UNSPEC_FMLAL2): Ditto.
24010         (UNSPEC_FMLSL2): Ditto.
24011         (f16mac): New code attribute.
24012         * config/aarch64/aarch64-simd-builtins.def
24013         (aarch64_fmlal_lowv2sf): Ditto.
24014         (aarch64_fmlsl_lowv2sf): Ditto.
24015         (aarch64_fmlalq_lowv4sf): Ditto.
24016         (aarch64_fmlslq_lowv4sf): Ditto.
24017         (aarch64_fmlal_highv2sf): Ditto.
24018         (aarch64_fmlsl_highv2sf): Ditto.
24019         (aarch64_fmlalq_highv4sf): Ditto.
24020         (aarch64_fmlslq_highv4sf): Ditto.
24021         (aarch64_fmlal_lane_lowv2sf): Ditto.
24022         (aarch64_fmlsl_lane_lowv2sf): Ditto.
24023         (aarch64_fmlal_laneq_lowv2sf): Ditto.
24024         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
24025         (aarch64_fmlalq_lane_lowv4sf): Ditto.
24026         (aarch64_fmlsl_lane_lowv4sf): Ditto.
24027         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
24028         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
24029         (aarch64_fmlal_lane_highv2sf): Ditto.
24030         (aarch64_fmlsl_lane_highv2sf): Ditto.
24031         (aarch64_fmlal_laneq_highv2sf): Ditto.
24032         (aarch64_fmlsl_laneq_highv2sf): Ditto.
24033         (aarch64_fmlalq_lane_highv4sf): Ditto.
24034         (aarch64_fmlsl_lane_highv4sf): Ditto.
24035         (aarch64_fmlalq_laneq_highv4sf): Ditto.
24036         (aarch64_fmlsl_laneq_highv4sf): Ditto.
24037         * config/aarch64/aarch64-simd.md:
24038         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
24039         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24040         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
24041         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24042         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
24043         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
24044         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
24045         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
24046         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
24047         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
24048         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
24049         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
24050         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
24051         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
24052         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
24053         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
24054         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
24055         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
24056         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
24057         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
24058         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
24059         (vfmlsl_low_u32): Ditto.
24060         (vfmlalq_low_u32): Ditto.
24061         (vfmlslq_low_u32): Ditto.
24062         (vfmlal_high_u32): Ditto.
24063         (vfmlsl_high_u32): Ditto.
24064         (vfmlalq_high_u32): Ditto.
24065         (vfmlslq_high_u32): Ditto.
24066         (vfmlal_lane_low_u32): Ditto.
24067         (vfmlsl_lane_low_u32): Ditto.
24068         (vfmlal_laneq_low_u32): Ditto.
24069         (vfmlsl_laneq_low_u32): Ditto.
24070         (vfmlalq_lane_low_u32): Ditto.
24071         (vfmlslq_lane_low_u32): Ditto.
24072         (vfmlalq_laneq_low_u32): Ditto.
24073         (vfmlslq_laneq_low_u32): Ditto.
24074         (vfmlal_lane_high_u32): Ditto.
24075         (vfmlsl_lane_high_u32): Ditto.
24076         (vfmlal_laneq_high_u32): Ditto.
24077         (vfmlsl_laneq_high_u32): Ditto.
24078         (vfmlalq_lane_high_u32): Ditto.
24079         (vfmlslq_lane_high_u32): Ditto.
24080         (vfmlalq_laneq_high_u32): Ditto.
24081         (vfmlslq_laneq_high_u32): Ditto.
24082         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
24083         (AARCH64_FL_FOR_ARCH8_4): New.
24084         (AARCH64_ISA_F16FML): New ISA flag.
24085         (TARGET_F16FML): New feature flag for fp16fml.
24086         (doc/invoke.texi): Document new fp16fml option.
24088 2018-01-10  Michael Collison  <michael.collison@arm.com>
24090         * config/aarch64/aarch64-builtins.c:
24091         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
24092         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24093         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
24094         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
24095         (AARCH64_ISA_SHA3): New ISA flag.
24096         (TARGET_SHA3): New feature flag for sha3.
24097         * config/aarch64/iterators.md (sha512_op): New int attribute.
24098         (CRYPTO_SHA512): New int iterator.
24099         (UNSPEC_SHA512H): New unspec.
24100         (UNSPEC_SHA512H2): Ditto.
24101         (UNSPEC_SHA512SU0): Ditto.
24102         (UNSPEC_SHA512SU1): Ditto.
24103         * config/aarch64/aarch64-simd-builtins.def
24104         (aarch64_crypto_sha512hqv2di): New builtin.
24105         (aarch64_crypto_sha512h2qv2di): Ditto.
24106         (aarch64_crypto_sha512su0qv2di): Ditto.
24107         (aarch64_crypto_sha512su1qv2di): Ditto.
24108         (aarch64_eor3qv8hi): Ditto.
24109         (aarch64_rax1qv2di): Ditto.
24110         (aarch64_xarqv2di): Ditto.
24111         (aarch64_bcaxqv8hi): Ditto.
24112         * config/aarch64/aarch64-simd.md:
24113         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
24114         (aarch64_crypto_sha512su0qv2di): Ditto.
24115         (aarch64_crypto_sha512su1qv2di): Ditto.
24116         (aarch64_eor3qv8hi): Ditto.
24117         (aarch64_rax1qv2di): Ditto.
24118         (aarch64_xarqv2di): Ditto.
24119         (aarch64_bcaxqv8hi): Ditto.
24120         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
24121         (vsha512h2q_u64): Ditto.
24122         (vsha512su0q_u64): Ditto.
24123         (vsha512su1q_u64): Ditto.
24124         (veor3q_u16): Ditto.
24125         (vrax1q_u64): Ditto.
24126         (vxarq_u64): Ditto.
24127         (vbcaxq_u16): Ditto.
24128         * config/arm/types.md (crypto_sha512): New type attribute.
24129         (crypto_sha3): Ditto.
24130         (doc/invoke.texi): Document new sha3 option.
24132 2018-01-10  Michael Collison  <michael.collison@arm.com>
24134         * config/aarch64/aarch64-builtins.c:
24135         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
24136         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24137         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
24138         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
24139         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
24140         (AARCH64_ISA_SM4): New ISA flag.
24141         (TARGET_SM4): New feature flag for sm4.
24142         * config/aarch64/aarch64-simd-builtins.def
24143         (aarch64_sm3ss1qv4si): Ditto.
24144         (aarch64_sm3tt1aq4si): Ditto.
24145         (aarch64_sm3tt1bq4si): Ditto.
24146         (aarch64_sm3tt2aq4si): Ditto.
24147         (aarch64_sm3tt2bq4si): Ditto.
24148         (aarch64_sm3partw1qv4si): Ditto.
24149         (aarch64_sm3partw2qv4si): Ditto.
24150         (aarch64_sm4eqv4si): Ditto.
24151         (aarch64_sm4ekeyqv4si): Ditto.
24152         * config/aarch64/aarch64-simd.md:
24153         (aarch64_sm3ss1qv4si): Ditto.
24154         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
24155         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
24156         (aarch64_sm4eqv4si): Ditto.
24157         (aarch64_sm4ekeyqv4si): Ditto.
24158         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
24159         (sm3part_op): Ditto.
24160         (CRYPTO_SM3TT): Ditto.
24161         (CRYPTO_SM3PART): Ditto.
24162         (UNSPEC_SM3SS1): New unspec.
24163         (UNSPEC_SM3TT1A): Ditto.
24164         (UNSPEC_SM3TT1B): Ditto.
24165         (UNSPEC_SM3TT2A): Ditto.
24166         (UNSPEC_SM3TT2B): Ditto.
24167         (UNSPEC_SM3PARTW1): Ditto.
24168         (UNSPEC_SM3PARTW2): Ditto.
24169         (UNSPEC_SM4E): Ditto.
24170         (UNSPEC_SM4EKEY): Ditto.
24171         * config/aarch64/constraints.md (Ui2): New constraint.
24172         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
24173         * config/arm/types.md (crypto_sm3): New type attribute.
24174         (crypto_sm4): Ditto.
24175         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
24176         (vsm3tt1aq_u32): Ditto.
24177         (vsm3tt1bq_u32): Ditto.
24178         (vsm3tt2aq_u32): Ditto.
24179         (vsm3tt2bq_u32): Ditto.
24180         (vsm3partw1q_u32): Ditto.
24181         (vsm3partw2q_u32): Ditto.
24182         (vsm4eq_u32): Ditto.
24183         (vsm4ekeyq_u32): Ditto.
24184         (doc/invoke.texi): Document new sm4 option.
24186 2018-01-10  Michael Collison  <michael.collison@arm.com>
24188         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
24189         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
24190         (AARCH64_FL_FOR_ARCH8_4): New.
24191         (AARCH64_FL_V8_4): New flag.
24192         (doc/invoke.texi): Document new armv8.4-a option.
24194 2018-01-10  Michael Collison  <michael.collison@arm.com>
24196         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24197         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
24198         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
24199         * config/aarch64/aarch64-option-extension.def: Add
24200         AARCH64_OPT_EXTENSION of 'sha2'.
24201         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
24202         (crypto): Disable sha2 and aes if crypto disabled.
24203         (crypto): Enable aes and sha2 if enabled.
24204         (simd): Disable sha2 and aes if simd disabled.
24205         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
24206         New flags.
24207         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
24208         (TARGET_SHA2): New feature flag for sha2.
24209         (TARGET_AES): New feature flag for aes.
24210         * config/aarch64/aarch64-simd.md:
24211         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
24212         conditional on TARGET_AES.
24213         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
24214         (aarch64_crypto_sha1hsi): Make pattern conditional
24215         on TARGET_SHA2.
24216         (aarch64_crypto_sha1hv4si): Ditto.
24217         (aarch64_be_crypto_sha1hv4si): Ditto.
24218         (aarch64_crypto_sha1su1v4si): Ditto.
24219         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
24220         (aarch64_crypto_sha1su0v4si): Ditto.
24221         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
24222         (aarch64_crypto_sha256su0v4si): Ditto.
24223         (aarch64_crypto_sha256su1v4si): Ditto.
24224         (doc/invoke.texi): Document new aes and sha2 options.
24226 2018-01-10  Martin Sebor  <msebor@redhat.com>
24228         PR tree-optimization/83781
24229         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
24230         as string arrays.
24232 2018-01-11  Martin Sebor  <msebor@gmail.com>
24233             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24235         PR tree-optimization/83501
24236         PR tree-optimization/81703
24238         * tree-ssa-strlen.c (get_string_cst): Rename...
24239         (get_string_len): ...to this.  Handle global constants.
24240         (handle_char_store): Adjust.
24242 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
24243             Jim Wilson  <jimw@sifive.com>
24245         * config/riscv/riscv-protos.h (riscv_output_return): New.
24246         * config/riscv/riscv.c (struct machine_function): New naked_p field.
24247         (riscv_attribute_table, riscv_output_return),
24248         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
24249         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
24250         (riscv_compute_frame_info): Only compute frame->mask if not a naked
24251         function.
24252         (riscv_expand_prologue): Add early return for naked function.
24253         (riscv_expand_epilogue): Likewise.
24254         (riscv_function_ok_for_sibcall): Return false for naked function.
24255         (riscv_set_current_function): New.
24256         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
24257         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
24258         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
24259         * doc/extend.texi (RISC-V Function Attributes): New.
24261 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
24263         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
24264         check for 128-bit long double before checking TCmode.
24265         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
24266         128-bit long doubles before checking TFmode or TCmode.
24267         (FLOAT128_IBM_P): Likewise.
24269 2018-01-10  Martin Sebor  <msebor@redhat.com>
24271         PR tree-optimization/83671
24272         * builtins.c (c_strlen): Unconditionally return zero for the empty
24273         string.
24274         Use -Warray-bounds for warnings.
24275         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
24276         for non-constant array indices with COMPONENT_REF, arrays of
24277         arrays, and pointers to arrays.
24278         (gimple_fold_builtin_strlen): Determine and set length range for
24279         non-constant character arrays.
24281 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
24283         PR middle-end/81897
24284         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
24285         empty blocks.
24287 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
24289         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
24291 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
24293         PR target/83399
24294         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
24295         VECTOR_MEM_ALTIVEC_OR_VSX_P.
24296         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
24297         indexed_or_indirect_operand predicate.
24298         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
24299         (*vsx_le_perm_load_v8hi): Likewise.
24300         (*vsx_le_perm_load_v16qi): Likewise.
24301         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
24302         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
24303         (*vsx_le_perm_store_v8hi): Likewise.
24304         (*vsx_le_perm_store_v16qi): Likewise.
24305         (eight unnamed splitters): Likewise.
24307 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
24309         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
24310         * config/rs6000/emmintrin.h: Likewise.
24311         * config/rs6000/mmintrin.h: Likewise.
24312         * config/rs6000/xmmintrin.h: Likewise.
24314 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
24316         PR c++/43486
24317         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
24318         "public_flag".
24319         * tree.c (tree_nop_conversion): Return true for location wrapper
24320         nodes.
24321         (maybe_wrap_with_location): New function.
24322         (selftest::check_strip_nops): New function.
24323         (selftest::test_location_wrappers): New function.
24324         (selftest::tree_c_tests): Call it.
24325         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
24326         (maybe_wrap_with_location): New decl.
24327         (EXPR_LOCATION_WRAPPER_P): New macro.
24328         (location_wrapper_p): New inline function.
24329         (tree_strip_any_location_wrapper): New inline function.
24331 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
24333         PR target/83735
24334         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
24335         stack_realign_offset for the largest alignment of stack slot
24336         actually used.
24337         (ix86_find_max_used_stack_alignment): New function.
24338         (ix86_finalize_stack_frame_flags): Use it.  Set
24339         max_used_stack_alignment if we don't realign stack.
24340         * config/i386/i386.h (machine_function): Add
24341         max_used_stack_alignment.
24343 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
24345         * config/arm/arm.opt (-mbranch-cost): New option.
24346         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
24347         account.
24349 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
24351         PR target/83629
24352         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
24353         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
24355 2018-01-10  Richard Biener  <rguenther@suse.de>
24357         PR debug/83765
24358         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
24359         early out so it also covers the case where we have a non-NULL
24360         origin.
24362 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
24364         PR tree-optimization/83753
24365         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
24366         for non-strided grouped accesses if the number of elements is 1.
24368 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
24370         PR target/81616
24371         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
24372         * i386.h (TARGET_USE_GATHER): Define.
24373         * x86-tune.def (X86_TUNE_USE_GATHER): New.
24375 2018-01-10  Martin Liska  <mliska@suse.cz>
24377         PR bootstrap/82831
24378         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
24379         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
24380         partitioning.
24381         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
24382         CLEANUP_NO_PARTITIONING is not set.
24384 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
24386         * doc/rtl.texi: Remove documentation of (const ...) wrappers
24387         for vectors, as a partial revert of r254296.
24388         * rtl.h (const_vec_p): Delete.
24389         (const_vec_duplicate_p): Don't test for vector CONSTs.
24390         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
24391         * expmed.c (make_tree): Likewise.
24393         Revert:
24394         * common.md (E, F): Use CONSTANT_P instead of checking for
24395         CONST_VECTOR.
24396         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
24397         checking for CONST_VECTOR.
24399 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
24401         PR middle-end/83575
24402         * predict.c (force_edge_cold): Handle in more sane way edges
24403         with no prediction.
24405 2018-01-09  Carl Love  <cel@us.ibm.com>
24407         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
24408         V4SI, V4SF types.
24409         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
24410         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
24411         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
24412         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
24413         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
24414         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
24415         * config/rs6000/rs6000-protos.h: Add extern defition for
24416         rs6000_generate_float2_double_code.
24417         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
24418         function.
24419         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
24420         (float2_v2df): Add define_expand.
24422 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
24424         PR target/83628
24425         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
24426         op_mode in the force_to_mode call.
24428 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
24430         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
24431         instead of checking each element individually.
24432         (aarch64_evpc_uzp): Likewise.
24433         (aarch64_evpc_zip): Likewise.
24434         (aarch64_evpc_ext): Likewise.
24435         (aarch64_evpc_rev): Likewise.
24436         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24437         instead of checking each element individually.  Return true without
24438         generating rtl if
24439         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24440         whether all selected elements come from the same input, instead of
24441         checking each element individually.  Remove calls to gen_rtx_REG,
24442         start_sequence and end_sequence and instead assert that no rtl is
24443         generated.
24445 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
24447         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24448         order of HIGH and CONST checks.
24450 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
24452         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24453         if the destination isn't an SSA_NAME.
24455 2018-01-09  Richard Biener  <rguenther@suse.de>
24457         PR tree-optimization/83668
24458         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24459         move prologue...
24460         (canonicalize_loop_form): ... here, renamed from ...
24461         (canonicalize_loop_closed_ssa_form): ... this and amended to
24462         swap successor edges for loop exit blocks to make us use
24463         the RPO order we need for initial schedule generation.
24465 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
24467         PR tree-optimization/64811
24468         * match.pd: When optimizing comparisons with Inf, avoid
24469         introducing or losing exceptions from comparisons with NaN.
24471 2018-01-09  Martin Liska  <mliska@suse.cz>
24473         PR sanitizer/82517
24474         * asan.c (shadow_mem_size): Add gcc_assert.
24476 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
24478         Don't save registers in main().
24480         PR target/83738
24481         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24482         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24483         * config/avr/avr.c (avr_set_current_function): Don't error if
24484         naked, OS_task or OS_main are specified at the same time.
24485         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24486         OS_main.
24487         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24488         attribute.
24489         * common/config/avr/avr-common.c (avr_option_optimization_table):
24490         Switch on -mmain-is-OS_task for optimizing compilations.
24492 2018-01-09  Richard Biener  <rguenther@suse.de>
24494         PR tree-optimization/83572
24495         * graphite.c: Include cfganal.h.
24496         (graphite_transform_loops): Connect infinite loops to exit
24497         and remove fake edges at the end.
24499 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
24501         * ipa-inline.c (edge_badness): Revert accidental checkin.
24503 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
24505         PR ipa/80763
24506         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24507         symbols; not inline clones.
24509 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
24511         PR target/83507
24512         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24513         hard registers.  Formatting fixes.
24515         PR preprocessor/83722
24516         * gcc.c (try_generate_repro): Pass
24517         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24518         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24519         do_report_bug.
24521 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
24522             Kito Cheng  <kito.cheng@gmail.com>
24524         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24525         (riscv_leaf_function_p): Delete.
24526         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24528 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24530         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24531         function.
24532         (do_ifelse): New function.
24533         (do_isel): New function.
24534         (do_sub3): New function.
24535         (do_add3): New function.
24536         (do_load_mask_compare): New function.
24537         (do_overlap_load_compare): New function.
24538         (expand_compare_loop): New function.
24539         (expand_block_compare): Call expand_compare_loop() when appropriate.
24540         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24541         option description.
24542         (-mblock-compare-inline-loop-limit): New option.
24544 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24546         PR target/83677
24547         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24548         Reverse order of second and third operands in first alternative.
24549         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24550         of first and second elements in UNSPEC_VPERMR vector.
24551         (altivec_expand_vec_perm_le): Likewise.
24553 2018-01-08  Jeff Law  <law@redhat.com>
24555         PR rtl-optimizatin/81308
24556         * tree-switch-conversion.c (cfg_altered): New file scoped static.
24557         (process_switch): If group_case_labels makes a change, then set
24558         cfg_altered.
24559         (pass_convert_switch::execute): If a switch is converted, then
24560         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
24562         PR rtl-optimization/81308
24563         * recog.c (split_all_insns): Conditionally cleanup the CFG after
24564         splitting insns.
24566 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
24568         PR target/83663 - Revert r255946
24569         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24570         generation for cases where splatting a value is not useful.
24571         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24572         across a vec_duplicate and a paradoxical subreg forming a vector
24573         mode to a vec_concat.
24575 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24577         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24578         -march=armv8.3-a variants.
24579         * config/arm/t-multilib: Likewise.
24580         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
24582 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24584         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24585         to generate rtl.
24586         (cceq_ior_compare_complement): Give it a name so I can use it, and
24587         change boolean_or_operator predicate to boolean_operator so it can
24588         be used to generate a crand.
24589         (eqne): New code iterator.
24590         (bd/bd_neg): New code_attrs.
24591         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24592         a single define_insn.
24593         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24594         decrement (bdnzt/bdnzf/bdzt/bdzf).
24595         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24596         with the new names of the branch decrement patterns, and added the
24597         names of the branch decrement conditional patterns.
24599 2018-01-08  Richard Biener  <rguenther@suse.de>
24601         PR tree-optimization/83563
24602         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24603         cache.
24605 2018-01-08  Richard Biener  <rguenther@suse.de>
24607         PR middle-end/83713
24608         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24610 2018-01-08  Richard Biener  <rguenther@suse.de>
24612         PR tree-optimization/83685
24613         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24614         references to abnormals.
24616 2018-01-08  Richard Biener  <rguenther@suse.de>
24618         PR lto/83719
24619         * dwarf2out.c (output_indirect_strings): Handle empty
24620         skeleton_debug_str_hash.
24621         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24623 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
24625         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24626         (emit_store_direct): Likewise.
24627         (arc_trampoline_adjust_address): Likewise.
24628         (arc_asm_trampoline_template): New function.
24629         (arc_initialize_trampoline): Use asm_trampoline_template.
24630         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24631         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24632         * config/arc/arc.md (flush_icache): Delete pattern.
24634 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
24636         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24637         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24638         munaligned-access.
24640 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24642         PR target/83681
24643         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24644         by not USED_FOR_TARGET.
24645         (make_pass_resolve_sw_modes): Likewise.
24647 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24649         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24650         USED_FOR_TARGET.
24652 2018-01-08  Richard Biener  <rguenther@suse.de>
24654         PR middle-end/83580
24655         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24657 2018-01-08  Richard Biener  <rguenther@suse.de>
24659         PR middle-end/83517
24660         * match.pd ((t * 2) / 2) -> t): Add missing :c.
24662 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
24664         PR middle-end/81897
24665         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24666         basic blocks with a small number of successors.
24667         (convert_control_dep_chain_into_preds): Improve handling of
24668         forwarder blocks.
24669         (dump_predicates): Split apart into...
24670         (dump_pred_chain): ...here...
24671         (dump_pred_info): ...and here.
24672         (can_one_predicate_be_invalidated_p): Add debugging printfs.
24673         (can_chain_union_be_invalidated_p): Improve check for invalidation
24674         of paths.
24675         (uninit_uses_cannot_happen): Avoid unnecessary if
24676         convert_control_dep_chain_into_preds yielded nothing.
24678 2018-01-06  Martin Sebor  <msebor@redhat.com>
24680         PR tree-optimization/83640
24681         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24682         subtracting negative offset from size.
24683         (builtin_access::overlap): Adjust offset bounds of the access to fall
24684         within the size of the object if possible.
24686 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
24688         PR rtl-optimization/83699
24689         * expmed.c (extract_bit_field_1): Restrict the vector usage of
24690         extract_bit_field_as_subreg to cases in which the extracted
24691         value is also a vector.
24693         * lra-constraints.c (process_alt_operands): Test for the equivalence
24694         substitutions when detecting a possible reload cycle.
24696 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
24698         PR debug/83480
24699         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24700         by default if flag_selective_schedling{,2}.  Formatting fixes.
24702         PR rtl-optimization/83682
24703         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24704         if it has non-VECTOR_MODE element mode.
24705         (vec_duplicate_p): Likewise.
24707         PR middle-end/83694
24708         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24709         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24711 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
24713         PR target/83604
24714         * config/i386/i386-builtin.def
24715         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24716         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24717         Require also OPTION_MASK_ISA_AVX512F in addition to
24718         OPTION_MASK_ISA_GFNI.
24719         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24720         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24721         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24722         to OPTION_MASK_ISA_GFNI.
24723         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24724         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24725         OPTION_MASK_ISA_AVX512BW.
24726         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24727         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24728         addition to OPTION_MASK_ISA_GFNI.
24729         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24730         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24731         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24732         to OPTION_MASK_ISA_GFNI.
24733         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24734         a requirement for all ISAs rather than any of them with a few
24735         exceptions.
24736         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24737         processing.
24738         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24739         bitmasks to be enabled with 3 exceptions, instead of requiring any
24740         enabled ISA with lots of exceptions.
24741         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24742         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24743         Change avx512bw in isa attribute to avx512f.
24744         * config/i386/sgxintrin.h: Add license boilerplate.
24745         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
24746         to __AVX512F__ and __AVX512VL to __AVX512VL__.
24747         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24748         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24749         defined.
24750         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24751         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24752         temporarily sse2 rather than sse if not enabled already.
24754         PR target/83604
24755         * config/i386/sse.md (VI248_VLBW): Rename to ...
24756         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
24757         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24758         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24759         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24760         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24761         mode iterator instead of VI248_VLBW.
24763 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
24765         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24766         (record_modified): Skip clobbers; add debug output.
24767         (param_change_prob): Use sreal frequencies.
24769 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
24771         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24772         punt for user-aligned variables.
24774 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
24776         * tree-chrec.c (chrec_contains_symbols): Return true for
24777         POLY_INT_CST.
24779 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
24781         PR target/82439
24782         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24783         of (x|y) == x for BICS pattern.
24785 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
24787         PR tree-optimization/83605
24788         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24789         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24790         can throw.
24792 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24794         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24795         * config/epiphany/rtems.h: New file.
24797 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24798             Uros Bizjak  <ubizjak@gmail.com>
24800         PR target/83554
24801         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24802         QIreg_operand instead of register_operand predicate.
24803         * config/i386/i386.c (ix86_rop_should_change_byte_p,
24804         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24805         comments instead of -fmitigate[-_]rop.
24807 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24809         PR bootstrap/81926
24810         * cgraphunit.c (symbol_table::compile): Switch to text_section
24811         before calling assembly_start debug hook.
24812         * run-rtl-passes.c (run_rtl_passes): Likewise.
24813         Include output.h.
24815 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24817         * tree-vrp.c (extract_range_from_binary_expr_1): Check
24818         range_int_cst_p rather than !symbolic_range_p before calling
24819         extract_range_from_multiplicative_op_1.
24821 2018-01-04  Jeff Law  <law@redhat.com>
24823         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24824         redundant test in assertion.
24826 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24828         * doc/rtl.texi: Document machine_mode wrapper classes.
24830 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24832         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24833         using tree_to_uhwi.
24835 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24837         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24838         the VEC_PERM_EXPR fold to fail.
24840 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24842         PR debug/83585
24843         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24844         to switched_sections.
24846 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24848         PR target/83680
24849         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24850         test for d.testing.
24852 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
24854         PR target/83387
24855         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24856         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24858 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24860         PR debug/83666
24861         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24862         is BLKmode and bitpos not zero or mode change is needed.
24864 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24866         PR target/83675
24867         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24868         TARGET_VIS2.
24870 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
24872         PR target/83628
24873         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24874         instead of MULT rtx.  Update all corresponding splitters.
24875         (*saddl_se): Ditto.
24876         (*ssub<modesuffix>): Ditto.
24877         (*ssubl_se): Ditto.
24878         (*cmp_sadd_di): Update split patterns.
24879         (*cmp_sadd_si): Ditto.
24880         (*cmp_sadd_sidi): Ditto.
24881         (*cmp_ssub_di): Ditto.
24882         (*cmp_ssub_si): Ditto.
24883         (*cmp_ssub_sidi): Ditto.
24884         * config/alpha/predicates.md (const23_operand): New predicate.
24885         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24886         Look for ASHIFT, not MULT inner operand.
24887         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24889 2018-01-04  Martin Liska  <mliska@suse.cz>
24891         PR gcov-profile/83669
24892         * gcov.c (output_intermediate_file): Add version to intermediate
24893         gcov file.
24894         * doc/gcov.texi: Document new field 'version' in intermediate
24895         file format. Fix location of '-k' option of gcov command.
24897 2018-01-04  Martin Liska  <mliska@suse.cz>
24899         PR ipa/82352
24900         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24902 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24904         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24906 2018-01-03  Martin Sebor  <msebor@redhat.com>
24908         PR tree-optimization/83655
24909         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24910         checking calls with invalid arguments.
24912 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24914         * tree-vect-stmts.c (vect_get_store_rhs): New function.
24915         (vectorizable_mask_load_store): Delete.
24916         (vectorizable_call): Return false for masked loads and stores.
24917         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
24918         instead of gimple_assign_rhs1.
24919         (vectorizable_load): Handle IFN_MASK_LOAD.
24920         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24924         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24925         split out from..,
24926         (vectorizable_mask_load_store): ...here.
24927         (vectorizable_load): ...and here.
24929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24931         * tree-vect-stmts.c (vect_build_all_ones_mask)
24932         (vect_build_zero_merge_argument): New functions, split out from...
24933         (vectorizable_load): ...here.
24935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24937         * tree-vect-stmts.c (vect_check_store_rhs): New function,
24938         split out from...
24939         (vectorizable_mask_load_store): ...here.
24940         (vectorizable_store): ...and here.
24942 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24944         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24945         split out from...
24946         (vectorizable_mask_load_store): ...here.
24948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24950         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24951         (vect_model_store_cost): Take a vec_load_store_type instead of a
24952         vect_def_type.
24953         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24954         (vect_model_store_cost): Take a vec_load_store_type instead of a
24955         vect_def_type.
24956         (vectorizable_mask_load_store): Update accordingly.
24957         (vectorizable_store): Likewise.
24958         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24962         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24963         IFN_MASK_LOAD calls here rather than...
24964         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24966 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24967             Alan Hayward  <alan.hayward@arm.com>
24968             David Sherwood  <david.sherwood@arm.com>
24970         * expmed.c (extract_bit_field_1): For vector extracts,
24971         fall back to extract_bit_field_as_subreg if vec_extract
24972         isn't available.
24974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24975             Alan Hayward  <alan.hayward@arm.com>
24976             David Sherwood  <david.sherwood@arm.com>
24978         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24979         they are variable or constant sized.
24980         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24981         slots for constant-sized data.
24983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24984             Alan Hayward  <alan.hayward@arm.com>
24985             David Sherwood  <david.sherwood@arm.com>
24987         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24988         handling COND_EXPRs with boolean comparisons, try to find a better
24989         basis for the mask type than the boolean itself.
24991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24993         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24994         is calculated and how it can be overridden.
24995         * genmodes.c (max_bitsize_mode_any_mode): New variable.
24996         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24997         if defined.
24998         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24999         if nonzero.
25001 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25002             Alan Hayward  <alan.hayward@arm.com>
25003             David Sherwood  <david.sherwood@arm.com>
25005         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
25006         Remove the mode argument.
25007         (aarch64_simd_valid_immediate): Remove the mode and inverse
25008         arguments.
25009         * config/aarch64/iterators.md (bitsize): New iterator.
25010         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
25011         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
25012         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
25013         aarch64_simd_valid_immediate.
25014         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
25015         (aarch64_reg_or_bic_imm): Likewise.
25016         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
25017         with an insn_type enum and msl with a modifier_type enum.
25018         Replace element_width with a scalar_mode.  Change the shift
25019         to unsigned int.  Add constructors for scalar_float_mode and
25020         scalar_int_mode elements.
25021         (aarch64_vect_float_const_representable_p): Delete.
25022         (aarch64_can_const_movi_rtx_p)
25023         (aarch64_simd_scalar_immediate_valid_for_move)
25024         (aarch64_simd_make_constant): Update call to
25025         aarch64_simd_valid_immediate.
25026         (aarch64_advsimd_valid_immediate_hs): New function.
25027         (aarch64_advsimd_valid_immediate): Likewise.
25028         (aarch64_simd_valid_immediate): Remove mode and inverse
25029         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
25030         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
25031         and aarch64_float_const_representable_p on the result.
25032         (aarch64_output_simd_mov_immediate): Remove mode argument.
25033         Update call to aarch64_simd_valid_immediate and use of
25034         simd_immediate_info.
25035         (aarch64_output_scalar_simd_mov_immediate): Update call
25036         accordingly.
25038 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25039             Alan Hayward  <alan.hayward@arm.com>
25040             David Sherwood  <david.sherwood@arm.com>
25042         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
25043         (mode_nunits): Likewise CONST_MODE_NUNITS.
25044         * machmode.def (ADJUST_NUNITS): Document.
25045         * genmodes.c (mode_data::need_nunits_adj): New field.
25046         (blank_mode): Update accordingly.
25047         (adj_nunits): New variable.
25048         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
25049         parameter.
25050         (emit_mode_size_inline): Set need_bytesize_adj for all modes
25051         listed in adj_nunits.
25052         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
25053         listed in adj_nunits.  Don't emit case statements for such modes.
25054         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
25055         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
25056         nothing if adj_nunits is nonnull.
25057         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
25058         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
25059         (emit_mode_fbit): Update use of print_maybe_const_decl.
25060         (emit_move_size): Likewise.  Treat the array as non-const
25061         if adj_nunits.
25062         (emit_mode_adjustments): Handle adj_nunits.
25064 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25066         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
25067         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
25068         (VECTOR_MODES): Use it.
25069         (make_vector_modes): Take the prefix as an argument.
25071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25072             Alan Hayward  <alan.hayward@arm.com>
25073             David Sherwood  <david.sherwood@arm.com>
25075         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
25076         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
25077         for MODE_VECTOR_BOOL.
25078         * machmode.def (VECTOR_BOOL_MODE): Document.
25079         * genmodes.c (VECTOR_BOOL_MODE): New macro.
25080         (make_vector_bool_mode): New function.
25081         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
25082         MODE_VECTOR_BOOL.
25083         * lto-streamer-in.c (lto_input_mode_table): Likewise.
25084         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
25085         Likewise.
25086         * stor-layout.c (int_mode_for_mode): Likewise.
25087         * tree.c (build_vector_type_for_mode): Likewise.
25088         * varasm.c (output_constant_pool_2): Likewise.
25089         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
25090         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
25091         for MODE_VECTOR_BOOL.
25092         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
25093         of mode class checks.
25094         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
25095         instead of a list of mode class checks.
25096         (expand_vector_scalar_condition): Likewise.
25097         (type_for_widest_vector_mode): Handle BImode as an inner mode.
25099 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25100             Alan Hayward  <alan.hayward@arm.com>
25101             David Sherwood  <david.sherwood@arm.com>
25103         * machmode.h (mode_size): Change from unsigned short to
25104         poly_uint16_pod.
25105         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
25106         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25107         or if measurement_type is not polynomial.
25108         (fixed_size_mode::includes_p): Check for constant-sized modes.
25109         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
25110         return a poly_uint16 rather than an unsigned short.
25111         (emit_mode_size): Change the type of mode_size from unsigned short
25112         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
25113         (emit_mode_adjustments): Cope with polynomial vector sizes.
25114         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25115         for GET_MODE_SIZE.
25116         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25117         for GET_MODE_SIZE.
25118         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
25119         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
25120         * caller-save.c (setup_save_areas): Likewise.
25121         (replace_reg_with_saved_mem): Likewise.
25122         * calls.c (emit_library_call_value_1): Likewise.
25123         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
25124         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
25125         (gen_lowpart_for_combine): Likewise.
25126         * convert.c (convert_to_integer_1): Likewise.
25127         * cse.c (equiv_constant, cse_insn): Likewise.
25128         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
25129         (cselib_subst_to_values): Likewise.
25130         * dce.c (word_dce_process_block): Likewise.
25131         * df-problems.c (df_word_lr_mark_ref): Likewise.
25132         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
25133         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
25134         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
25135         (rtl_for_decl_location): Likewise.
25136         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
25137         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
25138         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
25139         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
25140         (expand_expr_real_1): Likewise.
25141         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
25142         (pad_below): Likewise.
25143         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25144         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
25145         * ira.c (get_subreg_tracking_sizes): Likewise.
25146         * ira-build.c (ira_create_allocno_objects): Likewise.
25147         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
25148         (ira_sort_regnos_for_alter_reg): Likewise.
25149         * ira-costs.c (record_operand_costs): Likewise.
25150         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
25151         (resolve_simple_move): Likewise.
25152         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
25153         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
25154         (lra_constraints): Likewise.
25155         (CONST_POOL_OK_P): Reject variable-sized modes.
25156         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
25157         (add_pseudo_to_slot, lra_spill): Likewise.
25158         * omp-low.c (omp_clause_aligned_alignment): Likewise.
25159         * optabs-query.c (get_best_extraction_insn): Likewise.
25160         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25161         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
25162         (expand_mult_highpart, valid_multiword_target_p): Likewise.
25163         * recog.c (offsettable_address_addr_space_p): Likewise.
25164         * regcprop.c (maybe_mode_change): Likewise.
25165         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
25166         * regrename.c (build_def_use): Likewise.
25167         * regstat.c (dump_reg_info): Likewise.
25168         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
25169         (find_reloads, find_reloads_subreg_address): Likewise.
25170         * reload1.c (eliminate_regs_1): Likewise.
25171         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
25172         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
25173         (simplify_binary_operation_1, simplify_subreg): Likewise.
25174         * targhooks.c (default_function_arg_padding): Likewise.
25175         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
25176         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
25177         (verify_gimple_assign_ternary): Likewise.
25178         * tree-inline.c (estimate_move_cost): Likewise.
25179         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25180         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
25181         (get_address_cost_ainc): Likewise.
25182         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
25183         (vect_supportable_dr_alignment): Likewise.
25184         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25185         (vectorizable_reduction): Likewise.
25186         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
25187         (vectorizable_operation, vectorizable_load): Likewise.
25188         * tree.c (build_same_sized_truth_vector_type): Likewise.
25189         * valtrack.c (cleanup_auto_inc_dec): Likewise.
25190         * var-tracking.c (emit_note_insn_var_location): Likewise.
25191         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
25192         (ADDR_VEC_ALIGN): Likewise.
25194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25195             Alan Hayward  <alan.hayward@arm.com>
25196             David Sherwood  <david.sherwood@arm.com>
25198         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
25199         unsigned short.
25200         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25201         or if measurement_type is polynomial.
25202         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
25203         * combine.c (make_extraction): Likewise.
25204         * dse.c (find_shift_sequence): Likewise.
25205         * dwarf2out.c (mem_loc_descriptor): Likewise.
25206         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
25207         (extract_bit_field, extract_low_bits): Likewise.
25208         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
25209         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
25210         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
25211         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
25212         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25213         * reload.c (find_reloads): Likewise.
25214         * reload1.c (alter_reg): Likewise.
25215         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
25216         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
25217         * tree-if-conv.c (predicate_mem_writes): Likewise.
25218         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
25219         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
25220         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
25221         * valtrack.c (dead_debug_insert_temp): Likewise.
25222         * varasm.c (mergeable_constant_section): Likewise.
25223         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
25225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25226             Alan Hayward  <alan.hayward@arm.com>
25227             David Sherwood  <david.sherwood@arm.com>
25229         * expr.c (expand_assignment): Cope with polynomial mode sizes
25230         when assigning to a CONCAT.
25232 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25233             Alan Hayward  <alan.hayward@arm.com>
25234             David Sherwood  <david.sherwood@arm.com>
25236         * machmode.h (mode_precision): Change from unsigned short to
25237         poly_uint16_pod.
25238         (mode_to_precision): Return a poly_uint16 rather than an unsigned
25239         short.
25240         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
25241         or if measurement_type is not polynomial.
25242         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
25243         in which the mode is already known to be a scalar_int_mode.
25244         * genmodes.c (emit_mode_precision): Change the type of mode_precision
25245         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
25246         initializer.
25247         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25248         for GET_MODE_PRECISION.
25249         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25250         for GET_MODE_PRECISION.
25251         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
25252         as polynomial.
25253         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
25254         (expand_field_assignment, make_extraction): Likewise.
25255         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
25256         (get_last_value): Likewise.
25257         * convert.c (convert_to_integer_1): Likewise.
25258         * cse.c (cse_insn): Likewise.
25259         * expr.c (expand_expr_real_1): Likewise.
25260         * lra-constraints.c (simplify_operand_subreg): Likewise.
25261         * optabs-query.c (can_atomic_load_p): Likewise.
25262         * optabs.c (expand_atomic_load): Likewise.
25263         (expand_atomic_store): Likewise.
25264         * ree.c (combine_reaching_defs): Likewise.
25265         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
25266         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
25267         * tree.h (type_has_mode_precision_p): Likewise.
25268         * ubsan.c (instrument_si_overflow): Likewise.
25270 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25271             Alan Hayward  <alan.hayward@arm.com>
25272             David Sherwood  <david.sherwood@arm.com>
25274         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
25275         polynomial numbers of units.
25276         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
25277         (valid_vector_subparts_p): New function.
25278         (build_vector_type): Remove temporary shim and take the number
25279         of units as a poly_uint64 rather than an int.
25280         (build_opaque_vector_type): Take the number of units as a
25281         poly_uint64 rather than an int.
25282         * tree.c (build_vector_from_ctor): Handle polynomial
25283         TYPE_VECTOR_SUBPARTS.
25284         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
25285         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
25286         (build_vector_from_val): If the number of units is variable,
25287         use build_vec_duplicate_cst for constant operands and
25288         VEC_DUPLICATE_EXPR otherwise.
25289         (make_vector_type): Remove temporary is_constant ().
25290         (build_vector_type, build_opaque_vector_type): Take the number of
25291         units as a poly_uint64 rather than an int.
25292         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
25293         VECTOR_CST_NELTS.
25294         * cfgexpand.c (expand_debug_expr): Likewise.
25295         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
25296         (store_constructor, expand_expr_real_1): Likewise.
25297         (const_scalar_mask_from_tree): Likewise.
25298         * fold-const-call.c (fold_const_reduction): Likewise.
25299         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
25300         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
25301         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
25302         (fold_relational_const): Likewise.
25303         (native_interpret_vector): Likewise.  Change the size from an
25304         int to an unsigned int.
25305         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
25306         TYPE_VECTOR_SUBPARTS.
25307         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
25308         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
25309         duplicating a non-constant operand into a variable-length vector.
25310         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
25311         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
25312         * ipa-icf.c (sem_variable::equals): Likewise.
25313         * match.pd: Likewise.
25314         * omp-simd-clone.c (simd_clone_subparts): Likewise.
25315         * print-tree.c (print_node): Likewise.
25316         * stor-layout.c (layout_type): Likewise.
25317         * targhooks.c (default_builtin_vectorization_cost): Likewise.
25318         * tree-cfg.c (verify_gimple_comparison): Likewise.
25319         (verify_gimple_assign_binary): Likewise.
25320         (verify_gimple_assign_ternary): Likewise.
25321         (verify_gimple_assign_single): Likewise.
25322         * tree-pretty-print.c (dump_generic_node): Likewise.
25323         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25324         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
25325         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
25326         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
25327         (vect_shift_permute_load_chain): Likewise.
25328         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
25329         (expand_vector_condition, optimize_vector_constructor): Likewise.
25330         (lower_vec_perm, get_compute_type): Likewise.
25331         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25332         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
25333         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
25334         (vect_recog_mask_conversion_pattern): Likewise.
25335         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
25336         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
25337         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25338         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
25339         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
25340         (vectorizable_shift, vectorizable_operation, vectorizable_store)
25341         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
25342         (supportable_widening_operation): Likewise.
25343         (supportable_narrowing_operation): Likewise.
25344         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
25345         Likewise.
25346         * varasm.c (output_constant): Likewise.
25348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25349             Alan Hayward  <alan.hayward@arm.com>
25350             David Sherwood  <david.sherwood@arm.com>
25352         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
25353         so that both the length == 3 and length != 3 cases set up their
25354         own permute vectors.  Add comments explaining why we know the
25355         number of elements is constant.
25356         (vect_permute_load_chain): Likewise.
25358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25359             Alan Hayward  <alan.hayward@arm.com>
25360             David Sherwood  <david.sherwood@arm.com>
25362         * machmode.h (mode_nunits): Change from unsigned char to
25363         poly_uint16_pod.
25364         (ONLY_FIXED_SIZE_MODES): New macro.
25365         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
25366         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
25367         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
25368         New typedefs.
25369         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
25370         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
25371         or if measurement_type is not polynomial.
25372         * genmodes.c (ZERO_COEFFS): New macro.
25373         (emit_mode_nunits_inline): Make mode_nunits_inline return a
25374         poly_uint16.
25375         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
25376         Use ZERO_COEFFS when emitting initializers.
25377         * data-streamer.h (bp_pack_poly_value): New function.
25378         (bp_unpack_poly_value): Likewise.
25379         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25380         for GET_MODE_NUNITS.
25381         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25382         for GET_MODE_NUNITS.
25383         * tree.c (make_vector_type): Remove temporary shim and make
25384         the real function take the number of units as a poly_uint64
25385         rather than an int.
25386         (build_vector_type_for_mode): Handle polynomial nunits.
25387         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
25388         * emit-rtl.c (const_vec_series_p_1): Likewise.
25389         (gen_rtx_CONST_VECTOR): Likewise.
25390         * fold-const.c (test_vec_duplicate_folding): Likewise.
25391         * genrecog.c (validate_pattern): Likewise.
25392         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
25393         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25394         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
25395         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
25396         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
25397         * rtlanal.c (subreg_get_info): Likewise.
25398         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25399         (vect_grouped_load_supported): Likewise.
25400         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
25401         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
25402         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
25403         (simplify_const_unary_operation, simplify_binary_operation_1)
25404         (simplify_const_binary_operation, simplify_ternary_operation)
25405         (test_vector_ops_duplicate, test_vector_ops): Likewise.
25406         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
25407         instead of CONST_VECTOR_NUNITS.
25408         * varasm.c (output_constant_pool_2): Likewise.
25409         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
25410         explicit-encoded elements in the XVEC for variable-length vectors.
25412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25414         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
25416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25417             Alan Hayward  <alan.hayward@arm.com>
25418             David Sherwood  <david.sherwood@arm.com>
25420         * coretypes.h (fixed_size_mode): Declare.
25421         (fixed_size_mode_pod): New typedef.
25422         * builtins.h (target_builtins::x_apply_args_mode)
25423         (target_builtins::x_apply_result_mode): Change type to
25424         fixed_size_mode_pod.
25425         * builtins.c (apply_args_size, apply_result_size, result_vector)
25426         (expand_builtin_apply_args_1, expand_builtin_apply)
25427         (expand_builtin_return): Update accordingly.
25429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25431         * cse.c (hash_rtx_cb): Hash only the encoded elements.
25432         * cselib.c (cselib_hash_rtx): Likewise.
25433         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25434         CONST_VECTOR encoding.
25436 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25437             Jeff Law  <law@redhat.com>
25439         PR target/83641
25440         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25441         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25442         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25443         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25445         PR target/83641
25446         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25447         explicitly probe *sp in a noreturn function if there were any callee
25448         register saves or frame pointer is needed.
25450 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25452         PR debug/83621
25453         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25454         BLKmode for ternary, binary or unary expressions.
25456         PR debug/83645
25457         * var-tracking.c (delete_vta_debug_insn): New inline function.
25458         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25459         insns from get_insns () to NULL instead of each bb separately.
25460         Use delete_vta_debug_insn.  No longer static.
25461         (vt_debug_insns_local, variable_tracking_main_1): Adjust
25462         delete_vta_debug_insns callers.
25463         * rtl.h (delete_vta_debug_insns): Declare.
25464         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25465         instead of variable_tracking_main.
25467 2018-01-03  Martin Sebor  <msebor@redhat.com>
25469         PR tree-optimization/83603
25470         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25471         arguments past the endof the argument list in functions declared
25472         without a prototype.
25473         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25474         Avoid checking when arguments are null.
25476 2018-01-03  Martin Sebor  <msebor@redhat.com>
25478         PR c/83559
25479         * doc/extend.texi (attribute const): Fix a typo.
25480         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25481         issuing -Wsuggest-attribute for void functions.
25483 2018-01-03  Martin Sebor  <msebor@redhat.com>
25485         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25486         offset_int::from instead of wide_int::to_shwi.
25487         (maybe_diag_overlap): Remove assertion.
25488         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25489         * gimple-ssa-sprintf.c (format_directive): Same.
25490         (parse_directive): Same.
25491         (sprintf_dom_walker::compute_format_length): Same.
25492         (try_substitute_return_value): Same.
25494 2018-01-03  Jeff Law  <law@redhat.com>
25496         PR middle-end/83654
25497         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25498         non-constant residual for zero at runtime and avoid probing in
25499         that case.  Reorganize code for trailing problem to mirror handling
25500         of the residual.
25502 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25504         PR tree-optimization/83501
25505         * tree-ssa-strlen.c (get_string_cst): New.
25506         (handle_char_store): Call get_string_cst.
25508 2018-01-03  Martin Liska  <mliska@suse.cz>
25510         PR tree-optimization/83593
25511         * tree-ssa-strlen.c: Include tree-cfg.h.
25512         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25513         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25514         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25515         to false.
25516         (strlen_dom_walker::before_dom_children): Call
25517         gimple_purge_dead_eh_edges. Dump tranformation with details
25518         dump flags.
25519         (strlen_dom_walker::before_dom_children): Update call by adding
25520         new argument cleanup_eh.
25521         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25523 2018-01-03  Martin Liska  <mliska@suse.cz>
25525         PR ipa/83549
25526         * cif-code.def (VARIADIC_THUNK): New enum value.
25527         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25528         thunks.
25530 2018-01-03  Jan Beulich  <jbeulich@suse.com>
25532         * sse.md (mov<mode>_internal): Tighten condition for when to use
25533         vmovdqu<ssescalarsize> for TI and OI modes.
25535 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25537         Update copyright years.
25539 2018-01-03  Martin Liska  <mliska@suse.cz>
25541         PR ipa/83594
25542         * ipa-visibility.c (function_and_variable_visibility): Skip
25543         functions with noipa attribure.
25545 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25547         * gcc.c (process_command): Update copyright notice dates.
25548         * gcov-dump.c (print_version): Ditto.
25549         * gcov.c (print_version): Ditto.
25550         * gcov-tool.c (print_version): Ditto.
25551         * gengtype.c (create_file): Ditto.
25552         * doc/cpp.texi: Bump @copying's copyright year.
25553         * doc/cppinternals.texi: Ditto.
25554         * doc/gcc.texi: Ditto.
25555         * doc/gccint.texi: Ditto.
25556         * doc/gcov.texi: Ditto.
25557         * doc/install.texi: Ditto.
25558         * doc/invoke.texi: Ditto.
25560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25562         * vector-builder.h (vector_builder::m_full_nelts): Change from
25563         unsigned int to poly_uint64.
25564         (vector_builder::full_nelts): Update prototype accordingly.
25565         (vector_builder::new_vector): Likewise.
25566         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25567         (vector_builder::operator ==): Likewise.
25568         (vector_builder::finalize): Likewise.
25569         * int-vector-builder.h (int_vector_builder::int_vector_builder):
25570         Take the number of elements as a poly_uint64 rather than an
25571         unsigned int.
25572         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25573         from unsigned int to poly_uint64.
25574         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25575         (vec_perm_indices::new_vector): Likewise.
25576         (vec_perm_indices::length): Likewise.
25577         (vec_perm_indices::nelts_per_input): Likewise.
25578         (vec_perm_indices::input_nelts): Likewise.
25579         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25580         number of elements per input as a poly_uint64 rather than an
25581         unsigned int.  Use the original encoding for variable-length
25582         vectors, rather than clamping each individual element.
25583         For the second and subsequent elements in each pattern,
25584         clamp the step and base before clamping their sum.
25585         (vec_perm_indices::series_p): Handle polynomial element counts.
25586         (vec_perm_indices::all_in_range_p): Likewise.
25587         (vec_perm_indices_to_tree): Likewise.
25588         (vec_perm_indices_to_rtx): Likewise.
25589         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25590         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25591         (tree_vector_builder::new_binary_operation): Handle polynomial
25592         element counts.  Return false if we need to know the number
25593         of elements at compile time.
25594         * fold-const.c (fold_vec_perm): Punt if the number of elements
25595         isn't known at compile time.
25597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25599         * vec-perm-indices.h (vec_perm_builder): Change element type
25600         from HOST_WIDE_INT to poly_int64.
25601         (vec_perm_indices::element_type): Update accordingly.
25602         (vec_perm_indices::clamp): Handle polynomial element_types.
25603         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25604         (vec_perm_indices::all_in_range_p): Likewise.
25605         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25606         than shwi trees.
25607         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25608         polynomial vec_perm_indices element types.
25609         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25610         * fold-const.c (fold_vec_perm): Likewise.
25611         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25612         * tree-vect-generic.c (lower_vec_perm): Likewise.
25613         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25614         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25615         element type to HOST_WIDE_INT.
25617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25618             Alan Hayward  <alan.hayward@arm.com>
25619             David Sherwood  <david.sherwood@arm.com>
25621         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25622         rather than an int.  Use plus_constant.
25623         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25624         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25627             Alan Hayward  <alan.hayward@arm.com>
25628             David Sherwood  <david.sherwood@arm.com>
25630         * calls.c (emit_call_1, expand_call): Change struct_value_size from
25631         a HOST_WIDE_INT to a poly_int64.
25633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25634             Alan Hayward  <alan.hayward@arm.com>
25635             David Sherwood  <david.sherwood@arm.com>
25637         * calls.c (load_register_parameters): Cope with polynomial
25638         mode sizes.  Require a constant size for BLKmode parameters
25639         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
25640         forces a parameter to be padded at the lsb end in order to
25641         fill a complete number of words, require the parameter size
25642         to be ordered wrt UNITS_PER_WORD.
25644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25645             Alan Hayward  <alan.hayward@arm.com>
25646             David Sherwood  <david.sherwood@arm.com>
25648         * reload1.c (spill_stack_slot_width): Change element type
25649         from unsigned int to poly_uint64_pod.
25650         (alter_reg): Treat mode sizes as polynomial.
25652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25653             Alan Hayward  <alan.hayward@arm.com>
25654             David Sherwood  <david.sherwood@arm.com>
25656         * reload.c (complex_word_subreg_p): New function.
25657         (reload_inner_reg_of_subreg, push_reload): Use it.
25659 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25660             Alan Hayward  <alan.hayward@arm.com>
25661             David Sherwood  <david.sherwood@arm.com>
25663         * lra-constraints.c (process_alt_operands): Reject matched
25664         operands whose sizes aren't ordered.
25665         (match_reload): Refer to this check here.
25667 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25668             Alan Hayward  <alan.hayward@arm.com>
25669             David Sherwood  <david.sherwood@arm.com>
25671         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25672         that the mode size is in the set {1, 2, 4, 8, 16}.
25674 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25675             Alan Hayward  <alan.hayward@arm.com>
25676             David Sherwood  <david.sherwood@arm.com>
25678         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25679         Use plus_constant instead of gen_rtx_PLUS.
25681 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25682             Alan Hayward  <alan.hayward@arm.com>
25683             David Sherwood  <david.sherwood@arm.com>
25685         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25686         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25687         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25688         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25689         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25690         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25691         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25692         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25693         * config/i386/i386.c (ix86_push_rounding): ...this new function.
25694         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25695         a poly_int64.
25696         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25697         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25698         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25699         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25700         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25701         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25702         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25703         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25704         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25705         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25706         function.
25707         * expr.c (emit_move_resolve_push): Treat the input and result
25708         of PUSH_ROUNDING as a poly_int64.
25709         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25710         (emit_push_insn): Likewise.
25711         * lra-eliminations.c (mark_not_eliminable): Likewise.
25712         * recog.c (push_operand): Likewise.
25713         * reload1.c (elimination_effects): Likewise.
25714         * rtlanal.c (nonzero_bits1): Likewise.
25715         * calls.c (store_one_arg): Likewise.  Require the padding to be
25716         known at compile time.
25718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25719             Alan Hayward  <alan.hayward@arm.com>
25720             David Sherwood  <david.sherwood@arm.com>
25722         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25723         Use plus_constant instead of gen_rtx_PLUS.
25725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25726             Alan Hayward  <alan.hayward@arm.com>
25727             David Sherwood  <david.sherwood@arm.com>
25729         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25730         rather than an int.
25732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25733             Alan Hayward  <alan.hayward@arm.com>
25734             David Sherwood  <david.sherwood@arm.com>
25736         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25737         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25738         via stack temporaries.  Treat the mode size as polynomial too.
25740 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25741             Alan Hayward  <alan.hayward@arm.com>
25742             David Sherwood  <david.sherwood@arm.com>
25744         * expr.c (expand_expr_real_2): When handling conversions involving
25745         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25746         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
25747         as a poly_uint64 too.
25749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25750             Alan Hayward  <alan.hayward@arm.com>
25751             David Sherwood  <david.sherwood@arm.com>
25753         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25756             Alan Hayward  <alan.hayward@arm.com>
25757             David Sherwood  <david.sherwood@arm.com>
25759         * combine.c (can_change_dest_mode): Handle polynomial
25760         REGMODE_NATURAL_SIZE.
25761         * expmed.c (store_bit_field_1): Likewise.
25762         * expr.c (store_constructor): Likewise.
25763         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25764         and polynomial REGMODE_NATURAL_SIZE.
25765         (gen_lowpart_common): Likewise.
25766         * reginfo.c (record_subregs_of_mode): Likewise.
25767         * rtlanal.c (read_modify_subreg_p): Likewise.
25769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25770             Alan Hayward  <alan.hayward@arm.com>
25771             David Sherwood  <david.sherwood@arm.com>
25773         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25774         numbers of elements.
25776 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25777             Alan Hayward  <alan.hayward@arm.com>
25778             David Sherwood  <david.sherwood@arm.com>
25780         * match.pd: Cope with polynomial numbers of vector elements.
25782 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25783             Alan Hayward  <alan.hayward@arm.com>
25784             David Sherwood  <david.sherwood@arm.com>
25786         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25787         in a POINTER_PLUS_EXPR.
25789 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25790             Alan Hayward  <alan.hayward@arm.com>
25791             David Sherwood  <david.sherwood@arm.com>
25793         * omp-simd-clone.c (simd_clone_subparts): New function.
25794         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25795         (ipa_simd_modify_function_body): Likewise.
25797 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25798             Alan Hayward  <alan.hayward@arm.com>
25799             David Sherwood  <david.sherwood@arm.com>
25801         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25802         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25803         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25804         (expand_vector_condition, vector_element): Likewise.
25805         (subparts_gt): New function.
25806         (get_compute_type): Use subparts_gt.
25807         (count_type_subparts): Delete.
25808         (expand_vector_operations_1): Use subparts_gt instead of
25809         count_type_subparts.
25811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25812             Alan Hayward  <alan.hayward@arm.com>
25813             David Sherwood  <david.sherwood@arm.com>
25815         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25816         (vect_compile_time_alias): ...this new function.  Do the calculation
25817         on poly_ints rather than trees.
25818         (vect_prune_runtime_alias_test_list): Update call accordingly.
25820 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25821             Alan Hayward  <alan.hayward@arm.com>
25822             David Sherwood  <david.sherwood@arm.com>
25824         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25825         numbers of units.
25826         (vect_schedule_slp_instance): Likewise.
25828 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25829             Alan Hayward  <alan.hayward@arm.com>
25830             David Sherwood  <david.sherwood@arm.com>
25832         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25833         constant and extern definitions for variable-length vectors.
25834         (vect_get_constant_vectors): Note that the number of units
25835         is known to be constant.
25837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25838             Alan Hayward  <alan.hayward@arm.com>
25839             David Sherwood  <david.sherwood@arm.com>
25841         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25842         of units as polynomial.  Choose between WIDE and NARROW based
25843         on multiple_p.
25845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25846             Alan Hayward  <alan.hayward@arm.com>
25847             David Sherwood  <david.sherwood@arm.com>
25849         * tree-vect-stmts.c (simd_clone_subparts): New function.
25850         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25853             Alan Hayward  <alan.hayward@arm.com>
25854             David Sherwood  <david.sherwood@arm.com>
25856         * tree-vect-stmts.c (vectorizable_call): Treat the number of
25857         vectors as polynomial.  Use build_index_vector for
25858         IFN_GOMP_SIMD_LANE.
25860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25861             Alan Hayward  <alan.hayward@arm.com>
25862             David Sherwood  <david.sherwood@arm.com>
25864         * tree-vect-stmts.c (get_load_store_type): Treat the number of
25865         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25866         for variable-length vectors.
25867         (vectorizable_mask_load_store): Treat the number of units as
25868         polynomial, asserting that it is constant if the condition has
25869         already been enforced.
25870         (vectorizable_store, vectorizable_load): Likewise.
25872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25873             Alan Hayward  <alan.hayward@arm.com>
25874             David Sherwood  <david.sherwood@arm.com>
25876         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25877         of units as polynomial.  Punt if we can't tell at compile time
25878         which vector contains the final result.
25880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25881             Alan Hayward  <alan.hayward@arm.com>
25882             David Sherwood  <david.sherwood@arm.com>
25884         * tree-vect-loop.c (vectorizable_induction): Treat the number
25885         of units as polynomial.  Punt on SLP inductions.  Use an integer
25886         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
25887         cast of such a series for variable-length floating-point
25888         reductions.
25890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25891             Alan Hayward  <alan.hayward@arm.com>
25892             David Sherwood  <david.sherwood@arm.com>
25894         * tree.h (build_index_vector): Declare.
25895         * tree.c (build_index_vector): New function.
25896         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25897         of units as polynomial, forcibly converting it to a constant if
25898         vectorizable_reduction has already enforced the condition.
25899         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
25900         to create a {1,2,3,...} vector.
25901         (vectorizable_reduction): Treat the number of units as polynomial.
25902         Choose vectype_in based on the largest scalar element size rather
25903         than the smallest number of units.  Enforce the restrictions
25904         relied on above.
25906 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25907             Alan Hayward  <alan.hayward@arm.com>
25908             David Sherwood  <david.sherwood@arm.com>
25910         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25911         number of units as polynomial.
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         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25918         * target.def (autovectorize_vector_sizes): Return the vector sizes
25919         by pointer, using vector_sizes rather than a bitmask.
25920         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25921         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25922         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25923         Likewise.
25924         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25925         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25926         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25927         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25928         * omp-general.c (omp_max_vf): Likewise.
25929         * omp-low.c (omp_clause_aligned_alignment): Likewise.
25930         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25931         * tree-vect-loop.c (vect_analyze_loop): Likewise.
25932         * tree-vect-slp.c (vect_slp_bb): Likewise.
25933         * doc/tm.texi: Regenerate.
25934         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25935         to a poly_uint64.
25936         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25937         the vector size as a poly_uint64 rather than an unsigned int.
25938         (current_vector_size): Change from an unsigned int to a poly_uint64.
25939         (get_vectype_for_scalar_type): Update accordingly.
25940         * tree.h (build_truth_vector_type): Take the size and number of
25941         units as a poly_uint64 rather than an unsigned int.
25942         (build_vector_type): Add a temporary overload that takes
25943         the number of units as a poly_uint64 rather than an unsigned int.
25944         * tree.c (make_vector_type): Likewise.
25945         (build_truth_vector_type): Take the number of units as a poly_uint64
25946         rather than an unsigned int.
25948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25949             Alan Hayward  <alan.hayward@arm.com>
25950             David Sherwood  <david.sherwood@arm.com>
25952         * target.def (get_mask_mode): Take the number of units and length
25953         as poly_uint64s rather than unsigned ints.
25954         * targhooks.h (default_get_mask_mode): Update accordingly.
25955         * targhooks.c (default_get_mask_mode): Likewise.
25956         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25957         * doc/tm.texi: Regenerate.
25959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25960             Alan Hayward  <alan.hayward@arm.com>
25961             David Sherwood  <david.sherwood@arm.com>
25963         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25964         * omp-general.c (omp_max_vf): Likewise.
25965         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25966         (expand_omp_simd): Handle polynomial safelen.
25967         * omp-low.c (omplow_simd_context): Add a default constructor.
25968         (omplow_simd_context::max_vf): Change from int to poly_uint64.
25969         (lower_rec_simd_input_clauses): Update accordingly.
25970         (lower_rec_input_clauses): Likewise.
25972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25973             Alan Hayward  <alan.hayward@arm.com>
25974             David Sherwood  <david.sherwood@arm.com>
25976         * tree-vectorizer.h (vect_nunits_for_cost): New function.
25977         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25978         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25979         (vect_analyze_slp_cost): Likewise.
25980         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25981         (vect_model_load_cost): Likewise.
25983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25984             Alan Hayward  <alan.hayward@arm.com>
25985             David Sherwood  <david.sherwood@arm.com>
25987         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25988         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25989         from an unsigned int * to a poly_uint64_pod *.
25990         (calculate_unrolling_factor): New function.
25991         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
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-vectorizer.h (_slp_instance::unrolling_factor): Change
25998         from an unsigned int to a poly_uint64.
25999         (_loop_vec_info::slp_unrolling_factor): Likewise.
26000         (_loop_vec_info::vectorization_factor): Change from an int
26001         to a poly_uint64.
26002         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
26003         (vect_get_num_vectors): New function.
26004         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
26005         (vect_get_num_copies): Use vect_get_num_vectors.
26006         (vect_analyze_data_ref_dependences): Change max_vf from an int *
26007         to an unsigned int *.
26008         (vect_analyze_data_refs): Change min_vf from an int * to a
26009         poly_uint64 *.
26010         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26011         than an unsigned HOST_WIDE_INT.
26012         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
26013         (vect_analyze_data_ref_dependence): Change max_vf from an int *
26014         to an unsigned int *.
26015         (vect_analyze_data_ref_dependences): Likewise.
26016         (vect_compute_data_ref_alignment): Handle polynomial vf.
26017         (vect_enhance_data_refs_alignment): Likewise.
26018         (vect_prune_runtime_alias_test_list): Likewise.
26019         (vect_shift_permute_load_chain): Likewise.
26020         (vect_supportable_dr_alignment): Likewise.
26021         (dependence_distance_ge_vf): Take the vectorization factor as a
26022         poly_uint64 rather than an unsigned HOST_WIDE_INT.
26023         (vect_analyze_data_refs): Change min_vf from an int * to a
26024         poly_uint64 *.
26025         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
26026         vfm1 as a poly_uint64 rather than an int.  Make the same change
26027         for the returned bound_scalar.
26028         (vect_gen_vector_loop_niters): Handle polynomial vf.
26029         (vect_do_peeling): Likewise.  Update call to
26030         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
26031         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
26032         be constant.
26033         * tree-vect-loop.c (vect_determine_vectorization_factor)
26034         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
26035         (vect_get_known_peeling_cost): Likewise.
26036         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
26037         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
26038         (vect_transform_loop): Likewise.  Use the lowest possible VF when
26039         updating the upper bounds of the loop.
26040         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
26041         rather than an int.
26042         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
26043         polynomial unroll factors.
26044         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
26045         (vect_make_slp_decision): Likewise.
26046         (vect_supported_load_permutation_p): Likewise, and polynomial
26047         vf too.
26048         (vect_analyze_slp_cost): Handle polynomial vf.
26049         (vect_slp_analyze_node_operations): Likewise.
26050         (vect_slp_analyze_bb_1): Likewise.
26051         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26052         than an unsigned HOST_WIDE_INT.
26053         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
26054         (vectorizable_load): Handle polynomial vf.
26055         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
26056         a poly_uint64.
26057         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
26059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26060             Alan Hayward  <alan.hayward@arm.com>
26061             David Sherwood  <david.sherwood@arm.com>
26063         * match.pd: Handle bit operations involving three constants
26064         and try to fold one pair.
26066 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26068         * tree-vect-loop-manip.c: Include gimple-fold.h.
26069         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
26070         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
26071         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
26072         Add a path that uses a step of VF instead of 1, but disable it
26073         for now.
26074         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
26075         and niters_no_overflow parameters.  Update calls to
26076         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
26077         Create a new SSA name if the latter choses to use a ste other
26078         than zero, and return it via niters_vector_mult_vf_var.
26079         * tree-vect-loop.c (vect_transform_loop): Update calls to
26080         vect_do_peeling, vect_gen_vector_loop_niters and
26081         slpeel_make_loop_iterate_ntimes.
26082         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
26083         (vect_gen_vector_loop_niters): Update declarations after above changes.
26085 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
26087         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
26088         128-bit round to integer instructions.
26089         (ceil<mode>2): Likewise.
26090         (btrunc<mode>2): Likewise.
26091         (round<mode>2): Likewise.
26093 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26095         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
26096         unaligned VSX load/store on P8/P9.
26097         (expand_block_clear): Allow the use of unaligned VSX
26098         load/store on P8/P9.
26100 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26102         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
26103         New function.
26104         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
26105         swap associated with both a load and a store.
26107 2018-01-02  Andrew Waterman  <andrew@sifive.com>
26109         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
26110         * config/riscv/riscv.md (clear_cache): Use it.
26112 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
26114         * web.c: Remove out-of-date comment.
26116 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26118         * expr.c (fixup_args_size_notes): Check that any existing
26119         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
26120         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
26121         (emit_single_push_insn): ...here.
26123 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26125         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
26126         (const_vector_encoded_nelts): New function.
26127         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
26128         (const_vector_int_elt, const_vector_elt): Declare.
26129         * emit-rtl.c (const_vector_int_elt_1): New function.
26130         (const_vector_elt): Likewise.
26131         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
26132         of CONST_VECTOR_ELT.
26134 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26136         * expr.c: Include rtx-vector-builder.h.
26137         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
26138         directly on the tree encoding.
26139         (const_vector_from_tree): Likewise.
26140         * optabs.c: Include rtx-vector-builder.h.
26141         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
26142         sequence of "u" values.
26143         * vec-perm-indices.c: Include rtx-vector-builder.h.
26144         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
26145         directly on the vec_perm_indices encoding.
26147 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26149         * doc/rtl.texi (const_vector): Describe new encoding scheme.
26150         * Makefile.in (OBJS): Add rtx-vector-builder.o.
26151         * rtx-vector-builder.h: New file.
26152         * rtx-vector-builder.c: Likewise.
26153         * rtl.h (rtx_def::u2): Add a const_vector field.
26154         (CONST_VECTOR_NPATTERNS): New macro.
26155         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
26156         (CONST_VECTOR_DUPLICATE_P): Likewise.
26157         (CONST_VECTOR_STEPPED_P): Likewise.
26158         (CONST_VECTOR_ENCODED_ELT): Likewise.
26159         (const_vec_duplicate_p): Check for a duplicated vector encoding.
26160         (unwrap_const_vec_duplicate): Likewise.
26161         (const_vec_series_p): Check for a non-duplicated vector encoding.
26162         Say that the function only returns true for integer vectors.
26163         * emit-rtl.c: Include rtx-vector-builder.h.
26164         (gen_const_vec_duplicate_1): Delete.
26165         (gen_const_vector): Call gen_const_vec_duplicate instead of
26166         gen_const_vec_duplicate_1.
26167         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
26168         (gen_const_vec_duplicate): Use rtx_vector_builder.
26169         (gen_const_vec_series): Likewise.
26170         (gen_rtx_CONST_VECTOR): Likewise.
26171         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
26172         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26173         Build a new vector rather than modifying a CONST_VECTOR in-place.
26174         (handle_special_swappables): Update call accordingly.
26175         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
26176         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26177         Build a new vector rather than modifying a CONST_VECTOR in-place.
26178         (handle_special_swappables): Update call accordingly.
26180 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26182         * simplify-rtx.c (simplify_const_binary_operation): Use
26183         CONST_VECTOR_ELT instead of XVECEXP.
26185 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26187         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
26188         the selector elements to be different from the data elements
26189         if the selector is a VECTOR_CST.
26190         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
26191         ssizetype for the selector.
26193 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26195         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
26196         before testing each element individually.
26197         * tree-vect-generic.c (lower_vec_perm): Likewise.
26199 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26201         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
26202         * selftest-run-tests.c (selftest::run_tests): Call it.
26203         * vector-builder.h (vector_builder::operator ==): New function.
26204         (vector_builder::operator !=): Likewise.
26205         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
26206         (vec_perm_indices::all_from_input_p): New function.
26207         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26208         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
26209         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
26210         instead of reading the VECTOR_CST directly.  Detect whether both
26211         vector inputs are the same before constructing the vec_perm_indices,
26212         and update the number of inputs argument accordingly.  Use the
26213         utility functions added above.  Only construct sel2 if we need to.
26215 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26217         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
26218         the broadcast of the low byte.
26219         (expand_mult_highpart): Use an explicit encoding for the permutes.
26220         * optabs-query.c (can_mult_highpart_p): Likewise.
26221         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
26222         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26223         (vectorizable_bswap): Likewise.
26224         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
26225         explicit encoding for the power-of-2 permutes.
26226         (vect_permute_store_chain): Likewise.
26227         (vect_grouped_load_supported): Likewise.
26228         (vect_permute_load_chain): Likewise.
26230 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26232         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
26233         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
26234         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
26235         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26236         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
26237         (vect_gen_perm_mask_any): Likewise.
26239 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26241         * int-vector-builder.h: New file.
26242         * vec-perm-indices.h: Include int-vector-builder.h.
26243         (vec_perm_indices): Redefine as an int_vector_builder.
26244         (auto_vec_perm_indices): Delete.
26245         (vec_perm_builder): Redefine as a stand-alone class.
26246         (vec_perm_indices::vec_perm_indices): New function.
26247         (vec_perm_indices::clamp): Likewise.
26248         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
26249         (vec_perm_indices::new_vector): New function.
26250         (vec_perm_indices::new_expanded_vector): Update for new
26251         vec_perm_indices class.
26252         (vec_perm_indices::rotate_inputs): New function.
26253         (vec_perm_indices::all_in_range_p): Operate directly on the
26254         encoded form, without computing elided elements.
26255         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
26256         encoding.  Update for new vec_perm_indices class.
26257         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
26258         the given vec_perm_builder.
26259         (expand_vec_perm_var): Update vec_perm_builder constructor.
26260         (expand_mult_highpart): Use vec_perm_builder instead of
26261         auto_vec_perm_indices.
26262         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
26263         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
26264         or double series encoding as appropriate.
26265         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
26266         vec_perm_indices instead of auto_vec_perm_indices.
26267         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26268         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26269         (vect_permute_store_chain): Likewise.
26270         (vect_grouped_load_supported): Likewise.
26271         (vect_permute_load_chain): Likewise.
26272         (vect_shift_permute_load_chain): Likewise.
26273         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26274         (vect_transform_slp_perm_load): Likewise.
26275         (vect_schedule_slp_instance): Likewise.
26276         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26277         (vectorizable_mask_load_store): Likewise.
26278         (vectorizable_bswap): Likewise.
26279         (vectorizable_store): Likewise.
26280         (vectorizable_load): Likewise.
26281         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
26282         vec_perm_indices instead of auto_vec_perm_indices.  Use
26283         tree_to_vec_perm_builder to read the vector from a tree.
26284         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
26285         vec_perm_builder instead of a vec_perm_indices.
26286         (have_whole_vector_shift): Use vec_perm_builder and
26287         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
26288         truncation to calc_vec_perm_mask_for_shift.
26289         (vect_create_epilog_for_reduction): Likewise.
26290         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
26291         from auto_vec_perm_indices to vec_perm_indices.
26292         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26293         instead of changing individual elements.
26294         (aarch64_vectorize_vec_perm_const): Use new_vector to install
26295         the vector in d.perm.
26296         * config/arm/arm.c (expand_vec_perm_d::perm): Change
26297         from auto_vec_perm_indices to vec_perm_indices.
26298         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26299         instead of changing individual elements.
26300         (arm_vectorize_vec_perm_const): Use new_vector to install
26301         the vector in d.perm.
26302         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
26303         Update vec_perm_builder constructor.
26304         (rs6000_expand_interleave): Likewise.
26305         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
26306         (rs6000_expand_interleave): Likewise.
26308 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26310         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
26311         to qimode could truncate the indices.
26312         * optabs.c (expand_vec_perm_var): Likewise.
26314 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26316         * Makefile.in (OBJS): Add vec-perm-indices.o.
26317         * vec-perm-indices.h: New file.
26318         * vec-perm-indices.c: Likewise.
26319         * target.h (vec_perm_indices): Replace with a forward class
26320         declaration.
26321         (auto_vec_perm_indices): Move to vec-perm-indices.h.
26322         * optabs.h: Include vec-perm-indices.h.
26323         (expand_vec_perm): Delete.
26324         (selector_fits_mode_p, expand_vec_perm_var): Declare.
26325         (expand_vec_perm_const): Declare.
26326         * target.def (vec_perm_const_ok): Replace with...
26327         (vec_perm_const): ...this new hook.
26328         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
26329         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
26330         * doc/tm.texi: Regenerate.
26331         * optabs.def (vec_perm_const): Delete.
26332         * doc/md.texi (vec_perm_const): Likewise.
26333         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
26334         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
26335         expand_vec_perm for constant permutation vectors.  Assert that
26336         the mode of variable permutation vectors is the integer equivalent
26337         of the mode that is being permuted.
26338         * optabs-query.h (selector_fits_mode_p): Declare.
26339         * optabs-query.c: Include vec-perm-indices.h.
26340         (selector_fits_mode_p): New function.
26341         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
26342         is defined, instead of checking whether the vec_perm_const_optab
26343         exists.  Use targetm.vectorize.vec_perm_const instead of
26344         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
26345         fit in the vector mode before using a variable permute.
26346         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
26347         vec_perm_indices instead of an rtx.
26348         (expand_vec_perm): Replace with...
26349         (expand_vec_perm_const): ...this new function.  Take the selector
26350         as a vec_perm_indices rather than an rtx.  Also take the mode of
26351         the selector.  Update call to shift_amt_for_vec_perm_mask.
26352         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
26353         Use vec_perm_indices::new_expanded_vector to expand the original
26354         selector into bytes.  Check whether the indices fit in the vector
26355         mode before using a variable permute.
26356         (expand_vec_perm_var): Make global.
26357         (expand_mult_highpart): Use expand_vec_perm_const.
26358         * fold-const.c: Includes vec-perm-indices.h.
26359         * tree-ssa-forwprop.c: Likewise.
26360         * tree-vect-data-refs.c: Likewise.
26361         * tree-vect-generic.c: Likewise.
26362         * tree-vect-loop.c: Likewise.
26363         * tree-vect-slp.c: Likewise.
26364         * tree-vect-stmts.c: Likewise.
26365         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
26366         Delete.
26367         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
26368         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
26369         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
26370         (aarch64_vectorize_vec_perm_const): ...this new function.
26371         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26372         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26373         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
26374         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
26375         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26376         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26377         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
26378         into...
26379         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
26380         check for NEON modes.
26381         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
26382         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
26383         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
26384         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
26385         into...
26386         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
26387         the old VEC_PERM_CONST conditions.
26388         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
26389         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
26390         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
26391         (ia64_vectorize_vec_perm_const_ok): Merge into...
26392         (ia64_vectorize_vec_perm_const): ...this new function.
26393         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
26394         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
26395         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
26396         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
26397         * config/mips/mips.c (mips_expand_vec_perm_const)
26398         (mips_vectorize_vec_perm_const_ok): Merge into...
26399         (mips_vectorize_vec_perm_const): ...this new function.
26400         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
26401         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
26402         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
26403         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
26404         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
26405         (rs6000_expand_vec_perm_const): Delete.
26406         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
26407         Delete.
26408         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26409         (altivec_expand_vec_perm_const_le): Take each operand individually.
26410         Operate on constant selectors rather than rtxes.
26411         (altivec_expand_vec_perm_const): Likewise.  Update call to
26412         altivec_expand_vec_perm_const_le.
26413         (rs6000_expand_vec_perm_const): Delete.
26414         (rs6000_vectorize_vec_perm_const_ok): Delete.
26415         (rs6000_vectorize_vec_perm_const): New function.
26416         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26417         an element count and rtx array.
26418         (rs6000_expand_extract_even): Update call accordingly.
26419         (rs6000_expand_interleave): Likewise.
26420         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
26421         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
26422         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
26423         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
26424         (rs6000_expand_vec_perm_const): Delete.
26425         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26426         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26427         (altivec_expand_vec_perm_const_le): Take each operand individually.
26428         Operate on constant selectors rather than rtxes.
26429         (altivec_expand_vec_perm_const): Likewise.  Update call to
26430         altivec_expand_vec_perm_const_le.
26431         (rs6000_expand_vec_perm_const): Delete.
26432         (rs6000_vectorize_vec_perm_const_ok): Delete.
26433         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
26434         reference to the SPE evmerge intructions.
26435         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26436         an element count and rtx array.
26437         (rs6000_expand_extract_even): Update call accordingly.
26438         (rs6000_expand_interleave): Likewise.
26439         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26440         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26441         new function.
26442         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26444 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26446         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26447         vector mode and that that mode matches the mode of the data
26448         being permuted.
26449         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26450         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
26451         directly using expand_vec_perm_1 when forcing selectors into
26452         registers.
26453         (expand_vec_perm_var): New function, split out from expand_vec_perm.
26455 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26457         * optabs-query.h (can_vec_perm_p): Delete.
26458         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26459         * optabs-query.c (can_vec_perm_p): Split into...
26460         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26461         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26462         particular selector is valid.
26463         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26464         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26465         (vect_grouped_load_supported): Likewise.
26466         (vect_shift_permute_load_chain): Likewise.
26467         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26468         (vect_transform_slp_perm_load): Likewise.
26469         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26470         (vectorizable_bswap): Likewise.
26471         (vect_gen_perm_mask_checked): Likewise.
26472         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
26473         implementations of variable permutation vectors into account
26474         when deciding which selector to use.
26475         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26476         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26477         with a false third argument.
26478         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26479         to test whether the constant selector is valid and can_vec_perm_var_p
26480         to test whether a variable selector is valid.
26482 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26484         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26485         * optabs-query.c (can_vec_perm_p): Likewise.
26486         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26487         instead of vec_perm_indices.
26488         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26489         (vect_gen_perm_mask_checked): Likewise,
26490         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26491         (vect_gen_perm_mask_checked): Likewise,
26493 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26495         * optabs-query.h (qimode_for_vec_perm): Declare.
26496         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26497         (qimode_for_vec_perm): ...this new function.
26498         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26500 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26502         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26503         does not have a conditional at the top.
26505 2018-01-02  Richard Biener  <rguenther@suse.de>
26507         * ipa-inline.c (big_speedup_p): Fix expression.
26509 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
26511         PR target/81616
26512         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26513         for generic 4->6.
26515 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
26517         PR target/81616
26518         Generic tuning.
26519         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26520         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26521         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26522         cond_taken_branch_cost 3->4.
26524 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
26526         PR tree-optimization/83581
26527         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26528         TODO_cleanup_cfg if any changes have been made.
26530         PR middle-end/83608
26531         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26532         convert_modes if target mode has the right side, but different mode
26533         class.
26535         PR middle-end/83609
26536         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26537         last argument when extracting from CONCAT.  If either from_real or
26538         from_imag is NULL, use expansion through memory.  If result is not
26539         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26540         the parts directly to inner mode, if even that fails, use expansion
26541         through memory.
26543         PR middle-end/83623
26544         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26545         check for bswap in mode rather than HImode and use that in expand_unop
26546         too.
26548 Copyright (C) 2018 Free Software Foundation, Inc.
26550 Copying and distribution of this file, with or without modification,
26551 are permitted in any medium without royalty provided the copyright
26552 notice and this notice are preserved.