dumpfile.c: fix stray dump_loc output (PR tree-optimization/87309)
[official-gcc.git] / gcc / ChangeLog
blob667ecca4ed0c32cacd27c1d4865c4f9331dcc564
1 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
3         PR tree-optimization/87309
4         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5         calls with pflags and alt_flags.
6         (selftest::test_capture_of_dump_calls): Add test of interaction of
7         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
9 2018-09-21  Olivier Hainque  <hainque@adacore.com>
11         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
13 2018-09-21  Olivier Hainque  <hainque@adacore.com>
15         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
17 2018-09-21  Olivier Hainque  <hainque@adacore.com>
19         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
20         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
21         (VXWORKS_LIBS_RTP): Minor reordering.
23 2018-09-21  Olivier Hainque  <hainque@adacore.com>
25         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
26         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
28 2018-09-21  Olivier Hainque  <hainque@adacore.com>
30         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
31         (PTRDIFF_TYPE): Likewise.
33 2018-09-21  Olivier Hainque  <hainque@adacore.com>
35         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
36         triplet, similar to support for VxWorks7.
37         * config/vxworks-dummy.h: Provide a default definition
38         of TARGET_VXWORKS64 to 0.
40 2018-09-21  Olivier Hainque  <hainque@adacore.com>
42         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
43         * config/vxworks-dummy.h: here.
45 2018-09-21  Olivier Hainque  <hainque@adacore.com>
47         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
49 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
50             Bo Zhou  <zbo.zhou@hisilicon.com>
52         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
53         * config/aarch64/aarch64-tune.md: Regenerated.
54         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
55         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
56         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
58 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
59             Julian Brown  <julian@codesourcery.com>
61         * builtins.c (get_builtin_sync_mem): Handle address spaces.
63 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
65         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
66         if the call takes a static chain.
68 2018-09-21  Martin Liska  <mliska@suse.cz>
70         * auto-profile.c (autofdo_source_profile::read): Do not
71         set sum_all.
72         (read_profile): Do not add working sets.
73         (read_autofdo_file): Remove sum_all.
74         (afdo_callsite_hot_enough_for_early_inline): Remove const
75         qualifier.
76         * coverage.c (struct counts_entry): Remove gcov_summary.
77         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
78         do not support GCOV_TAG_PROGRAM_SUMMARY.
79         (get_coverage_counts): Remove summary and expected
80         arguments.
81         * coverage.h (get_coverage_counts): Likewise.
82         * doc/gcov-dump.texi: Remove -w option.
83         * gcov-dump.c (dump_working_sets): Remove.
84         (main): Do not support '-w' option.
85         (print_usage): Likewise.
86         (tag_summary): Likewise.
87         * gcov-io.c (gcov_write_summary): Do not dump
88         histogram.
89         (gcov_read_summary): Likewise.
90         (gcov_histo_index): Remove.
91         (gcov_histogram_merge): Likewise.
92         (compute_working_sets): Likewise.
93         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
94         it not obsolete.
95         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
96         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
97         (GCOV_HISTOGRAM_SIZE): Remove.
98         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
99         (struct gcov_summary): Simplify rapidly just
100         to runs and sum_max fields.
101         (gcov_histo_index): Remove.
102         (NUM_GCOV_WORKING_SETS): Likewise.
103         (compute_working_sets): Likewise.
104         * gcov-tool.c (print_overlap_usage_message): Remove
105         trailing empty line.
106         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
107         (output_lines): Remove program related line.
108         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
109         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
110         histogram.
111         (input_profile_summary): Do not read it.
112         (merge_profile_summaries): And do not merge it.
113         (input_symtab): Do not call removed function.
114         * modulo-sched.c (sms_schedule): Do not print sum_max.
115         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
116         removed when histogram method was invented.
117         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
118         mode.
119         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
120         GCOV coding style.
121         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
122         and dump selected value.
123         * profile.c (add_working_set): Remove.
124         (get_working_sets): Likewise.
125         (find_working_set): Likewise.
126         (get_exec_counts): Do not work with working sets.
127         (read_profile_edge_counts): Do not inform as sum_max is removed.
128         (compute_branch_probabilities): Likewise.
129         (compute_value_histograms): Remove argument for call of
130         get_coverage_counts.
131         * profile.h: Do not make gcov_summary const.
133 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
135         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
137 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
139         PR tree-optimization/86990
140         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
141         Check that the entire merged store group is made of constants only for
142         overlapping stores.
144 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
146         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
147         (VTABLE_VERIFICATION_SPEC): Likewise.
148         (SANITIZER_EARLY_SPEC): Likewise.
149         (SANITIZER_SPEC): Likewise.
150         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
151         * doc/invoke.texi (Link Options): Document -r.
153 2018-09-20  Richard Biener <rguenther@suse.de>
155         PR middle-end/87054
156         * gimplify.c (gimplify_expr): Retain alignment of
157         addressable lvalue in dereference.
159 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
161         PR bootstrap/87013
162         * configure.ac: Check for .loc is_stmt support.
163         * configure, config.in: Rebuilt.
164         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
165         if not supported.
167 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
169         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
170         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
171         -misel=no.
173 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
175         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
176         VECTOR_OTHER.
177         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
178         case VECTOR_OTHER.
180 2018-09-20  Marek Polacek  <polacek@redhat.com>
182         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
184 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
186         PR tree-optimization/87288
187         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
188         into account when determining PEELING_FOR_NITERS.
190 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
192         PR tree-optimization/86877
193         * tree-vect-loop.c (vect_analyze_loop_2): Call
194         vect_verify_datarefs_alignment.
196 2018-09-19  Marek Polacek  <polacek@redhat.com>
198         * doc/invoke.texi: Document -Wclass-conversion.
200 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
202         * config/pa/pa.c (pa_adjust_priority): Delete.
203         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
205         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
206         (atomic_storehi): Likewise.
207         (atomic_storesi): Likewise.
208         (atomic_loaddi): Restore compare and swap exchange loop code.
210 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
212         PR rtl-optimization/86902
213         * combine.c (try_combine): When changing the CC mode used, don't change
214         an unrelated mode in other_insn to that new CC mode.
216 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
218         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
219         with %T in place of calls to dump_generic_expr.
220         (prune_runtime_alias_test_list): Likewise.
221         (create_runtime_alias_checks): Likewise.
222         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
223         (vect_analyze_data_ref_dependence): Likewise.
224         (vect_slp_analyze_data_ref_dependence): Likewise.
225         (vect_record_base_alignment): Likewise.  Use %G in place of call
226         to dump_gimple_stmt.
227         (vect_compute_data_ref_alignment): Likewise.
228         (verify_data_ref_alignment): Likewise.
229         (vect_find_same_alignment_drs): Likewise.
230         (vect_analyze_group_access_1): Likewise.
231         (vect_analyze_data_ref_accesses): Likewise.
232         (dependence_distance_ge_vf): Likewise.
233         (dump_lower_bound): Likewise.
234         (vect_prune_runtime_alias_test_list): Likewise.
235         (vect_find_stmt_data_reference): Likewise.
236         (vect_analyze_data_refs): Likewise.
237         (vect_create_addr_base_for_vector_ref): Likewise.
238         (vect_create_data_ref_ptr): Likewise.
239         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
240         (vect_can_advance_ivs_p): Likewise.
241         (vect_update_ivs_after_vectorizer): Likewise.
242         (vect_gen_prolog_loop_niters): Likewise.
243         (vect_prepare_for_masked_peels): Likewise.
244         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
245         (vect_determine_vectorization_factor): Likewise.
246         (vect_is_simple_iv_evolution): Likewise.
247         (vect_analyze_scalar_cycles_1): Likewise.
248         (vect_analyze_loop_operations): Likewise.
249         (report_vect_op): Likewise.
250         (vect_is_slp_reduction): Likewise.
251         (check_reduction_path): Likewise.
252         (vect_is_simple_reduction): Likewise.
253         (vect_create_epilog_for_reduction): Likewise.
254         (vect_finalize_reduction:): Likewise.
255         (vectorizable_induction): Likewise.
256         (vect_transform_loop_stmt): Likewise.
257         (vect_transform_loop): Likewise.
258         (optimize_mask_stores): Likewise.
259         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
260         (vect_split_statement): Likewise.
261         (vect_recog_over_widening_pattern): Likewise.
262         (vect_recog_average_pattern): Likewise.
263         (vect_determine_min_output_precision_1): Likewise.
264         (vect_determine_precisions_from_range): Likewise.
265         (vect_determine_precisions_from_users): Likewise.
266         (vect_mark_pattern_stmts): Likewise.
267         (vect_pattern_recog_1): Likewise.
268         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
269         (vect_record_max_nunits): Likewise.
270         (vect_build_slp_tree_1): Likewise.
271         (vect_build_slp_tree_2): Likewise.
272         (vect_print_slp_tree): Likewise.
273         (vect_analyze_slp_instance): Likewise.
274         (vect_detect_hybrid_slp_stmts): Likewise.
275         (vect_detect_hybrid_slp_1): Likewise.
276         (vect_slp_analyze_operations): Likewise.
277         (vect_slp_analyze_bb_1): Likewise.
278         (vect_transform_slp_perm_load): Likewise.
279         (vect_schedule_slp_instance): Likewise.
280         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
281         (vect_mark_stmts_to_be_vectorized): Likewise.
282         (vect_init_vector_1): Likewise.
283         (vect_get_vec_def_for_operand): Likewise.
284         (vect_finish_stmt_generation_1): Likewise.
285         (vect_check_load_store_mask): Likewise.
286         (vectorizable_call): Likewise.
287         (vectorizable_conversion): Likewise.
288         (vectorizable_operation): Likewise.
289         (vectorizable_load): Likewise.
290         (vect_analyze_stmt): Likewise.
291         (vect_is_simple_use): Likewise.
292         (vect_get_vector_types_for_stmt): Likewise.
293         (vect_get_mask_type_for_stmt): Likewise.
294         * tree-vectorizer.c (increase_alignment): Likewise.
296 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
298         * doc/rtl.texi: Adjust vec_select description.
299         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
300         non-constant selectors.
302 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
304         * config/aarch64/aarch64-protos.h
305         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
306         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
307         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
308         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
309         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
310         (AARCH64_FL_PROFILE): Move index so flags are ordered.
311         (AARCH64_ISA_RCPC8_4): New flag.
312         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
313         to aarch64_offset_9bit_signed_unscaled_p.
314         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
315         and use stlur.
316         * config/aarch64/constraints.md (Ust): New constraint.
317         * config/aarch64/predicates.md.
318         (aarch64_9bit_offset_memory_operand): New predicate.
319         (aarch64_rcpc_memory_operand): New predicate.
321 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
323         PR rtl-optimization/87361
324         * rtlanal.c (nonzero_bits1): Revert accidental change.
326 2018-09-19  Richard Biener  <rguenther@suse.de>
328         PR tree-optimization/87349
329         PR tree-optimization/87342
330         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
332 2018-09-18  Marek Polacek  <polacek@redhat.com>
334         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
335         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
337 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
339         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
341 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
343         PR rtl-optimization/86882
344         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
346 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
348         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
349         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
351 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
353         PR other/87353
354         * doc/invoke.texi (Link Options): Fix formatting and grammar.
356 2018-09-18  Richard Biener  <rguenther@suse.de>
358         PR middle-end/63155
359         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
360         (compute_samebase_partition_bases): Likewise.
361         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
362         (gimple_can_coalesce_p): Simplify.
364 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
366         Handle a library implementation of ffs calling __builtin_ffs.
367         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
368         (mmix_init_libfuncs): New function: make __builtin_ffs expand
369         to __ffsdi2.
371 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
373         * diagnostic-show-locus.c (class layout_range): Add field
374         "m_original_idx".
375         (layout_range::layout_range): Add "original_idx" param and use it
376         to initialize new field.
377         (make_range): Use 0 for original_idx.
378         (layout::layout): Pass in index to calls to
379         maybe_add_location_range.
380         (layout::maybe_add_location_range): Add param "original_idx" and
381         pass it on to layout_range.
382         (layout::print_any_labels): Pass on range->m_original_idx to
383         get_text call.
384         (gcc_rich_location::add_location_if_nearby): Use 0 for
385         original_idx.
386         * gcc-rich-location.h (text_range_label::get_text): Update for new
387         param.
388         (range_label_for_type_mismatch::get_text): Likewise.
390 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
392         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
394 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
396         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
397         format_string_diagnostic_t.
398         (fmtwarn_n): Likewise.
399         * substring-locations.c
400         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
401         (format_warning_n_va): Convert to...
402         (format_string_diagnostic_t::emit_warning_n_va): ...this.
403         (format_warning_va): Convert to...
404         (format_string_diagnostic_t::emit_warning_va): ...this.
405         (format_warning_at_substring): Convert to...
406         (format_string_diagnostic_t::emit_warning): ...this.
407         (format_warning_at_substring_n): Convert to...
408         (format_string_diagnostic_t::emit_warning_n): ...this.
409         * substring-locations.h (class format_string_diagnostic_t): New
410         class.
411         (format_warning_va): Convert to
412         format_string_diagnostic_t::emit_warning_va.
413         (format_warning_n_va): Convert to
414         format_string_diagnostic_t::emit_warning_n_va.
415         (format_warning_at_substring): Convert to
416         format_string_diagnostic_t::emit_warning.
417         (format_warning_at_substring_n): Convert to
418         format_string_diagnostic_t::emit_warning_n.
420 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
421             Bernd Schmidt <bernds_cb1@t-online.de>
423         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
424         SImode args.
426 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
428         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
429         operand 0 predicate to nonimmediate operand.
430         (rint<mode>2_frndint): Remove insn pattern.
431         (rint<mode>2): Change operand 1 predicate to general_operand.
432         Extend operand 1 to XFmode and generate rintxf2 insn.
433         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
434         Do not use X87MODEF mode macro.
435         (frndintxf2_<rounding>_i387): Rename from
436         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
437         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
438         to XFmode and generate significandxf3 insn.
440 2018-09-17  Richard Biener  <rguenther@suse.de>
442         PR tree-optimization/87328
443         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
444         visiting unexecutable backedges when not iterating.
445         (do_rpo_vn): Mark all edges not executable even when not
446         iterating.
448 2018-09-17  Martin Jambor  <mjambor@suse.cz>
450         PR c/63886
451         * doc/invoke.texi (Warning Options): Likewise.
453 2018-09-17  Richard Biener  <rguenther@suse.de>
455         PR tree-optimization/87301
456         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
457         clean EH info from leftover copy assignments.
459 2018-09-17  Martin Liska  <mliska@suse.cz>
461         PR gcov-profile/85871
462         * gcov.c (output_intermediate_file): Fix out of bounds
463         access.
465 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
467         * config/arc/arc.c: Object attributes for core4 not reflected
468         correctly.
469         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
470         core3).
472 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
474         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
476 2018-09-17  Martin Liska  <mliska@suse.cz>
478         * doc/gcov.texi: Document new option --use-hotness-colors.
479         * gcov.c (struct source_info): Declare new field.
480         (source_info::source_info): Set default for maximum_count.
481         (print_usage): Add new -q option.
482         (process_args): Process it.
483         (accumulate_line_info): Save src->maximum_count.
484         (output_line_beginning): Make color line number if
485         flag_use_hotness_colors is set.
486         (output_line_details): Pass default argument value.
487         (output_lines): Pass src->maximum_count.
489 2018-09-17  Martin Liska  <mliska@suse.cz>
491         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
492         Use processor_names table.
493         * config/i386/i386.c (ix86_default_align): Use
494         processor_cost_table for alignment values.
495         (ix86_option_override_internal): Use processor_names.
496         (ix86_function_specific_print): Likewise.
497         * config/i386/i386.h (struct processor_costs):
498         Add alignment values.
499         (struct ptt): Remove and replace with const char *.
500         * config/i386/x86-tune-costs.h (struct processor_costs):
501         Declare default alignments for all costs.
503 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
505         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
506         symbolics or VR_VARYING ranges for ABS_EXPR.
507         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
508         when range will wrap.
510 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
512         PR middle-end/86864
513         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
514         before and after a JUMP_TABLE_DATA.
516 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
518         PR middle-end/87188
519         * dojump.c (do_compare_and_jump): Canonicalize function pointers
520         when one operand is a function pointer.  Use POINTER_TYPE_P and
521         FUNC_OR_METHOD_TYPE_P.
522         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
523         * fold-const.c (build_range_check): Likewise.
524         * match.pd (simple_comparison): Likewise.
526 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
528         PR c/82967
529         * spellcheck.c (get_edit_distance_cutoff): New function.
530         (selftest::test_edit_distance_unit_test_oneway): Rename to...
531         (selftest::test_get_edit_distance_one_way): ...this.
532         (selftest::test_get_edit_distance_unit): Rename to...
533         (selftest::test_get_edit_distance_both_ways): ...this.
534         (selftest::test_edit_distances): Move tests to this new function,
535         and test some more pairs of strings.  Update for above renaming.
536         (selftest::get_old_cutoff): New function.
537         (selftest::test_get_edit_distance_cutoff): New function.
538         (selftest::assert_suggested_for): New function.
539         (ASSERT_SUGGESTED_FOR): New macro.
540         (selftest::assert_not_suggested_for): New function.
541         (ASSERT_NOT_SUGGESTED_FOR): New macro.
542         (selftest::test_suggestions): New function.
543         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
544         tests to selftest::test_edit_distances and call it.  Add calls to
545         selftest::test_get_edit_distance_cutoff and
546         selftest::test_suggestions.
547         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
548         (best_match::consider): Replace hard-coded cutoff calculation with
549         a call to...
550         (best_match::get_cutoff): New declaration.
551         (best_match::get_best_meaningful_candidate): Likewise.
553 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
555         * builtins.c (fold_builtin_strlen): Remove TODO comment.
557 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
559         revert:
560         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
562         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
563         terminated string literal.
565 2018-09-14  Martin Sebor  <msebor@redhat.com>
567         * builtins.c (unterminated_array): Handle ARRAY_REF.
568         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
569         * builtins.h (unterminated_array): Declare extern.
570         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
571         arrays.
572         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
573         calls.
575 2018-09-14  Martin Sebor  <msebor@redhat.com>
576             Jeff Law  <law@redhat.com>
578         * builtins.c (unterminated_array): New.
579         (expand_builtin_strcpy): Adjust.
580         (expand_builtin_strcpy_args): Detect unterminated arrays.
581         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
582         unterminated arrays.
583         * gimple-fold.h (get_maxval_strlen): Add argument.
584         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
586         * gimple-fold.c (get_range_strlen): Add argument.
587         (get_maxval_strlen): Adjust.
588         * gimple-fold.h (get_range_strlen): Add argument.
590 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
592         * config/i386/movdirintrin.h: Fix copyright year.
594 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
596         * reg-stack.c: Include regs.h.
597         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
598         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
599         FIRST_STACK_REG, not DFmode.
600         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
601         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
602         (change stack): Default register mode to the reg_raw_mode of
603         FIRST_STACK_REG, not DFmode.
604         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
605         (*swapxf): Rename from swapxf.
607 2018-09-14  Carl Love  <cel@us.ibm.com>
609         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
610         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
612 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
614         PR target/87224
615         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
616         alternatives.
618 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
620         PR target/85628
621         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
623 2018-09-14  Jason Merrill  <jason@redhat.com>
625         Fix --enable-gather-detailed-mem-stats.
626         * hash-table.c (hash_table_usage): Change from variable to function.
627         * hash-table.h: Adjust.
628         * Makefile.in: Add missing dependencies on hash-table.h.
630 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
632         PR tree-optimization/87259
633         PR lto/87283
634         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
635         execute_cse_reciprocals_1 has tried transforming.
637 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
639         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
640         VR_VARYING for PLUS/MINUS_EXPR.
642 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
644         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
645         formatting.
647 2018-09-14  Richard Biener  <rguenther@suse.de>
649         PR middle-end/63155
650         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
651         bits for the merged partition.
653 2018-09-13  Martin Sebor  <msebor@redhat.com>
654             Bernd Edlinger  <bernd.edlinger@hotmail.de>
656         * builtins.h (c_srlen): Add argument.
657         * builtins.c (warn_string_no_nul): New function.
658         (c_strlen): Add argument and use it.  Update recursive calls.
659         Pass DECL argument to string_constant to get info on non
660         terminated strings.  Update *NONSTR as needed.
661         (fold_builtin_strlen): Add argument to calls to c_strlen.
662         Warn for unterminated arrays.
663         (warn_string_no_null): Add prototype.
664         * expr.c (string_constant): Update arguments.  Update recursive
665         calls appropriately.  Detect missing NUL terminator and outermost
666         declaration its missing in.
667         Improve checks for arrays with nonzero lower bound or elements
668         that are not a single byte.  Simplify offset computation.
669         Simplify checks for non-NUL terminated strings.
670         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
671         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
673 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
675         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
676         correctly.
677         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
678         argument.  Fix range checks.
679         * fold-const.h (c_getstr): Adjust protoype.
680         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
681         string is constant but contains no NUL byte.
683         * expr.c (string_constant): Adjust function comment.
684         Remove bogus check for zero termination.
686         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
688         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
689         (get_constant_size): Don't make STRING_CSTs larger than they are.
690         (check_string_literal): New check function for STRING_CSTs.
691         (output_constant): Use it.
693 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
695         PR target/86812
696         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
698 2018-09-13  Richard Biener  <rguenther@suse.de>
700         PR tree-optimization/87263
701         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
702         (struct unwind_state): Add max_rpo field.
703         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
704         Compute max_rpo, the max RPO number a block can be backwards reached
705         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
706         separating it from the iterating mode.
708 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
710         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
711         (rfs_decision): New scheduling decision.
713 2018-09-13  Richard Biener  <rguenther@suse.de>
715         PR bootstrap/87134
716         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
717         (vn_nary_op_insert_pieces_predicated): Do not write useless
718         valid_dominated_by_p entry outside of the allocated storage.
720 2018-09-13  Omar Sandoval  <osandov@osandov.com>
721             Tom de Vries  <tdevries@suse.de>
723         PR debug/86985
724         * dwarf2out.c (is_c): New function.
725         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
727 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
729         PR target/85628
730         * config/aarch64/aarch64.md (*aarch64_bfxil):
731         Define.
732         * config/aarch64/constraints.md (Ulc): Define.
733         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
734         Define.
735         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
736         New function.
738 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
740         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
741         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
742         aarch64_layout_frame call. 
743         (aarch64_expand_epilogue): Likewise.
744         (aarch64_initial_elimination_offset): Likewise.
745         (aarch64_get_separate_components): Likewise.
746         (aarch64_use_return_insn_p): Likewise.
747         (aarch64_layout_frame): Remove unneeded check.
749 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
751         * configure.ac: Only append
752         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
753         gcc_config_arguments if it was never reconfigured or last reconfigure
754         was with different arguments.
755         * configure: Regenerated.
757 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
758             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
760         PR middle-end/87290
761         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
762         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
764 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
766         PR tree-optimization/87287
767         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
768         X % C == 0 to X % (unsigned) C == 0 optimization to ...
769         * match.pd (X % C == 0): ... here.  New optimization.
771 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
773         PR middle-end/82853
774         * expr.h (maybe_optimize_mod_cmp): Declare.
775         * expr.c (mod_inv): New function.
776         (maybe_optimize_mod_cmp): New function.
777         (do_store_flag): Use it.
778         * cfgexpand.c (expand_gimple_cond): Likewise.
780 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
781             Julian Brown  <julian@codesourcery.com>
783         PR middle-end/86336
784         * gimplify.c (gimplify_scan_omp_clauses): Set
785         target_firstprivatize_array_bases in OpenACC parallel and kernels
786         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
787         OpenACC data regions.
789 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
791         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
792         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
794 2018-09-12  Richard Biener  <rguenther@suse.de>
796         PR tree-optimization/87280
797         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
798         edge but unreachable target.
799         (do_rpo_vn): For conservatively handling a PHI only mark
800         the backedge executable but not the block reachable.
802 2018-09-12  Richard Biener  <rguenther@suse.de>
804         PR tree-optimization/87266
805         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
806         visited blocks.
808 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
810         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
811         constants.
812         ("trunc<BFP:mode><DFP_ALL:mode>2")
813         ("trunc<DFP_ALL:mode><BFP:mode>2")
814         ("extend<BFP:mode><DFP_ALL:mode>2")
815         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
816         according to the target operand type.
818 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
819             Andreas Krebbel  <krebbel@linux.ibm.com>
821         PR tree-optimization/86844
822         * gimple-ssa-store-merging.c
823         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
824         there are any overlapping stores in between them, make sure they are
825         also coalesced or we give up completely.
827 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
829         PR middle-end/87248
830         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
831         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
833 2018-09-12  Tom de Vries  <tdevries@suse.de>
835         * common.opt (gdescribe-dies): Add option.
836         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
837         attribute for artifical and nameless decls.
838         (dwarf2out_register_external_die): Add description attribute to
839         external reference die.
840         (add_desc_attribute): New functions.
841         (gen_subprogram_die): Add description attribute to
842         DW_TAG_call_site_parameter.
843         * tree-pretty-print.c (print_generic_expr_to_str): New function.
844         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
845         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
846         -gno-describe-dies.
847         (@item -gdescribe-dies): Add.
849 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
851         * tree-vrp.c (vrp_shift_undefined_p): Remove.
852         (extract_range_from_binary_expr_1: Call
853         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
854         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
855         depend on sign.
857 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
859         * gimple-ssa-warn-alloca.c
860         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
861         field for ALLOCA_BOUND_*_LARGE.
863 2018-09-11  Nathan Sidwell  <nathan@acm.org>
865         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
867 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
869         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
870         for clobbers.  Remove obsolete comment.
872 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
874         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
875         mpxchk, mpxld and mpxst types.
876         (define_attr length_immediate): Remove all processing of mpx types.
877         (define_attr prefix_0f): Ditto.
878         (define_attr memory): Ditto.
880 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
882         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
883         (log<mode>2): Change operand 1 predicate to general_operand.
884         Extend operand 1 to XFmode and generate logxf3 insn.
885         (log10<mode>2): Change operand 1 predicate to general_operand.
886         Extend operand 1 to XFmode and generate log10xf3 insn.
887         (log2<mode>2): Change operand 1 predicate to general_operand.
888         Extend operand 1 to XFmode and generate log2xf3 insn.
889         (fyl2xp1_extend<mode>xf3_i387): Remove.
890         (log1p<mode>2): Change operand 1 predicate to general_operand.
891         Extend operand 1 to XFmode and generate log1pxf3 insn.
892         (fxtract_extend<mode>xf3_i387): Remove.
893         (logb<mode>2): Change operand 1 predicate to general_operand.
894         Extend operand 1 to XFmode and generate logbxf3 insn.
895         (ilogb<mode>2): Change operand 1 predicate to general_operand.
896         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
897         (significand<mode>2): Change operand 1 predicate to general_operand.
898         Extend operand 1 to XFmode and generate significandxf3 insn.
900 2018-09-11  Nathan Sidwell  <nathan@acm.org>
902         * gcc.c (perror_with_name, pfatal_with_name): Delete.
903         (load_specs): Use fatal_error.
904         (DELETE_IF_ORDINARY, process_command): Use error.
905         (execute, run_attempt): Use fatal_error.
907 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
909         * diagnostic-core.h (sorry_at): New prototype.
910         * diagnostic.c (sorry_at): New function.
912 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
914         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
915         by zero as VR_UNDEFINED.
917 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
919         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
920         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
921         (<sincos>mode2): New expander.
922         (sincos_extend<mode>xf3_i387): Remove insn pattern.
923         (sincos -> sin, cos splitters): Remove splitter patterns.
924         (sincos<mode>3): Change operand 2 predicate to general_operand.
925         Extend operand 2 to XFmode and generate sincosxf3 insn.
926         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
927         Change operand 3 predicate to const1_operand.
928         (fptan_extend<mode>xf4_i387): Remove insn pattern.
929         (tanxf2): Update operands in the call to fptanxf4_i387.
930         (tan<mode>2): Change operand 1 predicate to general_operand.
931         Extend operand 1 to XFmode and generate tanxf3 insn.
932         (atan2xf3): Rename from *fpatanxf3_i387.
933         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
934         (atan2xf3): Remove expander.
935         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
936         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
937         (atan<mode>2): Change operand 1 predicate to general_operand.
938         Extend operand 1 to XFmode and generate atanxf3 insn.
940 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
942         * config/i386/i386.md (x87/SSE constant load splitter): Use
943         memory_operand instead of nonimmediate_operand for input operand
944         predicate.
946 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
948         * config/i386/i386.md (float partial SSE register stall splitter): Move
949         splitter near its instruction pattern.
950         (float_extend partial SSE register stall splitter): Ditto.
951         (float_truncate partial SSE register stall splitter): Ditto.
953 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
955         PR target/86794
956         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
957         to speculation_safe_value_not_needed.
959         PR target/85666
960         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
961         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
962         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
963         leaf_function_p, instead use has_hard_reg_initial_val.
965 2018-09-09  Nathan Sidwell  <nathan@acm.org>
967         * gcc.h (pfatal_with_name): Don't declare here.
968         * gcc.c (pfatal_with_name): Make static.
970 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
972         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
973         earlyclobber.
975 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
977         PR rtl-optimization/85458
978         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
979         priority hook to reduce the priority of EXPR.
981 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
983         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
984         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
985         with X87_ENABLE_FLOAT.  Remove preparation code.
986         (*float<SWI48:mode><MODEF:mode>2): Rename from
987         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
988         math using "enabled" attribute.
989         (*floatdi<MODEF:mode>2_i387): Rename from
990         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
991         enable for 32bit targets only.
992         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
993         splitter.
994         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
995         as operand 1 predicate.  Rewrite as define_insn_and_split.
996         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
998 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
1000         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
1001         to fallthru to FLOAT case.
1003 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
1005         PR target/86731
1006         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
1007         around folding of vec_sl to handle out of range shift values.
1009 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
1011         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
1012         Update callers to gen_fix_trunc<mode>_i387_fisttp
1013         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
1014         nonimmediate_operand.
1015         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
1016         and corresponding splitters.
1017         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
1018         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
1019         (fix_truncdi_i387_with_temp): Remove insn pattern
1020         and corresponding splitters.
1021         (fix_trunc<mode>_i387): Change operand 0 predicate to
1022         nonimmediate_operand.
1023         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
1024         and corresponding splitters.
1025         (*fistdi2_1): Remove.
1026         (fistdi2): Ditto.
1027         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
1028         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
1029         (*fist<mode>2_1): Remove.
1030         (fist<mode>2): Ditto.
1031         (fist<mode>2_with_temp): Remove insn pattern and corresponding
1032         splitters.
1033         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
1034         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
1035         (fistdi2_<rounding>): Change operand 0 predicate to
1036         nonimmediate_operand.
1037         (fistdi2_<rounding>_with_temp): Remove insn pattern
1038         and corresponding splitters.
1039         (fist<mode>2_<rounding>): Change operand 0 predicate to
1040         nonimmediate_operand.
1041         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
1042         and corresponding splitters.
1044         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
1046 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1048         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1049         the init value.
1051 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
1053         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1054         early gimple folding of vec_splat().
1055         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1056         * gimple-fold.h: Add an extern define for tree_vec_extract().
1058 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
1060         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1061         wrappers around TREE_TYPE comparisons.
1063 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1065         PR target/80080
1066         * config/s390/predicates.md: Add nonsym_memory_operand.
1067         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1068         contains a SYMBOL_REF, load it into an intermediate pseudo.
1069         (s390_emit_compare_and_swap): Legitimize operand.
1070         * config/s390/s390.md: Use the new nonsym_memory_operand
1071         with UNSPECV_CAS patterns.
1073 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1075         PR target/80080
1076         * config/s390/s390-passes.def: New file.
1077         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1078         declaration.
1079         (make_pass_s390_early_mach): Add declaration.
1080         * config/s390/s390.c (make_pass_s390_early_mach):
1081         (s390_option_override): Remove dynamic registration.
1082         * config/s390/t-s390: Add s390-passes.def.
1084 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1086         * config/s390/s390.c (s390_decompose_constant_pool_ref):
1087         Remove UNSPEC_LTREL_BASE check.
1088         (annotate_constant_pool_refs): Likewise.
1089         (find_constant_pool_ref): Likewise.
1090         (find_ltrel_base): Removed.
1091         (replace_ltrel_base): Removed.
1092         (s390_mainpool_finish): Remove replace_ltrel_base call.
1093         (s390_chunkify_start): Remove pending LTREL_BASE logic.
1094         (s390_chunkify_finish): Remove replace_ltrel_base call.
1095         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1097 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
1099         PR target/86779
1100         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1101         to speculation_safe_value_not_needed.
1103 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
1104             Bernd Schmidt  <bernds_cb1@t-online.de>
1106         * config/nvptx/nvptx-opts.h: New file.
1107         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1108         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1109         (ASM_SPEC): Define.
1110         (TARGET_SM35): New macro.
1111         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1112         correct predicate.
1113         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1114         values.
1115         (misa=): New option.
1116         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1118 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
1120         * config/i386/i386.md (truncdfsf2): Remove expander.
1121         (truncdfsf2_with_temp): Ditto.
1122         (truncxf<mode>2): Ditto.
1123         (*truncdfsf_fast_mixed): Remove insn pattern.
1124         (*truncdfsf_fast_i387): Ditto.
1125         (*truncdfsf_mixed): Ditto.
1126         (*truncdfsf_i387): Ditto.
1127         (*truncdfsf2_i387_1): Ditto.
1128         (*truncxfsf2_mixed): Ditto.
1129         (*truncxfdf2_mixed): Ditto.
1130         (*truncxf<mode>2_i387_noop): Ditto. Update callers
1131         to call gen_truncxf<mode>2 instead.
1132         (*truncxf<mode>2_i387): Remove.
1133         (reg->reg splitters): Remove splitter pattern.
1134         (reg->mem splitters): Ditto.
1136         (truncdfsf2): New insn pattern.
1137         (truncxf<mode>2): Ditto.
1139 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1141         * tree-ssa-math-opts.c (is_mult_by): New function.
1142         (is_square_of): Use the above.
1143         (optimize_recip_sqrt): New function.
1144         (pass_cse_reciprocals::execute): Use the above.
1146 2018-09-05  Richard Biener  <rguenther@suse.de>
1148         PR bootstrap/87134
1149         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1150         to zero-init the emplaced vec.
1152 2018-09-05  Martin Liska  <mliska@suse.cz>
1154         PR tree-optimization/87205
1155         * tree-switch-conversion.c (pass_lower_switch::execute):
1156         Group cases for switch statements.
1158 2018-09-05  Richard Biener  <rguenther@suse.de>
1160         PR tree-optimization/87217
1161         * tree-ssa-sccvn.c (vuse_valueize): New.
1162         (vn_reference_lookup_pieces): Use it.
1163         (vn_reference_lookup): Likewise.
1165 2018-09-05  Nathan Sidwell  <nathan@acm.org>
1167         PR c++/87137
1168         * stor-layout.c (place_field): Scan forwards to check last
1169         bitfield when ms_bitfield_placement is in effect.
1171 2018-09-05  Richard Biener  <rguenther@suse.de>
1173         PR bootstrap/87225
1174         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1175         return.
1177 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1178             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
1180         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1181         * config.gcc (extra_objs): Build it.
1182         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1183         Likewise.
1184         * config/aarch64/aarch64-passes.def
1185         (pass_tag_collision_avoidance): New pass.
1186         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1187         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1188         (aarch64_classify_address): Remove static qualifier.
1189         (aarch64_address_info, aarch64_address_type): Move to...
1190         * config/aarch64/aarch64-protos.h: ... here.
1191         (make_pass_tag_collision_avoidance): New function.
1192         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1193         New tuning flag.
1195 2018-09-05  Martin Liska  <mliska@suse.cz>
1197         * doc/gcov.texi: Update documentation of humar
1198         readable mode.
1199         * gcov.c (format_count): Print one decimal place, it provides
1200         more fine number of situations like '1G' vs. '1.4G'.
1202 2018-09-05  Martin Liska  <mliska@suse.cz>
1204         PR target/87164
1205         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1206         * optc-gen.awk: Allow 'Var' for Deprecated options in order
1207         to generate a MASK value.
1209 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
1211         PR debug/86593
1212         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1213         if frame pointer isn't used.
1214         (compute_frame_pointer_to_fb_displacement): Likewise.
1216 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
1218         PR target/87198
1219         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1220         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1221         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1222         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1223         and OPTION_MASK_ISA_XSAVEC_UNSET.
1225 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
1227         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1228         XOR operations in NAND case.
1230 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
1232         * wide-int-range.cc (wide_int_range_convert): New.
1233         * wide-int-range.h (wide_int_range_convert): New.
1234         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1235         code into wide_int_range_convert.
1236         (extract_range_into_wide_ints): Do not munge anti range constants
1237         into the entire domain.  Just return the range back.
1239 2018-09-04  Martin Liska  <mliska@suse.cz>
1241         * genmatch.c (output_line_directive): Add new argument
1242         fnargs.
1243         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1245 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
1247         * doc/invoke.texi (Option Summary): Add whitespace.
1249         * doc/invoke.texi (Option Summary): Add -Waligned-new.
1251 2018-09-04  Richard Biener  <rguenther@suse.de>
1253         PR tree-optimization/87211
1254         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1255         backedge value we're supposed to treat as VARYING also number
1256         the PHI to VARYING in case it got a different value-number already.
1258 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
1260         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1261         (extract_range_from_binary_expr_1): Do not call
1262         vrp_can_optimize_bit_op.
1263         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1264         static.
1265         (wide_int_range_get_mask_and_bounds): New.
1266         (wide_int_range_optimize_bit_op): New.
1267         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1268         (wide_int_range_bit_and): Same.
1269         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1270         (wide_int_range_optimize_bit_op): New.
1271         (wide_int_range_get_mask_and_bounds): New.
1273 2018-09-04  Richard Biener  <rguenther@suse.de>
1275         PR tree-optimization/87176
1276         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1277         variable.  When value-numbering a virtual PHI node make sure
1278         to not value-number to the backedge value.
1280 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
1282         * doc/extend.texi (Long Long, Hex Floats): Document support for
1283         long long and hex floats in more recent versions of ISO C++.
1285 2018-09-03  Richard Biener  <rguenther@suse.de>
1287         PR tree-optimization/87177
1288         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1289         cleanup.
1291 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1293         * bb-reorder.c (edge_order): Convert to C-qsort-style
1294         tri-state comparator.
1295         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
1297 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1299         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1300         tri-state comparator.
1301         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1303 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1305         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
1306         (mergesort): ... here as maximum count for using netsort.
1307         (gcc_qsort): Set nlim to 3 if stable sort is requested.
1308         (gcc_stablesort): New.
1309         * system.h (gcc_stablesort): Declare.
1311 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
1313         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1314         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
1315         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
1317 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
1319         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1320         lxsdx and stxsdx alternatives.
1321         (*mov<mode>_hardfloat64): Ditto.
1322         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1324 2018-09-03  Richard Biener  <rguenther@suse.de>
1326         PR tree-optimization/87200
1327         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1328         simplify result.
1330 2018-09-03  Martin Liska  <mliska@suse.cz>
1332         PR tree-optimization/87201
1333         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1334         Fix parenthesis in an expression.
1336 2018-09-03  Richard Biener  <rguenther@suse.de>
1338         PR tree-optimization/87197
1339         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1340         visited.  CSE the VN_INFO hashtable lookup.
1342         PR tree-optimization/87169
1343         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1344         iterating make sure there's no extra backedges from irreducible
1345         regions feeding the header.  Mark the destination block
1346         executable.
1348 2018-09-03  Martin Liska  <mliska@suse.cz>
1350         PR driver/83193
1351         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1352         * common/common-targhooks.c (default_get_valid_option_values):
1353         New function.
1354         * common/common-targhooks.h (default_get_valid_option_values):
1355         Likewise.
1356         * common/config/i386/i386-common.c: Move processor_target_table
1357         from i386.c.
1358         (ix86_get_valid_option_values): New function.
1359         (TARGET_GET_VALID_OPTION_VALUES): New macro.
1360         * config/i386/i386.c (struct ptt): Move to i386-common.c.
1361         (PTA_*): Move all defined masks into i386-common.c.
1362         (ix86_function_specific_restore): Use new processor_cost_table.
1363         * config/i386/i386.h (struct ptt): Moved from i386.c.
1364         (struct pta): Likewise.
1365         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1366         * doc/tm.texi.in: Likewise.
1367         * opt-suggestions.c (option_proposer::suggest_option):
1368         Pass prefix to build_option_suggestions.
1369         (option_proposer::get_completions): Likewise.
1370         (option_proposer::build_option_suggestions): Use the new target
1371         hook.
1372         * opts.c (struct option_help_tuple): New struct.
1373         (print_filtered_help): Use the new target hook.
1375 2018-09-03  Martin Liska  <mliska@suse.cz>
1377         PR middle-end/59521
1378         * predict.c (set_even_probabilities): Add likely_edges
1379         argument and handle cases where we have precisely one
1380         likely edge.
1381         (combine_predictions_for_bb): Catch also likely_edges.
1382         (tree_predict_by_opcode): Handle gswitch statements.
1383         * tree-cfg.h (find_case_label_for_value): New declaration.
1384         (find_taken_edge_switch_expr): Likewise.
1385         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1386         Find pivot in decision tree based on probabily, not by number of
1387         nodes.
1389 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
1391         * doc/standards.texi (Standards): Update Objective-C reference.
1393 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1395         * doc/install.texi (Prerequisites): Update link for MPC.
1397 2018-09-01  Michael Matz  <matz@suse.de>
1399         PR tree-optimization/87074
1400         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1401         PHIs for outer-loop uses.
1403 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1405         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1406         * doc/invoke.texi (C Dialect Options): Ditto.
1408 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1410         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1412 2018-08-31  Richard Biener  <rguenther@suse.de>
1414         PR tree-optimization/87168
1415         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1416         (rpo_elim::eliminate_avail): When OP was not visited it must
1417         be available.
1419 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
1421         * tree-vrp.c (copy_value_range): Convert param "from" from
1422         "value_range *" to "const value_range *".
1423         (range_is_null): Likewise for param "vr".
1424         (range_int_cst_p): Likewise.
1425         (range_int_cst_singleton_p): Likewise.
1426         (symbolic_range_p): Likewise.
1427         (value_ranges_intersect_p): Likewise for both params.
1428         (value_range_nonnegative_p): Likewise for param "vr".
1429         (value_range_constant_singleton): Likewise.
1430         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1431         (extract_range_into_wide_ints): Likewise for param "vr".
1432         (extract_range_from_multiplicative_op): Likewise for params "vr0"
1433         and "vr1".
1434         (vrp_can_optimize_bit_op): Likewise.
1435         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1436         "vr1_".
1437         (extract_range_from_unary_expr): Likewise.
1438         (debug_value_range): Likewise for param "vr".
1439         (value_range::dump): Add "const" qualifier.
1440         (vrp_prop::check_array_ref): Convert local "vr" from
1441         "value_range *" to "const value_range *".
1442         (vrp_prop::check_mem_ref): Likewise.
1443         (vrp_prop::visit_stmt): Likewise for local "old_vr".
1444         (vrp_intersect_ranges_1): Likewise for param "vr_1".
1445         (vrp_intersect_ranges): Likewise.
1446         (simplify_stmt_for_jump_threading): Likewise for local "vr".
1447         (vrp_prop::vrp_finalize): Likewise.
1448         * tree-vrp.h (value_range::dump): Add "const" qualifier.
1449         (vrp_intersect_ranges): Add "const" qualifier to params as above.
1450         (extract_range_from_unary_expr): Likewise.
1451         (value_range_constant_singleton): Likewise.
1452         (symbolic_range_p): Likewise.
1453         (copy_value_range): Likewise.
1454         (extract_range_from_binary_expr_1): Likewise.
1455         (range_int_cst_p): Likewise.
1456         (vrp_set_zero_nonzero_bits): Likewise.
1457         (range_int_cst_singleton_p): Likewise.
1459 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
1461         * config/aarch64/arm_neon.h (vabsd_s64): New.
1462         (vnegd_s64): Likewise.
1464 2018-08-31  Martin Jambor  <mjambor@suse.cz>
1466         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1468 2018-08-31  Martin Liska  <mliska@suse.cz>
1470         * ipa-icf.c (sem_item::add_type): Use
1471         sem_item::m_type_hash_cache.
1472         * ipa-icf.h: Move the cache from sem_item_optimizer
1473         to sem_item.
1475 2018-08-31  Nathan Sidwell  <nathan@acm.org>
1477         * doc/extend.texi (Backwards Compatibility): Remove implicit
1478         extern C leeway of () being (...).
1480 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1482         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1484 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
1486         PR target/86684
1487         PR target/87149
1488         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1490 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
1492         PR middle-end/87138
1493         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1494         gen_int_mode.  Formatting fixes.
1496 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
1498         * target.def (custom_function_descriptors): Improve documentation.
1499         * doc/tm.texi.in (Trampolines): Expand discussion of function
1500         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1501         beginning of the section.
1502         * doc/tm.texi: Regenerated.
1504 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
1506         * cfg.h (class auto_edge_flag): Spell out the template-id of the
1507         base class in the initializer list.  This is a workaround for
1508         building with older GCC.
1509         (class auto_bb_flag): Likewise.
1511 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
1513         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1514         (altivec_vcmpequ<VI_char>_p): Remove star.
1515         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1516         vector load modes.
1517         (expand_strncmp_vec_sequence): New function.
1518         (emit_final_str_compare_vec): New function.
1519         (expand_strn_compare): Add support for vector strncmp.
1520         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1521         length specification to bytes.
1522         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1523         (vcmpnezb_p): New pattern.
1524         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1525         for option -mstring-compare-inline-limit.
1527 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
1529         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1530         (PTA_SKYLAKE): Add PTA_AES.
1531         (PTA_GOLDMONT): Likewise.
1533 2018-08-29  Jan Hubicka  <jh@suse.cz>
1535         PR lto/86517
1536         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1537         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1539 2018-08-29  Jan Hubicka  <jh@suse.cz>
1541         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1542         TYPE_STUB_DECL.
1543         (hash_tree): Do not visit TYPE_STUB_DECL.
1544         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1545         stream TYPE_STUB_DECL.
1546         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1547         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1548         after free_lang_data.
1549         (type_in_anonymous_namespace_p): Likewise.
1551 2018-08-29  Jan Hubicka  <jh@suse.cz>
1553         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1554         comment that it has to be even number.
1555         (class sreal): Change m_sig type to int32_t.
1556         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1557         int64_t for temporary calculations.
1558         (sreal_verify_basics): Drop one bit from minimum and maximum.
1560 2018-08-30  Richard Biener  <rguenther@suse.de>
1562         PR tree-optimization/87147
1563         * tree-ssa-sccvn.c (SSA_VISITED): New function.
1564         (visit_phi): When the degenerate result is from the backedge and
1565         we didn't visit its definition yet drop to VARYING.
1566         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1568 2018-08-29  Jan Hubicka  <jh@suse.cz>
1570         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1571         DECL_VINDEX.
1572         (hash_tree): Likewise.
1574 2018-08-29  Jan Hubicka  <jh@suse.cz>
1576         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1577         and TYPE_NEXT_REF_TO.
1579 2018-08-29  Jan Hubicka  <jh@suse.cz>
1581         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1582         comment that it has to be even number.
1583         (class sreal): Change m_sig type to int32_t.
1584         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1585         int64_t for temporary calculations.
1586         (sreal_verify_basics): Drop one bit from minimum and maximum.
1588 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
1590         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1592 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
1594         PR middle-end/86995
1595         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1596         if to_add is negative.
1598 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1600         PR middle-end/87053
1601         * builtins.c (c_strlen): Improve range checks.
1603 2018-08-29  Martin Sebor  <msebor@redhat.com>
1604             Jeff Law  <law@redhat.com>
1606         PR tree-optimization/86714
1607         PR tree-optimization/86711
1608         * builtins.c (c_strlen): Add arguments to call to string_constant.
1609         * expr.c (string_constant): Add argument.  Detect missing nul
1610         terminator and outermost declaration it's missing in.
1611         * expr.h (string_constant): Add argument.
1612         * fold-const.c (read_from_constant_string): Add arguments to call to
1613         string_constant.
1614         (c_getstr): Likewise.
1615         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1616         to string_constant.
1617         * tree-ssa-strlen.c (get_stridx): Likewise.
1619 2018-08-29  Jan Hubicka  <jh@suse.cz>
1621         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1622         Do not stream DECL_VINDEX.
1623         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1624         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1625         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1627 2018-08-29  Richard Biener  <rguenther@suse.de>
1629         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1630         virtual operands that are not default defs to honor region
1631         boundaries.
1632         (rpo_vn_valueize): Remove ineffective code here.
1634 2018-08-29  Richard Biener  <rguenther@suse.de>
1636         PR tree-optimization/87132
1637         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1638         when skipping defs reachable over backedges.
1640 2018-08-29  Richard Biener  <rguenther@suse.de>
1642         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1643         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1644         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1645         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1646         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1647         (vn_reference_lookup_3): Remove use of const_parms.
1648         (free_rpo_vn): Do not free const_parms.
1649         (do_rpo_vn): Do not call init_const_parms.
1650         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1651         SSA_NAME_POINTS_TO_READONLY_MEMORY.
1652         (call_may_clobber_ref_p_1): Likewise.
1654 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
1656         PR other/86726
1657         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1658         (-O): Ditto.
1659         (-ftree-scev-cprop): Document.
1661 2018-08-29  Jan Hubicka  <jh@suse.cz>
1663         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1664         parameters.
1665         (sreal constructor): Update.
1666         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1667         sreal:operator/): Update.
1669 2018-08-29  Martin Liska  <mliska@suse.cz>
1671         * tree-switch-conversion.c (switch_conversion::expand):
1672         Strenghten assumption about gswitch statements.
1674 2018-08-29  Richard Biener  <rguenther@suse.de>
1676         PR tree-optimization/87117
1677         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1678         re-value-number released SSA VDEFs.
1680 2018-08-29  Richard Biener  <rguenther@suse.de>
1682         PR tree-optimization/87126
1683         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1685 2018-08-28  Jim Wilson  <jimw@sifive.com>
1687         * config/riscv/pic.md: Rewrite.
1688         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1689         invalid address.
1690         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1691         (SOFTF, default_load, softload, softstore): New.
1693 2018-08-28  Jeff Law  <law@redhat.com>
1695         * fold-const.c (fold_binary_loc): Remove recently added assert.
1697 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1699         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1700         to OP parmeter of generated function.
1702 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
1704         PR tree-optimization/87009
1705         * match.pd: Add boolean optimizations.
1707 2018-08-28  Martin Sebor  <msebor@redhat.com>
1709         PR middle-end/86631
1710         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1711         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1712         (pass_walloca::gate): Use it.
1713         (alloca_call_type): Same.
1714         (pass_walloca::execute): Same.
1715         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1717 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
1719         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1720         GCC_VERSION for usage of "__gcc_dump_printf__" format from
1721         >= 3005 to >= 9000.
1723 2018-08-28  Richard Biener  <rguenther@suse.de>
1725         PR tree-optimization/87124
1726         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1727         constants before looking up avail.
1729 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
1731         PR middle-end/87099
1732         * calls.c (maybe_warn_nonstring_arg): Punt early if
1733         warn_stringop_overflow is zero.  Don't call get_range_strlen
1734         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1735         Swap comparison operands to have constants on rhs.  Only use
1736         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
1737         increment lenrng[0].
1739 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
1741         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1742         use of tree_to_shwi.  Remove duplicated test for the size being
1743         a whole number of bytes.
1745 2018-08-28  Richard Biener  <rguenther@suse.de>
1747         PR tree-optimization/87117
1748         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1749         Handle removed stmt without LHS (GIMPLE_NOP).
1751 2018-08-28  Richard Biener  <rguenther@suse.de>
1753         PR tree-optimization/87117
1754         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1755         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1757 2018-08-28  Richard Biener  <rguenther@suse.de>
1759         PR tree-optimization/87117
1760         * tree-ssa-pre.c (compute_avail): Do not make expressions
1761         with predicated values available.
1762         (get_expr_value_id): Assert we do not run into predicated value
1763         expressions.
1765 2018-08-28  Richard Biener  <rguenther@suse.de>
1767         PR tree-optimization/87117
1768         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1769         get virtual operands.
1770         (get_expr_operands): Handle STRING_CST like other decls.
1772 2018-08-28  Martin Liska  <mliska@suse.cz>
1774         * tree.h: Update documentation of fndecl_built_in_p
1775         functions.
1778 2018-08-27  Jeff Law  <law@redhat.com>
1779         PR tree-optimization/87110
1780         * tree-ssa-dse.c (compute_trims): Handle non-constant
1781         TYPE_SIZE_UNIT.
1783 2018-08-27  Martin Sebor  <msebor@redhat.com>
1785         PR tree-optimization/86914
1786         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1788 2018-08-27  Martin Sebor  <msebor@redhat.com>
1790         PR tree-optimization/87112
1791         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1792         the type of the bound argument.
1794 2018-08-27  Jeff Law  <law@redhat.com>
1796         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1797         type does not have a TYPE_SIZE_UNIT.
1799 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
1801         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1802         with include of backend.h.
1804 2018-08-27  Richard Biener  <rguenther@suse.de>
1806         PR tree-optimization/86927
1807         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1808         use const cond reduction code.
1810 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
1812         PR tree-optimization/85758
1813         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1815 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1817         PR c++/87091
1818         * diagnostic-show-locus.c (class layout_range): Update for
1819         conversion of show_caret_p to a tri-state.
1820         (layout_range::layout_range): Likewise.
1821         (make_range): Likewise.
1822         (layout::maybe_add_location_range): Likewise.
1823         (layout::should_print_annotation_line_p): Don't show annotation
1824         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1825         (layout::get_state_at_point): Update for conversion of
1826         show_caret_p to a tri-state.  Bail out early for
1827         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1828         underlining or source colorization.
1829         (gcc_rich_location::add_location_if_nearby): Update for conversion
1830         of show_caret_p to a tri-state.
1831         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1832         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1833         Likewise.
1834         (selftest::test_one_liner_labels): Likewise.
1835         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1836         conversion of show_caret_p to a tri-state.
1837         * pretty-print.c (text_info::set_location): Likewise.
1838         * pretty-print.h (text_info::set_location): Likewise.
1839         * substring-locations.c (format_warning_n_va): Likewise.
1840         * tree-diagnostic.c (default_tree_printer): Likewise.
1841         * tree-pretty-print.c (newline_and_indent): Likewise.
1843 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1845         PR c++/87091
1846         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1847         line above for line-insertion fix-it hints.
1848         (selftest::test_fixit_insert_containing_newline): Update the
1849         expected results, and add a test with line-numbering enabled.
1851 2018-08-27  Martin Liska  <mliska@suse.cz>
1853         PR sanitizer/86962
1854         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1855         params with DECL_HAS_VALUE_EXPR_P.
1857 2018-08-27  Martin Liska  <mliska@suse.cz>
1859         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1860         selected expansion strategy.
1862 2018-08-27  Martin Liska  <mliska@suse.cz>
1864         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1865         * builtins.c (is_builtin_fn): Likewise.
1866         * attribs.c (diag_attr_exclusions): Use new function
1867         fndecl_built_in_p and remove check for FUNCTION_DECL if
1868         possible.
1869         (builtin_mathfn_code): Likewise.
1870         (fold_builtin_expect): Likewise.
1871         (fold_call_expr): Likewise.
1872         (fold_builtin_call_array): Likewise.
1873         (fold_call_stmt): Likewise.
1874         (set_builtin_user_assembler_name): Likewise.
1875         (is_simple_builtin): Likewise.
1876         * calls.c (gimple_alloca_call_p): Likewise.
1877         (maybe_warn_nonstring_arg): Likewise.
1878         * cfgexpand.c (expand_call_stmt): Likewise.
1879         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1880         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1881         (cgraph_node::verify_node): Likewise.
1882         * cgraphclones.c (build_function_decl_skip_args): Likewise.
1883         (cgraph_node::create_clone): Likewise.
1884         * config/arm/arm.c (arm_insert_attributes): Likewise.
1885         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1886         * dse.c (scan_insn): Likewise.
1887         * expr.c (expand_expr_real_1): Likewise.
1888         * fold-const.c (operand_equal_p): Likewise.
1889         (fold_binary_loc): Likewise.
1890         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1891         * gimple-low.c (lower_stmt): Likewise.
1892         * gimple-pretty-print.c (dump_gimple_call): Likewise.
1893         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1894         * gimple.c (gimple_build_call_from_tree): Likewise.
1895         (gimple_call_builtin_p): Likewise.
1896         (gimple_call_combined_fn): Likewise.
1897         * gimplify.c (gimplify_call_expr): Likewise.
1898         (gimple_boolify): Likewise.
1899         (gimplify_modify_expr): Likewise.
1900         (gimplify_addr_expr): Likewise.
1901         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1902         * ipa-cp.c (determine_versionability): Likewise.
1903         * ipa-fnsummary.c (compute_fn_summary): Likewise.
1904         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1905         * ipa-split.c (visit_bb): Likewise.
1906         (split_function): Likewise.
1907         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1908         * lto-cgraph.c (input_node): Likewise.
1909         * lto-streamer-out.c (write_symbol): Likewise.
1910         * omp-low.c (setjmp_or_longjmp_p): Likewise.
1911         (lower_omp_1): Likewise.
1912         * predict.c (strip_predict_hints): Likewise.
1913         * print-tree.c (print_node): Likewise.
1914         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1915         * trans-mem.c (is_tm_irrevocable): Likewise.
1916         (is_tm_load): Likewise.
1917         (is_tm_simple_load): Likewise.
1918         (is_tm_store): Likewise.
1919         (is_tm_simple_store): Likewise.
1920         (is_tm_abort): Likewise.
1921         (tm_region_init_1): Likewise.
1922         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1923         * tree-cfg.c (verify_gimple_call): Likewise.
1924         (move_stmt_r): Likewise.
1925         (stmt_can_terminate_bb_p): Likewise.
1926         * tree-eh.c (lower_eh_constructs_2): Likewise.
1927         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1928         * tree-inline.c (remap_gimple_stmt): Likewise.
1929         (copy_bb): Likewise.
1930         (estimate_num_insns): Likewise.
1931         (fold_marked_statements): Likewise.
1932         * tree-sra.c (scan_function): Likewise.
1933         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1934         (optimize_stack_restore): Likewise.
1935         (pass_fold_builtins::execute): Likewise.
1936         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1937         (mark_all_reaching_defs_necessary_1): Likewise.
1938         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1939         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1940         (pass_forwprop::execute): Likewise.
1941         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1942         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1943         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1944         * tree-ssa-strlen.c (get_string_length): Likewise.
1945         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1946         (find_func_aliases_for_call): Likewise.
1947         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1948         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1949         * tree-tailcall.c (find_tail_calls): Likewise.
1950         * tree.c (need_assembler_name_p): Likewise.
1951         (free_lang_data_in_decl): Likewise.
1952         (get_call_combined_fn): Likewise.
1953         * ubsan.c (is_ubsan_builtin_p): Likewise.
1954         * varasm.c (incorporeal_function_p): Likewise.
1955         * tree.h (DECL_BUILT_IN): Remove and replace with
1956         fndecl_built_in_p.
1957         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1958         (fndecl_built_in_p): New.
1960 2018-08-27  Martin Liska  <mliska@suse.cz>
1962         PR tree-optimization/86847
1963         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1964         Dump also subtree probability.
1965         (switch_decision_tree::do_jump_if_equal): New function.
1966         (switch_decision_tree::emit_case_nodes): Handle special
1967         situations in balanced tree that can be emitted much simpler.
1968         Fix calculation of probabilities that happen in tree expansion.
1969         * tree-switch-conversion.h (struct cluster): Add
1970         is_single_value_p.
1971         (struct simple_cluster): Likewise.
1972         (struct case_tree_node): Add new function has_child.
1973         (do_jump_if_equal): New.
1975 2018-08-27  Martin Liska  <mliska@suse.cz>
1977         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1978         Add new argument to bit_test_cluster constructor.
1979         (bit_test_cluster::emit): Set bits really number of values
1980         handlel by a test.
1981         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1982         probability argument.
1983         * tree-switch-conversion.h (struct bit_test_cluster):
1984         Add m_handles_entire_switch.
1986 2018-08-27  Martin Liska  <mliska@suse.cz>
1988         PR tree-optimization/86702
1989         * tree-switch-conversion.c (jump_table_cluster::emit):
1990         Make probabilities even for values in jump table
1991         according to number of cases handled.
1992         (switch_decision_tree::compute_cases_per_edge): Pass
1993         argument to reset_out_edges_aux function.
1994         (switch_decision_tree::analyze_switch_statement): Likewise.
1995         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1996         Make it static.
1998 2018-08-27  Martin Liska  <mliska@suse.cz>
2000         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
2001         cfun argument explicitly.
2002         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
2003         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
2004         function gimple_switch_default_bb.
2005         (convert_switch_statements):
2006         (expand_builtins):
2007         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
2008         * stmt.c (label_to_block_fn): Use label_to_block and pass
2009         cfun argument explicitly and use gimple_switch_label_bb.
2010         (expand_case): Likewise.
2011         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
2012         cfun argument explicitly. Likewise.
2013         (make_edges_bb): Likewise.
2014         (make_cond_expr_edges): Likewise.
2015         (get_cases_for_edge): Likewise.
2016         (make_gimple_switch_edges): Likewise.
2017         (label_to_block_fn): Likewise.
2018         (label_to_block): Likewise.
2019         (make_goto_expr_edges): Likewise.
2020         (make_gimple_asm_edges): Likewise.
2021         (main_block_label): Likewise.
2022         (group_case_labels_stmt): Likewise.
2023         (find_taken_edge_computed_goto): Likewise.
2024         (find_taken_edge_switch_expr): Likewise.
2025         (gimple_verify_flow_info): Likewise.
2026         (gimple_redirect_edge_and_branch): Likewise.
2027         (gimple_switch_label_bb): New function.
2028         (gimple_switch_default_bb): Likewise.
2029         (gimple_switch_edge): Likewise.
2030         (gimple_switch_default_edge): Likewise.
2031         * tree-cfg.h (label_to_block_fn): Remove and replace ...
2032         (label_to_block): ... with this.
2033         (gimple_switch_label_bb): New.
2034         (gimple_switch_default_bb): Likewise.
2035         (gimple_switch_edge): Likewise.
2036         (gimple_switch_default_edge): Likewise.
2037         * tree-cfgcleanup.c (convert_single_case_switch): Use
2038         new gimple functions and pass new argument to label_to_block.
2039         (cleanup_control_flow_bb):
2040         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
2041         cfun argument explicitly.
2042         (make_eh_edges): Likewise.
2043         (redirect_eh_dispatch_edge): Likewise.
2044         (lower_resx): Likewise.
2045         (lower_eh_dispatch): Likewise.
2046         (maybe_remove_unreachable_handlers): Likewise.
2047         (unsplit_eh): Likewise.
2048         (cleanup_empty_eh): Likewise.
2049         (verify_eh_edges): Likewise.
2050         (verify_eh_dispatch_edge): Likewise.
2051         * tree-ssa-dom.c (record_edge_info): Likewise.
2052         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2053         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2054         (thread_through_normal_block): Likewise.
2055         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2056         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2057         * tree-switch-conversion.c (switch_conversion::collect): Use new
2058         gimple functions.
2059         (switch_conversion::check_final_bb): Likewise.
2060         (switch_conversion::gather_default_values): Pass new argument
2061         to label_to_block.
2062         (switch_conversion::build_constructors): Likewise.
2063         (switch_decision_tree::compute_cases_per_edge): Use new
2064         gimple_switch_edge function.
2065         (switch_decision_tree::analyze_switch_statement): Pass new argument
2066         to label_to_block.
2067         (switch_decision_tree::try_switch_expansion): Use
2068         gimple_switch_default_edge.
2069         * tree-vrp.c (find_switch_asserts): Pass new argument
2070         to label_to_block.
2071         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2072         (vr_values::simplify_switch_using_ranges): Likewise.
2074 2018-08-27  Richard Biener  <rguenther@suse.de>
2076         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2077         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2079         * tree-ssa-sccvn.h (struct vn_pval): New structure.
2080         (struct vn_nary_op_s): Add unwind_to member.  Add
2081         predicated_values flag and put result into a union together
2082         with a linked list of vn_pval.
2083         (struct vn_ssa_aux): Add name member to make maintaining
2084         a map of SSA name to vn_ssa_aux possible.  Remove no longer
2085         needed info, dfsnum, low, visited, on_sccstack, use_processed
2086         and range_info_anti_range_p members.
2087         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2088         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2089         New functions.
2090         (vn_valueize): New global.
2091         (vn_context_bb): Likewise.
2092         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2093         VN_INFO_PTR_INFO): Remove.
2094         * tree-ssa-sccvn.c: ... (rewrite)
2095         (pass_fre::execute): For -O2+ initialize loops and run
2096         RPO VN in optimistic mode (iterating).  For -O1 and -Og
2097         run RPO VN in non-optimistic mode.
2098         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2099         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2100         * doc/invoke.texi (sccvn-max-scc-size): Remove.
2101         (rpo-vn-max-loop-depth): Document.
2102         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2103         when valuezing the VUSE signals we walked out of the region.
2104         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2105         (phi_translate): Set VN context block to use for availability
2106         lookup.
2107         (compute_avail): Likewise.
2108         (pre_valueize): New function.
2109         (pass_pre::execute): Adjust to the RPO VN API.
2111         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2112         (propagate_constants_for_unrolling): Remove.
2113         (tree_unroll_loops_completely): Perform value-numbering
2114         on the unrolled bodies loop parent.
2116 2018-08-27  Richard Biener  <rguenther@suse.de>
2118         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2119         for partial antic compute.
2121 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
2123         PR rtl-optimization/87065
2124         * combine.c (simplify_if_then_else): Formatting fix.
2125         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2126         check.
2127         (known_cond): Don't return const_true_rtx for vector modes.  Use
2128         CONST0_RTX instead of const0_rtx.  Formatting fixes.
2130 2018-08-27  Martin Liska  <mliska@suse.cz>
2132         PR gcov-profile/87069
2133         * gcov.c (process_file): Record files already processed
2134         and warn about a file being processed multiple times.
2136 2018-08-27  Martin Liska  <mliska@suse.cz>
2138         PR driver/83193
2139         * config/aarch64/aarch64.c (aarch64_override_options_internal):
2140         Set default values for x_aarch64_*_string strings.
2141         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2142         prefix.  For -mabi do not print '=ABI' in help and use
2143         <option_value> format for -msve-vector-bits and -moverride
2144         options.
2146 2018-08-26  Jeff Law  <law@redhat.com>
2148         * config/mips/frame-header-opt.c: Include "backend.h" rather than
2149         "cfg.h"
2151 2018-08-26  Marek Polacek  <polacek@redhat.com>
2153         PR c++/87029, Implement -Wredundant-move.
2154         * doc/invoke.texi: Document -Wredundant-move.
2156 2018-08-25  Martin Sebor  <msebor@redhat.com>
2158         PR tree-optimization/87059
2159         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2160         to the same type as the other.
2161         * fold-const.c (fold_binary_loc): Assert expectation.
2163 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
2165         * config/darwin.c (machopic_legitimize_pic_address): Clean up
2166         extraneous parentheses, dead code section and formatting.
2168 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
2170         PR c++/87091
2171         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2172         wide enough for jumps in the line-numbering to be visible.
2173         (layout::print_gap_in_line_numbering): New member function.
2174         (layout::calculate_line_spans): When using line numbering, merge
2175         line spans that are only 1 line apart.
2176         (diagnostic_show_locus): When printing line numbers, show gaps in
2177         line numbering directly, rather than printing headers.
2178         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2179         line-numbering with multiple line spans.
2180         (selftest::test_fixit_insert_containing_newline_2): Add test of
2181         line-numbering, in which the spans are close enough to be merged.
2183 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
2185         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2186         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
2187         * tree-vrp.c (range_is_nonnull): Remove.
2188         (range_includes_zero_p): Accept value_range instead of min/max.
2189         (extract_range_from_binary_expr_1): Do not early bail on
2190         POINTER_PLUS_EXPR.
2191         Use range_includes_zero_p instead of range_is_nonnull.
2192         (extract_range_from_unary_expr): Use range_includes_zero_p instead
2193         of range_is_nonnull.
2194         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
2195         special case VR_ANTI_RANGE.
2196         (vrp_finalize): Same.
2197         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2198         instead of min/max.
2199         (range_is_nonnull): Remove.
2200         * vr-values.c (vrp_stmt_computes_nonzero): Use
2201         range_includes_zero_p instead of range_is_nonnull.
2202         (extract_range_basic): Pass value_range to range_includes_zero_p
2203         instead of range_is_nonnull.
2205 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
2207         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2208         * emit-rtl.h (rtl_data): Remove return_bnd.
2209         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2210         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2211         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2212         (POINTER_BOUNDS_MODE): Remove definition.
2213         (make_pointer_bounds_mode): Remove.
2214         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2215         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2216         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2217         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2218         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2219         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2220         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2222         * config/i386/i386-modes.def (BND32, BND64): Remove.
2223         * config/i386/i386.c (dbx_register_map): Remove bound registers.
2224         (dbx64_register_map): Ditto.
2225         (svr4_dbx_register_map): Ditto.
2226         (indirect_thunk_bnd_needed): Remove.
2227         (indirect_thunks_bnd_used): Ditto.
2228         (indirect_return_bnd_needed): Ditto.
2229         (indirect_return_via_cx_bnd): Ditto.
2230         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2231         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2232         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
2233         (output_indirect_thunk_function): Remove handling of
2234         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2235         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2236         (ix86_save_reg): Remove handling of crtl->return_bnd.
2237         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2238         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2239         and UNSPEC_BNDLX_ADDR.
2240         (ix86_output_indirect_branch_via_reg): Remove handling of
2241         indirect_thunk_prefix_bnd.
2242         (ix86_output_indirect_branch_via_push): Ditto.
2243         (ix86_output_function_return): Ditto.
2244         (ix86_output_indirect_function_return): Ditto.
2245         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2246         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2247         (CALL_USED_REGISTERS): Ditto.
2248         (REG_ALLOC_ORDER): Update for removal of bound registers.
2249         (HI_REGISTER_NAMES): Ditto.
2250         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2251         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2252         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2253         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2254         (FIRST_PSEUDO_REG): Update.
2255         (BND): Remove mode iterator.
2256         * config/i386/predicates.md (bnd_mem_operator): Remove.
2258 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
2260         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2261         vectors.
2263 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
2265         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2266         the case in which the permute needs only a single element and
2267         repeats for every vector of the result.  Extend that case to
2268         handle variable-length vectors.
2269         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2271 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
2273         PR debug/79342
2274         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2275         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2277 2018-08-24  Richard Biener  <rguenther@suse.de>
2279         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2280         bb_flags_allocated members.
2281         (auto_flag): New RAII class for allocating flags.
2282         (auto_edge_flag): New RAII class for allocating edge flags.
2283         (auto_bb_flag): New RAII class for allocating bb flags.
2284         * cfgloop.c (verify_loop_structure): Allocate temporary edge
2285         flag dynamically.
2286         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2287         in favor of temporarily allocated BB flag.
2288         * hsa-brig.c: Re-order includes.
2289         * hsa-dump.c: Likewise.
2290         * hsa-regalloc.c: Likewise.
2291         * print-rtl.c: Likewise.
2292         * profile-count.c: Likewise.
2294 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
2296         PR target/86989
2297         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2298         the TOC register.
2300 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
2302         PR 87073/bootstrap
2303         * wide-int-range.cc (wide_int_range_div): Do not ignore result
2304         from wide_int_range_multiplicative_op.
2306 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2308         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2309         "permutaion".
2311 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
2313         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2314         to 'expanded'.
2316 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
2318         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2319         full GENERIC expression used for replacement.
2321 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
2323         * tree-vrp.c (abs_extent_range): Remove.
2324         (extract_range_into_wide_ints): Pass wide ints by reference.
2325         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2326         Pass wide ints by reference in all calls to
2327         extract_range_into_wide_ints.
2328         * wide-int-range.cc (wide_int_range_div): New.
2329         * wide-int-range.h (wide_int_range_div): New.
2330         (wide_int_range_includes_zero_p): New.
2331         (wide_int_range_zero_p): New.
2333 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
2335         * config/aarch64/aarch64.md (arches): New enum.
2336         (arch): New enum attr.
2337         (arch_enabled): New attr.
2338         (enabled): Now uses arch_enabled only.
2339         (simd, sve, fp16): Removed attribute.
2340         (fp): Attr now defined in terms of 'arch'.
2341         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2342         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2343         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2344         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2345         attributes into 'arch'.
2346         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2347         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2348         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2349         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2350         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2351         'simd' attribute into 'arch'.
2352         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2353         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2354         Convert use of 'fp' attribute to 'arch'.
2355         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2356         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2357         into 'arch'.
2358         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2359         (different modes) Merge 'fp' and 'simd' into 'arch'.
2360         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2361         'simd' into 'arch'.
2363 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
2365         PR rtl-optimization/87026
2366         * expmed.c (canonicalize_comparison): If we can no longer create
2367         pseudoregisters, don't.
2369 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
2371         PR target/86951
2372         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2373         prototype.
2374         * config/arm/arm.c (speculation_barrier_libfunc): New static
2375         variable.
2376         (arm_init_libfuncs): Initialize it.
2377         (arm_emit_speculation_barrier): New function.
2378         * config/arm/arm.md (speculation_barrier): Call
2379         arm_emit_speculation_barrier for architectures that do not have
2380         DSB or ISB.
2381         (speculation_barrier_insn): Only match on Armv7 or later.
2383 2018-08-23  Richard Biener  <rguenther@suse.de>
2385         PR middle-end/87024
2386         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2387         calls.
2389 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
2391         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2392         of single-vector TBLs.
2393         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2394         one input is given.
2396 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
2398         PR target/85910
2399         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2400         aarch64_evpc_tbl guard.
2402 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2404         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2405         behaviour.
2407 2018-08-22  Martin Sebor  <msebor@redhat.com>
2409         PR middle-end/87052
2410         * tree-pretty-print.c (pretty_print_string): Add argument.
2411         (dump_generic_node): Call to pretty_print_string with string size.
2413 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
2415         PR rtl-optimization/86771
2416         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2417         of two SETs into those two SETs, one to be placed at i2, if that SETs
2418         destination is modified between i2 and i3.
2420 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2422         PR tree-optimization/86725
2423         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2424         function.
2425         (vect_analyze_scalar_cycles_1): Check it.
2427 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2429         PR tree-optimization/86725
2430         * tree-vect-loop.c (vect_is_simple_reduction): When treating
2431         an outer loop phi as a double reduction, make sure that the
2432         single user of the phi result is an inner loop phi.
2434 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2436         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2437         grouped stores with gaps to a strided group.
2439 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2441         * tree-vect-stmts.c (get_group_load_store_type)
2442         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2443         first statement in a group.
2445 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2447         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2448         the sequence used in gcc/gcc.c.
2450 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2452         PR other/704
2453         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2454         building it.
2456 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2458         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2459         Darwin10-specific unwinder-shim.
2460         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2461         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
2462         New to cater for Darwin10 Rosetta.
2464 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2466         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2467         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2469 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2471         PR bootstrap/81033
2472         PR target/81733
2473         PR target/52795
2474         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2475         (dwarf2out_switch_text_section): Generate a local label for the
2476         second function sub-section and apply it as the second FDE start
2477         label.
2478         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2479         second sub-section start.
2481 2018-08-22  Richard Biener  <rguenther@suse.de>
2483         PR tree-optimization/86988
2484         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2486 2018-08-22  Richard Biener  <rguenther@suse.de>
2488         PR tree-optimization/86945
2489         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2491 2018-08-22  Alexandre Oliva <oliva@adacore.com>
2493         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2494         a comment about how uses of r2 for .sdata2 come about.
2496 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
2498         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2500 2018-08-21  Marek Polacek  <polacek@redhat.com>
2502         PR c++/86981, Implement -Wpessimizing-move.
2503         * doc/invoke.texi: Document -Wpessimizing-move.
2505 2018-08-21  Jan Hubicka  <jh@suse.cz>
2507         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2508         * tree.h (is_redundant_typedef): Remove.
2509         * dwarf2out.c (is_redundant_typedef): Turn into static function.
2511 2018-08-21  Jan Hubicka  <jh@suse.cz>
2513         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2514         when possible.
2516 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
2518         * expmed.c (extract_low_bits): Reject invalid subregs early.
2520 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2522         PR middle-end/86121
2523         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2524         behaviour.
2526 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2528         * config/vxworks.h: Guard vxworks_asm_out_constructor and
2529         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2530         * config/vxworks.c: Likewise.
2532 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2534         * config/vxworks.c: Set targetm.have_ctors_dtors
2535         if HAVE_INITFINI_ARRAY_SUPPORT.
2536         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2537         if HAVE_INITFINI_ARRAY_SUPPORT.
2539 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2541         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2542         default search path for VxWorks < 7.
2544 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2546         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2547         (get_format_string): Refer to c_getstr.
2549 2018-08-21  Tom de Vries  <tdevries@suse.de>
2551         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2552         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2553         (debuginfo_early_stop): Declare.
2554         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2555         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2556         (debuginfo_early_stop): New function.
2557         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2558         and debuginfo_early_stop.
2559         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2560         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2561         (general_init): Call debuginfo_early_init.
2562         (finalize): Call debuginfo_fini.
2563         (do_compile): Call debuginfo_init.
2564         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2565         -fdump-early-debug.
2566         (@item -fdump-debug, @item -fdump-earlydebug): Add.
2568 2018-08-21  Tom de Vries  <tdevries@suse.de>
2570         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2571         flag_dump_noaddr and flag_dump_unnumbered.
2573 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
2575         * wide-int-range.cc (wide_int_range_abs): New.
2576         (wide_int_range_order_set): Rename from wide_int_range_min_max.
2577         * wide-int-range.h (wide_int_range_abs): New.
2578         (wide_int_range_min_max): New.
2579         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2580         case to call wide_int_range_abs.
2581         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2582         (extract_range_from_abs_expr): Delete.
2584 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
2586         PR target/87033
2587         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2588         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2589         for indexed loads.
2591 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2592             Jeff Law <law@redhat.com>
2594         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2595         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2597 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
2599         PR other/84889
2600         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2601         (decl_attributes): Likewise.
2602         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2603         instance.
2604         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2605         * diagnostic-core.h (class auto_diagnostic_group): New class.
2606         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2607         (diagnostic_report_diagnostic): Handle the first diagnostics within
2608         a group.
2609         (emit_diagnostic): Add auto_diagnostic_group instance.
2610         (inform): Likewise.
2611         (inform_n): Likewise.
2612         (warning): Likewise.
2613         (warning_at): Likewise.
2614         (warning_n): Likewise.
2615         (pedwarn): Likewise.
2616         (permerror): Likewise.
2617         (error): Likewise.
2618         (error_n): Likewise.
2619         (error_at): Likewise.
2620         (sorry): Likewise.
2621         (fatal_error): Likewise.
2622         (internal_error): Likewise.
2623         (internal_error_no_backtrace): Likewise.
2624         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2625         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2626         * diagnostic.h (struct diagnostic_context): Add fields
2627         "diagnostic_group_nesting_depth",
2628         "diagnostic_group_emission_count", "begin_group_cb",
2629         "end_group_cb".
2630         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2631         Add auto_diagnostic_group instance(s).
2632         (find_explicit_erroneous_behavior): Likewise.
2633         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2634         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2635         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2636         (gimplify_va_arg_expr): Likewise.
2637         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2638         (HSA_SORRY_AT): Likewise.
2639         * ipa-devirt.c (compare_virtual_tables): Likewise.
2640         (warn_odr): Likewise.
2641         * multiple_target.c (expand_target_clones): Likewise.
2642         * opts-common.c (cmdline_handle_error): Likewise.
2643         * reginfo.c (globalize_reg): Likewise.
2644         * substring-locations.c (format_warning_n_va): Likewise.
2645         * tree-inline.c (expand_call_inline): Likewise.
2646         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2647         * tree-ssa-loop-niter.c
2648         (do_warn_aggressive_loop_optimizations): Likewise.
2649         * tree-ssa-uninit.c (warn_uninit): Likewise.
2650         * tree.c (warn_deprecated_use): Likewise.
2652 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
2654         PR target/87014
2655         * config/i386/i386.md (eh_return): Always update EH return
2656         address in word_mode.
2658 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
2660         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2661         TARGET_SPLIT_COMPLEX_ARG is defined.
2663 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2665         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2667 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2669         PR target/86984
2670         * expr.c (expand_assignment): Assert that bitpos is positive.
2671         (store_field): Likewise
2672         (expand_expr_real_1): Make sure that bitpos is positive.
2673         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2674         integer overflow.
2676 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2678         * Makefile.in (CPP_ID_DATA_H): Delete.
2679         (CPP_INTERNAL_H): Don't add it.
2680         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2681         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2683 2018-08-20  Richard Biener  <rguenther@suse.de>
2685         PR tree-optimization/78655
2686         * tree-vrp.c (extract_range_from_binary_expr_1): Make
2687         pointer + offset nonnull if either operand is nonnull work.
2689 2018-08-20  Tom de Vries  <tdevries@suse.de>
2691         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2692         unless the referenced die describes the added property using
2693         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
2694         Otherwise, add a DW_AT_location to the referenced die.
2696 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
2698         PR target/86994
2699         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2700         register_operand when calling ix86_set_reg_reg_cost.
2701         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2702         Set *total to 0 for operands that satisfy x86_64_immediate_operand
2703         predicate and to 1 otherwise.
2705 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2707         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2708         emit a diagnostic that it is not supported and reset the option.
2709         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2710         supported and consume the option.  (ASM_FINAL_SPEC): New.
2712 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2714         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2715         a sentence.
2717 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
2719         C-SKY port: Documentation
2721         * doc/extend.texi (C-SKY Function Attributes): New section.
2722         * doc/invoke.texi (Option Summary): Add C-SKY options.
2723         (C-SKY Options): New section.
2724         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2726 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2727             Huibin Wang  <huibin_wang@c-sky.com>
2728             Sandra Loosemore  <sandra@codesourcery.com>
2729             Chung-Lin Tang  <cltang@codesourcery.com>
2731         C-SKY port: Backend implementation
2733         * config/csky/*: New.
2734         * common/config/csky/*: New.
2736 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2737             Huibin Wang  <huibin_wang@c-sky.com>
2738             Sandra Loosemore  <sandra@codesourcery.com>
2739             Chung-Lin Tang  <cltang@codesourcery.com>
2740             Andrew Jenner  <andrew@codesourcery.com>
2742         C-SKY port: Configury
2744         * config.gcc (csky-*-*): New.
2745         * configure.ac: Add csky to targets for dwarf2 debug_line support.
2746         * configure: Regenerated.
2748 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
2750         * dump-context.h: Include "dumpfile.h".
2751         (dump_context::dump_printf_va): Convert final param from va_list
2752         to va_list *.  Convert from ATTRIBUTE_PRINTF to
2753         ATTRIBUTE_GCC_DUMP_PRINTF.
2754         (dump_context::dump_printf_loc_va): Likewise.
2755         * dumpfile.c: Include "stringpool.h".
2756         (make_item_for_dump_printf_va): Delete.
2757         (make_item_for_dump_printf): Delete.
2758         (class dump_pretty_printer): New class.
2759         (dump_pretty_printer::dump_pretty_printer): New ctor.
2760         (dump_pretty_printer::emit_items): New member function.
2761         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2762         function.
2763         (dump_pretty_printer::emit_item): New member function.
2764         (dump_pretty_printer::stash_item): New member function.
2765         (dump_pretty_printer::format_decoder_cb): New member function.
2766         (dump_pretty_printer::decode_format): New member function.
2767         (dump_context::dump_printf_va): Reimplement in terms of
2768         dump_pretty_printer.
2769         (dump_context::dump_printf_loc_va): Convert final param from va_list
2770         to va_list *.
2771         (dump_context::begin_scope): Reimplement call to
2772         make_item_for_dump_printf.
2773         (dump_printf): Update for change to dump_printf_va.
2774         (dump_printf_loc): Likewise.
2775         (selftest::test_capture_of_dump_calls): Convert "stmt" from
2776         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
2777         with %T, %E, and %G.
2778         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2779         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2780         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2781         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2782         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2783         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2784         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2785         within a dump_printf_loc call to "%wu".
2786         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2787         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
2788         missing space after "=".
2789         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2790         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2791         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2792         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2793         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
2794         duplicate "vectorized" from message.
2796 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2798         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2799         polyNxK_t element's TYPE_STRING_FLAG.
2801 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2803         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2804         (they were unnamed before).  Fix comments.
2806 2018-08-17  Nathan Sidwell  <nathan@acm.org>
2808         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2810 2018-08-17  Richard Biener  <rguenther@suse.de>
2812         PR tree-optimization/86841
2813         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2815 2018-08-17  Martin Liska  <mliska@suse.cz>
2817         * common.opt: Remove Warn, Init and Report for options with
2818         Ignore/Deprecated flag. Warning is done automatically for
2819         Deprecated flags.
2820         * config/i386/i386.opt: Likewise.
2821         * config/ia64/ia64.opt: Likewise.
2822         * config/rs6000/rs6000.opt: Likewise.
2823         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2824         Remove usage of flag_check_pointer_bounds.
2825         * lto-wrapper.c (merge_and_complain): Do not handle
2826         OPT_fcheck_pointer_bounds.
2827         (append_compiler_options): Likewise.
2828         * opt-functions.awk: Do not handle Deprecated.
2829         * optc-gen.awk: Check that Var, Report and Init are not
2830         used for an option with Ignore/Deprecated flag.
2831         * opts-common.c (decode_cmdline_option): Do not report
2832         CL_ERR_DEPRECATED.
2833         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2834         options.
2835         * opts.h (struct cl_option): Remove cl_deprecated flag.
2836         (CL_ERR_DEPRECATED): Remove error enum value.
2838 2018-08-17  Richard Biener  <rguenther@suse.de>
2840         PR middle-end/86505
2841         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2842         across a va-arg-pack using call adjust its return value accordingly.
2844 2018-08-16  Martin Sebor  <msebor@redhat.com>
2846         PR tree-optimization/86853
2847         * gimple-ssa-sprintf.c (struct format_result): Rename member.
2848         (struct fmtresult): Add member and initialize it in ctors.
2849         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
2850         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
2851         (format_directive): Set POSUNDER4K when MAYFAIL is set.
2852         (parse_directive): Handle %C same as %c.
2853         (sprintf_dom_walker::compute_format_length): Adjust.
2854         (is_call_safe): Adjust.
2856 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2858         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
2859         for determining how to count the elements.
2860         * builtins.h (c_strlen): Adjust prototype.
2861         * expr.c (string_constant): Add new parameter mem_size.
2862         Set *mem_size appropriately.
2863         * expr.h (string_constant): Adjust protoype.
2864         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2865         * gimple-fold.h (get_range_strlen): Adjust prototype.
2866         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2867         (format_string): Call get_string_length with eltsize.
2869 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2871         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2872         to emit the span, rather than setting it as the prefix.
2874 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2876         * diagnostic-show-locus.c (layout::start_annotation_line): Add
2877         "margin_char" parameter, defaulting to space.  Use it in place
2878         of pp_space for the initial part of the margin.
2879         (layout::print_leading_fixits): Use '+' when filling the margin
2880         of line-insertion fix-it hints.
2882 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2884         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2885         Delete.
2887 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2889         * config/rs6000/altivec.md: Don't set length attribute to the default
2890         value.
2891         * config/rs6000/darwin.md: Ditto.
2892         * config/rs6000/dfp.md: Ditto.
2893         * config/rs6000/htm.md: Ditto.
2894         * config/rs6000/rs6000.md: Ditto.
2895         * config/rs6000/sync.md: Ditto.
2896         * config/rs6000/vsx.md: Ditto.
2898 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2900         * config/rs6000/altivec.md: Don't set length attribute to the default
2901         value, for branch instructions.
2902         * config/rs6000/darwin.md: Ditto.
2903         * config/rs6000/rs6000.md: Ditto.
2905 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2907         * config/rs6000/rs6000.md (length): Always define as const_int 4.
2908         (unnamed conditional branch define_insn): Set length to 4 or 8
2909         depending on offset.
2910         (<bd>_<mode>): Similar, for alternative 0.
2911         (<bd>tf_<mode>): Ditto.
2913 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2915         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2917 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
2919         * doc/rtl.texi: Replace old RTX class names with new names.
2922 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
2924         * expmed.h (canonicalize_comparison): New declaration.
2925         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2926         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2927         * optabs.c (prepare_cmp_insn): Likewise.
2928         * rtl.h (unsigned_condition_p): New function which checks if a
2929         comparison operator is unsigned.
2931 2018-08-16  Nathan Sidwell  <nathan@acm.org>
2933         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2934         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2936 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2938         PR target/84711
2939         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2940         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2941         (mov<mov>): ..this and enable unconditionally.
2943 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2945         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2947 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
2949         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2950         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2951         "Common" with "Target".
2953 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2955         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2956         * doc/invoke.texi (mmitigate-rop): Remove.
2957         * config/i386/i386.c: Do not include "regrename.h".
2958         (ix86_rop_should_change_byte_p, reg_encoded_number)
2959         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2960         Remove.
2961         (ix86_reorg): Remove call to ix86_mitigate_rop.
2962         * config/i386/i386.md (attr "modrm_class"): Remove.
2963         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2964         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2965         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2967 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2969         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2970         allow folding of mergeh() and mergel() for the float and double types.
2971         (fold_mergehl_helper): Rework to handle building a permute tree
2972         for float vectors.
2974 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2976         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2977         for TARGET_SSE.
2979 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2981         * common.opt (fdiagnostics-show-labels): New option.
2982         * diagnostic-show-locus.c (class layout_range): Add field
2983         "m_label".
2984         (class layout): Add field "m_show_labels_p".
2985         (layout_range::layout_range): Add param "label" and use it to
2986         initialize m_label.
2987         (make_range): Pass in NULL for new "label" param of layout_range's
2988         ctor.
2989         (layout::layout): Initialize m_show_labels_p.
2990         (layout::maybe_add_location_range): Pass in loc_range->m_label
2991         when constructing layout_range instances.
2992         (struct line_label): New struct.
2993         (layout::print_any_labels): New member function.
2994         (layout::print_line): Call it if label-printing is enabled.
2995         (selftest::test_one_liner_labels): New test.
2996         (selftest::test_diagnostic_show_locus_one_liner): Call it.
2997         * diagnostic.c (diagnostic_initialize): Initialize
2998         context->show_labels_p.
2999         * diagnostic.h (struct diagnostic_context): Add field
3000         "show_labels_p".
3001         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3002         -fno-diagnostics-show-labels.
3003         * dwarf2out.c (gen_producer_string): Add
3004         OPT_fdiagnostics_show_labels to the ignored options.
3005         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
3006         param.
3007         (gcc_rich_location::maybe_add_expr): Likewise.
3008         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
3009         label" param, defaulting to NULL.
3010         (gcc_rich_location::add_expr): Add "label" param.
3011         (gcc_rich_location::maybe_add_expr): Likewise.
3012         (class text_range_label): New class.
3013         (class range_label_for_type_mismatch): New class.
3014         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
3015         of format_warning_va.
3016         (fmtwarn_n): Likewise for new params of format_warning_n_va.
3017         * lto-wrapper.c (merge_and_complain): Add
3018         OPT_fdiagnostics_show_labels to the "pick one setting" options.
3019         (append_compiler_options): Likewise to the dropped options.
3020         (append_diag_options): Likewise to the passed-on options.
3021         * opts.c (common_handle_option): Handle the new option.
3022         * selftest-diagnostic.c
3023         (test_diagnostic_context::test_diagnostic_context): Enable
3024         show_labels_p.
3025         * substring-locations.c: Include "gcc-rich-location.h".
3026         (format_warning_n_va): Add "fmt_label" and "param_label" params
3027         and use them as appropriate.
3028         (format_warning_va): Add "fmt_label" and "param_label" params,
3029         passing them on to format_warning_n_va.
3030         (format_warning_at_substring): Likewise.
3031         (format_warning_at_substring_n): Likewise.
3032         * substring-locations.h (format_warning_va): Add "fmt_label" and
3033         "param_label" params.
3034         (format_warning_n_va): Likewise.
3035         (format_warning_at_substring): Likewise.
3036         (format_warning_at_substring_n): Likewise.
3037         * toplev.c (general_init): Initialize global_dc->show_labels_p.
3039 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
3041         PR testsuite/86519
3042         * builtins.c (expand_builtin_memcmp): Do not expand the call
3043         when overflow is detected.
3045 2018-08-15  Martin Sebor  <msebor@redhat.com>
3047         PR tree-optimization/71625
3048         * config/aarch64/aarch64-builtins.c
3049         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3051 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
3053         * config/s390/s390.c (s390_reorg): Remove loop.
3055 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
3057         * config/darwin.c
3058          (darwin_function_switched_text_sections): Delete.
3059         * gcc/config/darwin.h
3060          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3062 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
3064         PR target/81685
3065         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3066         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
3067         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3069 2018-08-15  Martin Liska  <mliska@suse.cz>
3071         PR tree-optimization/86925
3072         * predict.c (expr_expected_value_1): When taking
3073         later predictor, assign also probability.
3074         Use fold_build2_initializer_loc in order to fold
3075         the expression in -frounding-math.
3077 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
3079         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3080         patterns.
3081         (expand_vec_perm_1): Try the new method.
3083 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
3085         PR target/86547
3086         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3087         Check whether lra_live_max_point is 0 before dividing.
3089 2018-08-14  Martin Sebor  <msebor@redhat.com>
3091         PR tree-optimization/86650
3092         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3093         (vrp_prop::check_mem_ref): Same.
3095 2018-08-13  Liu Hao <lh_mouse@126.com>
3097         * pretty-print.c (eat_esc_sequence): Swap the foreground and
3098         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3099         and clear it thereafter, as it only works for DBCS.
3101 2018-08-13  Liu Hao <lh_mouse@126.com>
3103         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3104         handle returned by _get_osf_handle().
3106 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
3108         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3109         for folding vec_perm.
3111 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
3113         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3114         Add support for gimple-folding of vec_pack() and vec_unpack()
3115         intrinsics.
3117 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
3119         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3120         vec_xst variants to the list.
3121         (rs6000_gimple_fold_builtin): Add support for folding unaligned
3122         vector loads and stores.
3124 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
3126         * config.gcc (rs6000-ibm-aix4.x): Delete.
3127         (rs6000-ibm-aix5.1): Delete.
3128         (rs6000-ibm-aix5.2): Delete.
3129         (rs6000-ibm-aix5.3): Delete.
3130         * config/rs6000/aix43.h: Delete.
3131         * config/rs6000/aix51.h: Delete.
3132         * config/rs6000/aix52.h: Delete.
3133         * config/rs6000/t-aix43: Delete.
3135 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
3137         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3138         New function.
3139         (s390_decompose_address): Factor out constant pool ref
3140         decomposition.
3142 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3144         * config/nds32/nds32-predicates.c
3145         (nds32_can_use_bclr_p): Change return type as bool.
3146         (nds32_can_use_bset_p): Ditto.
3147         (nds32_can_use_btgl_p): Ditto.
3148         (nds32_can_use_bitci_p): Ditto.
3149         * config/nds32/nds32-protos.h
3150         (nds32_can_use_bclr_p): Change declaration.
3151         (nds32_can_use_bset_p): Ditto.
3152         (nds32_can_use_btgl_p): Ditto.
3153         (nds32_can_use_bitci_p): Ditto.
3155 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3157         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3158         Support -msched-prolog-epilog option.
3159         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3161 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3163         * common/config/nds32/nds32-common.c
3164         (nds32_option_optimization_table): Enalbe -malways-align.
3166 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3168         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3169         extra_headers.
3170         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3171         OPT_misr_secure_ case.
3172         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3173         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3174         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3175         secure attribute.
3176         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3177         (nds32_isr_info): New field security_level.
3178         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3179         * config/nds32/nds32.md (return_internal): Consider critical attribute.
3180         * config/nds32/nds32.opt (misr-secure): New option.
3181         * config/nds32/nds32_init.inc: New file.
3182         * config/nds32/nds32_isr.h: New file.
3184 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
3186         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3187         Update comment for atomic instructions.
3188         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3189         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3190         Remove.
3191         (atomic_loaddi): Revise fence expansion to only emit fence prior to
3192         load for __ATOMIC_SEQ_CST model.
3193         (atomic_loaddi_1): Remove float register target.
3194         (atomic_storedi): Handle CONST_INT values.
3195         (atomic_storedi_1): Remove float register source.  Add special case
3196         for zero value.
3197         (memory_barrier): New expander and insn.
3199 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
3201         PR tree-optimization/86835
3202         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3203         new_stmt after def_gsi, make sure to insert new_square_stmt after
3204         that stmt, not 2 stmts before it.
3206 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
3208         PR target/82418
3209         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3210         instead of SWI48.
3212 2018-08-10  Martin Liska  <mliska@suse.cz>
3214         PR target/83610
3215         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3216         function type.
3217         * builtins.c (expand_builtin_expect_with_probability):
3218         New function.
3219         (expand_builtin_expect_with_probability): New function.
3220         (build_builtin_expect_predicate): Add new argumnet probability
3221         for BUILT_IN_EXPECT_WITH_PROBABILITY.
3222         (fold_builtin_expect):
3223         (fold_builtin_2):
3224         (fold_builtin_3):
3225         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3226         * builtins.h (fold_builtin_expect): Set new argument.
3227         * doc/extend.texi: Document __builtin_expect_with_probability.
3228         * doc/invoke.texi: Likewise.
3229         * gimple-fold.c (gimple_fold_call): Pass new argument.
3230         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3231         also BUILT_IN_EXPECT_WITH_PROBABILITY.
3232         * predict.c (get_predictor_value): New function.
3233         (expr_expected_value): Add new argument probability. Assume
3234         that predictor and probability are always non-null.
3235         (expr_expected_value_1): Likewise.  For __builtin_expect and
3236         __builtin_expect_with_probability set probability.  Handle
3237         combination in binary expressions.
3238         (tree_predict_by_opcode): Simplify code by simply calling
3239         get_predictor_value.
3240         (pass_strip_predict_hints::execute): Add handling of
3241         BUILT_IN_EXPECT_WITH_PROBABILITY.
3242         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3243         new predictor.
3244         * tree.h (DECL_BUILT_IN_P): New function.
3246 2018-08-10  Martin Liska  <mliska@suse.cz>
3248         PR tree-optimization/85799
3249         * passes.def: Add argument for pass_strip_predict_hints.
3250         * predict.c (class pass_strip_predict_hints): Add new argument
3251         early_p.
3252         (strip_predictor_early): New function.
3253         (pass_strip_predict_hints::execute): Call the function to
3254         strip predictors.
3255         (strip_predict_hints): New function.
3256         * predict.def: Fix comment.
3258 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
3260         * Makefile.in: Clarify which tm.texi to copy over to assert the
3261         right to grant a GFDL license for all.
3263 2018-08-09  Jeff Law  <law@redhat.com>
3265         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3266         unused variable.
3268 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
3270         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3271         prototype.
3273 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
3275         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3276         reductions for variable-length vectors.
3278 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
3280         PR other/84889
3281         * common.opt (fdiagnostics-show-line-numbers): New option.
3282         * diagnostic-show-locus.c (class layout): Add fields
3283         "m_show_line_numbers_p" and "m_linenum_width";
3284         (num_digits): New function.
3285         (test_num_digits): New function.
3286         (layout::layout): Initialize new fields.  Update m_x_offset
3287         logic to handle any left margin.
3288         (layout::print_source_line): Print line number when requested.
3289         (layout::start_annotation_line): New member function.
3290         (layout::print_annotation_line): Call it.
3291         (layout::print_leading_fixits): Likewise.
3292         (layout::print_trailing_fixits): Likewise.  Update calls to
3293         move_to_column for new parameter.
3294         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3295         it to potentially call start_annotation_line.
3296         (layout::show_ruler): Call start_annotation_line.
3297         (selftest::test_line_numbers_multiline_range): New selftest.
3298         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3299         and selftest::test_line_numbers_multiline_range.
3300         * diagnostic.c (diagnostic_initialize): Initialize
3301         show_line_numbers_p.
3302         * diagnostic.h (struct diagnostic_context): Add field
3303         "show_line_numbers_p".
3304         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3305         -fno-diagnostics-show-line-numbers.
3306         * dwarf2out.c (gen_producer_string): Add
3307         OPT_fdiagnostics_show_line_numbers to the ignored options.
3308         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3309         one setting" options.
3310         (append_compiler_options): Likewise to the dropped options.
3311         (append_diag_options): Likewise to the passed-on options.
3312         * opts.c (common_handle_option): Handle the new option.
3313         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3315 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3317         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3318         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
3319         third argument of type "const signed char" to descriptions of
3320         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3321         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3322         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3323         __builtin_bcdsub_ov functions.
3325 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
3327         PR tree-optimization/86858
3328         * tree-vect-loop.c (vect_is_simple_reduction): Restore
3329         flow_bb_inside_loop_p calls.
3331 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
3333         PR tree-optimization/86871
3334         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3335         instead of gimple_assign_lhs.
3337 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
3339         PR target/86887
3340         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3341         register constraint to operand 0.
3342         (add<mode>3_carryinC): Likewise.
3343         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3345 2018-08-09  Martin Liska  <mliska@suse.cz>
3347         PR c/86895
3348         * common.opt: Remove extra line.
3350 2018-08-09  Martin Liska  <mliska@suse.cz>
3352         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3353         at the end of a line, make first letter capital and end up
3354         a sentence with a dot.
3355         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3356         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3357         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3358         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3359         (PARAM_MAX_ISL_OPERATIONS): Likewise.
3360         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3361         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3362         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3363         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3364         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3365         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3366         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3367         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3368         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3369         (PARAM_TREE_REASSOC_WIDTH): Likewise.
3370         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3371         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3372         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3374 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
3376         PR target/84332
3377         * config/s390/s390.c (s390_option_override_internal): Reduce the
3378         stack-clash-protection-probe-interval param if it would be too big
3379         for z900.
3381 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
3383         PR target/46179
3384         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3385         * config/m68k/m68k.c (handle_move_double): Don't call
3386         m68k_final_prescan_insn.
3387         (m68k_adjust_decorated_operand): Renamed from
3388         m68k_final_prescan_insn, remove first and third operand and
3389         simplify.
3390         (print_operand): Call it.
3391         (print_operand_address): Call it.
3393 2018-08-08  Nathan Sidwell  <nathan@acm.org>
3395         * diagnostic.c (diagnostic_report_current_module): Use
3396         linemap_included_from & linemap_included_from_linemap.
3398 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
3400         * config/aarch64/aarch64-cores.def: Add phecda core.
3401         * config/aarch64/aarch64-tune.md: Regenerate.
3402         * doc/invoke.texi: Add phecda core.
3404 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
3406         PR target/85295
3407         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3408         definitions.
3409         * config/s390/s390.md ("movti"): Add more alternatives for
3410         constant to GPR copies.
3412 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
3414         * config/s390/s390.c: Fix whitespace damage throughout the file.
3415         * config/s390/s390.h: Likewise.
3416         * config/s390/tpf.h: Likewise.
3418 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
3420         * config/s390/s390.c (s390_loadrelative_operand_p):
3421         Remove TARGET_CPU_ZARCH usages.
3422         (s390_rtx_costs): Likewise.
3423         (s390_legitimate_constant_p): Likewise.
3424         (s390_cannot_force_const_mem): Likewise.
3425         (legitimate_reload_constant_p): Likewise.
3426         (s390_preferred_reload_class): Likewise.
3427         (legitimize_pic_address): Likewise.
3428         (legitimize_tls_address): Likewise.
3429         (s390_split_branches): Removed.
3430         (s390_add_execute): Removed.
3431         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3432         (s390_mainpool_start): Likewise.
3433         (s390_mainpool_finish): Likewise.
3434         (s390_mainpool_cancel): Removed.
3435         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3436         (s390_chunkify_cancel): Likewise.
3437         (s390_return_addr_rtx): Likewise.
3438         (s390_register_info): Remove split_branches_pending_p uages.
3439         (s390_optimize_register_info): Likewise.
3440         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3441         split_branches_pending_p usages.
3442         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3443         (s390_load_got): Likewise.
3444         (s390_expand_split_stack_prologue): Likewise.
3445         (output_asm_nops): Likewise.
3446         (s390_function_profiler): Likewise.
3447         (s390_emit_call): Likewise.
3448         (s390_conditional_register_usage): Likewise.
3449         (s390_optimize_prologue): Likewise.
3450         (s390_reorg): Remove TARGET_CPU_ZARCH and
3451         split_branches_pending_p usages.
3452         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3453         usages.
3454         (s390_output_indirect_thunk_function): Likewise.
3455         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3456         (TARGET_CPU_ZARCH_P): Removed.
3457         (struct machine_function): Remove split_branches_pending_p.
3458         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3460 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
3462         * common/config/s390/s390-common.c (processor_flags_table):
3463         Remove flags.
3464         * config.gcc: Remove with_arch/with_tune support.
3465         * config/s390/2064.md: Remove cpu attribute comparisons.
3466         * config/s390/driver-native.c (s390_host_detect_local_cpu):
3467         Remove MTN.
3468         * config/s390/linux.h (ASM_SPEC):
3469         Remove -march support.
3470         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3471         Use a table to get an arch level.
3472         * config/s390/s390-opts.h (enum processor_type):
3473         Remove enum values.
3474         * config/s390/s390.c
3475         (processor_table): Remove entries, add arch_level values.
3476         (s390_issue_rate): Remove cases.
3477         (s390_option_override): Adjust
3478         s390_option_override_internal() call.
3479         (s390_option_override_internal): Remove deprecation warning.
3480         (s390_valid_target_attribute_tree): Adjust
3481         s390_option_override_internal() call.
3482         * config/s390/s390.h (struct s390_processor):
3483         Share with s390-c.c, add arch_level field.
3484         * config/s390/s390.md:
3485         Remove occurrences in cpu attribute.
3486         * config/s390/s390.opt: Remove -march/-mtune support.
3487         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3488         * doc/invoke.texi: Remove deprecation warning.
3490 2018-08-08  Luis Machado  <luis.machado@linaro.org>
3492         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3493         global.
3494         (qdf24xx_tunings): Set vector cost structure to
3495         qdf24xx_vector_cost.
3497         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3498         <register_sextend>: Set to 3.
3500 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
3502         PR target/86838
3503         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3504         * config/aarch64/aarch64-simd.md
3505         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3506         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3507         (aarch64_frecpx<mode>): ...this new pattern.
3508         * config/aarch64/aarch64-simd-builtins.def: Remove comment
3509         about aarch64_frecp<FRECP:frecp_suffix><mode>.
3511 2018-08-07  Martin Liska  <mliska@suse.cz>
3513         PR middle-end/83023
3514         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3515         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3516         * predict.def (PRED_MALLOC_NONNULL): New predictor.
3517         * doc/extend.texi: Document that malloc attribute adds
3518         hit to compiler.
3520 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
3522         PR target/86785
3523         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3524         Define to speculation_safe_value_not_needed.
3526 2018-08-06  Jeff Law  <law@redhat.com>
3528         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3529         the vr_values instance to cprop_into_stmt.
3530         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3531         (cprop_operand): Also query EVRP to determine if OP is a constant.
3533 2018-08-06  Nathan Sidwell  <nathan@acm.org>
3535         * diagnostic.c (diagnostic_report_current_module): Reroll
3536         included-at loop.  Translate text.
3538 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
3540         * function-tests.c (selftest::test_expansion_to_rtl): Call
3541         free_after_compilation.
3543 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3545         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3547 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
3549         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3550         loops with memory block operations from getting unrolled.
3552 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
3554         PR target/86807
3555         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3556         Define to speculation_safe_value_not_needed.
3558 2018-08-06  Jeff Law  <law@redhat.com>
3560         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3561         assert.
3563 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3565         PR target/86662
3566         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3567         with all enabled __intN types.
3569         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3571 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3573         * alias.c (record_set): Check for clobber high.
3574         * cfgexpand.c (expand_gimple_stmt): Likewise.
3575         * combine-stack-adj.c (single_set_for_csa): Likewise.
3576         * combine.c (find_single_use_1): Likewise.
3577         (set_nonzero_bits_and_sign_copies): Likewise.
3578         (get_combine_src_dest): Likewise.
3579         (is_parallel_of_n_reg_sets): Likewise.
3580         (try_combine): Likewise.
3581         (record_dead_and_set_regs_1): Likewise.
3582         (reg_dead_at_p_1): Likewise.
3583         (reg_dead_at_p): Likewise.
3584         * dce.c (deletable_insn_p): Likewise.
3585         (mark_nonreg_stores_1): Likewise.
3586         (mark_nonreg_stores_2): Likewise.
3587         * df-scan.c (df_find_hard_reg_defs): Likewise.
3588         (df_uses_record): Likewise.
3589         (df_get_call_refs): Likewise.
3590         * dwarf2out.c (mem_loc_descriptor): Likewise.
3591         * haifa-sched.c (haifa_classify_rtx): Likewise.
3592         * ira-build.c (create_insn_allocnos): Likewise.
3593         * ira-costs.c (scan_one_insn): Likewise.
3594         * ira.c (equiv_init_movable_p): Likewise.
3595         (rtx_moveable_p): Likewise.
3596         (interesting_dest_for_shprep): Likewise.
3597         * jump.c (mark_jump_label_1): Likewise.
3598         * postreload-gcse.c (record_opr_changes): Likewise.
3599         * postreload.c (reload_cse_simplify): Likewise.
3600         (struct reg_use): Add source expr.
3601         (reload_combine): Check for clobber high.
3602         (reload_combine_note_use): Likewise.
3603         (reload_cse_move2add): Likewise.
3604         (move2add_note_store): Likewise.
3605         * print-rtl.c (print_pattern): Likewise.
3606         * recog.c (decode_asm_operands): Likewise.
3607         (store_data_bypass_p): Likewise.
3608         (if_test_bypass_p): Likewise.
3609         * regcprop.c (kill_clobbered_value): Likewise.
3610         (kill_set_value): Likewise.
3611         * reginfo.c (reg_scan_mark_refs): Likewise.
3612         * reload1.c (maybe_fix_stack_asms): Likewise.
3613         (eliminate_regs_1): Likewise.
3614         (elimination_effects): Likewise.
3615         (mark_not_eliminable): Likewise.
3616         (scan_paradoxical_subregs): Likewise.
3617         (forget_old_reloads_1): Likewise.
3618         * reorg.c (find_end_label): Likewise.
3619         (try_merge_delay_insns): Likewise.
3620         (redundant_insn): Likewise.
3621         (own_thread_p): Likewise.
3622         (fill_simple_delay_slots): Likewise.
3623         (fill_slots_from_thread): Likewise.
3624         (dbr_schedule): Likewise.
3625         * resource.c (update_live_status): Likewise.
3626         (mark_referenced_resources): Likewise.
3627         (mark_set_resources): Likewise.
3628         * rtl.c (copy_rtx): Likewise.
3629         * rtlanal.c (reg_referenced_p): Likewise.
3630         (single_set_2): Likewise.
3631         (noop_move_p): Likewise.
3632         (note_stores): Likewise.
3633         * sched-deps.c (sched_analyze_reg): Likewise.
3634         (sched_analyze_insn): Likewise.
3636 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3638         * cse.c (invalidate_reg): New function extracted from...
3639         (invalidate): ...here.
3640         (canonicalize_insn): Check for clobber high.
3641         (invalidate_from_clobbers): invalidate clobber highs.
3642         (invalidate_from_sets_and_clobbers): Likewise.
3643         (count_reg_usage): Check for clobber high.
3644         (insn_live_p): Likewise.
3645         * cselib.c (cselib_expand_value_rtx_1):Likewise.
3646         (cselib_invalidate_regno): Check for clobber in setter.
3647         (cselib_invalidate_rtx): Pass through setter.
3648         (cselib_invalidate_rtx_note_stores):
3649         (cselib_process_insn): Check for clobber high.
3650         * cselib.h (cselib_invalidate_rtx): Add operand.
3652 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3654         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3655         (mark_not_eliminable): Likewise.
3656         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3657         * lra-lives.c (process_bb_lives): Check for clobber high.
3658         * lra.c (new_insn_reg): Remember clobber highs.
3659         (collect_non_operand_hard_regs): Check for clobber high.
3660         (lra_set_insn_recog_data): Likewise.
3661         (add_regs_to_insn_regno_info): Likewise.
3662         (lra_update_insn_regno_info): Likewise.
3664 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3666         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3667         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3669 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3671         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3672         (copy_insn_1): Likewise.
3673         (gen_hard_reg_clobber_high): New gen function.
3674         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3675         * genemit.c (gen_exp): Likewise.
3676         (gen_emit_seq): Pass through info.
3677         (gen_insn): Check for CLOBBER_HIGH.
3678         (gen_expand): Pass through info.
3679         (gen_split): Likewise.
3680         (output_add_clobbers): Likewise.
3681         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3682         (remove_clobbers): Likewise.
3683         * rtl.h (gen_hard_reg_clobber_high): New declaration.
3685 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3687         * doc/rtl.texi (clobber_high): Add.
3688         (parallel): Add in clobber high
3689         * rtl.c (rtl_check_failed_code3): Add function.
3690         * rtl.def (CLOBBER_HIGH): Add expression.
3691         * rtl.h (RTL_CHECKC3): Add macro.
3692         (rtl_check_failed_code3): Add declaration.
3693         (XC3EXP): Add macro.
3695 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
3697         PR target/86386
3698         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3699         cfun->machine->max_used_stack_alignment if needed.
3701 2018-08-04  Martin Sebor  <msebor@redhat.com>
3703         PR tree-optimization/86571
3704         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3705         NaN output to 4.
3707 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3709         PR target/86799
3710         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3711         Define.
3713 2018-08-03  Jeff Law  <law@redhat.com>
3715         PR target/86795
3716         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3717         Define to speculation_safe_value_not_needed.
3719 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
3721         * doc/gcov.texi (-x): Remove duplicate "to".
3722         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3723         (-Wif-not-aligned): Remove duplicate "is".
3724         (-flto): Remove duplicate "the".
3725         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3726         duplicate "v5.00.b".
3727         (MSP430 Options): Remove duplicate "and" from the description
3728         of "-mgprel-sec=regexp".
3729         (x86 Options): Remove duplicate copies of "vmldLog102" and
3730         vmlsLog104 from description of "-mveclibabi=type".
3732 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
3734         * internal-fn.h (first_commutative_argument): Declare.
3735         * internal-fn.c (first_commutative_argument): New function.
3736         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3737         restrictions for pattern statements.  Use first_commutative_argument
3738         to look for commutative operands in calls to internal functions.
3740 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
3742         * Makefile.in (wide-int-range.o): New.
3743         * tree-vrp.c: Move all the wide_int_* functions to...
3744         * wide-int-range.cc: ...here.
3745         * tree-vrp.h: Move all the wide_int_* prototypes to...
3746         * wide-int-range.h: ...here.
3748 2018-08-03  Tom de Vries  <tdevries@suse.de>
3750         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3751         UI_NONE.
3752         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3753         * except.c (output_function_exception_table): Do early exit if
3754         targetm_common.except_unwind_info (&global_options) == UI_NONE.
3756 2018-08-03  Martin Liska  <mliska@suse.cz>
3758         * predict.c (dump_prediction): Change to 2 digits
3759         in fraction part.
3761 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3763         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3764         neon_dup_q to...
3765         (falkor_am_1_gtov_gtov): ... a new insn reservation.
3767 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3769         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3770         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3771         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3772         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3773         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3775 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3777         * diagnostic-show-locus.c (diagnostic_show_locus): Use
3778         pp_take_prefix when saving the existing prefix.
3779         * diagnostic.c (diagnostic_append_note): Likewise.
3780         * langhooks.c (lhd_print_error_function): Likewise.
3781         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3782         param's type.  Free the existing prefix.
3783         (pp_take_prefix): New function.
3784         (pretty_printer::pretty_printer): Drop the prefix parameter.
3785         Rename the length parameter to match the comment.
3786         (pretty_printer::~pretty_printer): Free the prefix.
3787         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3788         parameter.
3789         (struct pretty_printer): Drop the "const" from "prefix" field's
3790         type and clarify memory management.
3791         (pp_set_prefix): Drop the "const" from the 2nd param.
3792         (pp_take_prefix): New decl.
3794 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3796         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3797         for word_mode_ok here instead of passing as argument.
3798         (expand_block_compare): Change select_block_compare_mode() call.
3799         (expand_strncmp_gpr_sequence): New function.
3800         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3802 2018-08-02  Jeff Law  <law@redhat.com>
3804         PR target/86790
3805         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3806         Define to speculation_safe_value_not_needed.
3808         PR target/86784
3809         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3810         Define to speculation_safe_value_not_needed.
3812 2018-08-02  Tom de Vries  <tdevries@suse.de>
3814         PR target/86660
3815         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3816         function.  Return UI_TARGET unconditionally.
3817         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3818         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3820 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3822         * genemit.c (print_overload_test): Fix typo.
3824 2018-08-02  Richard Biener  <rguenther@suse.de>
3826         PR tree-optimization/86816
3827         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3828         which checks for value availability before querying it.
3829         (gvn_uses_equal): Use it.
3830         (same_succ_hash): Likewise.
3831         (gimple_equal_p): Likewise.
3833 2018-08-02  Nick Clifton  <nickc@redhat.com>
3835         PR target/86813
3836         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3837         Define to speculation_safe_value_not_needed.
3839         PR target/86810
3840         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3841         Define to speculation_safe_value_not_needed.
3843         PR target/86810
3844         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3845         Define to speculation_safe_value_not_needed.
3847         PR target/86803
3848         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3849         Define to speculation_safe_value_not_needed.
3851         PR target/86797
3852         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3853         Define to speculation_safe_value_not_needed.
3855         PR target/86791
3856         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3857         Define to speculation_safe_value_not_needed.
3859         PR target/86789
3860         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3861         Define to speculation_safe_value_not_needed.
3863         PR target/86787
3864         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3865         Define to speculation_safe_value_not_needed.
3867         PR target/86782
3868         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3869         speculation_safe_value_not_needed.
3871         PR target/86781
3872         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3873         to speculation_safe_value_not_needed.
3875 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3877         * doc/md.texi: Expand the documentation of instruction names
3878         to mention port-local uses.  Document '@' in pattern names.
3879         * read-md.h (overloaded_instance, overloaded_name): New structs.
3880         (mapping): Declare.
3881         (md_reader::handle_overloaded_name): New member function.
3882         (md_reader::get_overloads): Likewise.
3883         (md_reader::m_first_overload): New member variable.
3884         (md_reader::m_next_overload_ptr): Likewise.
3885         (md_reader::m_overloads_htab): Likewise.
3886         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3887         m_next_overload_ptr and m_overloads_htab.
3888         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3889         (get_mode_token, get_code_token, get_int_token): New functions.
3890         (map_attr_string): Add an optional argument that passes back
3891         the associated iterator.
3892         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3893         (md_reader::handle_overloaded_name, add_overload_instance): New
3894         functions.
3895         (apply_iterators): Handle '@' names.  Report an error if '@'
3896         is used without iterators.
3897         (initialize_iterators): Initialize the new iterator_group fields.
3898         * genopinit.c (handle_overloaded_code_for)
3899         (handle_overloaded_gen): New functions.
3900         (main): Use them to print declarations of maybe_code_for_* and
3901         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3902         * genemit.c (print_overload_arguments, print_overload_test)
3903         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3904         (main): Use it to print definitions of maybe_code_for_* and
3905         maybe_gen_* functions.
3906         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3907         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3908         instead of explicit mode checks.
3909         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3910         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3911         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3912         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3913         (aarch64_expand_compare_and_swap): Likewise
3914         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3915         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3916         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3917         (aarch64_constant_pool_reload_icode): Delete.
3918         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3919         instead of aarch64_constant_pool_reload_icode.  Use
3920         code_for_aarch64_reload_mov instead of explicit mode checks.
3921         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3922         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3923         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3924         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3925         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3926         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3927         (aarch64_atomic_load_op_code): Delete.
3928         (aarch64_emit_atomic_load_op): Likewise.
3929         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3930         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
3931         instead of aarch64_emit_atomic_load_op.
3932         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3933         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3934         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3935         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3936         character before the pattern name.
3937         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3938         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3939         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3940         (aarch64_frecps<mode>): Likewise.
3941         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3942         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3943         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3944         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3945         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3947 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3949         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3950         Allow HFmode constants if TARGET_FP_F16INST.
3952 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
3954         PR target/86014
3955         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3956         No longer check last store for clobber of address register.
3958 2018-08-02  Martin Liska  <mliska@suse.cz>
3960         PR gcov-profile/86817
3961         * gcov.c (process_all_functions): New function.
3962         (main): Call it.
3963         (process_file): Move functions processing to
3964         process_all_functions.
3966 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3968         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3969         "const" to the "gimple *" and "rtx_insn *" parameters.
3970         * dumpfile.h (dump_user_location_t::dump_user_location_t):
3971         Likewise.
3972         (dump_location_t::dump_location_t): Likewise.
3974 2018-08-01  Martin Sebor  <msebor@redhat.com>
3976         PR tree-optimization/86650
3977         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3978         rather than a "gcall *".  Directly pass the data of interest
3979         to percent_K_format, rather than building a temporary CALL_EXPR
3980         to hold it.
3981         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3982         (gimple_fold_builtin_strncat): Adjust.
3983         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3984         gcall* argument with gimple*.
3985         * gimple-ssa-warn-restrict.c (check_call): Same.
3986         (wrestrict_dom_walker::before_dom_children): Same.
3987         (builtin_access::builtin_access): Same.
3988         (check_bounds_or_overlap): Same
3989         (maybe_diag_overlap): Same.
3990         (maybe_diag_offset_bounds): Same.
3991         * tree-diagnostic.c (default_tree_printer): Move usage of
3992         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3993         to this callsite.
3994         * tree-pretty-print.c (percent_K_format): Add argument.
3995         * tree-pretty-print.h: Add argument.
3996         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3997         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3998         (maybe_diag_stxncpy_trunc): Same.
3999         (handle_builtin_stxncpy): Same.
4000         (handle_builtin_strcat): Same.
4002 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4004         * match.pd: Optimise pointer range checks.
4006 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4008         PR tree-optimization/86758
4009         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
4010         to remove pattern statements.
4012 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4014         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
4015         result of dfs_enumerate_from when constructing stmt_vec_infos,
4016         instead of additionally calling get_loop_body.
4018 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4020         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
4021         parameter.
4022         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
4023         When creating an iv, assert that the step is not known to be zero.
4024         (vect_setup_realignment): Update call accordingly.
4025         * tree-vect-stmts.c (vectorizable_store): Likewise.
4026         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
4028 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4030         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
4031         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
4032         (vectorizable_reduction): Likewise.
4033         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4034         (vect_detect_hybrid_slp_stmts): Likewise.
4035         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4037 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
4039         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
4040         (wide_int_set_zero_nonzero_bits): ...this.
4041         (zero_nonzero_bits_from_vr): Rename to...
4042         (vrp_set_zero_nonzero_bits): ...this.
4043         (extract_range_from_multiplicative_op_1): Abstract wide int
4044         code...
4045         (wide_int_range_multiplicative_op): ...here.
4046         (extract_range_from_binary_expr_1): Extract wide int binary
4047         operations into their own functions.
4048         (wide_int_range_lshift): New.
4049         (wide_int_range_can_optimize_bit_op): New.
4050         (wide_int_range_shift_undefined_p): New.
4051         (wide_int_range_bit_xor): New.
4052         (wide_int_range_bit_ior): New.
4053         (wide_int_range_bit_and): New.
4054         (wide_int_range_trunc_mod): New.
4055         (extract_range_into_wide_ints): New.
4056         (vrp_shift_undefined_p): New.
4057         (extract_range_from_multiplicative_op): New.
4058         (vrp_can_optimize_bit_op): New.
4059         * tree-vrp.h (value_range::dump): New.
4060         (wide_int_range_multiplicative_op): New.
4061         (wide_int_range_lshift):New.
4062         (wide_int_range_shift_undefined_p): New.
4063         (wide_int_range_bit_xor): New.
4064         (wide_int_range_bit_ior): New.
4065         (wide_int_range_bit_and): New.
4066         (wide_int_range_trunc_mod): New.
4067         (zero_nonzero_bits_from_bounds): Rename to...
4068         (wide_int_set_zero_nonzero_bits): ...this.
4069         (zero_nonzero_bits_from_vr): Rename to...
4070         (vrp_set_zero_nonzero_bits): ...this.
4071         (range_easy_mask_min_max): Rename to...
4072         (wide_int_range_can_optimize_bit_op): this.
4073         * vr-values.c (simplify_bit_ops_using_ranges): Rename
4074         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4076 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4078         * tree-vectorizer.h (vect_orig_stmt): New function.
4079         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4080         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4081         (vect_create_epilog_for_reduction): Likewise.
4082         (vectorizable_live_operation): Likewise.
4083         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4084         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4085         * tree-vect-stmts.c (vectorizable_call): Likewise.
4086         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4088 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4090         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4091         argument.
4092         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4093         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4094         (vect_transform_loop): Likewise.
4095         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4097 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4099         * tree-vectorizer.h (vect_schedule_slp): Return void.
4100         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4101         (vect_schedule_slp): Likewise.
4103 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4105         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4106         argument.
4107         (vect_transform_loop): Update calls accordingly.  Schedule SLP
4108         instances before the main loop, if any exist.
4110 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
4112         PR tree-optimization/86749
4113         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4114         If the lhs is used in a COND_EXPR, check that it is being used
4115         as the "then" or "else" value.
4117 2018-08-01  Tom de Vries  <tdevries@suse.de>
4119         PR target/86800
4120         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4121         speculation_safe_value_not_needed.
4123 2018-08-01  Richard Biener  <rguenther@suse.de>
4125         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4126         as base and offset.
4128 2018-08-01  Martin Liska  <mliska@suse.cz>
4130         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4131         format how successful transformation is dumped.
4132         (gimple_mod_pow2_value_transform): Likewise.
4133         (gimple_mod_subtract_transform): Likewise.
4134         (gimple_stringops_transform): Likewise.
4136 2018-08-01  Martin Liska  <mliska@suse.cz>
4138         PR value-prof/35543
4139         * value-prof.c (interesting_stringop_to_profile_p):
4140         Simplify the code and add BUILT_IN_MEMMOVE.
4141         (gimple_stringops_transform): Likewise.
4143 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
4145         * config/aarch64/aarch64-simd.md
4146         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4147         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4148         use GPI iterator instead of SI mode.
4150 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
4152         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4153         rs6000_speculation_barrier.
4154         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4155         new barrier pattern name.
4157 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
4159         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4160         (speculation_barrier): New insn.
4162 2018-08-01  Richard Biener  <rguenther@suse.de>
4164         PR bootstrap/86724
4165         * graphite.h: Include isl/id.h and isl/space.h to allow build
4166         with ISL 0.20.
4168 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
4170         PR target/86651
4171         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4172         mode for COFF targets.
4173         * defaults.h (TARGET_COFF): Define.
4174         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4175         TARGET_COFF): Define.
4176         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4177         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4178         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4180 2018-07-31  Alexandre Oliva <oliva@adacore.com>
4182         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4183         * gimple-streamer-out.c (output_bb): Save it.
4184         * lto-streamer-in.c (input_struct_function_base): Restore
4185         instance discriminator if available.  Create map on demand.
4186         * lto-streamer-out.c (output_struct_function_base): Save it if
4187         available.
4188         * final.c (decl_to_instance_map): Document LTO strategy.
4190 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
4191             Olivier Hainque  <hainque@adacore.com>
4193         * debug.h (decl_to_instance_map_t): New type.
4194         (decl_to_instance_map): Declare.
4195         (maybe_create_decl_to_instance_map): New inline function.
4196         * final.c (bb_discriminator, last_bb_discriminator): New statics,
4197         to track basic block discriminators.
4198         (final_start_function_1): Initialize them.
4199         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4200         bb_discriminator.
4201         (decl_to_instance_map): New variable.
4202         (map_decl_to_instance, maybe_set_discriminator): New functions.
4203         (notice_source_line): Set discriminator.
4205 2018-07-31  Ian Lance Taylor  <iant@golang.org>
4207         * targhooks.c (default_have_speculation_safe_value): Add
4208         ATTRIBUTE_UNUSED.
4210 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
4212         * dump-context.h: Include "pretty-print.h".
4213         (dump_context::refresh_dumps_are_enabled): New decl.
4214         (dump_context::emit_item): New decl.
4215         (class dump_context): Add fields "m_test_pp" and
4216         "m_test_pp_flags".
4217         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4218         (temp_dump_context::get_dumped_text): New decl.
4219         (class temp_dump_context): Add field "m_pp".
4220         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4221         (dump_context::refresh_dumps_are_enabled): ...and add a test for
4222         m_test_pp.
4223         (set_dump_file): Update for above change.
4224         (set_alt_dump_file): Likewise.
4225         (dump_loc): New overload, taking a pretty_printer *.
4226         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
4227         to any test pretty-printer.
4228         (make_item_for_dump_gimple_stmt): New function, adapted from
4229         optinfo::add_gimple_stmt.
4230         (dump_context::dump_gimple_stmt): Call it, and use the result,
4231         eliminating the direct usage of dump_file and alt_dump_file in
4232         favor of indirectly using them via emit_item.
4233         (make_item_for_dump_gimple_expr): New function, adapted from
4234         optinfo::add_gimple_expr.
4235         (dump_context::dump_gimple_expr): Call it, and use the result,
4236         eliminating the direct usage of dump_file and alt_dump_file in
4237         favor of indirectly using them via emit_item.
4238         (make_item_for_dump_generic_expr): New function, adapted from
4239         optinfo::add_tree.
4240         (dump_context::dump_generic_expr): Call it, and use the result,
4241         eliminating the direct usage of dump_file and alt_dump_file in
4242         favor of indirectly using them via emit_item.
4243         (make_item_for_dump_printf_va): New function, adapted from
4244         optinfo::add_printf_va.
4245         (make_item_for_dump_printf): New function.
4246         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4247         and use the result, eliminating the direct usage of dump_file and
4248         alt_dump_file in favor of indirectly using them via emit_item.
4249         (make_item_for_dump_dec): New function.
4250         (dump_context::dump_dec): Call it, and use the result,
4251         eliminating the direct usage of dump_file and alt_dump_file in
4252         favor of indirectly using them via emit_item.
4253         (make_item_for_dump_symtab_node): New function, adapted from
4254         optinfo::add_symtab_node.
4255         (dump_context::dump_symtab_node): Call it, and use the result,
4256         eliminating the direct usage of dump_file and alt_dump_file in
4257         favor of indirectly using them via emit_item.
4258         (dump_context::begin_scope): Reimplement, avoiding direct usage
4259         of dump_file and alt_dump_file in favor of indirectly using them
4260         via emit_item.
4261         (dump_context::emit_item): New member function.
4262         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4263         Set up test pretty-printer on the underlying context.  Call
4264         refresh_dumps_are_enabled.
4265         (temp_dump_context::~temp_dump_context): Call
4266         refresh_dumps_are_enabled.
4267         (temp_dump_context::get_dumped_text): New member function.
4268         (selftest::verify_dumped_text): New function.
4269         (ASSERT_DUMPED_TEXT_EQ): New macro.
4270         (selftest::test_capture_of_dump_calls): Run all tests twice, with
4271         and then without optinfo enabled.  Add uses of
4272         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
4273         * dumpfile.h: Update comment for the dump_* API.
4274         * optinfo-emit-json.cc
4275         (selftest::test_building_json_from_dump_calls): Update for new
4276         param for temp_dump_context ctor.
4277         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4278         and "m_owned" field.
4279         (optinfo_item::~optinfo_item): Likewise.
4280         (optinfo::add_item): New member function.
4281         (optinfo::emit): Update comment.
4282         (optinfo::add_string): Delete.
4283         (optinfo::add_printf): Delete.
4284         (optinfo::add_printf_va): Delete.
4285         (optinfo::add_gimple_stmt): Delete.
4286         (optinfo::add_gimple_expr): Delete.
4287         (optinfo::add_tree): Delete.
4288         (optinfo::add_symtab_node): Delete.
4289         (optinfo::add_dec): Delete.
4290         * optinfo.h (class dump_context): New forward decl.
4291         (optinfo::add_item): New decl.
4292         (optinfo::add_string): Delete.
4293         (optinfo::add_printf): Delete.
4294         (optinfo::add_printf_va): Delete.
4295         (optinfo::add_gimple_stmt): Delete.
4296         (optinfo::add_gimple_expr): Delete.
4297         (optinfo::add_tree): Delete.
4298         (optinfo::add_symtab_node): Delete.
4299         (optinfo::add_dec): Delete.
4300         (optinfo::add_poly_int): Delete.
4301         (optinfo_item::optinfo_item): Remove "owned" param.
4302         (class optinfo_item): Remove field "m_owned".
4304 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4306         PR middle-end/86705
4307         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4308         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4309         requested variable alignment.
4310         (expand_one_ssa_partition): Likewise.
4311         (expand_one_var): Likewise.
4313 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4315         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4316         to speculation_safe_value_not_needed.
4318 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4320         * targhooks.h (speculation_safe_value_not_needed): New prototype.
4321         * targhooks.c (speculation_safe_value_not_needed): New function.
4322         * target.def (have_speculation_safe_value): Update documentation.
4323         * doc/tm.texi: Regenerated.
4325 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4327         * config/aarch64/iterators.md (ALLI_TI): New iterator.
4328         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4329         expand.
4330         (despeculate_copy<ALLI:mode>_insn): New insn.
4331         (despeculate_copyti_insn): New insn.
4332         (despeculate_simple<ALLI:mode>): New insn
4333         (despeculate_simpleti): New insn.
4334         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4335         function.
4336         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4337         aarch64_speculation_safe_value.
4338         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4340 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4342         * config/aarch64/aarch64-speculation.cc: New file.
4343         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4344         before pass_reorder_blocks.
4345         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4346         prototype.
4347         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4348         X14 and X15 when tracking speculation.
4349         * config/aarch64/aarch64.md (register name constants): Add
4350         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4351         (unspec): Add UNSPEC_SPECULATION_TRACKER.
4352         (speculation_barrier): New insn attribute.
4353         (cmp<mode>): Allow SP in comparisons.
4354         (speculation_tracker): New insn.
4355         (speculation_barrier): Add speculation_barrier attribute.
4356         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4357         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4358         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4360 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4362         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4363         aarch64_track_speculation is true.
4364         (tb<optab><mode>1): Likewise.
4365         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4366         generate CB[N]Z when tracking speculation.
4367         (aarch64_split_compare_and_swap): Likewise.
4368         (aarch64_split_atomic_op): Likewise.
4370 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4372         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4374 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4376         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4377         (speculation_barrier): New insn.
4379 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4381         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4382         * config/arm/arm.md (speculation_barrier): New expand.
4383         (speculation_barrier_insn): New pattern.
4385 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
4387         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4388         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4389         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4390         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4391         list.
4392         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4393         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4394         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4395         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4396         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4397         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4398         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4399         * builtins.c (expand_speculation_safe_value): New function.
4400         (expand_builtin): Call it.
4401         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4402         * doc/extend.texi: Document __builtin_speculation_safe_value.
4403         * doc/md.texi: Document "speculation_barrier" pattern.
4404         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4405         TARGET_HAVE_SPECULATION_SAFE_VALUE.
4406         * doc/tm.texi: Regenerated.
4407         * target.def (have_speculation_safe_value, speculation_safe_value): New
4408         hooks.
4409         * targhooks.c (default_have_speculation_safe_value): New function.
4410         (default_speculation_safe_value): New function.
4411         * targhooks.h (default_have_speculation_safe_value): Add prototype.
4412         (default_speculation_safe_value): Add prototype.
4414 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
4416         * dump-context.h (dump_context::dump_loc): New decl.
4417         * dumpfile.c (dump_context::dump_loc): New member function.
4418         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4419         and dump_gimple_stmt.
4420         (dump_context::dump_gimple_expr_loc): Likewise, using
4421         dump_gimple_expr.
4422         (dump_context::dump_generic_expr_loc): Likewise, using
4423         dump_generic_expr.
4424         (dump_context::dump_printf_loc_va): Likewise, using
4425         dump_printf_va.
4426         (dump_context::begin_scope): Explicitly using the global function
4427         "dump_loc", rather than the member function.
4429 2018-07-31  Martin Sebor  <msebor@redhat.com>
4431         PR tree-optimization/86741
4432         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4434 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
4436         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4437         depend on whether prefetch instructions will be emitted or not.
4438         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4439         will be emitted or not.
4440         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4441         (TARGET_SETMEM_PFD): New macros.
4443 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4445         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4446         (NULL_STMT_VEC_INFO): Delete.
4447         (stmt_vec_info::operator*): Likewise.
4448         (stmt_vec_info::operator gimple *): Likewise.
4449         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4450         of NULL_STMT_VEC_INFO.
4451         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4452         (vect_reassociating_reduction_p): Likewise.
4453         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4454         (vectorizable_store): Likewise.
4455         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4456         (vec_info::free_stmt_vec_infos): Likewise.
4458 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4460         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4461         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4463 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4465         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4466         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4467         (vec_info::free_stmt_vec_info): New private member functions.
4468         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4469         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4470         * tree-parloops.c (gather_scalar_reductions): Remove calls to
4471         set_stmt_vec_info_vec and free_stmt_vec_infos.
4472         * tree-vect-loop.c (_loop_vec_info): Remove call to
4473         set_stmt_vec_info_vec.
4474         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4475         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4476         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4477         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4478         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
4479         assignments in {vec_info::,}new_stmt_vec_info that are redundant
4480         with the clearing in the xcalloc.
4481         (stmt_vec_info_vec): Delete.
4482         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4483         (vectorize_loops): Likewise.
4484         (vec_info::~vec_info): Remove argument from call to
4485         free_stmt_vec_infos.
4486         (vec_info::add_stmt): Remove vinfo argument from call to
4487         new_stmt_vec_info.
4489 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4491         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4492         rather than a gimple stmt.
4493         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
4494         information for pattern statements when passed the original
4495         statement; instead wait to be passed the pattern statement itself.
4496         Don't call set_vinfo_for_stmt here.
4497         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4498         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4499         stmt_vec_infos here.
4500         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4501         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4502         stmt_vec_infos entry.
4504 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4506         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4507         * tree-vectorizer.c (vec_info::replace_stmt): New function.
4508         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4509         * tree-vect-stmts.c (vectorizable_call): Likewise.
4510         (vectorizable_simd_clone_call): Likewise.
4512 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4514         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4515         * tree-vectorizer.c (vec_info::remove_stmt): New function.
4516         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4517         * tree-vect-loop.c (vect_transform_loop): Likewise.
4518         * tree-vect-slp.c (vect_schedule_slp): Likewise.
4519         * tree-vect-stmts.c (vect_remove_stores): Likewise.
4521 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4523         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4524         (vect_dr_stmt): Delete.
4525         * tree-vectorizer.c (vec_info::lookup_dr): New function.
4526         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4527         of DR_VECT_AUX.
4528         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4529         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4530         (vect_verify_datarefs_alignment, vect_peeling_supportable)
4531         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4532         (vect_analyze_data_refs): Likewise.
4533         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
4534         argument.
4535         (vect_find_same_alignment_drs): Likewise.
4536         (vect_slp_analyze_node_dependences): Update calls accordingly.
4537         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
4538         instead of DR_VECT_AUX.
4539         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4540         of a vector data references.  Use vec_info::lookup_dr instead of
4541         DR_VECT_AUX.
4542         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4543         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
4544         instead of DR_VECT_AUX.
4546 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4548         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4549         dr_vec_info.
4550         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4551         accordingly.
4552         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4553         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4554         (vect_gen_prolog_loop_niters): Likewise.
4556 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4558         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4559         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4560         (vect_known_alignment_in_bytes, vect_dr_behavior)
4561         (vect_get_scalar_dr_size): Take references as dr_vec_infos
4562         instead of data_references.  Update calls to other routines for
4563         which the same change has been made.
4564         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4565         dr_vec_infos instead of stmt_vec_infos.
4566         (vect_analyze_data_ref_dependence): Update call accordingly.
4567         (vect_slp_analyze_data_ref_dependence)
4568         (vect_record_base_alignments): Use DR_VECT_AUX.
4569         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4570         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4571         (vector_alignment_reachable_p, vect_get_data_access_cost)
4572         (vect_peeling_supportable, vect_analyze_group_access_1)
4573         (vect_analyze_group_access, vect_analyze_data_ref_access)
4574         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4575         (vect_compile_time_alias, vect_small_gap_p)
4576         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4577         (vect_supportable_dr_alignment): Take references as dr_vec_infos
4578         instead of data_references.  Update calls to other routines for
4579         which the same change has been made.
4580         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4581         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4582         (vect_slp_analyze_and_verify_node_alignment)
4583         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4584         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4585         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
4586         above changes.
4587         (_vect_peel_info::dr): Replace with...
4588         (_vect_peel_info::dr_info): ...this new field.
4589         (vect_peeling_hash_get_most_frequent)
4590         (vect_peeling_hash_choose_best_peeling): Update accordingly.
4591         (vect_peeling_hash_get_lowest_cost):
4592         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
4593         routines for which the same change has been made.
4594         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
4595         data_reference.
4596         * tree-vect-loop-manip.c (get_misalign_in_elems)
4597         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
4598         above changes.
4599         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4600         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4601         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4602         (get_group_load_store_type, get_negative_load_store_type)
4603         (vect_get_data_ptr_increment, vectorizable_store)
4604         (vectorizable_load): Likewise.
4605         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4606         Update calls to other routines for which the same change has been made.
4608 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4610         * tree-vectorizer.h (vec_info::move_dr): New member function.
4611         (dataref_aux): Rename to...
4612         (dr_vec_info): ...this and add "dr" and "stmt" fields.
4613         (_stmt_vec_info::dr_aux): Update accordingly.
4614         (_stmt_vec_info::data_ref_info): Delete.
4615         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4616         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4617         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4618         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4619         of data_ref.
4620         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
4621         (STMT_VINFO_DR_INFO): New macro.
4622         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4623         (set_dr_misalignment): Update after rename of dataref_aux.
4624         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
4625         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4626         initialization of STMT_VINFO_DATA_REF.
4627         * tree-vectorizer.c (vec_info::move_dr): New function.
4628         * tree-vect-patterns.c (vect_recog_bool_pattern)
4629         (vect_recog_mask_conversion_pattern)
4630         (vect_recog_gather_scatter_pattern): Use it.
4631         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4632         the "dr" and "stmt" fields of dr_vec_info instead of
4633         STMT_VINFO_DATA_REF.
4635 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4637         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4638         (is_pattern_stmt_p): Use it.
4639         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4640         on pattern statements.
4642 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4644         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4645         original stmt as a stmt_vec_info rather than a gimple stmt.
4646         (vect_pattern_recog_1): Take the statement directly as a
4647         stmt_vec_info, rather than via a gimple_stmt_iterator.
4648         Update call to vect_mark_pattern_stmts.
4649         (vect_pattern_recog): Update calls accordingly.
4651 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4653         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4654         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4655         a vect_def_type for the first argument.
4656         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4657         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
4658         operand if it isn't defined by a vectorized statement.
4659         (vect_build_gather_load_calls): Remove the mask_dt argument and
4660         update calls to vect_get_vec_def_for_stmt_copy.
4661         (vectorizable_bswap): Likewise the dt argument.
4662         (vectorizable_call): Update calls to vectorizable_bswap and
4663         vect_get_vec_def_for_stmt_copy.
4664         (vectorizable_simd_clone_call, vectorizable_assignment)
4665         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4666         (vectorizable_comparison): Update calls to
4667         vect_get_vec_def_for_stmt_copy.
4668         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
4669         vect_is_simple_use.
4670         (vect_get_loop_based_defs): Remove dt argument and update call
4671         to vect_get_vec_def_for_stmt_copy.
4672         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4673         and vect_get_vec_def_for_stmt_copy.
4674         (vectorizable_load): Update calls to vect_build_gather_load_calls
4675         and vect_get_vec_def_for_stmt_copy.
4676         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4677         (vectorizable_reduction, vectorizable_live_operation): Update calls
4678         to vect_get_vec_def_for_stmt_copy.
4680 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4682         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4683         and gimple stmt arguments with a stmt_vec_info.
4684         (vect_record_base_alignments): Update calls accordingly.
4685         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4686         and gimple stmt arguments with a stmt_vec_info.
4687         (vect_build_slp_tree_1): Remove vinfo argument and update call
4688         to vect_record_max_nunits.
4689         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4690         and vect_record_max_nunits.
4692 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4694         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4695         file and take a stmt_vec_info instead of a gimple stmt.
4696         (supportable_widening_operation, vect_finish_replace_stmt)
4697         (vect_finish_stmt_generation, vect_get_store_rhs)
4698         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4699         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4700         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4701         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4702         (vect_create_data_ref_ptr, bump_vector_ptr)
4703         (vect_permute_store_chain, vect_setup_realignment)
4704         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4705         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4706         (vectorizable_reduction, vectorizable_induction)
4707         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4708         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4709         than gimple stmts as arguments.
4710         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4711         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4712         (can_group_stmts_p, vect_check_gather_scatter)
4713         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4714         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4715         (vect_permute_load_chain, vect_shift_permute_load_chain)
4716         (vect_transform_grouped_load)
4717         (vect_record_grouped_load_vectors): Likewise.
4718         * tree-vect-loop.c (vect_fixup_reduc_chain)
4719         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4720         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4721         (vectorizable_reduction, vectorizable_induction)
4722         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4723         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4724         (vect_get_load_store_mask): Likewise.
4725         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4726         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4727         * tree-vect-stmts.c (vect_mark_relevant)
4728         (is_simple_and_all_uses_invariant)
4729         (exist_non_indexing_operands_for_use_p, process_use)
4730         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4731         (vect_get_vec_def_for_operand, vect_get_vec_defs)
4732         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4733         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4734         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4735         (get_negative_load_store_type, get_load_store_type)
4736         (vect_check_load_store_mask, vect_check_store_rhs)
4737         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4738         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4739         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4740         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4741         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4742         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4743         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4744         (supportable_widening_operation): Likewise.
4746 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4748         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4749         a stmt_vec_info instead of a gcall.
4750         (vect_check_gather_scatter): Update call accordingly.
4751         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4752         of a gphi.
4753         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4754         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4755         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4756         instead of a gimple stmt.
4757         (vect_transform_loop): Update calls accordingly.
4758         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4759         stmt_vec_infos instead of gimple stmts.
4760         (vect_analyze_slp_instance): Update use accordingly.
4761         * tree-vect-stmts.c (read_vector_array, write_vector_array)
4762         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4763         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4764         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4765         (vect_gen_widened_results_half, vect_get_loop_based_defs)
4766         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4767         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4768         down to subroutines.
4770 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4772         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4773         of the worklist from a vector of gimple stmts to a vector of
4774         stmt_vec_infos.
4775         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4776         (vect_mark_stmts_to_be_vectorized): Likewise
4778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4780         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4781         statement before passing it to vect_analyze_stmt.
4782         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4783         the chain of phi vector definitions.  Track the exit phi via its
4784         stmt_vec_info.
4785         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4786         STMT_VINFO_REDUC_DEF.
4787         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4788         stmt_vec_infos to handle the statement chains.
4789         (vect_get_slp_defs): Record the first statement in the node
4790         using a stmt_vec_info.
4791         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4792         statements here and pass their stmt_vec_info down to subroutines.
4793         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4794         down to vect_finish_stmt_generation.
4795         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4796         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4797         stmt_vec_infos to subroutines.
4798         (vect_remove_stores): Use stmt_vec_infos to handle the statement
4799         chains.
4801 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4803         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4804         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4805         (vect_permute_store_chain, vect_setup_realignment)
4806         (vect_permute_load_chain, vect_shift_permute_load_chain)
4807         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4808         stmts internally, and when passing values to other vectorizer routines.
4809         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4810         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4811         (vect_analyze_loop_operations, get_initial_def_for_reduction)
4812         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4813         (vectorizable_reduction, vectorizable_induction)
4814         (vectorizable_live_operation, vect_transform_loop_stmt)
4815         (vect_transform_loop): Likewise.
4816         * tree-vect-patterns.c (vect_reassociating_reduction_p)
4817         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4818         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4819         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4820         (vect_slp_analyze_node_operations_1): Likewise.
4821         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4822         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4823         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4824         (vect_finish_stmt_generation_1, get_group_load_store_type)
4825         (get_load_store_type, vect_build_gather_load_calls)
4826         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4827         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4828         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4829         (vectorizable_store, vectorizable_load, vectorizable_condition)
4830         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4831         (supportable_widening_operation): Likewise.
4832         (vect_get_vector_types_for_stmt): Likewise.
4833         * tree-vectorizer.h (vect_dr_behavior): Likewise.
4835 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4837         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4838         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4839         (vect_permute_store_chain, vect_permute_load_chain)
4840         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4841         repeated stmt_vec_info lookups.
4842         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4843         (vect_update_ivs_after_vectorizer): Likewise.
4844         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4845         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4846         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4847         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4848         (vect_bb_slp_scalar_cost): Likewise.
4849         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4851 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4853         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4854         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4855         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4856         to get gassigns and gcalls, rather than operating on generc gimple
4857         stmts.
4858         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4859         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4860         (vectorizable_load, vect_analyze_stmt): Likewise.
4861         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4863 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4865         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4866         return stmt_vec_infos rather than gimple stmts.  Do not accept
4867         null arguments.
4868         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4869         of a gimple stmt.
4870         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4871         Update use of get_later_stmt.
4872         (vect_get_constant_vectors): Update call accordingly.
4873         (vect_schedule_slp_instance): Likewise
4874         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4875         (vect_slp_analyze_instance_dependence): Likewise.
4876         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4878 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4880         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4881         (stmt_info_for_cost::stmt_info): ...this new field.
4882         (add_stmt_costs): Update accordingly.
4883         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4884         (vect_get_known_peeling_cost): Likewise.
4885         (vect_estimate_min_profitable_iters): Likewise.
4886         * tree-vect-stmts.c (record_stmt_cost): Likewise.
4888 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4890         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4891         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4892         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4893         accordingly.
4894         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4896 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4898         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4899         a gimple stmt to a stmt_vec_info.
4900         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4902 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4904         * tree-vectorizer.h (vec_info::grouped_stores): Change from
4905         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4906         (_loop_vec_info::reduction_chains): Likewise.
4907         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4908         accordingly.
4909         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4911 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4913         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4914         a gimple stmt to a stmt_vec_info.
4915         (_stmt_vec_info::next_element): Likewise.
4916         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4917         (vect_slp_analyze_and_verify_node_alignment)
4918         (vect_analyze_group_access_1, vect_analyze_group_access)
4919         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4920         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4921         (vect_supportable_dr_alignment): Update accordingly.
4922         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4923         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4924         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4925         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4926         * tree-vect-slp.c (vect_build_slp_tree_1)
4927         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4928         (vect_split_slp_store_group, vect_analyze_slp_instance)
4929         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4930         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4931         (get_group_load_store_type, get_load_store_type)
4932         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4933         (vect_transform_stmt, vect_remove_stores): Likewise.
4935 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4937         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4938         than a gimple stmt.
4939         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4940         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4941         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4942         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4943         (vector_alignment_reachable_p, vect_get_data_access_cost)
4944         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4945         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4946         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4947         (vect_analyze_group_access_1, vect_analyze_group_access)
4948         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4949         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4950         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4951         result of vect_dr_stmt and use the stmt_vec_info instead of
4952         the associated gimple stmt.
4953         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4954         (vect_gen_prolog_loop_niters): Likewise.
4955         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4957 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4959         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4960         to a vec<stmt_vec_info>.
4961         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4962         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4963         vec<stmt_vec_info>.
4964         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4965         to a vec<stmt_vec_info>.
4966         (bst_traits::value_type, bst_traits::value_type): Likewise.
4967         (bst_traits::hash): Update accordingly.
4968         (vect_get_and_check_slp_defs): Change the stmts parameter from
4969         a vec<gimple *> to a vec<stmt_vec_info>.
4970         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4971         (vect_build_slp_tree): Likewise.
4972         (vect_build_slp_tree_2): Likewise.  Update uses of
4973         SLP_TREE_SCALAR_STMTS.
4974         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4975         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4976         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4977         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4978         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4979         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4980         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4981         (vect_get_constant_vectors, vect_get_slp_defs)
4982         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4983         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4984         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4985         instead of gimple stmts.
4986         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4987         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4988         (vect_slp_analyze_instance_dependence): Update uses of
4989         SLP_TREE_SCALAR_STMTS.
4990         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4991         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4992         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4993         (get_initial_defs_for_reduction): Likewise.
4994         (vect_create_epilog_for_reduction): Likewise.
4995         (vectorize_fold_left_reduction): Likewise.
4996         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4997         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4998         (can_vectorize_live_stmts): Likewise.
5000 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5002         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
5003         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5004         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
5005         than gimple stmts.
5006         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
5007         of a gimple stmt.
5008         (gather_scalar_reductions): Update after above interface changes.
5009         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
5010         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
5011         than gimple stmts.
5012         (vect_force_simple_reduction): Likewise.
5013         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
5014         LOOP_VINFO_REDUCTIONS.
5015         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5017 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5019         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
5020         a gimple stmt to a stmt_vec_info.
5021         * tree-vect-loop.c (vect_active_double_reduction_p)
5022         (vect_force_simple_reduction, vectorizable_reduction): Update
5023         accordingly.
5025 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5027         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
5028         vec<gimple *> to a vec<stmt_vec_info>.
5029         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
5030         the reduction_phis argument from a vec<gimple *> to a
5031         vec<stmt_vec_info>.
5032         (vectorizable_reduction): Likewise the phis local variable that
5033         is passed to vect_create_epilog_for_reduction.  Update for new type
5034         of SLP_TREE_VEC_STMTS.
5035         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
5036         (vectorizable_live_operation): Likewise.
5037         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
5038         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
5040 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5042         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
5043         a gimple stmt to a stmt_vec_info.
5044         (vectorizable_condition, vectorizable_live_operation)
5045         (vectorizable_reduction, vectorizable_induction): Pass back the
5046         vectorized statement as a stmt_vec_info.
5047         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5048         use of STMT_VINFO_VEC_STMT.
5049         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5050         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5051         as stmt_vec_infos rather than gimple stmts.
5052         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5053         to a stmt_vec_info.
5054         (vectorizable_live_operation): Likewise.
5055         (vectorizable_reduction, vectorizable_induction): Likewise,
5056         updating use of STMT_VINFO_VEC_STMT.
5057         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5058         of STMT_VINFO_VEC_STMT.
5059         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5060         (vectorizable_simd_clone_call, vectorizable_conversion)
5061         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5062         (vectorizable_store, vectorizable_load, vectorizable_condition)
5063         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5064         from a gimple stmt to a stmt_vec_info.
5065         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
5066         pointer to a stmt_vec_info to the vectorizable_* routines.
5068 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5070         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5071         a gimple stmt to a stmt_vec_info.
5072         (is_pattern_stmt_p): Update accordingly.
5073         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5074         (vect_record_grouped_load_vectors): Likewise.
5075         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5076         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5077         (vect_model_reduction_cost): Likewise.
5078         (vect_create_epilog_for_reduction): Likewise.
5079         (vectorizable_reduction, vectorizable_induction): Likewise.
5080         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5081         Return the stmt_vec_info for the pattern statement.
5082         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5083         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5084         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5085         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5086         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5087         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5088         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5089         (free_stmt_vec_info, vect_is_simple_use): Likewise.
5091 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5093         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5094         (vect_finish_stmt_generation): Likewise.
5095         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5096         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5097         (vect_build_gather_load_calls): Use the return value of the above
5098         functions instead of a separate call to vinfo_for_stmt.  Use narrow
5099         scopes for the input gimple stmt and wider scopes for the associated
5100         stmt_vec_info.  Use vec_info::lookup_def when setting these
5101         stmt_vec_infos from an SSA_NAME definition.
5102         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5103         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5104         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5105         (vectorizable_store, vectorizable_load, vectorizable_condition)
5106         (vectorizable_comparison): Likewise.
5107         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5108         (vectorizable_reduction): Likewise.
5110 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5112         * tree-vectorizer.h (vect_is_simple_use): Add an optional
5113         stmt_vec_info * parameter before the optional gimple **.
5114         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5115         (process_use, vect_get_vec_def_for_operand_1): Update callers.
5116         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5117         * tree-vect-loop.c (vectorizable_reduction): Likewise.
5118         (vectorizable_live_operation): Likewise.
5119         * tree-vect-patterns.c (type_conversion_p): Likewise.
5120         (vect_look_through_possible_promotion): Likewise.
5121         (vect_recog_rotate_pattern): Likewise.
5122         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5124 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5126         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5127         a typedef to a wrapper class.
5128         (NULL_STMT_VEC_INFO): New macro.
5129         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5130         (stmt_vec_info::operator*): New function.
5131         (stmt_vec_info::operator gimple *): Likewise.
5132         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5133         (add_stmt_costs): Likewise.
5134         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5135         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5136         (vect_get_known_peeling_cost): Likewise.
5137         (vect_estimate_min_profitable_iters): Likewise.
5138         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5139         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5140         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5141         (vectorizable_store, free_stmt_vec_infos): Likewise.
5142         (new_stmt_vec_info): Change return type of xcalloc to
5143         _stmt_vec_info *.
5145 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5147         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5148         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5149         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5150         a single_imm_use-based sequence.
5151         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5153 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5155         * tree-vectorizer.h (vec_info::lookup_def): Declare.
5156         * tree-vectorizer.c (vec_info::lookup_def): New function.
5157         * tree-vect-patterns.c (vect_get_internal_def): Use it.
5158         (vect_widened_op_tree): Likewise.
5159         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5160         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5161         (vectorizable_reduction): Likewise.
5162         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5163         of a gimple *.
5164         (vect_is_slp_reduction): Update calls accordingly.  Use
5165         vec_info::lookup_def.
5166         (vect_is_simple_reduction): Likewise
5167         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5169 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5171         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5172         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5173         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5174         of vinfo_for_stmt.
5175         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5176         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5177         (vect_update_vf_for_slp, vect_analyze_loop_operations)
5178         (vect_is_slp_reduction, vectorizable_induction)
5179         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5180         * tree-vect-patterns.c (vect_init_pattern_stmt):
5181         (vect_determine_min_output_precision_1, vect_determine_precisions)
5182         (vect_pattern_recog): Likewise.
5183         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5184         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5185         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5186         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5187         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5188         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
5189         info field from a loop to a loop_vec_info.
5191 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5193         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5194         (vec_info::add_stmt): Declare.
5195         * tree-vectorizer.c (vec_info::add_stmt): New function.
5196         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5197         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5198         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5199         (vectorizable_induction): Likewise.
5200         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5201         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5202         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5203         (vectorizable_load): Likewise.
5204         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5205         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5206         (vect_recog_gather_scatter_pattern): Likewise.
5207         (append_pattern_def_seq): Likewise.  Remove a check that is
5208         performed by add_stmt itself.
5210 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5212         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5213         which make_ssa_name was called with new_stmt before new_stmt
5214         had been created.
5216 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5218         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5219         split out from...
5220         (vect_is_slp_reduction): ...here...
5221         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
5222         that are already known to be false.
5224 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5226         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5227         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
5228         STMT_VINFO_NUM_SLP_USES when it's true.
5229         (vect_free_slp_instance): Add a final_p parameter and pass it to
5230         vect_free_slp_tree.
5231         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5232         (vect_analyze_slp_instance): Likewise.
5233         (vect_slp_analyze_operations): Likewise.
5234         (vect_slp_analyze_bb_1): Likewise.
5235         * tree-vectorizer.c (vec_info): Likewise.
5236         * tree-vect-loop.c (vect_transform_loop): Likewise.
5238 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5240         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5241         function is not called for second and subsequent members of
5242         a reduction group.
5244 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5246         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5247         cases for nested loops from here to ...
5248         (vect_create_epilog_for_reduction): ...here.  Only call
5249         vect_is_simple_use for inner-loop reductions.
5251 2018-07-31  Martin Liska  <mliska@suse.cz>
5253         PR gcov-profile/85338
5254         PR gcov-profile/85350
5255         PR gcov-profile/85372
5256         * profile.c (struct location_triplet): New.
5257         (struct location_triplet_hash): Likewise.
5258         (output_location): Do not output a BB that
5259         is already recorded for a line.
5260         (branch_prob): Use streamed_locations.
5262 2018-07-31  Martin Liska  <mliska@suse.cz>
5264         PR gcov-profile/85370
5265         * coverage.c (coverage_begin_function): Do not mark target
5266         clones as artificial functions.
5268 2018-07-31  Martin Liska  <mliska@suse.cz>
5270         PR gcov-profile/83813
5271         PR gcov-profile/84758
5272         PR gcov-profile/85217
5273         PR gcov-profile/85332
5274         * profile.c (branch_prob): Do not record GOTO expressions
5275         for GIMPLE statements which locations are already streamed.
5277 2018-07-31  Olivier Hainque  <hainque@adacore.com>
5279         * gcc.c (handle_spec_function): Accept a soft_matched_part
5280         argument, as do_spec_1.  Pass it down to ...
5281         (eval_spec_function): Accept a soft_matched_part argument,
5282         and pass it down to ...
5283         (do_spec_2): Accept a soft_matched_part argument, and pass
5284         it down to do_spec_1.
5285         (do_spec_1): Pass soft_matched_part to handle_spec_function.
5286         (handle_braces): Update call to handle_spec_function.
5287         (driver::set_up_specs): Update calls to do_spec_2.
5288         (compare_debug_dump_opt_spec_function): Likewise.
5289         (compare_debug_self_opt_spec_function): Likewise.
5291 2018-07-31  Olivier Hainque  <hainque@adacore.com>
5293         * common.opt (nolibc): New option.
5294         * doc/invoke.texi (Link Options): Document it.
5295         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5296         * config/alpha/linux.h: Likewise.
5297         * config/arc/elf.h: Likewise.
5298         * config/arm/uclinux-elf.h: Likewise.
5299         * config/arm/unknown-elf.h: Likewise.
5300         * config/avr/avrlibc.h: Likewise.
5301         * config/bfin/bfin.h: Likewise.
5302         * config/bfin/linux.h: Likewise.
5303         * config/bfin/uclinux.h: Likewise.
5304         * config/darwin.h: Likewise.
5305         * config/darwin10.h: Likewise.
5306         * config/darwin12.h: Likewise.
5307         * config/gnu-user.h: Likewise.
5308         * config/lm32/uclinux-elf.h: Likewise.
5309         * config/pa/pa-hpux11.h: Likewise.
5310         * config/pa/pa64-hpux.h: Likewise.
5311         * config/sparc/sparc.h: Likewise.
5313 2018-07-31  Olivier Hainque  <hainque@adacore.com>
5315         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5316         undefined variables.
5318 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
5320         PR target/86640
5321         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5322         instead of GEN_INT.
5324 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5326         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5327         terminated string literal.
5329 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
5331         PR rtl-optimization/85160
5332         * combine.c (is_just_move): New function.
5333         (try_combine): Allow combining two instructions into two if neither of
5334         the original instructions was a move.
5336 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
5338         PR target/86673
5339         * doc/extend.texi (Global Register Variables): Discourage use of type
5340         qualifiers.
5341         (Local Register Variables): Likewise.
5343 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
5345         PR tree-optimization/86506
5346         * hwint.h (ceil_log2): Resync with hwint.c implementation.
5348 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
5350         PR target/86547
5351         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5352         hard_regno, make sure no insn between `from` and `to` clobbers it.
5354 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
5355             Tom de Vries  <tdevries@suse.de>
5357         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5358         (PTX_DEFAULT_RUNTIME_DIM): ... this.
5359         (nvptx_goacc_validate_dims): Set default worker and gang dims to
5360         PTX_DEFAULT_RUNTIME_DIM.
5361         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5363 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
5365         * config/pa/pa.c (pa_output_addr_vec): Align address table.
5366         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5367         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5369 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
5371         * config/rs6000/constraints.md (wG constraint): Delete, no longer
5372         used.
5373         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5374         predicate to reflect toc fusion has been deleted.
5375         (toc_fusion_mem_raw): Delete, no longer used.
5376         (toc_fusion_mem_wrapped): Likewise.
5377         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5378         fusion mask bit.
5379         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5380         Delete, no longer used.
5381         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5382         meant to be used for toc fusion.
5383         (rs6000_debug_print_mode): Delete toc fusion debugging.
5384         (rs6000_debug_reg_global): Likewise.
5385         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5386         fusion and secondary reload support that were never used.
5387         (rs6000_option_override_internal): Delete TOC fusion, that was only
5388         partially defined, and it did not work unless you also used the
5389         -mcmodel= switch.
5390         (rs6000_legitimate_address_p): Delete TOC fusion support.
5391         (rs6000_opt_masks): Likewise.
5392         (fusion_wrap_memory_address): Delete function, no longer used.
5393         (fusion_split_address); Delete TOC fusion support.
5394         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5395         longer used with toc fusion being deleted.
5396         (TARGET_TOC_FUSION_FP): Likewise.
5397         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5398         UNSPEC.
5399         (toc fusion spliter): Delete TOC fusion support.
5400         (toc_fusionload_<mode>): Likewise.
5401         (toc_fusionload_di): Likewise.
5402         (fusion_gpr_load_<mode>): Delete generator function, this insn no
5403         longer needs to be named.  Rename predicate to delete TOC fusion.
5404         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5405         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5406         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5407         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5408         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5410 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5412         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5413         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
5414         __int128 in built-in function prototypes.
5415         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5416         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5418 2018-07-27  Martin Sebor  <msebor@redhat.com>
5420         PR tree-optimization/86696
5421         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5422         types, including enums.
5423         (handle_char_store): Be prepared for the above function to fail.
5425 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
5427         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5428         when optimization level is lower than 2 or optimize for size.
5430 2018-07-26  Martin Sebor  <msebor@redhat.com>
5432         PR tree-optimization/86043
5433         PR tree-optimization/86042
5434         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5435         (get_string_cst_length): Rename...
5436         (get_min_string_length): ...to this.  Add argument.
5437         (handle_char_store): Extend to handle multi-character stores by
5438         MEM_REF.
5439         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
5440         * tree.h (initializer_zerop): Add argument.
5442 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
5444         PR middle-end/86660
5445         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5446         declare target to variables if they have always,{to,from,tofrom} map
5447         kinds.
5449 2018-07-26  Martin Liska  <mliska@suse.cz>
5451         PR lto/86548
5452         * lto-wrapper.c: Add linker_output as prefix
5453         for ltrans_output_file.
5455 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
5457         PR rtl-optimization/85805
5458         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5459         value for hard registers if that was written in the same mode.
5461 2018-07-26  Martin Liska  <mliska@suse.cz>
5463         PR gcov-profile/86536
5464         * gcov.c (format_gcov): Use printf format %.*f directly
5465         and do not handle special values.
5467 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5469         * common/config/arc/arc-common.c (arc_option_optimization_table):
5470         Update default optimizations for size.
5472 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5474         * config/arc/arc.md (movsf_insn): Add short instruction selection.
5475         * config/arc/constraints.md (CfZ): New constraint.
5476         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5477         (subsf3_fpu): Likewise.
5478         (cmpsf_fpu): Likewise.
5479         (cmpsf_fpu_uneq): Likewise.
5481 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5483         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5484         accesses as well.
5485         (arc_is_uncached_mem_p): uncached applies to both the variable and
5486         the pointer.
5488 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5490         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5491         register names.
5493 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
5495         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5496         field "m_scopes" from vec to auto_vec.
5498 2018-07-25  Martin Liska  <mliska@suse.cz>
5500         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5501         return type.
5503 2018-07-25  Richard Biener  <rguenther@suse.de>
5505         PR debug/86654
5506         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5507         special wrt context_die late.
5508         (gen_subprogram_die): Re-use DIEs in local scope.
5510 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
5512         PR tree-optimization/86644
5513         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
5515 2018-07-25  Martin Liska  <mliska@suse.cz>
5517         PR middle-end/86645
5518         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5519         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5521 2018-07-25  Martin Liska  <mliska@suse.cz>
5523         PR sanitizer/79635
5524         * params.def: Explain ASan abbreviation and provide
5525         a documentation link.
5527 2018-07-24  Martin Sebor  <msebor@redhat.com>
5529         PR tree-optimization/86622
5530         PR tree-optimization/86532
5531         * builtins.h (string_length): Declare.
5532         * builtins.c (c_strlen): Correct handling of non-constant offsets.
5533         (check_access): Be prepared for non-constant length ranges.
5534         (string_length): Make extern.
5535         * expr.c (string_constant): Only handle the minor non-constant
5536         array index.  Use string_constant to compute the length of
5537         a generic string constant.
5539 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
5541         PR tree-optimization/86618
5542         * tree-vect-stmts.c (vectorizable_call): Don't take the address
5543         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5545 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
5547         PR tree-optimization/86636
5548         * json.cc (json::object::set): Fix comment.  Add assertions.
5549         (json::array::append): Move here from json.h.  Add comment and an
5550         assertion.
5551         (json::string::string): Likewise.
5552         * json.h (json::array::append): Move to json.cc.
5553         (json::string::string): Likewise.
5554         * optinfo-emit-json.cc
5555         (optrecord_json_writer::impl_location_to_json): Assert that we
5556         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5557         wrapper around it.  Expand the location once, rather than three
5558         times.
5559         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5560         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5561         wrappers.
5562         (optrecord_json_writer::optinfo_to_json): Likewise, in four
5563         places.  Fix some overlong lines.
5565 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
5567         * config/aarch64/aarch64-simd.md
5568         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5569         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5570         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5571         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5572         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5573         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5574         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5575         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5576         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5578 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
5580         PR middle-end/86627
5581         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5582         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
5583         and abs_d == d, do the power of two handling if profitable.
5585 2018-07-24  Richard Biener  <rguenther@suse.de>
5587         * match.pd: Add BIT_FIELD_REF canonicalizations.
5589 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5591         PR c/86617
5592         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5594 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5596         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5597         terminated STRING_CST object.
5599 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5601         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5603 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
5605         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5606         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5607         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5608         the elements into a register.
5609         (rs6000_split_v4si_init_di_reg): Delete.
5610         (rs6000_split_v4si_init): Delete.
5611         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5612         (vsx_init_v4si): Rewrite as a define_expand.
5614 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
5616         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5617         zero_extend argument from memory): New.
5619 2018-07-22  Martin Sebor  <msebor@redhat.com>
5621         PR bootstrap/86621
5622         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5623         diagnosing calls with unknown arguments unless -Walloca-larger-than
5624         is restricted to less than PTRDIFF_MAX bytes.
5626 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
5628         * doc/gcov.texi (Invoking Gcov): Editorial changes.
5630 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5632         * pretty-print.c (text_info::set_location): Remove redundant
5633         "line_table" parameter from call to rich_location::set_range.
5635 2018-07-20  Martin Sebor  <msebor@redhat.com>
5637         PR middle-end/82063
5638         * builtins.c (expand_builtin_alloca): Adjust.
5639         * calls.c (alloc_max_size): Simplify.
5640         * cgraphunit.c (cgraph_node::expand): Adjust.
5641         * common.opt (larger_than_size, warn_frame_larger_than): Remove
5642         variables.
5643         (frame_larger_than_size): Same.
5644         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5645         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5646         Initialize.
5647         * doc/invoke.texi (GCC Command Options): Document option arguments.
5648         Explain byte-size arguments and suffixes.
5649         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5650         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5651         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5652         * doc/options.texi (UInteger): Expand.
5653         (Host_Wide_Int, ByteSize): Document new properties.
5654         * final.c (final_start_function_1): Include sizes in an error message.
5655         * function.c (frame_offset_overflow): Same.
5656         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5657         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5658         Diagnose unbounded alloca calls only for limits of less than
5659         PTRDIFF_MAX.
5660         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
5661         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
5662         for alloca(0).
5663         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
5664         only for limits of less than PTRDIFF_MAX.
5665         * langhooks-def.h (lhd_handle_option): Change function argument
5666         to HOST_WIDE_INT.
5667         * langhooks.c (lhd_handle_option): Same.
5668         * langhooks.h (handle_option): Same.
5669         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5670         ByteSize flags.
5671         (var_type, var_type_struct): Same.
5672         (var_set): Handle ByteSize flag.
5673         * optc-gen.awk: Add comments to output to ease debugging.  Make
5674         use of HOST_WIDE_INT where appropriate.
5675         * opts-gen-save.awk:  Use %lx to format unsigned long.
5676         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5677         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5678         arguments.  Parse bytes-size suffixes.
5679         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5680         (enum_value_to_arg): Same.
5681         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
5682         (handle_option): Adjust.
5683         (generate_option): Change function argument to HOST_WIDE_INT.
5684         (cmdline_handle_error): Adjust.
5685         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5686         (set_option): Change function argument to HOST_WIDE_INT.
5687         (option_enabled): Handle cl_host_wide_int.
5688         (get_option_state): Handle CLVC_SIZE.
5689         (control_warning_option): Same.
5690         * opts.c (common_handle_option): Change function argument to
5691         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
5692         OPT_Wvla_larger_than_.
5693         * opts.h (enum cl_var_type): Add an enumerator.
5694         * stor-layout.c (layout_decl): Print a more meaningful warning.
5695         * toplev.c (output_stack_usage): Adjust.
5697 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
5699         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5700         call to inline_expand_builtin_string_cmp.
5701         (expand_builtin_strcmp): Likewise.
5702         (expand_builtin_strncmp): Likewise.
5703         (inline_string_cmp): Delete the last parameter, change char_type_node
5704         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5705         two operands.
5706         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5707         the inlining expansion on target where the type of the call has same or
5708         narrower precision than unsigned char.
5710 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5712         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5713         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5714         * common.opt (fsave-optimization-record): New option.
5715         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5716         * doc/invoke.texi (-fsave-optimization-record): New option.
5717         * dumpfile.c: Include "optinfo-emit-json.h".
5718         (struct kv_pair): Move to coretypes.h.
5719         (optgroup_options): Make non-static.
5720         (dump_context::end_scope): Call
5721         optimization_records_maybe_pop_dump_scope.
5722         * dumpfile.h (optgroup_options): New decl.
5723         * json.cc: New file.
5724         * json.h: New file.
5725         * optinfo-emit-json.cc: New file.
5726         * optinfo-emit-json.h: New file.
5727         * optinfo.cc: Include "optinfo-emit-json.h".
5728         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5729         (optinfo_enabled_p): Check optimization_records_enabled_p.
5730         (optinfo_wants_inlining_info_p): Likewise.
5731         * optinfo.h: Update comment.
5732         * profile-count.c (profile_quality_as_string): New function.
5733         * profile-count.h (profile_quality_as_string): New decl.
5734         (profile_count::quality): New accessor.
5735         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5736         and optinfo_emit_json_cc_tests.
5737         * selftest.h (selftest::json_cc_tests): New decl.
5738         (selftest::optinfo_emit_json_cc_tests): New decl.
5739         * toplev.c: Include "optinfo-emit-json.h".
5740         (compile_file): Call optimization_records_finish.
5741         (do_compile): Call optimization_records_start.
5742         * tree-ssa-live.c: Include optinfo.h.
5743         (remove_unused_scope_block_p): Retain inlining information if
5744         optinfo_wants_inlining_info_p returns true.
5746 2018-07-20  Richard Biener  <rguenther@suse.de>
5748         PR debug/86585
5749         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5750         to cover -flto-partition=none.
5752 2018-07-20  Martin Liska  <mliska@suse.cz>
5754         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5755         (get_decl_source_range): Remove unused function.
5757 2018-07-20  Richard Biener  <rguenther@suse.de>
5759         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5760         (struct vn_phi_s): Likewise.
5761         (struct vn_reference_s): Likewise.
5762         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5763         for searching the slot of an entry known to be in the hash itself.
5764         (vn_phi_hasher::equal): Likewise.
5765         (vn_reference_hasher::equal): Likewise.
5766         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5767         globals.
5768         (optimistic_info, current_info): Remove, keeping only valid_info.
5769         (vn_reference_lookup_1): Remove fallback lookup.
5770         (vn_reference_lookup_2): Likewise.
5771         (vn_nary_op_lookup_1): Likewise.
5772         (vn_phi_lookup): Likewise.
5773         (vn_nary_build_or_lookup_1): Make sure to not chain the built
5774         hash element.
5775         (vn_reference_insert): Adjust, chain the inserted hash element
5776         at last_inserted_ref.
5777         (vn_reference_insert_pieces): Likewise.
5778         (visit_reference_op_call): Likewise.
5779         (vn_nary_op_insert_into): Chain the inserted hash element at
5780         last_inserted_nary.
5781         (vn_nary_op_insert_pieces): Adjust.
5782         (vn_nary_op_insert): Likewise.
5783         (vn_nary_op_insert_stmt): Likewise.
5784         (vn_phi_insert): Adjust, chain the inserted hash element at
5785         last_inserted_phi.
5786         (process_scc): Remove clearing and copying the optimistic
5787         table.  Instead remove elements inserted during an optimistic
5788         iteration from the single table we maintain.
5789         (init_scc_vn): Adjust.
5790         (free_scc_vn): Likewise.
5791         (sccvn_dom_walker::record_cond): Likewise.
5792         (sccvn_dom_walker::after_dom_children): Likewise.
5794 2018-07-19  Martin Sebor  <msebor@redhat.com>
5796         PR tree-optimization/84047
5797         PR tree-optimization/83776
5798         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5799         (check_array_bounds): Call it.
5801 2018-07-19  Martin Sebor  <msebor@redhat.com>
5803         * align.h (align_flags): Use member initialization.
5805 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
5807         * Makefile.in (OBJS): Add optinfo.o.
5808         * coretypes.h (class symtab_node): New forward decl.
5809         (struct cgraph_node): New forward decl.
5810         (class varpool_node): New forward decl.
5811         * dump-context.h: New file.
5812         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5813         "tree-pass.h".
5814         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5815         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5816         (set_alt_dump_file): Likewise.
5817         (dump_context::~dump_context): New dtor.
5818         (dump_gimple_stmt): Move implementation to...
5819         (dump_context::dump_gimple_stmt): ...this new member function.
5820         Add the stmt to any pending optinfo, creating one if need be.
5821         (dump_gimple_stmt_loc): Move implementation to...
5822         (dump_context::dump_gimple_stmt_loc): ...this new member function.
5823         Start a new optinfo and add the stmt to it.
5824         (dump_gimple_expr): Move implementation to...
5825         (dump_context::dump_gimple_expr): ...this new member function.
5826         Add the stmt to any pending optinfo, creating one if need be.
5827         (dump_gimple_expr_loc): Move implementation to...
5828         (dump_context::dump_gimple_expr_loc): ...this new member function.
5829         Start a new optinfo and add the stmt to it.
5830         (dump_generic_expr): Move implementation to...
5831         (dump_context::dump_generic_expr): ...this new member function.
5832         Add the tree to any pending optinfo, creating one if need be.
5833         (dump_generic_expr_loc): Move implementation to...
5834         (dump_context::dump_generic_expr_loc): ...this new member
5835         function.  Add the tree to any pending optinfo, creating one if
5836         need be.
5837         (dump_printf): Move implementation to...
5838         (dump_context::dump_printf_va): ...this new member function.  Add
5839         the text to any pending optinfo, creating one if need be.
5840         (dump_printf_loc): Move implementation to...
5841         (dump_context::dump_printf_loc_va): ...this new member function.
5842         Start a new optinfo and add the stmt to it.
5843         (dump_dec): Move implementation to...
5844         (dump_context::dump_dec): ...this new member function.  Add the
5845         value to any pending optinfo, creating one if need be.
5846         (dump_context::dump_symtab_node): New member function.
5847         (dump_context::get_scope_depth): New member function.
5848         (dump_context::begin_scope): New member function.
5849         (dump_context::end_scope): New member function.
5850         (dump_context::ensure_pending_optinfo): New member function.
5851         (dump_context::begin_next_optinfo): New member function.
5852         (dump_context::end_any_optinfo): New member function.
5853         (dump_context::s_current): New global.
5854         (dump_context::s_default): New global.
5855         (dump_scope_depth): Delete global.
5856         (dumpfile_ensure_any_optinfo_are_flushed): New function.
5857         (dump_symtab_node): New function.
5858         (get_dump_scope_depth): Reimplement in terms of dump_context.
5859         (dump_begin_scope): Likewise.
5860         (dump_end_scope): Likewise.
5861         (selftest::temp_dump_context::temp_dump_context): New ctor.
5862         (selftest::temp_dump_context::~temp_dump_context): New dtor.
5863         (selftest::verify_item): New function.
5864         (ASSERT_IS_TEXT): New macro.
5865         (ASSERT_IS_TREE): New macro.
5866         (ASSERT_IS_GIMPLE): New macro.
5867         (selftest::test_capture_of_dump_calls): New test.
5868         (selftest::dumpfile_c_tests): Call it.
5869         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5870         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5871         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5872         descriptive comment.
5873         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5874         (dump_node, dump_bb): Move these unrelated decls.
5875         (class dump_manager): Add leading comment.
5876         * optinfo.cc: New file.
5877         * optinfo.h: New file.
5879 2018-07-19  Michael Collison  <michael.collison@arm.com>
5880             Richard Henderson <rth@redhat.com>
5882         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5883         (subti): Handle op1 zero.
5884         (subvti4, usub4ti4): New.
5885         (*sub<GPI>3_compare1_imm): New.
5886         (sub<GPI>3_carryinCV): New.
5887         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5888         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5890 2018-07-19  Michael Collison  <michael.collison@arm.com>
5891             Richard Henderson <rth@redhat.com>
5893         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5894         (addti3): Create simpler code if low part is already known to be 0.
5895         (addvti4, uaddvti4): New.
5896         (*add<GPI>3_compareC_cconly_imm): New.
5897         (*add<GPI>3_compareC_cconly): New.
5898         (*add<GPI>3_compareC_imm): New.
5899         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5900         handle constants within this pattern..
5901         (*add<GPI>3_compareV_cconly_imm): New.
5902         (*add<GPI>3_compareV_cconly): New.
5903         (*add<GPI>3_compareV_imm): New.
5904         (add<GPI>3_compareV): New.
5905         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5906         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5907         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5908         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5909         with 'comparison' operator.
5910         (*add<GPI>3_compareV_cconly_imm): Ditto.
5911         (*add<GPI>3_compareV_cconly): Ditto.
5912         (*add<GPI>3_compareV_imm): Ditto.
5913         (add<GPI>3_compareV): Ditto.
5914         (add<mode>3_carryinC): Ditto.
5915         (*add<mode>3_carryinC_zero): Ditto.
5916         (*add<mode>3_carryinC): Ditto.
5917         (add<mode>3_carryinV): Ditto.
5918         (*add<mode>3_carryinV_zero): Ditto.
5919         (*add<mode>3_carryinV): Ditto.
5921 2018-07-19  Michael Collison  <michael.collison@arm.com>
5922             Richard Henderson <rth@redhat.com>
5924         * config/aarch64/aarch64-modes.def (CC_V): New.
5925         * config/aarch64/aarch64-protos.h
5926         (aarch64_addti_scratch_regs): Declare
5927         (aarch64_subvti_scratch_regs): Declare.
5928         (aarch64_expand_subvti): Declare.
5929         (aarch64_gen_unlikely_cbranch): Declare
5930         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5931         for signed overflow using CC_Vmode.
5932         (aarch64_get_condition_code_1): Handle CC_Vmode.
5933         (aarch64_gen_unlikely_cbranch): New function.
5934         (aarch64_addti_scratch_regs): New function.
5935         (aarch64_subvti_scratch_regs): New function.
5936         (aarch64_expand_subvti): New function.
5938 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5940         * config/aarch64/aarch64-option-extensions.def: New entry for profile
5941         extension.
5942         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5943         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5944         extension.
5946 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5948         PR target/83009
5949         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5950         address check not strict.
5952 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5954         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5955         Umq with Umn.
5956         (store_pair_lanes<mode>): Likewise.
5957         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5958         enum value 'ADDR_QUERY_LDP_STP_N'.
5959         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5960         (aarch64_print_address_internal): Add declaration.
5961         (aarch64_print_ldpstp_address): Remove.
5962         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5963         (aarch64_print_operand): Change printing of 'y'.
5964         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5965         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5966         'true' rather than '1'.
5967         * config/aarch64/constraints.md (Uml): Likewise.
5968         (Uml): Rename to Umn.
5969         (Umq): Remove.
5971 2018-07-19  Richard Biener  <rguenther@suse.de>
5973         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5974         a trailing array.
5975         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5976         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5977         (vn_reference_hasher): Likewise.
5978         (struct vn_tables_s): Remove obstack and alloc-pool members.
5979         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5980         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5981         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5982         (vn_reference_insert_pieces): Likewise.
5983         (alloc_vn_nary_op_noinit): Adjust.
5984         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5985         (vn_phi_eq): Adjust.
5986         (shared_lookup_phiargs): Remove.
5987         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5988         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5989         (visit_reference_op_call): Likewise.
5990         (copy_nary, copy_phi, copy_reference): Remove.
5991         (process_scc): Rewind the obstack when iterating.  Do not
5992         copy the elements to valid_info but just move them from one
5993         hashtable to the other.
5994         (allocate_vn_table): Adjust.
5995         (free_vn_table): Likewise.
5996         (init_scc_vn): Likewise.
5997         (free_scc_vn): Likewise.
5999 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
6001         PR target/86560
6002         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
6003         indirect_return as function type attribute.
6004         (ix86_attribute_table): Change indirect_return to function
6005         type attribute.
6006         * doc/extend.texi: Update indirect_return attribute.
6008 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
6010         * wide-int.h (widest2_int): New.
6011         * gimple-fold.c (arith_overflowed_p): Use it.
6012         * tree.h (widest2_int_cst): New.
6013         * tree-vrp.c (wide_int_binop_overflow): Rename from
6014         vrp_int_const_binop.
6015         Rewrite to work on trees.
6016         (extract_range_from_multiplicative_op_1): Abstract code to...
6017         (wide_int_range_min_max): ...here.
6018         (wide_int_range_cross_product): ...and here.
6019         (extract_range_from_binary_expr_1): Abstract overflow code to...
6020         (wide_int_range_mult_wrapping): ...here.
6021         * tree-vrp.h (wide_int_range_cross_product): New.
6022         (wide_int_range_mult_wrapping): New.
6024 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
6025             Julia Koval  <julia.koval@intel.com>
6027         * config/i386/x86-tune-costs.h (skylake_memcpy,
6028         skylake_memset): Replace rep_prefix with unrolling for size 512.
6030 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
6032         PR middle-end/86544
6033         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
6034         comparision with EQ_EXPR in last stmt.
6036 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6038         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
6039         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
6040         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
6041         previously known as "PowerPC AltiVec Built-in Functions".  Move
6042         some material to new subsubsections "PowerPC AltiVec Built-in
6043         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
6044         ISA 2.07".
6045         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
6046         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
6047         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6048         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6050 2018-07-18  Richard Biener  <rguenther@suse.de>
6052         PR tree-optimization/86557
6053         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6054         EXACT_DIV_EXPR.
6056 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
6058         * config/s390/s390.c (s390_function_profiler): Generate CFI.
6060 2018-07-17  Jeff Law  <law@redhat.com>
6062         * config/arm/arm.c (get_label_padding): Update for recent
6063         changes to label_to_alignment.
6065         PR tree-optimization/86010
6066         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6068         * config/mips/mips.c (vr4130_align_insns): Update for recent
6069         changes to label_to_alignment.
6071         * config/frv/frv.c (frv_label_align): Update for recent changes
6072         to label_to_alignment.
6074         * config/nios2/nios2.c (nios2_label_align): Update for recent
6075         changes which dropped ALIGN_LABELS_LOG.
6077 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
6079         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6080         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6082 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
6084         * config/arc/arc.c (arc_label_align): Use align_labels instead of
6085         deprecated align_labels_log.
6087 2018-07-17  Richard Biener  <rguenther@suse.de>
6089         PR lto/86456
6090         * dwarf2out.c (init_sections_and_labels): Always generate
6091         a debug_line_str_section for early LTO debug.
6092         (dwarf2out_finish): Reset debug_line_str_hash output early.
6093         Bump counter for extra dwarf5 .debug_loc labels to not conflict
6094         with fat LTO part.
6095         (dwarf2out_early_finish): Output debug_line_str.
6097 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
6099         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6100         index register on z196 or later.
6102 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
6104         * config/s390/s390.c (s390_default_align): Set default function
6105         alignment to 16.
6106         (s390_override_options_after_change): Call s390_default align.
6107         (s390_option_override_internal): Call s390_default_align.
6108         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6110 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
6112         PR middle-end/86542
6113         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6114         to _looptemp_ clauses, other than the first two.
6116 2018-07-17  Martin Liska  <mliska@suse.cz>
6118         * opts.c: Do not enable OPT_falign_* for -Os.
6120 2018-07-17  Martin Liska  <mliska@suse.cz>
6122         * align.h (MAX_CODE_ALIGN): New.
6123         (MAX_CODE_ALIGN_VALUE): New.
6124         * common/config/i386/i386-common.c (ix86_handle_option):
6125         (MAX_CODE_ALIGN): Moved to align.h.
6126         * final.c (MAX_CODE_ALIGN): Likewise.
6127         * opts.c (parse_and_check_align_values):
6128         (MAX_CODE_ALIGN): Likewise.
6129         (MAX_CODE_ALIGN_VALUE): Likewise.
6131 2018-07-17  Martin Liska  <mliska@suse.cz>
6133         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6134         in order to fulfil coding style.
6135         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6136         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6137         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6138         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6139         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6140         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6141         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6142         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6143         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6145 2018-07-17  Martin Liska  <mliska@suse.cz>
6147         * align.h: New file.
6148         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6149         directly.
6150         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6151         align_flags of label_to_alignment.
6152         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6153         align_flags class.
6154         * config/m68k/m68k.c: Do not use removed align_labels_value and
6155         align_loops_value.
6156         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6157         (LOOP_ALIGN): Likewise.
6158         (LABEL_ALIGN): Likewise.
6159         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6160         Remove not used macro.
6161         (rs6000_loop_align): Change return type to align_flags.
6162         (rs6000_loop_align_max_skip): Remove.
6163         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6164         Change return type to align_flags.
6165         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6166         Remove not used macro.
6167         (rs6000_loop_align):  Change return type to align_flags.
6168         (rs6000_loop_align_max_skip): Remove.
6169         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6170         * config/rx/rx-protos.h (rx_align_for_label): Make it
6171         static function.
6172         * config/rx/rx.c (rx_align_for_label): Change return type
6173         to align_flags.
6174         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6175         macro definitions.
6176         into align_flags class.
6177         (LABEL_ALIGN): Likewise.
6178         (LOOP_ALIGN): Likewise.
6179         * config/s390/s390.c (s390_label_align): Use align_flags
6180         class member.
6181         (s390_asm_output_function_label): Likewise.
6182         * config/sh/sh.c (sh_override_options_after_change):
6183         Use align_flags class directly without macros.
6184         (find_barrier): Likewise.
6185         (barrier_align): Likewise.
6186         (sh_loop_align): Likewise.
6187         * config/spu/spu.c (spu_option_override):
6188         Use align_flags_tuple::get_value instead of removed macros.
6189         (spu_sched_init): Likewise.
6190         * config/spu/spu.h (GTY): Likewise.
6191         * config/visium/visium.c (visium_option_override):
6192         Set "8" as default secondary alignment.
6193         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6194         in order to guarantee secondary alignment of 8.
6195         * coretypes.h: Include align.h header file.
6196         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6197         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6198         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6199         * doc/tm.texi.in: Likewise.
6200         * final.c (struct label_alignment): Remove not used structure.
6201         (LABEL_ALIGN): Change type to align_flags.
6202         (LOOP_ALIGN): Likewise.
6203         (JUMP_ALIGN): Likewise.
6204         (default_loop_align_max_skip): Remove.
6205         (default_label_align_max_skip): Likewise.
6206         (default_jump_align_max_skip): Likewise.
6207         (default_label_align_after_barrier_max_skip):
6208         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6209         (LABEL_TO_MAX_SKIP): Remove.
6210         (label_to_alignment): Return align_flags type instead of integer.
6211         (label_to_max_skip): Remove.
6212         (align_fuzz): Use align_flags type.
6213         (compute_alignments): Use align_flags type and use align_flags::max
6214         to combine multiple alignments.
6215         (grow_label_align): Grow vec instead of C array.
6216         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6217         (shorten_branches):  Use align_flags type and use align_flags::max
6218         to combine multiple alignments.
6219         (final_scan_insn_1): Remove usage of secondary alignment that comes
6220         from label alignment, but instead use proper secondary alignment
6221         which is computed in grow_label_align.
6222         * flags.h (struct align_flags_tuple): Move to align.h.
6223         (struct align_flags): Likewise.
6224         (state_align_loops): Rename to align_loops.
6225         (state_align_jumps): Rename to align_jumps.
6226         (state_align_labels): Rename to align_labels.
6227         (state_align_functions): Rename to align_functions.
6228         (align_loops_log): Remove.
6229         (align_jumps_log): Remove.
6230         (align_labels_log): Remove.
6231         (align_functions_log): Remove.
6232         (align_loops_max_skip): Remove.
6233         (align_jumps_max_skip): Remove.
6234         (align_labels_max_skip): Remove.
6235         (align_functions_max_skip): Remove.
6236         (align_loops_value): Remove.
6237         (align_jumps_value): Remove.
6238         (align_labels_value): Remove.
6239         (align_functions_value): Remove.
6240         * output.h (label_to_alignment): Change return type to align_flags.
6241         (label_to_max_skip): Remove.
6242         * target.def: Remove loop_align_max_skip, label_align_max_skip,
6243         jump_align_max_skip macros.
6244         * targhooks.h (default_loop_align_max_skip): Remove.
6245         (default_label_align_max_skip): Likewise.
6246         (default_jump_align_max_skip): Likewise.
6247         (default_label_align_after_barrier_max_skip): Remove.
6248         * toplev.c (read_log_maxskip): Use ::normalize function.
6249         (parse_N_M): Remove not used argument and also call ::normalize.
6250         (parse_alignment_opts): Do not pass unused arguments.
6251         * varasm.c (assemble_start_function): Use directly align_functions
6252         instead of removed macros.
6253         * system.h: Do not poison removed macros.
6255 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
6257         PR middle-end/86539
6258         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6259         and cond temporaries don't have reference type if iterator has
6260         pointer type.  For init use &for_pre_body instead of pre_p if
6261         for_pre_body is non-empty.
6263 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
6265         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6266         double-double modes to SFmode directly directly.
6267         (trunc<mode>sf2_fprs): Delete.
6269 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
6271         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6272         for conversions between IFmode and the decimal floating point modes.
6273         (init_float128_ieee): Use the correct names for conversions between
6274         KFmode and the decimal floating point modes.
6276 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
6278         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6279         for the conversions between TDmode and IFmode.
6280         (init_float128_ieee): Use more correct names for the conversions
6281         between TDmode and KFmode.
6283 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
6285         PR tree-optimization/86526
6286         * builtins.c (expand_builtin_memcmp): Formatting fixes.
6287         (inline_expand_builtin_string_cmp): Likewise.
6288         (inline_string_cmp): Likewise.  Use c_readstr instead of
6289         builtin_memcpy_read_str.  Add unit_mode temporary.
6291 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6293         PR middle-end/86528
6294         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6295         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6297 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6299         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6300         Alphabetize prototypes of built-in functions, separating out
6301         built-in functions that are listed in this section but should be
6302         described elsewhere.
6304 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
6306         PR target/86511
6307         * expmed.c (emit_store_flag): Do not emit setcc followed by a
6308         conditional move when trapping comparison was split to a
6309         non-trapping one (and vice versa).
6311 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6313         * config/s390/s390.c (s390_function_profiler): Generate nops
6314         instead of profiler call sequences.
6315         * config/s390/s390.opt: Add the new option.
6317 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6319         * config/s390/s390.c (s390_function_profiler): Generate
6320         __mcount_loc section.
6321         * config/s390/s390.opt: Add the new option.
6323 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6325         * common.opt: Add the new warning.
6326         * config/s390/s390.c (s390_function_profiler): Emit "brasl
6327         %r0,__fentry__" when -mfentry is specified.
6328         (s390_option_override_internal): Disallow -mfentry for 31-bit
6329         CPUs.
6330         * config/s390/s390.opt: Add the new option.
6332 2018-07-16  Richard Biener  <rguenther@suse.de>
6334         PR lto/86523
6335         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6336         for function-local FUNCTION_DECL and RESULT_DECL immediately.
6338 2018-07-16  Martin Liska  <mliska@suse.cz>
6340         PR ipa/86529
6341         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6342         to ::get_create.
6344 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
6346         * config/arc/arcHS.md: Update ARCHS scheduling rules.
6348 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
6350         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6351         for ARCHS4x.
6352         * config/arc/arc-cpus.def (hs4x): New cpu.
6353         (hs4xd): Likewise.
6354         * config/arc/arc-tables.opt: Regenerate.
6355         * config/arc/arc.c (arc_sched_issue_rate): New function.
6356         (TARGET_SCHED_ISSUE_RATE): Define.
6357         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6358         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6359         fpu_cvt.
6360         (attr tune): Add ARCHS4x tune values.
6361         (attr tune_dspmpy): Define.
6362         (*tst): Correct instruction type.
6363         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6364         * config/arc/arcHS4x.md: New file.
6365         * config/arc/fpu.md: Update instruction type attributes.
6366         * config/arc/t-multilib: Regenerate.
6368 2018-07-16  Tom de Vries  <tdevries@suse.de>
6370         PR debug/86455
6371         * var-tracking.c (vt_initialize): Fix pre_dec handling.
6373 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6375         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6376         early clobber.
6378 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
6380         PR tree-optimization/86514
6381         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6382         conversion to a boolean type from a type with greater precision.
6384 2018-07-16  Tom de Vries  <tdevries@suse.de>
6386         * var-tracking.c (vt_initialize): Print adjusted insn slim if
6387         dump_flags request TDF_SLIM.
6389 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
6391         * fold-const.c (int_const_binop_1): Abstract...
6392         (wide_int_binop): ...wide int code here.
6393         (poly_int_binop): ...poly int code here.
6394         Abstract the rest of int_const_binop_1 into int_const_binop.
6395         * fold-const.h (wide_int_binop): New.
6396         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6397         Remove useless PLUS/MINUS_EXPR case.
6398         (zero_nonzero_bits_from_vr): Move wide int code...
6399         (zero_nonzero_bits_from_bounds): ...here.
6400         (extract_range_from_binary_expr_1): Move mask optimization code...
6401         (range_easy_mask_min_max): ...here.
6402         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6403         (range_easy_mask_min_max): New.
6405 2018-07-15  Jeff Law  <law@redhat.com>
6407         PR target/85993
6408         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6409         block.
6411 2018-07-14  Jim Wilson  <jimw@sifive.com>
6413         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6415 2018-07-14  Paul Koning  <ni1d@arrl.net>
6417         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6419 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
6421         * lto-streamer-out.c (copy_function_or_variable): Dump info about
6422         copying section.
6424 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
6425             Steve Munroe  <munroesj52@gmail.com>
6427         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6428         (_mm_andnot_si128): Likewise.
6429         (_mm_or_si128): Likewise.
6430         (_mm_xor_si128): Likewise.
6432 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
6434         PR middle-end/78809
6435         * builtins.c (expand_builtin_memcmp): Inline the calls first
6436         when result_eq is false.
6437         (expand_builtin_strcmp): Inline the calls first.
6438         (expand_builtin_strncmp): Likewise.
6439         (inline_string_cmp): New routine. Expand a string compare
6440         call by using a sequence of char comparison.
6441         (inline_expand_builtin_string_cmp): New routine. Inline expansion
6442         a call to str(n)cmp/memcmp.
6443         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6444         New option.
6445         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6447 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
6449         * config/arm/driver-arm.c: Include arm-native.h.
6450         (host_detect_local_cpu): Use auto-generated data tables.
6451         (vendors, arm_cpu_table): Delete.  Move part information to ...
6452         * config/arm/arm-cpus.in: ... here.
6453         * config/arm/parsecpu.awk (gen_native): New function.
6454         (vendor, part): New CPU fields.
6455         (END): Add support for building the native CPU detection tables.
6456         * config/arm/t-arm (arm-native.h): Add build rule.
6457         (driver-arm.o): Add dependency on arm-native.h.
6459 2018-07-13  Richard Biener  <rguenther@suse.de>
6461         PR middle-end/85974
6462         * match.pd (addr1 - addr2): Allow either of the operand to
6463         have a conversion.
6465 2018-07-13  Tom de Vries  <tdevries@suse.de>
6467         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6468         in remap_ssa_name.
6470 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
6472         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6473         arrays instead of numbered variables.
6475 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
6477         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6478         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6480 2018-07-13  Richard Biener  <rguenther@suse.de>
6482         PR debug/86452
6483         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6484         instead of get_context_die.
6486 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
6487             Richard Biener  <rguenther@suse.de>
6489         PR middle-end/86489
6490         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6491         that the loop latch destination where phi is defined.
6493 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
6495         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6496         (riscv_expand_epilogue): Add assertion to check interrupt mode.
6497         (riscv_set_current_function): Extract getting interrupt type to new
6498         function.
6499         (riscv_get_interrupt_type): New function.
6500         (riscv_merge_decl_attributes): New function, checking interrupt type is
6501         same.
6502         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6504 2018-07-12  Paul Koning  <ni1d@arrl.net>
6506         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6507         directive.
6509 2018-07-12  Paul Koning  <ni1d@arrl.net>
6511         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6512         zero reference, add doloop_end instead.
6513         * doc/md.texi (decrement_and_branch_until_zero): Remove.
6514         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
6515         detail for doloop_end.
6517 2018-07-12  Martin Sebor  <msebor@redhat.com>
6519         PR c/86453
6520         * attribs.c (decl_attributes): Reject conflicting attributes before
6521         calling attribute handlers.
6523 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6525         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6526          parameter.
6527         (gcc::dump_manager::get_dump_file_name): likewise.
6528         (dump_begin): Likewise.
6529         * dumpfile.h (dump_begin): Update prototype.
6530         (gcc::dump_manager::get_dump_file_name,
6531         gcc::dump_manager::get_dump_file_name): Update prototype.
6533 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6535         * internal-fn.h (vectorizable_internal_fn_p): New function.
6536         * tree-vect-slp.c (compatible_calls_p): Likewise.
6537         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
6538         to internal functions.
6539         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6541 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6543         * fold-const.h (inverse_conditions_p): Declare.
6544         * fold-const.c (inverse_conditions_p): New function.
6545         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
6546         that test the inverse condition of a conditional internal function.
6547         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6548         * internal-fn.c (internal_fn_mask_index): Handle conditional
6549         internal functions.
6550         (vectorized_internal_fn_supported_p): New function.
6551         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6552         (any_pred_load_store): Replace with...
6553         (need_to_predicate): ...this new variable.
6554         (redundant_ssa_names): New variable.
6555         (ifcvt_can_use_mask_load_store): Move initial checks to...
6556         (ifcvt_can_predicate): ...this new function.  Handle tree codes
6557         for which a conditional internal function exists.
6558         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6559         instead of ifcvt_can_use_mask_load_store.  Update after variable
6560         name change.
6561         (predicate_load_or_store): New function, split out from
6562         predicate_mem_writes.
6563         (check_redundant_cond_expr): New function.
6564         (value_available_p): Likewise.
6565         (predicate_rhs_code): Likewise.
6566         (predicate_mem_writes): Rename to...
6567         (predicate_statements): ...this.  Use predicate_load_or_store
6568         and predicate_rhs_code.
6569         (combine_blocks, tree_if_conversion): Update after above name changes.
6570         (ifcvt_local_dce): Handle redundant_ssa_names.
6571         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6572         general conditional functions.
6573         * tree-vect-stmts.c (vectorizable_call): Likewise.
6575 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6576             Alan Hayward  <alan.hayward@arm.com>
6577             David Sherwood  <david.sherwood@arm.com>
6579         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6580         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6581         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6582         plus and minus and convert them into IFN_COND_FMA-based sequences.
6583         (convert_mult_to_fma): Handle conditional plus and minus.
6585 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6587         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6588         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6589         (cond_fnms_optab): New optabs.
6590         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6591         internal functions.
6592         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6593         * internal-fn.h (get_conditional_internal_fn): Declare.
6594         (get_unconditional_internal_fn): Likewise.
6595         * internal-fn.c (cond_ternary_direct): New macro.
6596         (expand_cond_ternary_optab_fn): Likewise.
6597         (direct_cond_ternary_optab_supported_p): Likewise.
6598         (FOR_EACH_COND_FN_PAIR): Likewise.
6599         (get_conditional_internal_fn): New function.
6600         (get_unconditional_internal_fn): Likewise.
6601         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6602         (gimple_match_op::gimple_match_op): Add a new overload for 5
6603         operands.
6604         (gimple_match_op::set_op): Likewise.
6605         (gimple_resimplify5): Declare.
6606         * genmatch.c (decision_tree::gen): Generate simplifications for
6607         5 operands.
6608         * gimple-match-head.c (gimple_simplify): Define an overload for
6609         5 operands.  Handle calls with 5 arguments in the top-level overload.
6610         (convert_conditional_op): Handle conversions from unconditional
6611         internal functions to conditional ones.
6612         (gimple_resimplify5): New function.
6613         (build_call_internal): Pass a fifth operand.
6614         (maybe_push_res_to_seq): Likewise.
6615         (try_conditional_simplification): Try converting conditional
6616         internal functions to unconditional internal functions.
6617         Handle 3-operand unconditional forms.
6618         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6619         Define ternary equivalents of the current rules for binary conditional
6620         internal functions.
6621         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6622         ternary operations.
6623         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6624         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6625         (optab): Handle them.
6626         (SVE_COND_FP_TERNARY): New int iterator.
6627         (sve_fmla_op, sve_fmad_op): New int attributes.
6628         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6629         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6630         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6632 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6634         * target.def (preferred_else_value): New target hook.
6635         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6636         * doc/tm.texi: Regenerate.
6637         * targhooks.h (default_preferred_else_value): Declare.
6638         * targhooks.c (default_preferred_else_value): New function.
6639         * internal-fn.h (conditional_internal_fn_code): Declare.
6640         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6641         (get_conditional_internal_fn): Use it.
6642         (conditional_internal_fn_code): New function.
6643         * gimple-match.h (gimple_match_cond): New struct.
6644         (gimple_match_op): Add a cond member function.
6645         (gimple_match_op::gimple_match_op): Update all forms to take a
6646         gimple_match_cond.
6647         * genmatch.c (expr::gen_transform): Use the same condition as res_op
6648         for the suboperation, but don't specify a particular else_value.
6649         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6650         (visit_nary_op, visit_reference_op_load): Pass
6651         gimple_match_cond::UNCOND to the gimple_match_op constructor.
6652         * gimple-match-head.c: Include tree-eh.h
6653         (convert_conditional_op): New function.
6654         (maybe_resimplify_conditional_op): Likewise.
6655         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6656         (gimple_resimplify2): Likewise.
6657         (gimple_resimplify3): Likewise.
6658         (gimple_resimplify4): Likewise.
6659         (maybe_push_res_to_seq): Return null for conditional operations.
6660         (try_conditional_simplification): New function.
6661         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
6662         constructor.
6663         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6664         IFN_COND_* call.
6665         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6666         function.
6667         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6669 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6671         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6672         DECL_FCONTEXT
6673         (hash_tree): Do not hash DECL_FCONTEXT
6674         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6675         Do not stream DECL_FCONTEXT.
6676         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6677         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6679 2018-07-12  Richard Biener  <rguenther@suse.de>
6681         PR debug/86462
6682         * dwarf2out.c (gen_block_die): Only output blocks when they have
6683         at least one !DECL_IGNORED_P variable.
6685 2018-07-12  Richard Biener  <rguenther@suse.de>
6687         PR target/84829
6688         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6689         Remove -mieee-fp handling.
6691 2018-07-12  Richard Biener  <rguenther@suse.de>
6693         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6694         left-over from last patch.
6696 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
6698         PR tree-optimization/86492
6699         * gimple-ssa-store-merging.c
6700         (imm_store_chain_info::coalesce_immediate_stores): Call
6701         check_no_overlap even for the merge_overlapping case.  Formatting fix.
6703 2018-07-12  Richard Biener  <rguenther@suse.de>
6705         PR middle-end/86479
6706         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6707         move possibly trapping operations into the conditional.
6709 2018-07-12  Richard Biener  <rguenther@suse.de>
6711         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6712         (vn_lookup_simplify_result): Remove recursion limit applied
6713         here.
6714         (vn_nary_build_or_lookup_1): Adjust.
6715         (try_to_simplify): Likewise.
6716         * gimple-match-head.c (gimple_resimplify1): Instead apply one
6717         here.
6718         (gimple_resimplify2): Likewise.
6719         (gimple_resimplify3): Likewise.
6720         (gimple_resimplify4): Likewise.
6722 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
6724         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6725         Use __mmask64 type instead of __mmask8 for __M argument.
6726         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6727         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6728         __U argument.
6729         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6730         __mmask16 for __M argument.
6731         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6732         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6733         to __mmask16 instead of __mmask8.
6734         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6735         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6736         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6737         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6738         instead of __mmask16 for __U argument.
6739         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6740         __mmask16 instead of __mmask8 for __U argument.
6741         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6742         __U argument.
6743         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6744         __mmask16.
6745         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6746         argument.
6747         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6748         __U argument.
6749         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6750         __mmask16.
6751         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6752         of __mmask16.
6753         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6754         __U argument.
6755         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6756         __U argument.
6757         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6758         __U argument.
6759         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6760         __U argument.
6761         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6762         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6763         return type as well as __M argument type and all casts from __mmask8
6764         to __mmask32.
6765         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6766         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6767         return type as well as __M argument type and all casts from __mmask8
6768         to __mmask16.
6769         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6770         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6771         return type as well as __M argument type and all casts from __mmask8
6772         to __mmask32.
6773         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6774         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6775         return type as well as __M argument type and all casts from __mmask8
6776         to __mmask16.
6777         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6778         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6779         __mmask16.
6781 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
6783         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6784         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6785         for __U argument.
6787 2018-07-11  Paul Koning  <ni1d@arrl.net>
6789         * doc/md.texi (define_subst): Document how multiple occurrences of
6790         the same argument in the replacement pattern are handled.
6792 2018-07-11  Paul Koning  <ni1d@arrl.net>
6794         * doc/extend.texi (Common Variable Attributes): Move "mode" into
6795         alphabetical order.
6796         (Common Type Attributes): Add "mode" attribute.
6798 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
6800         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6801         stream DECL_ORIGINAL_TYPE.
6802         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6803         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6804         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6805         Do not walk original type.
6806         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6807         external decls.
6808         (write_ts_decl_non_common_tree_pointers): Do not stream
6809         DECL_ORIGINAL_TYPE
6810         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6811         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6813 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6815         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6816         thread twice from the same starting edge.
6818 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6820         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6821         * gimple.c (gimple_call_nonnull_result_p): ...here...
6822         (gimple_call_nonnull_arg): ...and here.
6823         * gimple.h (gimple_call_nonnull_result_p): New.
6824         (gimple_call_nonnull_arg): New.
6826 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
6828         * config/arm/arm-cpus.in: Move information from fpu field of each
6829         cpu definition to the isa field.
6830         * config/arm/parsecpu.awk (fpu): Delete match rule.
6831         (gen_comm_data): Don't add bits from the CPU's FPU entry.
6833 2018-07-11  Richard Biener  <rguenther@suse.de>
6835         PR debug/86457
6836         * dwarf2out.c (init_sections_and_labels): Use
6837         output_asm_line_debug_info consistently.
6838         (dwarf2out_early_finish): Likewise.
6839         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6840         type units.
6842 2018-07-11  Richard Biener  <rguenther@suse.de>
6844         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6845         Rework father_bb setting in a way to avoid propagating constants
6846         multiple times on a loop body.
6848 2018-07-10  Mark Wielaard  <mark@klomp.org>
6850         PR debug/86459
6851         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6853 2018-07-10  Richard Biener  <rguenther@suse.de>
6855         * hash-map.h (hash_map::iterator::operator*): Return
6856         references to key and value.
6858 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
6860         PR c++/86443
6861         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6862         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6863         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6864         (gimplify_omp_for): For composite loops, move outer
6865         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6866         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
6867         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
6868         TREE_LIST for both the original class iterator and the "last" helper
6869         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
6870         loop, remember has_decl_expr from outer composite loops for the
6871         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6873 2018-07-09  Martin Sebor  <msebor@redhat.com>
6875         PR middle-end/77357
6876         PR middle-end/86428
6877         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6878         accessing implicitly initialized array elements.
6879         * expr.c (string_constant): Handle string initializers of
6880         character arrays within aggregates.
6881         * gimple-fold.c (fold_array_ctor_reference): Add argument.
6882         Store element offset.  As a special case, handle zero size.
6883         (fold_nonarray_ctor_reference): Same.
6884         (fold_ctor_reference): Add argument.  Store subobject offset.
6885         * gimple-fold.h (fold_ctor_reference): Add argument.
6887 2018-07-09  Paul Koning  <ni1d@arrl.net>
6889         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6890         (pdp11_insn_cost): New function.
6891         (pdp11_md_asm_adjust): New function.
6892         (TARGET_INVALID_WITHIN_DOLOOP): Define.
6893         (pdp11_rtx_costs): Update to match machine better.
6894         (output_addr_const_pdp11): Correct format mismatch warnings.
6895         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6896         * config/pdp11/pdp11.md: General change to add base_cost and/or
6897         length attributes for use by new pdp11_insn_cost function.
6898         (MIN_BRANCH): Correct definition.
6899         (MIN_SOB): Ditto.
6900         (doloop_end): Use standard pattern name for looping pattern.
6901         (doloop_end_nocc): New.
6902         (movsf): Add another constraint alternative.
6903         (zero_extendqihi2): Add constraint alternatives for not in place
6904         extend.
6905         (zero_extendhisi2): Remove.
6906         (shift patterns): Add CC handling variants.
6907         (bswaphi2): New.
6908         (bswapsi2): New.
6909         (rothi3): New.
6910         (define_peephole2): New peephole to recognize mov that sets CC for
6911         subsequent test.
6913 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6915         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6916         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6917         wi::add.
6919 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
6921         PR c/86420
6922         * real.c (real_nextafter): Return true if result is denormal.
6924 2018-07-09  Martin Liska  <mliska@suse.cz>
6926         * common.opt: Add back wrongly removed attribute.
6928 2018-07-09  Richard Biener  <rguenther@suse.de>
6930         PR debug/86413
6931         * dwarf2out.c (gen_block_die): For an early generated DIE
6932         always output high/low PC attributes.
6934 2018-07-09  Tom de Vries  <tdevries@suse.de>
6936         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6937         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6938         onto VAR_DECL with abstract origin.
6940 2018-07-07  Jim Wilson  <jimw@sifive.com>
6942         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6944 2018-07-07  Tom de Vries  <tdevries@suse.de>
6946         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6948 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
6950         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6951         overflow_type.
6952         (combine_bound): Use wide-int overflow calculation instead of
6953         rolling our own.
6954         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6955         overflow_type.
6956         * fold-const.c (int_const_binop_2): Same.
6957         (extract_muldiv_1): Same.
6958         (fold_div_compare): Same.
6959         (fold_abs_const): Same.
6960         * match.pd: Same.
6961         * poly-int.h (add): Same.
6962         (sub): Same.
6963         (neg): Same.
6964         (mul): Same.
6965         * predict.c (predict_iv_comparison): Same.
6966         * profile-count.c (slow_safe_scale_64bit): Same.
6967         * simplify-rtx.c (simplify_const_binary_operation): Same.
6968         * tree-chrec.c (tree_fold_binomial): Same.
6969         * tree-data-ref.c (split_constant_offset_1): Same.
6970         * tree-if-conv.c (idx_within_array_bound): Same.
6971         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6972         * tree-ssa-phiopt.c (minmax_replacement): Same.
6973         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6974         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6975         * vr-values.c (vr_values::adjust_range_with_scev): Same.
6976         * wide-int.cc (wi::add_large): Same.
6977         (wi::mul_internal): Same.
6978         (wi::sub_large): Same.
6979         (wi::divmod_internal): Same.
6980         * wide-int.h: Change overflow type to overflow_type for neg, add,
6981         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6982         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6983         mul_internal, divmod_internal.
6984         (overflow_type): New enum.
6985         (accumulate_overflow): New.
6987 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6989         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6990         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6992 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6994         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6995         argument is checked for zero before entering loop, avoid checking again.
6997 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6999         * gimplify.h (generic_expr_could_trap_p): Set as global function.
7000         * gimplify.h (generic_expr_could_trap_p): Likwise.
7001         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
7003 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
7005         PR tree-optimization/86401
7006         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
7007         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
7008         (fold_bit_and_mask): ... here.  New helper function for match.pd.
7009         * fold-const.h (fold_bit_and_mask): Declare.
7010         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
7012 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
7014         PR target/86324
7015         * target.def (translate_mode_attribute): New hook.
7016         * targhooks.h (default_translate_mode_attribute): Declare.
7017         * targhooks.c (default_translate_mode_attribute): New function.
7018         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
7019         * doc/tm.texi: Regenerate.
7020         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
7021         (rs6000_translate_mode_attribute): New function.
7023 2018-07-06  Paul Koning  <ni1d@arrl.net>
7025         * doc/md.texi (define_split): Document DONE and FAIL.
7026         (define_peephole2): Ditto.
7028 2018-07-05  Jeff Law  <law@redhat.com>
7030         PR tree-optimization/86010
7031         * tree-ssa-dse.c (compute_trims): More aggressively trim at
7032         both the head and tail of mem* and str* calls.
7034 2018-07-05  Jim Wilson  <jimw@sifive.com>
7036         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
7038 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
7040         * config/aarch64/aarch64-simd.md: correct flags text for
7041         MIN_EXPR replacement.
7043 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
7045         * configure: Regenerated.
7047 2018-07-05  Carl Love  <cel@us.ibm.com>
7049         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7050         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7051         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7052         VSX_BUILTIN_DOUBLEL_V4SF.
7054 2018-07-05  Martin Sebor  <msebor@redhat.com>
7056         PR c++/86400
7057         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7058         than its domain to compute its the upper bound of a char array.
7060 2018-07-05  Nathan Sidwell  <nathan@acm.org>
7062         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7063         * doc/cpp.texi: Update comment.
7064         * doc/tm.texi: Rebuilt.
7065         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7066         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7067         * doc/extend.texi (Backwards Compatibility): Clarify it is system
7068         headers affected by extern "C".
7069         * system.h: Poison NO_IMPLICIT_EXTERN_C.
7070         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7071         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7072         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7073         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7074         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7075         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7076         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7077         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7078         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7079         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7080         config/sparc/sp64-elf.h, config/spu/spu.h,
7081         config/stormy16/stormy16.h, config/v850/v850.h,
7082         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7083         define NO_IMPLICIT_EXTERN_C.
7084         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7086 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
7088         PR target/84711
7089         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7090         instead of GET_MODE_SIZE when comparing Units.
7092 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
7094         PR target/84711
7095         * rtlanal.c (set_noop_p): Constrain on mode change,
7096         include hard-reg-set.h
7098 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
7100         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7102 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
7104         Revert
7105         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
7107         PR sanitizer/84250
7108         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7109         libasan.
7110         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7112 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
7114         PR sanitizer/84250
7115         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7116         libasan.
7117         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7119 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
7121         PR middle-end/86380
7122         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7124 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
7126         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7127         neg_*_op* variables.
7129 2018-07-04  Martin Liska  <mliska@suse.cz>
7131         * tree-switch-conversion.c: Define
7132         max_ratio_for_speed and max_ratio_for_size constants.
7134 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
7135             Martin Liska  <mliska@suse.cz>
7137         PR middle-end/66240
7138         PR target/45996
7139         PR c/84100
7140         * common.opt: Rename align options with 'str_' prefix.
7141         * common/config/i386/i386-common.c (set_malign_value): New
7142         function.
7143         (ix86_handle_option): Use it to set -falign-* options/
7144         * config/aarch64/aarch64-protos.h (struct tune_params): Change
7145         type from int to string.
7146         * config/aarch64/aarch64.c: Update default values from int
7147         to string.
7148         * config/alpha/alpha.c (alpha_override_options_after_change):
7149         Likewise.
7150         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7151         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7152         max skip conditionally.
7153         * config/i386/freebsd.h (SUBALIGN_LOG): New.
7154         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7155         max skip conditionally.
7156         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7157         max skip conditionally.
7158         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7159         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7160         max skip conditionally.
7161         * config/i386/i386.c (struct ptt): Change type from int to
7162         string.
7163         (ix86_default_align): Set default values.
7164         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7165         max skip conditionally.
7166         * config/i386/iamcu.h (SUBALIGN_LOG): New.
7167         (ASM_OUTPUT_MAX_SKIP_ALIGN):
7168         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7169         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7170         max skip conditionally.
7171         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7172         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7173         * config/i386/x86-64.h (SUBALIGN_LOG): New.
7174         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7175         max skip conditionally.
7176         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7177         * config/ia64/ia64.c (ia64_option_override): Set default values
7178         for alignment options.
7179         * config/m68k/m68k.c: Handle new str_align_* options.
7180         * config/mips/mips.c (mips_set_compression_mode): Change
7181         type of constants.
7182         (mips_option_override): Set default values for options.
7183         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7184         Likewise.
7185         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7186         Likewise.
7187         * config/rx/rx.c (rx_option_override): Likewise.
7188         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7189         (LABEL_ALIGN): Use align_labels_log.
7190         (LOOP_ALIGN): Use align_loops_align.
7191         * config/s390/s390.c (s390_asm_output_function_label): Use new
7192         macros.
7193         * config/sh/sh.c (sh_override_options_after_change):
7194         Change type of constants.
7195         * config/spu/spu.c (spu_sched_init): Likewise.
7196         * config/sparc/sparc.c (sparc_option_override): Set default
7197         values for options.
7198         * config/visium/visium.c (visium_option_override): Likewise.
7199         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7200         emit p2align format with last argument if it's not needed.
7201         * doc/invoke.texi: Document extended format of -falign-*.
7202         * final.c: Use align_labels alignment.
7203         * flags.h (struct target_flag_state): Change type to use
7204         align_flags.
7205         (struct align_flags_tuple): New.
7206         (struct align_flags): Likewise.
7207         (align_loops_log): Redefine macro to use new types.
7208         (align_loops_max_skip): Redefine macro to use new types.
7209         (align_jumps_log): Redefine macro to use new types.
7210         (align_jumps_max_skip): Redefine macro to use new types.
7211         (align_labels_log): Redefine macro to use new types.
7212         (align_labels_max_skip): Redefine macro to use new types.
7213         (align_functions_log): Redefine macro to use new types.
7214         (align_loops): Redefine macro to use new types.
7215         (align_jumps): Redefine macro to use new types.
7216         (align_labels): Redefine macro to use new types.
7217         (align_functions): Redefine macro to use new types.
7218         (align_functions_max_skip): Redefine macro to use new types.
7219         (align_loops_value): New macro.
7220         (align_jumps_value): New macro.
7221         (align_labels_value): New macro.
7222         (align_functions_value): New macro.
7223         * function.c (invoke_set_current_function_hook): Propagate
7224         alignment values from flags to global variables default in
7225         topleev.h.
7226         * ipa-icf.c (sem_function::equals_wpa): Use
7227         cl_optimization_option_eq instead of memcmp.
7228         * lto-streamer.h (cl_optimization_stream_out): Support streaming
7229         of string types.
7230         (cl_optimization_stream_in): Likewise.
7231         * optc-save-gen.awk: Support strings in cl_optimization.
7232         * opth-gen.awk: Likewise.
7233         * opts.c (finish_options): Remove error checking of invalid
7234         value ranges.
7235         (MAX_CODE_ALIGN): Remove.
7236         (MAX_CODE_ALIGN_VALUE): Likewise.
7237         (parse_and_check_align_values): New function.
7238         (check_alignment_argument): Likewise.
7239         (common_handle_option): Use check_alignment_argument.
7240         * opts.h (parse_and_check_align_values): Declare.
7241         * toplev.c (init_alignments): Remove.
7242         (read_log_maxskip): New.
7243         (parse_N_M): Likewise.
7244         (parse_alignment_opts): Likewise.
7245         (backend_init_target): Remove usage of init_alignments.
7246         * toplev.h (parse_alignment_opts): Declare.
7247         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7248         argument.
7249         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7250         * tree.c (cl_option_hasher::equal): New.
7251         * varasm.c: Use new global macros.
7253 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
7255         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7256         Use a simpler align directive also if MAXSKIP = ALIGN-1.
7257         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7258         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7259         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7260         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7261         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7262         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7263         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7264         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7265         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7266         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7267         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7269 2018-07-04  Martin Liska  <mliska@suse.cz>
7270             Jonathan Wakely  <jwakely@redhat.com>
7272         * coverage.c: Use correct type.
7273         * doc/invoke.texi: Language correction.
7275 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
7277         PR target/85620
7278         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7279         ENDBRANCH for non-tail call which may return via indirect branch.
7280         * doc/extend.texi: Document indirect_return attribute.
7282 2018-07-03  Martin Sebor  <msebor@redhat.com>
7284         PR tree-optimization/86274
7285         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7286         precondition.
7287         (format_floating): Correct handling of infinities and NaNs.
7289 2018-07-03  Martin Sebor  <msebor@redhat.com>
7291         * print-tree.c (print_real_cst): New function.
7292         (print_node_brief): Call it.
7293         (print_node): Ditto.
7295 2018-07-03  Jeff Law  <law@redhat.com>
7297         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7298         into a single pattern.
7300         * config/h8300/h8300.md (ors code_iterator): New.
7301         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7302         a single pattern and single splitter.
7303         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7304         (iorqi3_1, xorqi3_1): Likewise.
7305         (iorqi3, xorqi3 expanders): Similarly.
7307         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7308         (movmd_internal) into a single pattern using the P mode iterator.
7309         (movmd splitters): Similarly.
7310         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7311         (movsd splitters): Similarly.
7313         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7314         ADDB, ADDW and ADDL into a single ADD attribute which selects the
7315         right table based on the size of the operand.
7316         * config/h8300/h8300.md (length_table): Corresponding changes. All
7317         references to "addb", "addw" and "addl" changed to "add".
7318         (btst patterns): Merge two variants into a single pattern.
7319         (tstqi, tsthi): Likewise.
7320         (addhi3_incdec, addsi3_incdec): Likewise.
7321         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7322         (mulhi3, mulsi3): Likewise.
7323         (udivhi3, udivsi3): Likewise.
7324         (divhi3, divsi3): Likewise.
7325         (andorqi3, andorhi3, andorsi3): Likewise.
7327 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
7329         PR target/85694
7330         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7331         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7333 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7335         PR tree-optimization/85694
7336         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7337         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7338         UNSPEC_URHADD.
7339         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7340         (<u>avg<mode>3_ceil): New patterns.
7342 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
7344         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7345         scan-tree-dump directive.
7346         * gcc.dg/vect/slp-perm-2.c: Likewise.
7347         * gcc.dg/vect/slp-perm-3.c: Likewise.
7348         * gcc.dg/vect/slp-perm-5.c: Likewise.
7349         * gcc.dg/vect/slp-perm-6.c: Likewise.
7350         * gcc.dg/vect/slp-perm-7.c: Likewise.
7351         * gcc.dg/vect/slp-perm-8.c: Likewise.
7353 2018-07-03  Marek Polacek  <polacek@redhat.com>
7355         PR middle-end/86202
7356         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7358 2018-07-03  Richard Biener  <rguenther@suse.de>
7360         PR ipa/86389
7361         * tree-ssa-structalias.c (find_func_clobbers): Properly
7362         handle indirect calls.
7364 2018-07-03  Jeff Law  <law@redhat.com>
7366         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7367         (shifts): New code iterator.
7368         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7369         expander.  Fix HImode handling on H8/SX.
7370         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7371         (subqi3, subhi3, subsi3 expanders): Likewise.
7372         (andqi3, andhi3, andsi3 expanders): Likewise.
7373         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7374         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7375         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7376         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7377         (zero_extendqihi2, zero_extendqisi2): Likewise.
7378         (extendqihi2, extendqisi2): Likewise.
7379         (rotlqi3, rotlhi3, rotlsi3): Likewise.
7380         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7381         (rotlqi3_1, rotlhi3_1): Likewise.
7382         (logicalhi3_sn, logicalsi3_sn): Likewise.
7383         (logicalhi3, logicalsi3): Likewise.
7385 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7387         * tree-vect-patterns.c (vect_recog_rotate_pattern)
7388         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7389         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7390         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7391         type to append_pattern_def_seq instead of creating a stmt_vec_info
7392         directly.
7393         (build_mask_conversion): Likewise.  Remove vinfo argument.
7394         (vect_add_conversion_to_patterm): Likewise, renaming to...
7395         (vect_add_conversion_to_pattern): ...this.
7396         (vect_recog_mask_conversion_pattern): Update call to
7397         build_mask_conversion.  Pass the vector type to
7398         append_pattern_def_seq here too.
7399         (vect_recog_gather_scatter_pattern): Update call to
7400         vect_add_conversion_to_pattern.
7402 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7404         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7405         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7406         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7407         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7408         STMT_VINFO_PATTERN_DEF_SEQ to null here.
7409         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7410         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7411         append_pattern_def_seq instead of new_pattern_def_seq.
7412         (vect_recog_divmod_pattern): Do both of the above.
7413         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7414         is null.
7416 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7418         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7419         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7420         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7421         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7422         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7423         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7424         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7425         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7426         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7427         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7428         parameter with a single stmt_vec_info.
7429         (vect_recog_func_ptr): Likewise.
7430         (vect_recog_gather_scatter_pattern): Likewise, folding in...
7431         (vect_try_gather_scatter_pattern): ...this.
7432         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7433         the stmt_vec_info of the statement to be matched.  Don't clear
7434         STMT_VINFO_RELATED_STMT.
7435         (vect_pattern_recog): Update call accordingly.
7437 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7439         PR tree-optimization/85694
7440         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7441         (uavgM3_ceil): Document new optabs.
7442         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7443         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7444         functions.
7445         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7446         (savg_ceil_optab): New optabs.
7447         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7448         (vect_vect_recog_func_ptrs): Add it.
7449         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7450         constant directly from the associated lhs.
7452 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7454         * tree-vect-patterns.c (vect_split_statement): New function.
7455         (vect_convert_input): Use it to try to split an existing cast.
7457 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7459         * poly-int.h (print_hex): New function.
7460         * dumpfile.h (dump_dec, dump_hex): Declare.
7461         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7462         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7463         min_input_precision, operation_precision and operation_sign.
7464         * tree-vect-patterns.c (vect_get_range_info): New function.
7465         (vect_same_loop_or_bb_p, vect_single_imm_use)
7466         (vect_operation_fits_smaller_type): Delete.
7467         (vect_look_through_possible_promotion): Add an optional
7468         single_use_p parameter.
7469         (vect_recog_over_widening_pattern): Rewrite to use new
7470         stmt_vec_info infomration.  Handle one operation at a time.
7471         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7472         (vect_truncatable_operation_p, vect_set_operation_type)
7473         (vect_set_min_input_precision): New functions.
7474         (vect_determine_min_output_precision_1): Likewise.
7475         (vect_determine_min_output_precision): Likewise.
7476         (vect_determine_precisions_from_range): Likewise.
7477         (vect_determine_precisions_from_users): Likewise.
7478         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7479         (vect_vect_recog_func_ptrs): Put over_widening first.
7480         Add cast_forwprop.
7481         (vect_pattern_recog): Call vect_determine_precisions.
7483 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7485         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7486         statements that have been replaced by further pattern statements.
7487         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7489 2018-07-03  Richard Biener  <rguenther@suse.de>
7491         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7492         always set *dt.  Dump vectype in vectype overload.
7493         * dumpfile.h (dump_gimple_expr): New function.
7494         (dump_gimple_expr_loc): Likewise.
7495         * dumpfile.c (dump_gimple_expr): New function.
7496         (dump_gimple_expr_loc): Likewise.
7498 2018-07-02  Jeff Law  <law@redhat.com>
7500         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7501         the H8/300, H8/300H and H8/S variants into a single pattern.
7502         (movhi_h8300, movqi_h8300hs): Similarly.
7503         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7504         (QHI mode iterator): New.
7506         * config/h8300/h8300.md: Remove trailing whitespace.
7508 2018-07-02  Jim Wilson  <jimw@sifive.com>
7510         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7511         instead of emit_insn for interrupt returns.
7512         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7513         (riscv_sret, riscv_uret): Likewise.
7515 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
7517         * pretty-print.c (selftest::test_pp_format): Move save and restore
7518         of quotes to class auto_fix_quotes, and add an instance.
7519         * selftest.c: Include "intl.h".
7520         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7521         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7522         * selftest.h (selftest::auto_fix_quotes): New class.
7524 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
7526         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7527         (aarch64_sve_prepare_conditional_op): Remove.
7528         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7529         Allow aarch64_simd_reg_or_zero as select operand; remove
7530         the aarch64_sve_prepare_conditional_op call.
7531         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7532         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7533         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7534         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7535         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7536         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7537         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7538         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7539         and a splitters to match all of the *_any patterns.
7540         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7542         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7543         (SVE_COND_FP_BINARY_REV): Remove.
7544         (sve_int_op_rev, sve_fp_op_rev): New.
7545         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7546         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7547         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7548         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7549         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7550         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7551         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7552         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7553         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7555         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7556         Remove match_dup 1 from the inner unspec.
7557         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7559         * config/aarch64/aarch64.md (movprfx): New attr.
7560         (length): Default movprfx to 8.
7561         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7562         (*madd<SVE_I>, *msub<SVE_I): Likewise.
7563         (*<su>mul<SVE_I>3_highpart): Likewise.
7564         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7565         (*v<ASHIFT><SVE_I>3): Likewise.
7566         (*<su><MAXMIN><SVE_I>3): Likewise.
7567         (*<su><MAXMIN><SVE_F>3): Likewise.
7568         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7569         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7570         (*div<SVE_F>4): Likewise.
7572 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
7574         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7575         in dump string.
7577 2018-07-02  Richard Biener  <rguenther@suse.de>
7579         PR tree-optimization/86363
7580         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7581         memset argument refers to a non-variable address.
7583 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
7585         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7586         {PLUS,MINUS}_EXPR code to...
7587         (adjust_symbolic_bound): ...here,
7588         (combine_bound): ...here,
7589         (set_value_range_with_overflow): ...and here.
7591 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
7593         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7594         code...
7595         (extract_range_from_abs_expr): ...here.
7597 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7599         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7600         -fno-omit-frame-pointer when not optimizing.
7602 2018-07-02  Martin Liska  <mliska@suse.cz>
7604         PR ipa/86279
7605         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7606         (propagate_nothrow): Likewise.
7608 2018-07-02  Martin Liska  <mliska@suse.cz>
7610         PR ipa/86323
7611         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7613 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
7615         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7616         function in r262149, changing "loc" param from source_location to
7617         const dump_location_t &.
7618         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7619         declaration, as above.
7621 2018-07-01  Paul Koning  <ni1d@arrl.net>
7623         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7624         -munit-asm, -mgnu-asm, -mdec-asm.
7625         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7626         (pdp11_output_labelref): New.
7627         (pdp11_output_def): New.
7628         (pdp11_output_addr_vec_elt): New.
7629         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
7630         %# and %@ format codes.
7631         (pdp11_option_override): New.
7632         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7633         (pdp11_output_ident): New.
7634         (pdp11_asm_named_section): New.
7635         (pdp11_asm_init_sections): New.
7636         (pdp11_file_start): New.
7637         (pdp11_file_end): New.
7638         (output_ascii): Use .ascii/.asciz for -mdec-asm.
7639         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
7640         %o, like %c but octal.
7641         (pdp11_option_override): New.
7642         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7643         -mdec-asm.
7644         (DATA_SECTION_ASM_OP): Ditto.
7645         (READONLY_DATA_SECTION_ASM_OP): New.
7646         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7647         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7648         (ASM_OUTPUT_LABELREF): Ditto.
7649         (ASM_OUTPUT_DEF): Ditto.
7650         (ASM_OUTPUT_EXTERNAL): New.
7651         (ASM_OUTPUT_SOURCE_FILENAME): New.
7652         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7653         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7654         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
7655         %# and %@ format codes.
7656         * config/pdp11/pdp11.opt (mgnu-asm): New.
7657         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7658         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7659         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7661 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
7663         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7664         dereferencing path[] beyond its length.
7665         (debug_path): New.
7666         (debug_all_paths): New.
7667         (rewire_first_differing_edge): New.
7668         (adjust_paths_after_duplication): New.
7669         (duplicate_thread_path): Call adjust_paths_after_duplication.
7670         Add new argument.
7671         (thread_through_all_blocks): Add new argument to
7672         duplicate_thread_path.
7674 2018-06-30  Jim Wilson  <jimw@sifive.com>
7676         * config/riscv/predicates.md (p2m1_shift_operand): New.
7677         (high_mask_shift_operand): New.
7678         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7679         pattern using p2m1_shift_operand.
7680         (lshsi3_zero_extend_3+2): New combiner pattern using
7681         high_mask_shift_operand.
7683 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7685         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7686         split out from...
7687         (vect_recog_rotate_pattern): ...here.
7688         (vect_convert_input): Try to insert casts of invariants in the
7689         preheader.
7690         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7691         preheader to be empty.
7693 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7695         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7696         vector type.  If given, install it in the new statement's
7697         STMT_VINFO_VECTYPE.
7698         (vect_element_precision): New function.
7699         (vect_unpromoted_value): New struct.
7700         (vect_unpromoted_value::vect_unpromoted_value): New function.
7701         (vect_unpromoted_value::set_op): Likewise.
7702         (vect_look_through_possible_promotion): Likewise.
7703         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7704         (vect_widened_op_tree, vect_convert_input): Likewise.
7705         (vect_convert_inputs, vect_convert_output): Likewise.
7706         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7707         to handle the optional cast of the multiplication result and
7708         vect_widened_op_tree to detect the widened multiplication itself.
7709         Do not require the input and output of promotion casts to have
7710         the same sign, but base the signedness of the operation on the
7711         input rather than the result.  If the pattern includes two
7712         promotions, check that those promotions have the same sign.
7713         Do not restrict the MULT_EXPR handling to a double-width result;
7714         handle quadruple-width results and wider.  Use vect_convert_inputs
7715         to convert the inputs to the common type.
7716         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
7717         to handle the optional cast of the ABS result.  Also allow a sign
7718         change or a sign extension between the ABS and MINUS.
7719         Use vect_widened_op_tree to detect the widened subtraction and use
7720         vect_convert_inputs to convert the inputs to the common type.
7721         (vect_handle_widen_op_by_const): Delete.
7722         (vect_recog_widen_op_pattern): New function.
7723         (vect_recog_widen_mult_pattern): Use it.
7724         (vect_recog_widen_shift_pattern): Likewise.
7725         (vect_recog_widen_sum_pattern): Use
7726         vect_look_through_possible_promotion to handle the promoted
7727         PLUS_EXPR operand.
7729 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7731         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7732         the containing gimple_seq *.
7733         * gimple-iterator.h (gsi_for_stmt): Declare it.
7734         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7735         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7736         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7737         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7738         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7739         checks.
7740         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7741         split out from...
7742         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
7743         statement being replaced is part of an existing pattern
7744         definition sequence, inserting the new pattern statements before
7745         the original one.
7746         (vect_pattern_recog_1): Don't return a bool.  If the statement
7747         is already part of a pattern, instead apply pattern matching
7748         to the pattern definition statements.  Don't clear the
7749         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7750         (vect_pattern_recog): Don't break after the first match;
7751         continue processing the pattern definition statements instead.
7752         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7754 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7756         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7757         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7758         (vect_recog_widen_sum_pattern): Use it.
7760 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7762         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7763         phi is not a pattern statement and has not been replaced by
7764         a pattern statement.
7765         * tree-vect-patterns.c (type_conversion_p): Don't check
7766         STMT_VINFO_IN_PATTERN_P.
7767         (vect_recog_vector_vector_shift_pattern): Likewise.
7768         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7769         the pattern statement rather than the original statement; check
7770         directly for a WIDEN_MULT_EXPR here.
7771         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7772         vect_is_simple_use to return the pattern statement rather
7773         than the original statement; use is_pattern_stmt_p to check
7774         for such a pattern statement.
7775         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7776         to return the pattern statement rather than the original statement;
7777         don't do the same transformation here.
7778         (vect_is_simple_use): If the defining statement has been replaced
7779         by a pattern statement, return the pattern statement instead.
7780         Remove the corresponding (local) transformation from the vectype
7781         overload.
7783 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7785         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7786         end and default to null.
7787         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7788         (vectorizable_reduction): Update calls accordingly, dropping the
7789         gimple ** argument if the passed-back statement isn't needed.
7790         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7791         (vect_recog_rotate_pattern): Likewise.
7792         (vect_recog_mask_conversion_pattern): Likewise.
7793         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7794         (vect_mask_constant_operand_p): Likewise.
7795         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7796         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7797         (get_group_load_store_type, get_load_store_type): Likewise.
7798         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7799         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7800         (vectorizable_conversion, vectorizable_assignment): Likewise.
7801         (vectorizable_shift, vectorizable_operation): Likewise.
7802         (vectorizable_store, vect_is_simple_cond): Likewise.
7803         (vectorizable_condition, vectorizable_comparison): Likewise.
7804         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7805         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7806         and move it to the end.  Cope with null def_stmt_outs.
7808 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7810         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7812 2018-06-29  Jeff Law  <law@redhat.com>
7814         * config/v850/v850.c (v850_legitimate_address_p): Handle large
7815         displacements for TARGET_V850E2V3 and newer.
7816         (TARGET_LRA_P): Remove.  Defaults to LRA now.
7817         * config/v850/v850.md (sign23byte_load): Remove.
7818         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7819         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7821 2018-06-29  Martin Liska  <mliska@suse.cz>
7823         PR lto/85759
7824         * coverage.c (coverage_init): Mangle full path name.
7825         * doc/invoke.texi: Document the change.
7826         * gcov-io.c (mangle_path): New.
7827         * gcov-io.h (mangle_path): Likewise.
7828         * gcov.c (mangle_name): Use mangle_path for path mangling.
7830 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7832         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7833         if starting source register is not even.
7835 2018-06-29  Martin Liska  <mliska@suse.cz>
7837         PR tree-optimization/86263
7838         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7839         Make edge redirection.
7841 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
7843         * dumpfile.c (dump_loc): Add indentation based on scope depth.
7844         (dump_scope_depth): New variable.
7845         (get_dump_scope_depth): New function.
7846         (dump_begin_scope): New function.
7847         (dump_end_scope): New function.
7848         * dumpfile.h (get_dump_scope_depth): New declaration.
7849         (dump_begin_scope): New declaration.
7850         (dump_end_scope): New declaration.
7851         (class auto_dump_scope): New class.
7852         (AUTO_DUMP_SCOPE): New macro.
7853         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7854         AUTO_DUMP_SCOPE.
7856 2018-06-29  Richard Biener  <rguenther@suse.de>
7858         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7859         compute_all_dependences succeeds.
7860         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7861         exceed --param loop-max-datarefs-for-datadeps.
7863 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
7865         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7867 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
7869         PR target/86348
7870         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7871         alternative 0 in preferred_for_speed attribute.
7873 2018-06-28  Paul Koning  <ni1d@arrl.net>
7875         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7876         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7877         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7878         * config/pdp11/pdp11.md: Correct "length" attribute calculation
7879         for shift insn patterns.
7881 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
7883         * cgraph.c (cgraph_node::get_body): Replace assignments to
7884         "dump_file" with calls to set_dump_file.
7885         * dumpfile.c (alt_dump_file): Make static, and group with...
7886         (alt_flags): ...this definition.
7887         (dumps_are_enabled): New variable.
7888         (refresh_dumps_are_enabled): New function.
7889         (set_dump_file): New function.
7890         (set_alt_dump_file): New function.
7891         (gcc::dump_manager::dump_start): Replace assignments to
7892         "dump_file" and "alt_dump_file" with calls to set_dump_file and
7893         set_alt_dump_file.
7894         (gcc::dump_manager::dump_finish): Likewise.
7895         * dumpfile.h (alt_dump_file): Delete decl.
7896         (dumps_are_enabled): New variable decl.
7897         (set_dump_file): New function decl.
7898         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7899         global.
7900         * tree-nested.c (lower_nested_functions): Replace assignments to
7901         "dump_file" with calls to set_dump_file.
7903 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7905         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7906         goto_locus of each outgoing edge of each basic block.
7908 2018-06-28  Richard Biener  <rguenther@suse.de>
7910         * dwarf2out.c (decl_scope_table): Remove.
7911         (push_decl_scope): Likewise.
7912         (pop_decl_scope): Likewise.
7913         (gen_type_die_for_member): Do not call push/pop_decl_scope.
7914         (gen_struct_or_union_type_die): Likewise.
7915         (gen_tagged_type_die): Likewise.
7916         (dwarf2out_init): Do not initialize decl_scope_table.
7917         (dwarf2out_c_finalize): Do not free it.
7919 2018-06-28  Richard Biener  <rguenther@suse.de>
7921         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7922         deciding whether to not re-use a DIE.
7924 2018-06-28  Richard Biener  <rguenther@suse.de>
7926         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7927         DW_AT_abstract_origin attribute.
7929 2018-06-28  Martin Liska  <mliska@suse.cz>
7931         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7932         Use newly introduced constants.
7933         * tree-switch-conversion.h (struct jump_table_cluster):
7934         Define max_ratio_for_size and max_ratio_for_speed.
7936 2018-06-28  Martin Liska  <mliska@suse.cz>
7938         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7939         Add new checking assert to catch invalid state.
7940         (jump_table_cluster::can_be_handled): Handle single case
7941         clusters.
7942         (jump_table_cluster::is_beneficial): Bail out for such case.
7943         (bit_test_cluster::find_bit_tests):
7944         Add new checking assert to catch invalid state.
7945         (bit_test_cluster::can_be_handled): Handle single case
7946         clusters.
7947         (bit_test_cluster::is_beneficial): Bail out for such case.
7948         (switch_decision_tree::analyze_switch_statement):
7949         Fix comment.
7951 2018-06-28  Martin Liska  <mliska@suse.cz>
7953         * common.opt: Introduce -completion option.
7954         * gcc.c (driver_handle_option): Handle it.
7955         (driver::main): Print completions if completion
7956         is set.
7957         * opt-suggestions.c (option_proposer::get_completions):
7958         New function.
7959         (option_proposer::suggest_completion): Likewise.
7960         (option_proposer::find_param_completions): Likewise.
7961         (verify_autocompletions): Likewise.
7962         (test_completion_valid_options): Likewise.
7963         (test_completion_valid_params): Likewise.
7964         (in_completion_p): Likewise.
7965         (empty_completion_p): Likewise.
7966         (test_completion_partial_match): Likewise.
7967         (test_completion_garbage): Likewise.
7968         (opt_proposer_c_tests): Likewise.
7969         * opt-suggestions.h: Declare new functions.
7970         * opts.c (common_handle_option): Handle OPT__completion_.
7971         * selftest-run-tests.c (selftest::run_tests): Add
7972         opt_proposer_c_tests.
7973         * selftest.c (assert_str_startswith): New.
7974         * selftest.h (assert_str_startswith): Likewise.
7975         (opt_proposer_c_tests): New.
7976         (ASSERT_STR_STARTSWITH): Likewise.
7978 2018-06-28  Martin Liska  <mliska@suse.cz>
7980         * Makefile.in: Add opt-suggestions.o.
7981         * gcc-main.c: Include opt-suggestions.h.
7982         * gcc.c (driver::driver): Likewise.
7983         (driver::~driver): Remove m_option_suggestions.
7984         (driver::build_option_suggestions): Moved to option_proposer.
7985         (driver::suggest_option): Likewise.
7986         (driver::handle_unrecognized_options): Use option_proposer.
7987         * gcc.h (class driver): Add new memver m_option_proposer.
7988         * opt-suggestions.c: New file.
7989         * opt-suggestions.h: New file.
7991 2018-06-28  Martin Liska  <mliska@suse.cz>
7993         * vec.h (class auto_string_vec): New (moved from auto_argvec).
7994         (auto_string_vec::~auto_string_vec): Likewise.
7996 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7998         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7999         prevent_decl_creation_for_types fields up and add reset_location field.
8000         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
8001         statement if id->reset_location is true.
8002         (copy_edges_for_bb): Do not set goto_locus on the new edges if
8003         id->reset_location is true.
8004         (copy_phis_for_bb): Force input_location on the arguments if
8005         id->reset_location is true.
8006         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
8007         is set on the function to be inlined.
8009 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
8011         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
8013 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
8015         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
8016         registers for Pmode.
8017         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
8018         hard registers for the clobbered pseudo.
8020 2018-06-27  Paul Koning  <ni1d@arrl.net>
8022         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8023         mutually exclusive options.
8024         * config/pdp11/constraints.md (h): New constraint.
8025         (O): Update definition to match shift code generation.
8026         (D): New constraint.
8027         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
8028         (CCFP): Remove.
8029         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
8030         function.
8031         (output_jump): Change arguments.
8032         (pdp11_fixed_cc_regs): New function.
8033         (pdp11_cc_mode): Ditto.
8034         (pdp11_expand_shift): Ditto.
8035         (pdp11_assemble_shift): Ditto.
8036         (pdp11_small_shift): Ditto.
8037         (pdp11_branch_cost): Remove.
8038         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
8039         from output.
8040         (pdp11_register_move_cost): Update for CC registers.
8041         (pdp11_rtx_costs): Add case for LSHIFTRT.
8042         (pdp11_output_jump): Add CCNZ mode conditional branches.
8043         (notice_update_cc_on_set): Remove.
8044         (pdp11_cc_mode): New function.
8045         (simple_memory_operand): Correct pre/post decrement case.
8046         (no_side_effect_operand): New function.
8047         (pdp11_regno_reg_class): Add CC_REGS class.
8048         (pdp11_fixed_cc_regs): New function.
8049         (pdp11_small_shift): New function.
8050         (pdp11_expand_shift): New function to expand shift insns.
8051         (pdp11_assemble_shift): New function to output shifts.
8052         (pdp11_branch_cost): Remove.
8053         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8054         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8055         (WCHAR_TYPE): Ditto.
8056         (PTRDIFF_TYPE): Ditto.
8057         (ADJUST_INSN_LENGTH): New macro.
8058         (FIXED_REGISTERS): Add CC registers.
8059         (CALL_USED_REGISTERS): Ditto.
8060         (reg_class): Ditto.
8061         (REG_CLASS_NAMES): Ditto.
8062         (REG_CLASS_CONTENTS): Ditto.
8063         (SELECT_CC_MODE): Use new function.
8064         (TARGET_FLAGS_REGNUM): New macro.
8065         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8066         (cc0_reg_rtx): Remove.
8067         (CC_STATUS_MDEP): Remove.
8068         (CC_STATUS_MDEFP_INIT): Remove.
8069         (CC_IN_FPU): Remove.
8070         (NOTICE_UPDATE_CC): Remove.
8071         (REGISTER_NAMES): Add CC registers.
8072         (BRANCH_COST): Change to constant 1.
8073         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8074         handling.
8075         * config/pdp11/pdp11.opt (mbcopy): Remove.
8076         (mbcopy-builtin): Remove.
8077         (mbranch-cheap): Remove.
8078         (mbranch-expensive): Remove.
8079         * config/pdp11/predicates.md (expand_shift_operand): Update to
8080         match shift code generation.
8081         (ccnz_operator): New predicate.
8082         * doc/invoke.texi (PDP-11 Options): Remove deleted options
8083         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8084         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
8085         exclusive options.
8086         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
8087         description of O constraint.
8089 2018-06-27  Jeff Law  <law@redhat.com>
8090             Austin Law  <austinklaw@gmail.com>
8092         * config/v850/v850.md (addsi3_set_flags): New pattern.
8093         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8094         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8095         (zero_extendhisi2_v850_set_flags): Likewise.
8096         (zero_extendqisi2_v850_set_flags): Likewise.
8097         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8098         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8099         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8101         * config/v850/v850-protos.h (notice_update_cc): Remove.
8102         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8103         (v850_print_operand): Handle 'D' and "d".
8104         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8105         Add handling of arithmetic/logical operations compared against zero.
8106         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8107         Do not look at v850_compare_op, instead get mode from last argument.
8108         (v850_gen_compare): Remove
8109         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8110         after reload for prologue insns.
8111         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8112         patterns.
8113         (construct_save_jarl): Likewise.
8114         (TARGET_FLAGS_REGNUM): Define.
8115         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8116         (NOTICE_UPDATE_CC): Remove.
8117         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8118         than cc0.  Conditionalize on reload_completed.
8119         (cmpsi_insn, setfcc_insn): Likewise.
8120         (tst1 splitter): Turn into define_and_split which sets the flags
8121         after reload.
8122         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8123         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8124         (cstoresf4, cstoredf4): Clobber the flags.
8125         (cmpsi, cmpsf, cmpdf): Remove expanders.
8126         (setf_insn): Remove pattern.
8127         (addsi3): Turn into define_and_split which clobbers the flags after
8128         reload and a suitable pattern (addsi3_clobber_flags) for use after
8129         reload.
8130         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8131         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8132         (ashrsi3, ashrsi3_v850e2): Likewise.
8133         (bins): Clobber the flags.
8134         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8135         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8136         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8137         (call_value_internal_short, call_value_internal_long): Likewise.
8138         (callt_save_interrupt, callt_return_interrupt): Likewise.
8139         (save_interrupt, return_interrupt): Likewise.
8140         (callt_save_all_interrupt, save_all_interrupt): Likewise.
8141         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8142         (restore_all_interrupt, _restore_all_interrupt): Likewise.
8143         (All FP comparisons): Only allow after reload has completed.
8144         (trfsr): Likewise.
8145         (divh, divhu): Tweak output template.
8146         (branch_z_normal, branch_z_invert): Remove
8147         (branch_nz_normal, branch_nz_invert): Likewise.
8148         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8150         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8151         * config/v850/v850.c (notice_update_cc): Remove.
8152         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
8153         (CC_NO_CARRY): Likewise.
8154         (NOTICE_UPDATE_CC): Define to nothing.
8155         * config/v850/v850.md: Remove block comment on cc0 handling
8156         Remove "cc" attribute from all patterns.  Remove cc_status handling
8157         from all patterns.  Minor formatting fixes.
8159 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8161         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8162         (cortex-a76.cortex-a55): Likewise.
8163         * config/aarch64/aarch64-tune.md: Regenerate.
8164         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8165         cortex-a76.cortex-a55.
8167 2018-06-27  Jeff Law  <law@redhat.com>
8169         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8170         (MULTILIB_DIRNAMES): Similarly.
8172 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
8174         * gimple.h (gimple_return_retbnd): Delete.
8175         (gimple_return_set_retbnd): Likewise.
8176         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8177         gimple_return_set_retbnd.
8178         * gimple-pretty-print.c (dump_gimple_return): Remove call to
8179         gimple_return_retbnd and adjust.
8180         * tree-inline.h (struct copy_body_data): Remove retbnd field.
8181         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8182         Explicitly return NULL in a couple more cases.  Move assertion
8183         on debug statements and remove unreachable code.
8184         (reset_debug_binding): Do not test id->retbnd.
8185         (expand_call_inline): Do not set it.
8187 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8189         * configure.ac: Add --disable-gcov option.
8190         * configure: Regenerate.
8191         * Makefile.in: Honour @enable_gcov@.
8192         * doc/install.texi: Document --disable-gcov.
8194 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8196         * config/arm/arm-cpus.in (cortex-a76): New entry.
8197         (cortex-a76.cortex-a55): Likewise.
8198         * config/arm/arm-tables.opt: Regenerate.
8199         * config/arm/arm-tune.md: Likewise.
8200         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8201         * doc/invoke.texi (ARM Options): Document cortex-a76 and
8202         cortex-a76.cortex-a55.
8204 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
8206         PR target/85769
8207         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8209 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
8211         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8212         comment.
8213         (EPILOGUE_USES): Likewise.
8215 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
8217         * tree-inline.c (remap_location): New function extracted from...
8218         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
8219         (copy_phis_for_bb): ...here.  Call remap_location.
8220         (copy_cfg_body): Adjust call to copy_edges_for_bb.
8222 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
8224         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8225         unaligned vsx for 16B memset.
8227 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
8229         PR target/86285
8230         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8231         ieee128_float_type_node to long_double_type_node unless
8232         TARGET_LONG_DOUBLE_128 is set.
8234 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
8236         * cfgloop.c (get_loop_location): Convert return type from
8237         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8238         by implicit construction from rtx_insn *, and using
8239         dump_user_location_t::from_function_decl for the fallback case.
8240         * cfgloop.h (get_loop_location): Convert return type from
8241         location_t to dump_user_location_t.
8242         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8243         dump_printf_loc to pass in a dump_location_t rather than a
8244         location_t, via the gimple stmt.
8245         * coverage.c (get_coverage_counts): Update calls to
8246         dump_printf_loc to pass in dump_location_t rather than a
8247         location_t.
8248         * doc/optinfo.texi (Dump types): Convert example of
8249         dump_printf_loc from taking "locus" to taking "insn".  Update
8250         description of the "_loc" calls to cover dump_location_t.
8251         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8252         "selftest.h".
8253         (dump_user_location_t::dump_user_location_t): New constructors,
8254         from gimple *stmt and rtx_insn *.
8255         (dump_user_location_t::from_function_decl): New function.
8256         (dump_loc): Make static.
8257         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8258         const dump_location_t &.
8259         (dump_generic_expr_loc): Delete.
8260         (dump_printf_loc): Convert param "loc" from location_t to
8261         const dump_location_t &.
8262         (selftest::test_impl_location): New function.
8263         (selftest::dumpfile_c_tests): New function.
8264         * dumpfile.h: Include "profile-count.h".
8265         (class dump_user_location_t): New class.
8266         (struct dump_impl_location_t): New struct.
8267         (class dump_location_t): New class.
8268         (dump_printf_loc): Convert 2nd param from source_location to
8269         const dump_location_t &.
8270         (dump_generic_expr_loc): Delete.
8271         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8272         const dump_location_t &.
8273         * gimple-fold.c (fold_gimple_assign): Update call to
8274         dump_printf_loc to pass in a dump_location_t rather than a
8275         location_t, via the gimple stmt.
8276         (gimple_fold_call): Likewise.
8277         * gimple-loop-interchange.cc
8278         (loop_cand::analyze_iloop_reduction_var): Update for change to
8279         check_reduction_path.
8280         (tree_loop_interchange::interchange): Update for change to
8281         find_loop_location.
8282         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8283         change in return-type of find_loop_location.
8284         (graphite_regenerate_ast_isl): Likewise.
8285         * graphite-optimize-isl.c (optimize_isl): Likewise.
8286         * graphite.c (graphite_transform_loops): Likewise.
8287         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8288         pass in a dump_location_t rather than a location_t, via the
8289         gimple stmt.
8290         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8291         * ipa.c (walk_polymorphic_call_targets): Likewise.
8292         * loop-unroll.c (report_unroll): Convert "locus" param from
8293         location_t to dump_location_t.
8294         (decide_unrolling): Update for change to get_loop_location's
8295         return type.
8296         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8297         location_t to dump_user_location_t.
8298         (grid_find_single_omp_among_assignments_1): Updates calls to
8299         dump_printf_loc to pass in a dump_location_t rather than a
8300         location_t, via the gimple stmt.
8301         (grid_parallel_clauses_gridifiable): Convert "tloc" from
8302         location_t to dump_location_t.  Updates calls to dump_printf_loc
8303         to pass in a dump_location_t rather than a location_t, via the
8304         gimple stmt.
8305         (grid_inner_loop_gridifiable_p): Likewise.
8306         (grid_dist_follows_simple_pattern): Likewise.
8307         (grid_gfor_follows_tiling_pattern): Likewise.
8308         (grid_target_follows_gridifiable_pattern): Likewise.
8309         (grid_attempt_target_gridification): Convert initialization
8310         of local "grid" from memset to zero-initialization; FIXME: does
8311         this require C++11?  Update call to dump_printf_loc to pass in a
8312         optinfo_location rather than a location_t, via the gimple stmt.
8313         * profile.c (read_profile_edge_counts): Updates call to
8314         dump_printf_loc to pass in a dump_location_t rather than a
8315         location_t
8316         (compute_branch_probabilities): Likewise.
8317         * selftest-run-tests.c (selftest::run_tests): Call
8318         dumpfile_c_tests.
8319         * selftest.h (dumpfile_c_tests): New decl.
8320         * tree-loop-distribution.c (pass_loop_distribution::execute):
8321         Update for change in return type of find_loop_location.
8322         * tree-parloops.c (parallelize_loops): Likewise.
8323         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8324         "locus" from location_t to dump_user_location_t.
8325         (canonicalize_loop_induction_variables): Likewise.
8326         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8327         for change in return type of find_loop_location.
8328         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8329         to dump_printf_loc to pass in a dump_location_t rather than a
8330         location_t, via the stmt.
8331         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8332         Likewise.
8333         * tree-vect-loop-manip.c (find_loop_location): Convert return
8334         type from source_location to dump_user_location_t.
8335         (vect_do_peeling): Update for above change.
8336         (vect_loop_versioning): Update for change in type of
8337         vect_location.
8338         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8339         from location_t to dump_user_location_t.
8340         (vect_estimate_min_profitable_iters): Update for change in type
8341         of vect_location.
8342         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8343         location_t to dump_location_t.
8344         (vect_slp_bb): Update for change in type of vect_location.
8345         * tree-vectorizer.c (vect_location): Convert from source_location
8346         to dump_user_location_t.
8347         (try_vectorize_loop_1): Update for change in vect_location's type.
8348         (vectorize_loops): Likewise.
8349         (increase_alignment): Likewise.
8350         * tree-vectorizer.h (vect_location): Convert from source_location
8351         to dump_user_location_t.
8352         (find_loop_location): Convert return type from source_location to
8353         dump_user_location_t.
8354         (check_reduction_path): Convert 1st param from location_t to
8355         dump_user_location_t.
8356         * value-prof.c (check_counter): Update call to dump_printf_loc to
8357         pass in a dump_user_location_t rather than a location_t; update
8358         call to error_at for change in type of "locus".
8359         (check_ic_target): Update call to dump_printf_loc to
8360         pass in a dump_user_location_t rather than a location_t, via the
8361         call_stmt.
8363 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
8365         * config/s390/s390.h (enum processor_flags): Do not use
8366         default tune parameter when -march was specified.
8368 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
8370         PR target/86314
8371         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8372         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8373         operands.
8375 2018-06-26  Richard Biener  <rguenther@suse.de>
8377         PR tree-optimization/86287
8378         PR bootstrap/86316
8379         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8380         (vect_analyze_loop): Initialize n_stmts.
8382 2018-06-26  Richard Biener  <rguenther@suse.de>
8384         PR middle-end/86271
8385         * fold-const.c (fold_convertible_p): Pointer extension
8386         isn't valid.
8388 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
8390         PR debug/86064
8391         * dwarf2out.c (loc_list_has_views): Adjust comments.
8392         (dw_loc_list): Split single cross-partition range with
8393         nonzero locview.
8395 2018-06-25  Jeff Law  <law@redhat.com>
8397         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8398         on -mbig-switch by default.
8400         * config/v850/predicates.md (const_float_1_operand): Fix match_code
8401         test.
8402         (const_float_0_operand): Remove unused predicate.
8403         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8404         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8405         (recipsf2): New expander.  Original pattern now called
8406         (recipsf2_insn).
8407         (recipdf2, recipdf2_insn): Similarly.
8408         (rsqrtsf2, rsqrtsf2_insn): Similarly
8409         (rsqrtdf2, rsqrtdf2_insn): Similarly
8411 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
8413         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8414         Simplify logic for FreeBSD (twice).
8416 2018-06-25  Martin Sebor  <msebor@redhat.com>
8418         PR tree-optimization/86204
8419         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8420         a strnlen result if it's less than the length of the string.
8422 2018-06-25  Martin Sebor  <msebor@redhat.com>
8424         PR tree-optimization/85700
8425         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8426         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8427         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8429 2018-06-25  Martin Sebor  <msebor@redhat.com>
8431         * doc/extend.texi (Zero-length arrays): Update and clarify.
8433 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
8435         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8436         added IEEE/IBM long double multilib support on PowerPC little
8437         endian Linux systems.
8438         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8439         (MULTILIB_DEFAULTS): Likewise.
8440         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8441         Likewise.
8442         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8443         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8444         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8446 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
8448         PR middle-end/86311
8449         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8450         (REORDER_45): Likewise.
8452 2018-06-25  Jeff Law  <law@redhat.com>
8454         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8455         dividend to 32 bits.  Adjust length.
8456         (udivmodhi4): Cleanup output template.  Fix length.
8458 2018-06-25  Carl Love  <cel@us.ibm.com>
8460         * config/rs6000/vsx.md: Change word selector to prefered location.
8462 2018-06-25  Richard Biener  <rguenther@suse.de>
8464         PR tree-optimization/86304
8465         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8466         epilogue-if-converted loops as well.
8468 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
8470         * lto-section-out.c (lto_begin_section): Do not print section
8471         name for noaddr and unnumbered dumps.
8473 2018-06-25  Richard Biener  <rguenther@suse.de>
8475         * tree-vectorizer.h (struct vec_info_shared): New structure
8476         with parts split out from struct vec_info and loop_nest from
8477         struct _loop_vec_info.
8478         (struct vec_info): Adjust accordingly.
8479         (struct _loop_vec_info): Likewise.
8480         (LOOP_VINFO_LOOP_NEST): Adjust.
8481         (LOOP_VINFO_DATAREFS): Likewise.
8482         (LOOP_VINFO_DDRS): Likewise.
8483         (struct _bb_vec_info): Likewise.
8484         (BB_VINFO_DATAREFS): Likewise.
8485         (BB_VINFO_DDRS): Likewise.
8486         (struct _stmt_vec_info): Add dr_aux member.
8487         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8488         (DR_MISALIGNMENT_UNINITIALIZED): New.
8489         (set_dr_misalignment): Adjust.
8490         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8491         (vect_analyze_loop): Adjust prototype.
8492         (vect_analyze_loop_form): Likewise.
8493         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8494         Compute dependences lazily.
8495         (vect_record_base_alignments): Use shared datarefs/ddrs.
8496         (vect_verify_datarefs_alignment): Likewise.
8497         (vect_analyze_data_refs_alignment): Likewise.
8498         (vect_analyze_data_ref_accesses): Likewise.
8499         (vect_analyze_data_refs): Likewise.
8500         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8501         constructor parameter for shared part.
8502         (vect_analyze_loop_form): Pass in shared part and adjust.
8503         (vect_analyze_loop_2): Pass in storage for the number of
8504         stmts.  Move loop nest finding to the caller.  Compute
8505         datarefs lazily.
8506         (vect_analyze_loop): Pass in shared part.
8507         (vect_transform_loop): Verify shared datarefs are unchanged.
8508         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8509         constructor parameter for shared part.
8510         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8511         (vect_slp_bb): Verify shared datarefs are unchanged before
8512         transform.
8513         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8514         change.
8515         (new_stmt_vec_info): Initialize DR_AUX misalignment to
8516         DR_MISALIGNMENT_UNINITIALIZED.
8517         * tree-vectorizer.c (vec_info::vec_info): Add constructor
8518         parameter for shared part.
8519         (vec_info::~vec_info): Adjust.
8520         (vec_info_shared::vec_info_shared): New.
8521         (vec_info_shared::~vec_info_shared): Likewise.
8522         (vec_info_shared::save_datarefs): Likewise.
8523         (vec_info_shared::check_datarefs): Likewise.
8524         (try_vectorize_loop_1): Construct shared part live for analyses
8525         of a single loop for multiple vector sizes.
8526         * tree-parloops.c (gather_scalar_reductions): Adjust.
8528 2018-06-25  Richard Biener  <rguenther@suse.de>
8530         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8531         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8532         (vect_analyze_data_refs): Remove similar code from here and
8533         simplify accordingly.
8535 2018-06-25  Richard Biener  <rguenther@suse.de>
8537         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8538         for reverse storage order accesses rather than asserting
8539         they cannot happen here.
8541 2018-06-25  Tom de Vries  <tdevries@suse.de>
8543         PR debug/86257
8544         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8545         Use data16 instead of .byte for insn prefix.
8547 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
8549         PR C++/86082
8550         * parser.c (make_char_string_pack): Pass this literal chars
8551         through cpp_interpret_string.
8552         (cp_parser_userdef_numeric_literal): Check the result of
8553         make_char_string_pack.
8555 2018-06-24  Maya Rashish  <coypu@sdf.org>
8557         * ginclude/stddef.h: Simplify conditions around avoiding
8558         re-definition of __size_t.
8560 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8562         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8563         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8565 2018-06-22  Maya Rashish  <coypu@sdf.org>
8567         * doc/invoke.texi (mno-fancy-math-387): Update for changes
8568         made to OpenBSD and NetBSD through the years.
8570 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8572         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8573         behavior of vec_pack (vector double, vector double) to match
8574         behavior of vec_float2 (vector double, vector double).
8576 2018-06-22  Olivier Hainque  <hainque@adacore.com>
8578         * gimplify.c (gimplify_function_tree): Prevent creation
8579         of a trampoline for the address of the current function
8580         passed to entry/exit instrumentation hooks.
8582 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
8584         PR target/86222
8585         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8586         correctly.
8588 2018-06-22  Martin Liska  <mliska@suse.cz>
8590         PR tree-optimization/86263
8591         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8592         Bail out if is_enabled is false.
8593         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8594         New declaration.
8595         (jump_table_cluster::is_enabled): New function.
8597 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8599         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8600         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8601         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8602         (lto_input_ts_binfo_tree_pointers): Likewise.
8603         * tree-streamer-out.c (streamer_write_tree_bitfields,
8604         write_ts_binfo_tree_pointers): Likewise.
8605         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8607 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8609         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8611 2018-06-22  Martin Liska  <mliska@suse.cz>
8613         * symbol-summary.h (get): Make it pure and inline move
8614         functionality from ::get function.
8615         (get): Remove and inline into ::get and ::get_create.
8616         (get_create): Move code from ::get function.
8618 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8620         PR target/85994
8621         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8622         -x assembler-with-cpp.
8624 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8626         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8627         _FILE_OFFSET_BITS=64 for C++.
8629 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
8631         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8632         conversion insn that shows up when pr85657-3.c is compiled using
8633         IEEE 128-bit long double.
8634         (neg<mode>2_internal): Use the correct mode to check whether the
8635         mode is IBM extended.
8636         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8637         multiply and divide external functions from being created more
8638         than once.
8640 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8642         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8643         functions.
8644         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
8645         the edge can be forwarded.
8646         (cfg_layout_merge_blocks): Likewise.
8648 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8650         * except.c (finish_eh_generation): Commit edge insertions only after
8651         the EH edges have been redirected from post-landing to landing pads.
8653 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8655         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8656         create_tmp_var_for to create the FRAME decl.
8657         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8659 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8661         * tree-inline.c (copy_edges_for_bb): Minor tweak.
8662         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8663         debug statement when resetting its value.
8664         (expand_call_inline): Copy the locus of the call onto the assignment
8665         of the return value, if any.  Use local variable in more cases.
8667 2018-06-21  Martin Liska  <mliska@suse.cz>
8669         * ipa-pure-const.c (propagate_nothrow): Use
8670         funct_state_summaries->get.
8671         (dump_malloc_lattice): Likewise.
8672         (propagate_malloc): Likewise.
8674 2018-06-21  Richard Biener  <rguenther@suse.de>
8676         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8677         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8678         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8679         comment.
8680         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8681         BLOCK_ABSTRACT_ORIGIN unconditionally.
8683 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
8685         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8686         deleting it.
8687         * ipa-reference.c (ipa_reference_c_finalize): Delete
8688         ipa_ref_opt_sum_summaries and set it to NULL.
8690 2018-06-21  Tom de Vries  <tdevries@suse.de>
8692         PR tree-optimization/85859
8693         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8694         test with comment from bb_no_side_effects_p.
8696 2018-06-21  Richard Biener  <rguenther@suse.de>
8698         PR tree-optimization/86232
8699         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8700         max for constant niter.
8702 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8704         * config/aarch64/aarch64-simd.md
8705         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8707 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8709         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8710         Make opernads of the unspec commutative.
8712 2018-06-21  Richard Biener  <rguenther@suse.de>
8714         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8715         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8716         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8717         (vect_analyze_data_ref_dependence): Re-order checks to deal with
8718         NULL DR_STEP.
8719         (vect_record_base_alignments): Do not record base alignment
8720         for gathers or scatters.
8721         (vect_compute_data_ref_alignment): Drop return value that is always
8722         true.  Bail out early for gathers or scatters.
8723         (vect_enhance_data_refs_alignment): Bail out early for gathers
8724         or scatters.
8725         (vect_find_same_alignment_drs): Likewise.
8726         (vect_analyze_data_refs_alignment): Remove dead code.
8727         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8728         (vect_analyze_data_refs): For possible gathers or scatters do
8729         not create an alternate DR, just check their possible validity
8730         and mark them.  Adjust DECL_NONALIASED handling to not rely
8731         on DR_BASE_ADDRESS.
8732         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8733         update inits of gathers or scatters.
8734         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8735         Also copy gather/scatter flag to pattern vinfo.
8737 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8739         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8740         behavior of vec_packsu (vector unsigned long long, vector unsigned
8741         long long) to match behavior of vec_packs with same signature.
8743 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
8744             Thomas Schwinge <thomas@codesourcery.com>
8745             Cesar Philippidis  <cesar@codesourcery.com>
8747         * gimplify.c (gimplify_scan_omp_clauses): Add support for
8748         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8749         (gimplify_adjust_omp_clauses): Likewise.
8750         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8751         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8752         (gimplify_omp_target_update): Update handling of acc update and
8753         enter/exit data.
8754         * omp-low.c (install_var_field): Remove unused parameter
8755         base_pointers_restrict.
8756         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8757         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8758         FINALIZE}
8759         (omp_target_base_pointers_restrict_p): Delete.
8760         (scan_omp_target): Update call to scan_sharing_clauses.
8761         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8762         FINALIZE}.
8763         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8764         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8765         (convert_local_omp_clauses): Likewise.
8766         * tree-pretty-print.c (dump_omp_clause): Likewise.
8767         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
8768         FINALIZE}.
8769         (omp_clause_code_name): Likewise.
8771 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8773         PR debug/86194
8774         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8775         be narrowed.
8777         PR tree-optimization/86231
8778         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
8779         anti-range don't overwrite *vr0min before using it to compute *vr0max.
8781 2018-06-20  Tom de Vries  <tdevries@suse.de>
8783         PR tree-optimization/86097
8784         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8785         iv type if signedness of iv type is not the same as that of *nit.
8787 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8789         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
8790         EDGE_EH edges, verify they are all EDGE_EH.
8792 2018-06-20  Maya Rashish  <coypu@sdf.org>
8794         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8796 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8798         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8799         * config/aarch64/aarch64.c (xgene1_tunings): Add
8800         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8801         (aarch64_mode_valid_for_sched_fusion_p):
8802         Allow 16-byte modes.
8803         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8804         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8805         128-bit modes.
8806         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8807         New pattern.
8808         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8809         * config/aarch64/iterators.md (VQ2): New mode iterator.
8811 2018-06-20  Martin Liska  <mliska@suse.cz>
8813         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8814         Change default ratio from 10 to 8.
8816 2018-06-20  Martin Liska  <mliska@suse.cz>
8818         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8819         New.
8820         (bit_test_cluster::find_bit_tests): Likewise.
8821         (switch_decision_tree::analyze_switch_statement): Find clusters.
8822         * tree-switch-conversion.h (struct jump_table_cluster): Document
8823         hierarchy.
8825 2018-06-20  Martin Liska  <mliska@suse.cz>
8827         * tree-switch-conversion.c (switch_conversion::collect):
8828         Record m_uniq property.
8829         (switch_conversion::expand): Bail out for special conditions.
8830         (group_cluster::~group_cluster): New.
8831         (group_cluster::group_cluster): Likewise.
8832         (group_cluster::dump): Likewise.
8833         (jump_table_cluster::emit): New.
8834         (switch_decision_tree::fix_phi_operands_for_edges): New.
8835         (struct case_node): Remove struct.
8836         (jump_table_cluster::can_be_handled): New.
8837         (case_values_threshold): Moved to header.
8838         (reset_out_edges_aux): Likewise.
8839         (jump_table_cluster::is_beneficial): New.
8840         (bit_test_cluster::can_be_handled): Likewise.
8841         (add_case_node): Remove.
8842         (bit_test_cluster::is_beneficial): New.
8843         (case_bit_test::cmp): New.
8844         (bit_test_cluster::emit): New.
8845         (expand_switch_as_decision_tree_p): Remove.
8846         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8847         (fix_phi_operands_for_edge): Likewise.
8848         (switch_decision_tree::analyze_switch_statement): New.
8849         (compute_cases_per_edge): Move ...
8850         (switch_decision_tree::compute_cases_per_edge): ... here.
8851         (try_switch_expansion): Likewise.
8852         (switch_decision_tree::try_switch_expansion): Likewise.
8853         (record_phi_operand_mapping): Likewise.
8854         (switch_decision_tree::record_phi_operand_mapping): Likewise.
8855         (emit_case_decision_tree): Likewise.
8856         (switch_decision_tree::emit): Likewise.
8857         (balance_case_nodes): Likewise.
8858         (switch_decision_tree::balance_case_nodes): Likewise.
8859         (dump_case_nodes): Likewise.
8860         (switch_decision_tree::dump_case_nodes): Likewise.
8861         (emit_jump): Likewise.
8862         (switch_decision_tree::emit_jump): Likewise.
8863         (emit_cmp_and_jump_insns): Likewise.
8864         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8865         (emit_case_nodes): Likewise.
8866         (switch_decision_tree::emit_case_nodes): Likewise.
8867         (conditional_probability): Remove.
8868         * tree-switch-conversion.h (enum cluster_type): New.
8869         (PRINT_CASE): New.
8870         (struct cluster): Likewise.
8871         (cluster::cluster): Likewise.
8872         (struct simple_cluster): Likewise.
8873         (simple_cluster::simple_cluster): Likewise.
8874         (struct group_cluster): Likewise.
8875         (struct jump_table_cluster): Likewise.
8876         (struct bit_test_cluster): Likewise.
8877         (struct min_cluster_item): Likewise.
8878         (struct case_tree_node): Likewise.
8879         (case_tree_node::case_tree_node): Likewise.
8880         (jump_table_cluster::case_values_threshold): Likewise.
8881         (struct case_bit_test): Likewise.
8882         (struct switch_decision_tree): Likewise.
8883         (struct switch_conversion): Likewise.
8884         (switch_decision_tree::reset_out_edges_aux): Likewise.
8886 2018-06-20  Martin Liska  <mliska@suse.cz>
8888         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8889         (hoist_edge_and_branch_if_true): Likewise.
8890         (expand_switch_using_bit_tests_p): Likewise.
8891         (struct case_bit_test): Likewise.
8892         (case_bit_test_cmp): Likewise.
8893         (emit_case_bit_tests): Likewise.
8894         (switch_conversion::switch_conversion): New class.
8895         (struct switch_conv_info): Remove old struct.
8896         (collect_switch_conv_info): More to ...
8897         (switch_conversion::collect): ... this.
8898         (check_range): Likewise.
8899         (switch_conversion::check_range): Likewise.
8900         (check_all_empty_except_final): Likewise.
8901         (switch_conversion::check_all_empty_except_final): Likewise.
8902         (check_final_bb): Likewise.
8903         (switch_conversion::check_final_bb): Likewise.
8904         (create_temp_arrays): Likewise.
8905         (switch_conversion::create_temp_arrays): Likewise.
8906         (free_temp_arrays): Likewise.
8907         (gather_default_values): Likewise.
8908         (switch_conversion::gather_default_values): Likewise.
8909         (build_constructors): Likewise.
8910         (switch_conversion::build_constructors): Likewise.
8911         (constructor_contains_same_values_p): Likewise.
8912         (switch_conversion::contains_same_values_p): Likewise.
8913         (array_value_type): Likewise.
8914         (switch_conversion::array_value_type): Likewise.
8915         (build_one_array): Likewise.
8916         (switch_conversion::build_one_array): Likewise.
8917         (build_arrays): Likewise.
8918         (switch_conversion::build_arrays): Likewise.
8919         (gen_def_assigns): Likewise.
8920         (switch_conversion::gen_def_assigns): Likewise.
8921         (prune_bbs): Likewise.
8922         (switch_conversion::prune_bbs): Likewise.
8923         (fix_phi_nodes): Likewise.
8924         (switch_conversion::fix_phi_nodes): Likewise.
8925         (gen_inbound_check): Likewise.
8926         (switch_conversion::gen_inbound_check): Likewise.
8927         (process_switch): Use the newly created class.
8928         (switch_conversion::expand): New.
8929         (switch_conversion::~switch_conversion): New.
8930         * tree-switch-conversion.h: New file.
8932 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8934         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8935         tree-vect-patterns.c.
8936         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8937         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
8938         (vect_recog_sad_pattern): Likewise.
8939         (vect_recog_widen_sum_pattern): Likewise.
8940         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
8941         (vect_recog_widen_shift_pattern): Remove the type_in argument.
8942         (vect_recog_rotate_pattern): Likewise.
8943         (vect_recog_mult_pattern): Likewise.
8944         (vect_recog_vector_vector_shift_pattern): Likewise.
8945         (vect_recog_divmod_pattern): Likewise.
8946         (vect_recog_mixed_size_cond_pattern): Likewise.
8947         (vect_recog_bool_pattern): Likewise.
8948         (vect_recog_mask_conversion_pattern): Likewise.
8949         (vect_try_gather_scatter_pattern): Likewise.
8950         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
8951         (vect_recog_over_widening_pattern): Likewise.
8952         (vect_recog_gather_scatter_pattern): Likewise.
8953         (vect_recog_func_ptr): Move from tree-vectorizer.h
8954         (vect_vect_recog_func_ptrs): Move further down the file.
8955         (vect_recog_func): Likewise.  Remove the third argument.
8956         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8957         (vect_pattern_recog_1): Expect the pattern function to do any
8958         necessary target tests.  Also expect it to provide a vector type.
8959         Remove the type_in handling.
8961 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8963         * tree-vect-patterns.c (vect_pattern_detected): New function.
8964         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8965         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8966         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8967         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8968         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8969         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8970         (vect_recog_mask_conversion_pattern)
8971         (vect_try_gather_scatter_pattern): Likewise.
8973 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8975         * tree-vect-patterns.c (vect_get_internal_def): New function.
8976         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8977         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8978         (search_type_for_mask_1): Use it.
8980 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8982         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8983         redundant WIDEN_SUM_EXPR handling.
8984         (vect_recog_sad_pattern): Likewise.
8986 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8988         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8989         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8990         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8991         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8992         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8994 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8996         * tree-vect-stmts.c (vectorizable_call): Make sure that we
8997         use the stmt_vec_info of the original bb statement for the
8998         new zero assignment, even if the call is part of a pattern.
9000 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9002         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
9003         that the sequence is attached to the original statement rather
9004         than the pattern statement.
9005         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
9006         PATTERN_DEF_SEQ from the original statement rather than
9007         the main pattern statement.
9008         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
9009         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
9010         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
9012 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9014         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
9015         definition statements before the early exit for statements that aren't
9016         live or relevant.
9017         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
9018         split out from...
9019         (vect_transform_loop): ...here.  Process pattern definition
9020         statements without first checking whether the main pattern
9021         statement is live or relevant.
9023 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
9025         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
9026         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
9028 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
9030         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
9031         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
9032         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
9033         (expand_block_compare): Change select_block_compare_mode call.
9034         (expand_strncmp_align_check): Use new functions, fix comment.
9035         (emit_final_str_compare_gpr): New function.
9036         (expand_strn_compare): Refactor and clean up code.
9037         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
9039 2018-06-19  Tony Reix  <tony.reix@atos.com>
9040             Damien Bergamini  <damien.bergamini@atos.com>
9041             David Edelsohn  <dje.gcc@gmail.com>
9043         * collect2.c (static_obj): New variable.
9044         (static_libs): New variable.
9045         (is_in_list): Uncomment declaration.
9046         (main): Track AIX libraries linked statically.
9047         (is_in_list): Uncomment definition.
9048         (scan_prog_file): Don't add AIX shared libraries initializer
9049         to constructor list if linking statically.
9051 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
9053         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9054         constant.
9055         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9057 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
9059         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9060         blocks.
9062 2018-06-19  Martin Liska  <mliska@suse.cz>
9064         * config/i386/i386.c (ix86_can_inline_p): Do not use
9065         ipa_fn_summaries::get_create.
9066         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9067         get.
9068         (devirtualization_time_bonus): Likewise.
9069         (ipcp_propagate_stage): Likewise.
9070         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9071         (edge_set_predicate): Likewise.
9072         (evaluate_conditions_for_known_args): Likewise.
9073         (evaluate_properties_for_edge): Likewise.
9074         (ipa_call_summary::reset): Tranform to ...
9075         (ipa_call_summary::~ipa_call_summary): ... this.
9076         (ipa_fn_summary::reset): Transform to ...
9077         (ipa_fn_summary::~ipa_fn_summary): ... this.
9078         (ipa_fn_summary_t::remove): Rename to ...
9079         (ipa_fn_summary_t::remove_callees): ... this.
9080         (ipa_fn_summary_t::duplicate): Use placement new
9081         instead of memory copy.
9082         (ipa_call_summary_t::duplicate): Likewise.
9083         (ipa_call_summary_t::remove): Remove.
9084         (dump_ipa_call_summary): Change get_create to get.
9085         (ipa_dump_fn_summary): Dump only when summary exists.
9086         (analyze_function_body): Use symbol_summary::get instead
9087         of get_create.
9088         (compute_fn_summary): Likewise.
9089         (estimate_edge_devirt_benefit): Likewise.
9090         (estimate_edge_size_and_time): Likewise.
9091         (inline_update_callee_summaries): Likewise.
9092         (remap_edge_change_prob): Likewise.
9093         (remap_edge_summaries): Likewise.
9094         (ipa_merge_fn_summary_after_inlining): Likewise.
9095         (write_ipa_call_summary): Likewise.
9096         (ipa_fn_summary_write): Likewise.
9097         (ipa_free_fn_summary): Likewise.
9098         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9099         (struct ipa_call_summary): Likewise.
9100         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9101         of get_create.
9102         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9103         (estimate_size_after_inlining): Likewise.
9104         (estimate_growth): Likewise.
9105         (growth_likely_positive): Likewise.
9106         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9107         (inline_call): Likewise.
9108         * ipa-inline.c (caller_growth_limits): Likewise.
9109         (can_inline_edge_p): Likewise.
9110         (can_inline_edge_by_limits_p): Likewise.
9111         (compute_uninlined_call_time): Likewise.
9112         (compute_inlined_call_time): Likewise.
9113         (want_inline_small_function_p): Likewise.
9114         (edge_badness): Likewise.
9115         (update_caller_keys): Likewise.
9116         (update_callee_keys): Likewise.
9117         (inline_small_functions): Likewise.
9118         (inline_to_all_callers_1): Likewise.
9119         (dump_overall_stats): Likewise.
9120         (early_inline_small_functions): Likewise.
9121         (early_inliner): Likewise.
9122         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9123         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9124         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9125         * ipa-split.c (execute_split_functions): Likewise.
9126         * symbol-summary.h: Likewise.
9127         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9129 2018-06-19  Richard Biener  <rguenther@suse.de>
9131         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9132         (vectorize_loops): ... here.  Fix dbgcnt handling.
9133         (try_vectorize_loop): Wrap try_vectorize_loop_1.
9135 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
9137         PR target/86197
9138         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9139         ieee128 argument takes up only one (vector) register, not two (floating
9140         point) registers.
9142 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
9144         * gimplify.c (gimplify_init_constructor): Really never clear for an
9145         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9147 2018-06-19  Richard Biener  <rguenther@suse.de>
9149         PR tree-optimization/86179
9150         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9151         after failed recognition.
9153 2018-06-18  Martin Sebor  <msebor@redhat.com>
9155         PR middle-end/85602
9156         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9157         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9158         Handle integer subtraction.
9159         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9160         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9162 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
9164         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9165         param from rtx to rtx_insn *.
9166         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9167         param.
9168         (frv_ifcvt_modify_insn): Likwise.
9169         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9170         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
9171         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9172         as_a <rtx_insn *> cast to local "unprotected_region" once
9173         it's been established that it's not NULL or pc_rtx.
9174         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9175         param "sethi" from rtx to rtx_insn *.
9176         (nds32_group_float_insns): Likewise for param "insn".
9177         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9178         param.
9179         (vax_output_int_subtract): Likewise.
9180         * config/vax/vax.c (vax_output_int_add): Likewise for param
9181         "insn".
9182         (vax_output_int_subtract): Likewise.
9183         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9184         (emit_pattern_after): Likewise for param "after".
9185         (emit_insn_after): Likewise.
9186         (emit_jump_insn_after): Likewise.
9187         (emit_call_insn_after): Likewise.
9188         (emit_debug_insn_after): Likewise.
9189         (emit_pattern_before): Likewise for param "before".
9190         (emit_insn_before): Likewise.
9191         (emit_jump_insn_before): Likewise.
9192         * final.c (get_insn_template): Likewise for param "insn", removing
9193         a cast.
9194         * output.h (get_insn_template): Likewise for 2nd param.
9195         * rtl.h (emit_insn_before): Likewise.
9196         (emit_jump_insn_before): Likewise.
9197         (emit_debug_insn_before_noloc): Likewise.
9198         (emit_insn_after): Likewise.
9199         (emit_jump_insn_after): Likewise.
9200         (emit_call_insn_after): Likewise.
9201         (emit_debug_insn_after): Likewise.
9202         (set_insn_deleted): Likewise for param.
9204 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
9206         PR target/85358
9207         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9208         floating point modes, so that IFmode is numerically greater than
9209         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9210         to declare the ordering.  This prevents IFmode from being
9211         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9212         machine.  Include rs6000-modes.h to share the fractional values
9213         between genmodes* and the rest of the compiler.
9214         (IFmode): Likewise.
9215         (KFmode): Likewise.
9216         (TFmode): Likewise.
9217         * config/rs6000/rs6000-modes.h: New file.
9218         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9219         meaning of rs6000_long_double_size so that 126..128 selects an
9220         appropriate 128-bit floating point type.
9221         (rs6000_option_override_internal): Likewise.
9222         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9223         (TARGET_LONG_DOUBLE_128): Change the meaning of
9224         rs6000_long_double_size so that 126..128 selects an appropriate
9225         128-bit floating point type.
9226         (LONG_DOUBLE_TYPE_SIZE): Update comment.
9227         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9228         source and destination to match the standard usage.
9229         (truncifkf2): Likewise.
9230         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9231         ISA 2.07 to use an explicit clobber, instead of passing in a
9232         temporary.
9233         (copysign<mode>3_soft): Likewise.
9235 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
9237         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9238         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9239         (vect_slp_analyze_instance_dependence): Likewise.
9240         (vect_enhance_data_refs_alignment): Likewise.
9241         (vect_analyze_data_refs_alignment): Likewise.
9242         (vect_slp_analyze_and_verify_instance_alignment
9243         (vect_analyze_data_ref_accesses): Likewise.
9244         (vect_prune_runtime_alias_test_list): Likewise.
9245         (vect_analyze_data_refs): Likewise.
9246         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9247         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9248         (vect_analyze_scalar_cycles_1): Likewise.
9249         (vect_get_loop_niters): Likewise.
9250         (vect_analyze_loop_form_1): Likewise.
9251         (vect_update_vf_for_slp): Likewise.
9252         (vect_analyze_loop_operations): Likewise.
9253         (vect_analyze_loop): Likewise.
9254         (vectorizable_induction): Likewise.
9255         (vect_transform_loop): Likewise.
9256         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9257         * tree-vect-slp.c (vect_analyze_slp): Likewise.
9258         (vect_make_slp_decision): Likewise.
9259         (vect_detect_hybrid_slp): Likewise.
9260         (vect_slp_analyze_operations): Likewise.
9261         (vect_slp_bb): Likewise.
9262         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9263         (vectorizable_bswap): Likewise.
9264         (vectorizable_call): Likewise.
9265         (vectorizable_simd_clone_call): Likewise.
9266         (vectorizable_conversion): Likewise.
9267         (vectorizable_assignment): Likewise.
9268         (vectorizable_shift): Likewise.
9269         (vectorizable_operation): Likewise.
9270         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9272 2018-06-18  Martin Sebor  <msebor@redhat.com>
9274         PR tree-optimization/81384
9275         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9276         * builtins.c (expand_builtin_strnlen): New function.
9277         (expand_builtin): Call it.
9278         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9279         * builtins.def (BUILT_IN_STRNLEN): New.
9280         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9281         Warn for bounds in excess of maximum object size.
9282         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9283         single-value ranges.  Handle strnlen.
9284         (handle_builtin_strlen): Handle strnlen.
9285         (strlen_check_and_optimize_stmt): Same.
9286         * doc/extend.texi (Other Builtins): Document strnlen.
9288 2018-06-18  Maya Rashish  <coypu@sdf.org>
9290         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9291         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9292         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9294         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9295         here to ...
9296         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9298 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9300         * tree.c (escaped_string::escape): Replace cast to char * by
9301         const_cast<char *> (unescaped).
9303 2018-06-18  Nick Clifton  <nickc@redhat.com>
9305         PR 84195
9306         * tree.c (escaped_string): New class.  Converts an unescaped
9307         string into its escaped equivalent.
9308         (warn_deprecated_use): Use the new class to convert the
9309         deprecation message, if present.
9310         (test_escaped_strings): New self test.
9311         (test_c_tests): Add test_escaped_strings.
9312         * doc/extend.texi (deprecated): Add a note that the
9313         deprecation message is affected by the -fmessage-length
9314         option, and that control characters will be escaped.
9315         (#pragma GCC error): Document this pragma.
9316         (#pragma GCC warning): Likewise.
9317         * doc/invoke.texi (-fmessage-length): Document this option's
9318         effect on the #warning and #error preprocessor directives and
9319         the deprecated attribute.
9321 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9323         * tree.c (decl_value_expr_lookup): Revert latest change.
9324         (decl_value_expr_insert): Likewise.
9326 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
9328         * gimplify.c (nonlocal_vlas): Delete.
9329         (nonlocal_vla_vars): Likewise.
9330         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9331         referenced VLAs.
9332         (gimplify_body): Do not create and destroy nonlocal_vlas.
9333         * tree-nested.c: Include diagnostic.h.
9334         (use_pointer_in_frame): Tweak.
9335         (lookup_field_for_decl): Add assertion and declare the transformation.
9336         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9337         internal error when the reference is in a wrong context.  Do not
9338         create a debug decl by default.
9339         (note_nonlocal_block_vlas): Delete.
9340         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9341         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
9342         create a debug decl by default.
9343         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9344         call is in a wrong context.
9345         (fixup_vla_decls): New function.
9346         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
9347         debug variables were created.
9348         * tree.c (decl_value_expr_lookup): Add checking assertion.
9349         (decl_value_expr_insert): Likewise.
9351 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
9353         PR middle-end/82479
9354         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9355         * tree-scalar-evolution.c (interpret_expr): Likewise.
9356         (expression_expensive_p): Likewise.
9357         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9358         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9359         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9360         (ssa_defined_by_minus_one_stmt_p): New.
9362 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
9364         PR middle-end/64946
9365         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9366         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9367         * dojump.c (do_jump): Likewise.
9368         * expr.c (expand_expr_real_2): Check operand type's sign.
9369         * fold-const.c (const_unop): Handle ABSU_EXPR.
9370         (fold_abs_const): Likewise.
9371         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9372         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9373         (strip_sign_op_1): Likesise.
9374         * match.pd: Add new pattern to generate ABSU_EXPR.
9375         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9376         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9377         * tree-eh.c (operation_could_trap_helper_p): Likewise.
9378         * tree-inline.c (estimate_operator_cost): Likewise.
9379         * tree-pretty-print.c (dump_generic_node): Likewise.
9380         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9381         * tree.def (ABSU_EXPR): New.
9383 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
9385         PR middle-end/86095
9386         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9387         documented as preserved for backward compatibility only.
9388         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9390         PR rtl-optimization/86108
9391         * bb-reorder.c (create_forwarder_block): Renamed to ...
9392         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
9393         jump from new landing pad to the second part.
9394         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9395         Adjust callers.
9397 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
9399         PR middle-end/85878
9400         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9401         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9402         Only call store_expr for halves if the mode is the same.
9404         PR middle-end/86123
9405         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9406         Fix up comment formatting.
9408 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9410         * typed-splay-tree.h (typed_splay_tree::remove): New function.
9411         (typed_splay_tree::closure,
9412         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9413         (typed_splay_tree::typed_splay_tree,
9414         typed_splay_tree::operator =): Declared private.
9415         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9416         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9417         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9418         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9419         typed_splay_tree::splay_tree_splay,
9420         typed_splay_tree::splay_tree_foreach_helper,
9421         typed_splay_tree::splay_tree_insert,
9422         typed_splay_tree::splay_tree_remove,
9423         typed_splay_tree::splay_tree_lookup,
9424         typed_splay_tree::splay_tree_predecessor,
9425         typed_splay_tree::splay_tree_successor,
9426         typed_splay_tree::splay_tree_min,
9427         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9428         (typed_splay_tree::root, typed_splay_tree::comp,
9429         typed_splay_tree::delete_key,
9430         typed_splay_tree::delete_value): New data members.
9431         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9432         typed_splay_tree::remove.
9434 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
9436         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9437         -mginv and -mno-ginv to the assembler.
9438         * config/mips/mips.opt (-mcrc): New option.
9439         (-mginv): Likewise.
9440         * doc/invoke.text (-mcrc): Document.
9441         (-mginv): Likewise.
9443 2018-06-15  Nick Clifton  <nickc@redhat.com>
9445         PR 84195
9446         * tree.c (escaped_string): New class.  Converts an unescaped
9447         string into its escaped equivalent.
9448         (warn_deprecated_use): Use the new class to convert the
9449         deprecation message, if present.
9450         (test_escaped_strings): New self test.
9451         (test_c_tests): Add test_escaped_strings.
9452         * doc/extend.texi (deprecated): Add a note that the
9453         deprecation message is affected by the -fmessage-length
9454         option, and that control characters will be escaped.
9455         (#pragma GCC error): Document this pragma.
9456         (#pragma GCC warning): Likewise.
9457         * doc/invoke.texi (-fmessage-length): Document this option's
9458         effect on the #warning and #error preprocessor directives and
9459         the deprecated attribute.
9461 2018-06-15  Richard Biener  <rguenther@suse.de>
9463         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9464         here, also noting vector size used.
9465         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
9466         size used in MSG_OPTIMIZED_LOCATIONS dump.
9467         (pass_slp_vectorize::execute): Adjust.
9469 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
9471         PR target/85968
9472         * config/arc/arc.c (arc_return_address_register): Fix
9473         if-condition.
9475 2018-06-15  Richard Biener  <rguenther@suse.de>
9477         PR middle-end/86159
9478         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9479         leave useless conversion stripping to force_gimple_operand_gsi.
9480         (gimplify_build2): Likewise.
9481         (gimplify_build1): Likewise.
9483 2018-06-15  Richard Biener  <rguenther@suse.de>
9485         PR middle-end/86076
9486         * tree-cfg.c (move_stmt_op): unshare invariant addresses
9487         before adjusting their block.
9489 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9491         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9492         multilibs for *-*-rtems*.
9493         * config/riscv/t-rtems: New file.
9495 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
9497         PR middle-end/86122
9498         * match.pd ((A +- CST1) +- CST2): Punt if last resort
9499         unsigned_type_for returns NULL.
9501         PR target/85945
9502         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9503         subregs of multi-word pseudos unless the float mode has word size.
9505 2018-06-14  Richard Biener  <rguenther@suse.de>
9507         PR middle-end/86139
9508         * tree-vect-generic.c (build_word_mode_vector_type): Remove
9509         duplicate and harmful type_hash_canon.
9510         * tree.c (type_hash_canon): Assert we didn't find ourselves.
9512 2018-06-14  Richard Biener  <rguenther@suse.de>
9514         PR ipa/86124
9515         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9516         NULL cgraph_node.
9518 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9520         * config/rtems.h (STDINT_LONG32): Define.
9522 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
9523             Prachi Godbole  <prachi.godbole@imgtec.com>
9525         * config/mips/mips-cpus.def: Define P6600.
9526         * config/mips/mips-tables.opt: Regenerate.
9527         * config/mips/mips.c (mips_ucbranch_type): New enum.
9528         (mips_rtx_cost_data): Add support for P6600.
9529         (mips_issue_rate): Likewise.
9530         (mips_multipass_dfa_lookahead): Likewise.
9531         (mips_avoid_hazard): Likewise.
9532         (mips_reorg_process_insns): Likewise.
9533         (mips_classify_branch_p6600): New function.
9534         * config/mips/mips.h (TUNE_P6600): New define.
9535         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9536         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9537         * config/mips/mips.md: Include p6600.md.
9538         (processor): Add p6600.
9539         * config/mips/p6600.md: New file.
9540         * doc/invoke.texi: Add p6600 to supported architectures.
9542 2018-06-13  Martin Sebor  <msebor@redhat.com>
9544         PR tree-optimization/86114
9545         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9546         of integer types.
9547         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9549 2018-06-13  Richard Biener  <rguenther@suse.de>
9551         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9552         Properly set vector type of the intermediate stmt.
9553         * tree-vect-stmts.c (vectorizable_operation): The destination
9554         var always has vectype_out type.
9556 2018-06-13  Jeff Law  <law@redhat.com>
9558         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9559         integer 0 for argument to print_rtl_with_bb.
9560         (rl78_reorg): Likewise.
9562 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
9564         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9565         from rtx to rtx_insn *.
9566         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9567         "label".
9568         (add_sched_insns_for_speculation): Likewise for local "target",
9569         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9570         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9571         from rtx_insn ** to rtx_code_label **.
9572         (reorg_emit_nops): Likewise.
9573         (c6x_reorg): Likewise for local "call_labels".
9574         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9575         rtx to rtx_insn *.
9576         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9577         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9578         the loops over LABEL_REFS.
9579         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9580         braf_label.
9581         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9582         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9583         (split_branches): Strengthen local "olabel" from rtx to
9584         rtx_insn *, adding a safe_as_a cast.
9585         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9586         to "rtx_insn *".
9587         (add_insn_after): Likewise for first two params.
9588         (add_insn_before): Likewise.
9589         (remove_insn): Likewise for param.
9590         (emit_pattern_before_noloc): Likewise for second and third params.
9591         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9592         (emit_call_insn_before_noloc): Likewise.
9593         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9594         to "rtx_insn *".
9595         (emit_barrier_before): Likewise.
9596         (emit_label_before): Strengthen "label" param from "rtx" to
9597         "rtx_code_label *".  Strengthen "before" param from "rtx" to
9598         "rtx_insn *".
9599         (emit_insn_after_1): Strengthen "after" param from "rtx" to
9600         "rtx_insn *".
9601         (emit_pattern_after_noloc): Likewise.
9602         (emit_insn_after_noloc): Likewise.
9603         (emit_jump_insn_after_noloc): Likewise.
9604         (emit_call_insn_after_noloc): Likewise.
9605         (emit_debug_insn_after_noloc): Likewise.
9606         (emit_barrier_after): Likewise.
9607         (emit_label_after): Likewise for both params.
9608         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
9609         "loc" param from "int" to "location_t".
9610         (emit_insn_after_setloc): Likewise.
9611         (emit_jump_insn_after_setloc): Likewise.
9612         (emit_call_insn_after_setloc): Likewise.
9613         (emit_debug_insn_after_setloc): Likewise.
9614         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
9615         "loc" param from "int" to "location_t".
9616         (emit_pattern_before): Convert NULL_RTX to NULL.
9617         (emit_insn_before_setloc): Convert "loc" param from "int" to
9618         "location_t".
9619         (emit_jump_insn_before_setloc): Likewise.
9620         (emit_call_insn_before_setloc): Likewise.
9621         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9622         rtx_insn *.  Convert "loc" param from "int" to "location_t".
9623         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9624         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9625         Convert 3rd param from "int" to "location_t".
9626         (emit_barrier_before, emit_barrier_after, next_real_insn):
9627         Strengthen param from rtx to rtx_insn *.
9628         (emit_label_before): Strengthen 1st param from "rtx" to
9629         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
9630         "rtx_insn *".
9631         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9632         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9633         Strengthen 2nd param from "rtx" to "rtx_insn *".
9634         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9635         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9636         Likewise. Convert 3rd param from "int" to "location_t".
9637         (emit_label_after): Strengthen 1st param from "rtx" to
9638         "rtx_code_label *".
9639         (next_real_insn, remove_insn): Strengthen param from "rtx" to
9640         "rtx_insn *".
9641         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9642         from "rtx" to "rtx_insn *".
9644 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
9646         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9647         bodies streamed in with -Q.
9648         * dumpfile.c (dump_files): Add lto-stream-out dump file.
9649         * dumpfile.h (tree_dump_index): Add lto_stream_out.
9650         * gimple-streamer-out.c: Include gimple-pretty-print.h
9651         (output_bb): Dump stmts streamed.
9652         * lto-section-out.c: Include print-tree.h
9653         (lto_begin_section): Dump sections created.
9654         (lto_output_decl_index): Dump decl encoded.
9655         * lto-streamer-out.c: Include print-tree.h
9656         (create_output_block): Dump output block created.
9657         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9658         (output_function): Dump function output.
9659         (output_constructor): Dump constructor streamed.
9660         (write_global_stream): Output indexes encoded.
9661         (produce_asm_for_decls): Dump streams encoded.
9662         * lto-streamer.c (streamer_dump_file): New global var.
9663         * lto-streamer.h (streamer_dump_file): Declare.
9664         * passes.c (ipa_write_summaries): Initialize streamer dump.
9665         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9666         in.
9668 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9670         PR target/86048
9671         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9672         offsets for register save directives.  Emit a second batch of save
9673         directives, if need be, when the function accesses prior frames.
9675 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9677         * config/arc/fpu.md (fmasf4): Force operand to register.
9678         (fnmasf4): Likewise.
9680 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9682         * config/arc/arc-protos.h (arc_pad_return): Remove.
9683         * config/arc/arc.c (machine_function): Remove force_short_suffix
9684         and size_reason.
9685         (arc_print_operand): Adjust printing of '&'.
9686         (arc_verify_short): Remove conditional printing of short suffix.
9687         (arc_final_prescan_insn): Remove reference to size_reason.
9688         (pad_return): New function.
9689         (arc_reorg): Call pad_return.
9690         (arc_pad_return): Remove.
9691         (arc_init_machine_status): Remove reference to force_short_suffix.
9692         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9693         (attr length): When attribute iscompact is true force to 2
9694         regardless; in the case of maybe check if we want to force the
9695         instruction to have 4 bytes length.
9696         (nopv): Change it to generate 4 byte long nop as well.
9697         (blockage): New pattern.
9698         (simple_return): Remove call to arc_pad_return.
9699         (p_return_i): Likewise.
9701 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9703         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9705 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9707         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9708         ARC cores.
9710 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9712         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9713         for ARC700 and ARCv2.
9715 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
9717         PR target/86076
9718         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9719         operands[2] instead of operands[1].
9722 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9724         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9725         case, check whether the outer register overlaps an unallocatable
9726         register, not just whether it fits the required class.
9728 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9730         * poly-int.h (can_div_trunc_p): Add new overload in which all values
9731         are poly_ints.
9732         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9733         (memrefs_conflict_p): Likewise.
9734         (init_alias_analysis): Likewise.
9735         * cfgexpand.c (expand_debug_expr): Likewise.
9736         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9737         * cse.c (fold_rtx): Likewise.
9738         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9739         * expr.c (emit_block_move_hints): Likewise.
9740         (clear_storage_hints, push_block, emit_push_insn): Likewise.
9741         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9742         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9743         (emit_group_store): Likewise.
9744         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
9745         to read the PRE/POST_MODIFY increment.
9746         * calls.c (store_one_arg): Use strip_offset.
9747         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9748         poly_int_rtx_p.
9749         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9750         by a VEC_SELECT.
9751         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9752         (simplify_binary_operation_1): Extend CONST_INT handling to
9753         poly_int_rtx_p.
9754         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9755         than a HOST_WIDE_INT.
9756         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9757         poly_int64.
9758         (adjust_mems, add_stores): Update accodingly.
9759         (vt_canonicalize_addr): Track polynomial offsets.
9760         (emit_note_insn_var_location): Likewise.
9761         (vt_add_function_parameter): Likewise.
9762         (vt_initialize): Likewise.
9764 2018-06-12  Jeff Law  <law@redhat.com>
9766         * config.gcc (alpha*-*-freebsd*): Remove.
9767         * config/alpha/freebsd.h: Remove.
9769 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
9771         PR other/69968
9772         * spellcheck-tree.c (levenshtein_distance): Rename to...
9773         (get_edit_distance): ...this, and update for underlying renaming.
9774         * spellcheck-tree.h (levenshtein_distance): Rename to...
9775         (get_edit_distance): ...this.
9776         * spellcheck.c (levenshtein_distance): Rename to...
9777         (get_edit_distance): ...this.  Convert from Levenshtein distance
9778         to Damerau-Levenshtein distance by supporting transpositions of
9779         adjacent characters.  Rename "v1" to "v_next" and "v0" to
9780         "v_one_ago".
9781         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9782         (selftest::test_edit_distance_unit_test_oneway): ...this, and
9783         update for underlying renaming.
9784         (selftest::levenshtein_distance_unit_test): Rename to...
9785         (selftest::test_get_edit_distance_unit): ...this, and update for
9786         underlying renaming.
9787         (selftest::test_find_closest_string): Add example from PR 69968
9788         where transposition helps
9789         (selftest::test_metric_conditions): Update for renaming.
9790         (selftest::test_metric_conditions): Likewise.
9791         (selftest::spellcheck_c_tests): Likewise.
9792         * spellcheck.h (levenshtein_distance): Rename both overloads to...
9793         (get_edit_distance): ...this.
9794         (best_match::consider): Update for renaming.
9796 2018-06-12  Martin Sebor  <msebor@redhat.com>
9798         PR tree-optimization/85259
9799         * builtins.c (compute_objsize): Handle constant offsets.
9800         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9801         true iff a warning has been issued.
9802         * gimple.h (gimple_nonartificial_location): New function.
9803         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9804         gimple_nonartificial_location and handle -Wno-system-headers.
9805         (handle_builtin_stxncpy): Same.
9807 2018-06-12  Martin Sebor  <msebor@redhat.com>
9809         PR c/85931
9810         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9812 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
9814         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9815         BUILTIN_VEC_XST entries for pointer to double and long long.
9817 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
9819         PR target/85990
9820         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9821         Update comments.
9822         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9823         Likewise.
9825 2018-06-12  Martin Liska  <mliska@suse.cz>
9827         * doc/options.texi: Document IntegerRange.
9829 2018-06-12  Martin Liska  <mliska@suse.cz>
9831         * config/i386/i386.opt: Make MPX-related options as Deprecated.
9832         * opt-functions.awk: Handle Deprecated flag.
9833         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9834         and report error.
9835         (read_cmdline_option): Report warning for a deprecated option.
9836         * opts.h (struct cl_option): Add new field cl_deprecated.
9837         (CL_ERR_DEPRECATED): New.
9839 2018-06-12  Martin Liska  <mliska@suse.cz>
9841         * doc/options.texi: Document Deprecated option flag.
9843 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9845         * config/arc/arc-arch.h (arc_extras): New enum.
9846         (arc_cpu_t):Add field extra.
9847         (arc_cpu_types): Consider the extras.
9848         * config/arc/arc-cpus.def: Add extras info.
9849         * config/arc/arc-opts.h (processor_type): Consider extra field.
9850         * config/arc/arc.c (arc_override_options): Handle extra field.
9852 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9854         * config/arc/arc-arch.h: Update ARC_OPTX macro.
9855         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9856         field.
9857         * config/arc/arc.c (arc_init): Update pic warning.
9858         (irq_range): Update irq range parsing warnings.
9859         (arc_override_options): Update various warning messages.
9860         (arc_handle_aux_attribute): Likewise.
9862 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
9864         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9866 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9868         * doc/sourcebuild.texi: Document usage of line number 0 in verify
9869         compiler messages directives.
9871 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
9873         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9874         * config/mips/mips-tables.opt: Regenerate.
9875         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9876         mips64r6.
9877         * doc/invoke.texi: Document -march=i6500.
9879 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
9881         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9882         (i6400_gpmul): Add cpu_unit.
9883         (i6400_gpdiv): Likewise.
9884         (i6400_msa_add_d): Update reservations.
9885         (i6400_msa_int_add) Likewise.
9886         (i6400_msa_short_logic3) Likewise.
9887         (i6400_msa_short_logic2) Likewise.
9888         (i6400_msa_short_logic) Likewise.
9889         (i6400_msa_move) Likewise.
9890         (i6400_msa_cmp) Likewise.
9891         (i6400_msa_short_float2) Likewise.
9892         (i6400_msa_div_d) Likewise.
9893         (i6400_msa_long_logic1) Likewise.
9894         (i6400_msa_long_logic2) Likewise.
9895         (i6400_msa_mult) Likewise.
9896         (i6400_msa_long_float2) Likewise.
9897         (i6400_msa_long_float4) Likewise.
9898         (i6400_msa_long_float5) Likewise.
9899         (i6400_msa_long_float8) Likewise.
9900         (i6400_fpu_fadd): Include frint type.
9901         (i6400_fpu_store): New define_insn_reservation.
9902         (i6400_fpu_load): Likewise.
9903         (i6400_fpu_move): Likewise.
9904         (i6400_fpu_fcmp): Likewise.
9905         (i6400_fpu_fmadd): Likewise.
9906         (i6400_int_mult): Include imul3nc type and update reservation.
9907         (i6400_int_div): Include idiv3 type and update reservation.
9908         (i6400_int_load): Update to check type not move_type.
9909         (i6400_int_store): Likewise.
9910         (i6400_int_prefetch): Set zero latency.
9912 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
9914         * gcc.c: Document new %@{...} sequence.
9915         (LINK_COMMAND_SPEC): Use it for the -L switches.
9916         (cpp_unique_options): Use it for the -I switches.
9917         (at_file_argbuf): New global variable.
9918         (in_at_file): Likewise.
9919         (alloc_args): Create at_file_argbuf.
9920         (clear_args): Truncate at_file_argbuf.
9921         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9922         (open_at_file): New function.
9923         (close_at_file): Likewise.
9924         (create_at_file): Delete.
9925         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9926         <'o'>: Likewise.
9927         <'@'>: New case.
9928         (validate_switches_from_spec): Deal with %@{...} sequence.
9929         (validate_switches): Likewise.
9930         (driver::finalize): Call clear_args.
9932 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
9934         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9936 2018-06-11  Martin Sebor  <msebor@redhat.com>
9938         * doc/invoke.texi (-Wall): List -Wc++17-compat.
9939         (Wno-class-memaccess): Add @opindex.
9940         (Wno-templates, Wno-multiple-inheritance): Same.
9941         (Wno-virtual-inheritance, Wno-namespaces): Same.
9942         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9943         (Wno-format-overflow, Wno-format-truncation): Same.
9944         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9945         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9946         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9947         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9948         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9949         (Wno-misspelled-isr): Same.
9951 2018-06-11  Martin Sebor  <msebor@redhat.com>
9953         * PR tree-optimization/86083
9954         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9956 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
9958         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9960 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
9962         PR target/85755
9963         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9964         on the correct operand.
9965         (*movdi_internal64): Ditto.
9967 2018-06-11  Martin Liska  <mliska@suse.cz>
9969         PR tree-optimization/86089
9970         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9972 2018-06-11  Julia Koval  <julia.koval@intel.com>
9974         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9975         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9976         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9978 2018-06-11  Olivier Hainque  <hainque@adacore.com>
9980         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9981         for Ada with strict dwarf2.
9983 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
9985         PR target/85755
9986         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9987         addresses.
9989 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
9991         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9993 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
9995         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9996         TARGET_ELF.
9998 2018-06-08  Martin Liska  <mliska@suse.cz>
10000         * tree-cfg.h (debug_function): Fix argument type to match
10001         implementation.
10003 2018-06-08  Martin Liska  <mliska@suse.cz>
10005         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
10006         Remove usage of MPX-related (and removed) fields.
10007         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
10009 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
10011         * cfg.c (debug): Use TDF_NONE rather than 0.
10012         * cfghooks.c (debug): Likewise.
10013         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
10014         (struct dump_option_value_info): Convert to...
10015         (struct kv_pair): ...this template type.
10016         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
10017         rather than 0.
10018         (optinfo_verbosity_options): Likewise.
10019         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
10020         OPTGROUP_NONE.
10021         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
10022         than int for "optgroup_flags" param.
10023         (dump_generic_expr_loc): Use dump_flags_t rather than int for
10024         "dump_kind" param.
10025         (dump_dec): Likewise.
10026         (dump_finish): Use TDF_NONE rather than 0.
10027         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
10028         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
10029         than 0.  Update for change to option_ptr.
10030         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
10031         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
10032         0.  Update for changes to optinfo_verbosity_options and
10033         optgroup_options.
10034         (opt_info_switch_p): Convert optgroup_flags from int to
10035         optgroup_flags_t.
10036         (dump_basic_block): Use dump_flags_t rather than int
10037         for "dump_kind" param.
10038         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
10039         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
10040         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
10041         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
10042         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
10043         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
10044         TDF_NONE): Convert from macros to...
10045         (enum dump_flag): ...this new enum.
10046         (dump_flags_t): Update to use enum.
10047         (operator|, operator&, operator~, operator|=, operator&=):
10048         Implement for dump_flags_t.
10049         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10050         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10051         Convert from macros to...
10052         (enum optgroup_flag): ...this new enum.
10053         (optgroup_flags_t): New typedef.
10054         (operator|, operator|=): Implement for optgroup_flags_t.
10055         (struct dump_file_info): Convert field "alt_flags" to
10056         dump_flags_t.  Convert field "optgroup_flags" to
10057         optgroup_flags_t.
10058         (dump_basic_block): Use dump_flags_t rather than int for param.
10059         (dump_generic_expr_loc): Likewise.
10060         (dump_dec): Likewise.
10061         (dump_register): Convert param "optgroup_flags" to
10062         optgroup_flags_t.
10063         (opt_info_enable_passes): Likewise.
10064         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10065         than 0.
10066         * gimple-pretty-print.c (debug): Likewise.
10067         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10068         (merged_store_group::apply_stores): Likewise.
10069         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10070         * gimple.c (verify_gimple_pp): Likewise.
10071         * graphite-poly.c (print_pbb_body): Likewise.
10072         * passes.c (pass_manager::register_one_dump_file): Convert
10073         local "optgroup_flags" to optgroup_flags_t.
10074         * print-tree.c (print_node): Use TDF_NONE rather than 0.
10075         (debug): Likewise.
10076         (debug_body): Likewise.
10077         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10078         to optgroup_flags_t.
10079         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10080         than 0.
10081         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10082         (convert_mult_to_fma): Likewise.
10083         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10084         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10085         * tree-vect-data-refs.c (dump_lower_bound): Convert param
10086         "dump_kind" to dump_flags_t.
10088 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
10090         * config/rs6000/rs6000.c (min, max): Delete.
10092 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
10094         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10095         -mabi=spe and -mabi=no-spe.
10097 2018-06-08  Martin Liska  <mliska@suse.cz>
10099         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10100         where we expect an existing summary.
10102 2018-06-08  Martin Liska  <mliska@suse.cz>
10104         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10105         * ipa-inline.h (estimate_edge_growth): Likewise.
10107 2018-06-08  Martin Liska  <mliska@suse.cz>
10109         * cgraph.c (function_version_hasher::hash): Use
10110         cgraph_node::get_uid ().
10111         (function_version_hasher::equal):
10112         * cgraph.h (cgraph_node::get_uid): New method.
10113         * ipa-inline.c (update_caller_keys): Use
10114         cgraph_node::get_uid ().
10115         (update_callee_keys): Likewise.
10116         * ipa-utils.c (searchc): Likewise.
10117         (ipa_reduced_postorder): Likewise.
10118         * lto-cgraph.c (input_node): Likewise.
10119         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10120         * symbol-summary.h (symtab_insertion): Likewise.
10121         (symtab_removal): Likewise.
10122         (symtab_duplication): Likewise.
10123         * tree-pretty-print.c (dump_function_header): Likewise.
10124         * tree-sra.c (convert_callers_for_node): Likewise.
10126 2018-06-08  Martin Liska  <mliska@suse.cz>
10128         * cgraph.c (symbol_table::create_edge): Always assign a new
10129         unique number.
10130         (symbol_table::free_edge): Do not recycle numbers.
10131         * cgraph.h (cgraph_edge::get): New method.
10132         * symbol-summary.h (symtab_removal): Use it.
10133         (symtab_duplication): Likewise.
10134         (call_summary::hashable_uid): Remove.
10136 2018-06-08  Martin Liska  <mliska@suse.cz>
10138         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10139         (initialize_growth_caches): Remove.
10140         (free_growth_caches): Likewise.
10141         (do_estimate_edge_time): Use edge_growth_cache.
10142         (do_estimate_edge_size): Likewise.
10143         (do_estimate_edge_hints): Likewise.
10144         * ipa-inline.c (reset_edge_caches): Likewise.
10145         (recursive_inlining): Likewise.
10146         (inline_small_functions): Likewise.
10147         * ipa-inline.h (initialize_growth_caches): Remove.
10148         (estimate_edge_size): Likewise.
10149         (estimate_edge_time): Likewise.
10150         (estimate_edge_hints): Likewise.
10151         (reset_edge_growth_cache): Likewise.
10152         * symbol-summary.h (call_summary::remove): New method.
10154 2018-06-08  Martin Liska  <mliska@suse.cz>
10156         * ipa-cp.c (class edge_clone_summary): New summary.
10157         (grow_edge_clone_vectors): Remove.
10158         (ipcp_edge_duplication_hook): Remove.
10159         (class edge_clone_summary_t): New call_summary class.
10160         (ipcp_edge_removal_hook): Remove.
10161         (edge_clone_summary_t::duplicate): New function.
10162         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10163         (create_specialized_node): Likewise.
10164         (ipcp_driver): Initialize edge_clone_summaries and do not
10165         register hooks.
10167 2018-06-08  Martin Liska  <mliska@suse.cz>
10169         * symbol-summary.h (get): New function.
10170         (call_summary::m_initialize_when_cloning): New class member.
10172 2018-06-08  Martin Liska  <mliska@suse.cz>
10174         * cgraph.c (cgraph_node::remove): Do not recycle uid.
10175         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10176         (symbol_table::allocate_cgraph_symbol): Do not set uid.
10177         * passes.c (uid_hash_t): Record removed_nodes by their uids.
10178         (remove_cgraph_node_from_order): Use the removed_nodes set.
10179         (do_per_function_toporder): Likwise.
10180         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10181         instead of summary_uid.
10182         (symtab_removal): Likewise.
10183         (symtab_duplication): Likewise.
10185 2018-06-08  Martin Liska  <mliska@suse.cz>
10187         * ipa-cp.c (ipcp_store_bits_results): Use
10188         ipcp_transformation_sum.
10189         (ipcp_store_vr_results): Likewise.
10190         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10191         to ...
10192         (ipcp_transformation_initialize): ... this.
10193         (ipa_set_node_agg_value_chain):
10194         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10195         (write_ipcp_transformation_info): Likewise.
10196         (read_ipcp_transformation_info): Likewise.
10197         (ipcp_update_bits): Likewise.
10198         (ipcp_update_vr): Likewise.
10199         (ipcp_transform_function): Likewise.
10200         * ipa-prop.h: Rename ipcp_transformation_summary to
10201         ipcp_transformation.
10202         (class ipcp_transformation_t): New function summary.
10203         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10204         (ipa_get_agg_replacements_for_node): Likewise.
10206 2018-06-08  Martin Liska  <mliska@suse.cz>
10208         * ipa-pure-const.c (struct funct_state_d): Do it class instead
10209         of struct.
10210         (class funct_state_summary_t): New function_summary class.
10211         (has_function_state): Remove.
10212         (get_function_state): Likewise.
10213         (set_function_state): Likewise.
10214         (add_new_function): Likewise.
10215         (funct_state_summary_t::insert): New function.
10216         (duplicate_node_data): Remove.
10217         (remove_node_data): Remove.
10218         (funct_state_summary_t::duplicate): New function.
10219         (register_hooks): Create new funct_state_summaries.
10220         (pure_const_generate_summary): Use it.
10221         (pure_const_write_summary): Likewise.
10222         (pure_const_read_summary): Likewise.
10223         (propagate_pure_const): Likewise.
10224         (propagate_nothrow): Likewise.
10225         (dump_malloc_lattice): Likewise.
10226         (propagate_malloc): Likewise.
10227         (execute): Do not register hooks, just remove summary
10228         instead.
10229         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10230         constructor.
10232 2018-06-08  Martin Liska  <mliska@suse.cz>
10234         * ipa-reference.c (remove_node_data): Remove.
10235         (duplicate_node_data): Likewise.
10236         (class ipa_ref_var_info_summary_t): New class.
10237         (class ipa_ref_opt_summary_t): Likewise.
10238         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10239         (get_reference_optimization_summary): Use
10240         ipa_ref_opt_sum_summaries.
10241         (set_reference_vars_info): Remove.
10242         (set_reference_optimization_summary): Likewise.
10243         (ipa_init): Create summaries.
10244         (init_function_info): Use function summary.
10245         (ipa_ref_opt_summary_t::duplicate): New function.
10246         (ipa_ref_opt_summary_t::remove): New function.
10247         (get_read_write_all_from_node): Fix GNU coding style.
10248         (propagate): Use function summary.
10249         (write_node_summary_p): Fix GNU coding style.
10250         (stream_out_bitmap): Likewise.
10251         (ipa_reference_read_optimization_summary): Use function summary.
10252         (ipa_reference_c_finalize): Do not release hooks.
10254 2018-06-08  Martin Liska  <mliska@suse.cz>
10256         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10257         (analyze_function_body): Extract multiple calls of get_create.
10258         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10259         * ipa-inline.c (recursive_inlining): Use ::get method.
10260         * ipa-inline.h (estimate_edge_growth): Likewise.
10262 2018-06-08  Martin Liska  <mliska@suse.cz>
10264         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10265         HSA_INVALID.
10266         (hsa_function_summary::hsa_function_summary): Use the new enum
10267         value.
10268         (hsa_gpu_implementation_p): Use hsa_summaries::get.
10269         * hsa-gen.c (hsa_get_host_function): Likewise.
10270         (get_brig_function_name): Likewise.
10271         * ipa-hsa.c (process_hsa_functions): Likewise.
10272         (ipa_hsa_write_summary): Likewise.
10273         * symbol-summary.h (symtab_duplication): Use ::get function/
10274         (get): New function.
10276 2018-06-08  Martin Liska  <mliska@suse.cz>
10278         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10279         of get.
10280         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10281         (hsa_register_kernel): Likewise.
10282         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10283         * hsa-gen.c (hsa_get_host_function): Likewise.
10284         (get_brig_function_name): Likewise.
10285         (generate_hsa): Likewise.
10286         (pass_gen_hsail::execute): Likewise.
10287         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10288         (devirtualization_time_bonus): Likewise.
10289         (ipcp_propagate_stage): Likewise.
10290         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10291         (edge_set_predicate): Likewise.
10292         (evaluate_conditions_for_known_args): Likewise.
10293         (evaluate_properties_for_edge): Likewise.
10294         (ipa_fn_summary::reset): Likewise.
10295         (ipa_fn_summary_t::duplicate): Likewise.
10296         (dump_ipa_call_summary): Likewise.
10297         (ipa_dump_fn_summary): Likewise.
10298         (analyze_function_body): Likewise.
10299         (compute_fn_summary): Likewise.
10300         (estimate_edge_devirt_benefit): Likewise.
10301         (estimate_edge_size_and_time): Likewise.
10302         (estimate_calls_size_and_time): Likewise.
10303         (estimate_node_size_and_time): Likewise.
10304         (inline_update_callee_summaries): Likewise.
10305         (remap_edge_change_prob): Likewise.
10306         (remap_edge_summaries): Likewise.
10307         (ipa_merge_fn_summary_after_inlining): Likewise.
10308         (ipa_update_overall_fn_summary): Likewise.
10309         (read_ipa_call_summary): Likewise.
10310         (inline_read_section): Likewise.
10311         (write_ipa_call_summary): Likewise.
10312         (ipa_fn_summary_write): Likewise.
10313         (ipa_free_fn_summary): Likewise.
10314         * ipa-hsa.c (process_hsa_functions): Likewise.
10315         (ipa_hsa_write_summary): Likewise.
10316         (ipa_hsa_read_section): Likewise.
10317         * ipa-icf.c (sem_function::merge): Likewise.
10318         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10319         (do_estimate_edge_time): Likewise.
10320         (estimate_size_after_inlining): Likewise.
10321         (estimate_growth): Likewise.
10322         (growth_likely_positive): Likewise.
10323         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10324         (inline_call): Likewise.
10325         * ipa-inline.c (caller_growth_limits): Likewise.
10326         (can_inline_edge_p): Likewise.
10327         (can_inline_edge_by_limits_p): Likewise.
10328         (compute_uninlined_call_time): Likewise.
10329         (compute_inlined_call_time): Likewise.
10330         (want_inline_small_function_p): Likewise.
10331         (edge_badness): Likewise.
10332         (update_caller_keys): Likewise.
10333         (update_callee_keys): Likewise.
10334         (recursive_inlining): Likewise.
10335         (inline_small_functions): Likewise.
10336         (inline_to_all_callers_1): Likewise.
10337         (dump_overall_stats): Likewise.
10338         (early_inline_small_functions): Likewise.
10339         (early_inliner): Likewise.
10340         * ipa-inline.h (estimate_edge_growth): Likewise.
10341         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10342         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10343         * ipa-prop.h (IPA_NODE_REF): Likewise.
10344         (IPA_EDGE_REF): Likewise.
10345         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10346         (propagate_malloc): Likewise.
10347         * ipa-split.c (execute_split_functions): Likewise.
10348         * symbol-summary.h: Rename get to get_create.
10349         (get): Likewise.
10350         (get_create): Likewise.
10351         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10353 2018-06-08  Martin Liska  <mliska@suse.cz>
10355         * symbol-summary.h (release): Move definition out of class
10356         declaration.
10357         (symtab_removal): Likewise.
10358         (symtab_duplication): Likewise.
10360 2018-06-08  Martin Liska  <mliska@suse.cz>
10362         * symbol-summary.h (function_summary): Move constructor
10363         implementation out of class declaration.
10364         (release): Likewise.
10365         (symtab_insertion): Likewise.
10366         (symtab_removal): Likewise.
10367         (symtab_duplication): Likewise.
10368         (get): Likewise.
10370 2018-06-08  Martin Liska  <mliska@suse.cz>
10372         * Makefile.in: Remove support for MPX (macros, related functions,
10373         fields in cgraph_node, ...).
10374         * builtin-types.def (BT_BND): Likewise.
10375         (BT_FN_BND_CONST_PTR): Likewise.
10376         (BT_FN_CONST_PTR_BND): Likewise.
10377         (BT_FN_VOID_PTR_BND): Likewise.
10378         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10379         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10380         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10381         (expand_builtin_mempcpy_with_bounds): Likewise.
10382         (expand_builtin_memset_with_bounds): Likewise.
10383         (expand_builtin_memset_args): Likewise.
10384         (std_expand_builtin_va_start): Likewise.
10385         (expand_builtin): Likewise.
10386         (expand_builtin_with_bounds): Likewise.
10387         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10388         (DEF_LIB_BUILTIN_CHKP): Likewise.
10389         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10390         (DEF_CHKP_BUILTIN): Likewise.
10391         (BUILT_IN_MEMCPY): Likewise.
10392         (BUILT_IN_MEMMOVE): Likewise.
10393         (BUILT_IN_MEMPCPY): Likewise.
10394         (BUILT_IN_MEMSET): Likewise.
10395         (BUILT_IN_STPCPY): Likewise.
10396         (BUILT_IN_STRCAT): Likewise.
10397         (BUILT_IN_STRCHR): Likewise.
10398         (BUILT_IN_STRCPY): Likewise.
10399         (BUILT_IN_STRLEN): Likewise.
10400         (BUILT_IN_MEMCPY_CHK): Likewise.
10401         (BUILT_IN_MEMMOVE_CHK): Likewise.
10402         (BUILT_IN_MEMPCPY_CHK): Likewise.
10403         (BUILT_IN_MEMSET_CHK): Likewise.
10404         (BUILT_IN_STPCPY_CHK): Likewise.
10405         (BUILT_IN_STRCAT_CHK): Likewise.
10406         (BUILT_IN_STRCPY_CHK): Likewise.
10407         * calls.c (store_bounds): Likewise.
10408         (emit_call_1): Likewise.
10409         (special_function_p): Likewise.
10410         (maybe_warn_nonstring_arg): Likewise.
10411         (initialize_argument_information): Likewise.
10412         (finalize_must_preallocate): Likewise.
10413         (compute_argument_addresses): Likewise.
10414         (expand_call): Likewise.
10415         * cfgexpand.c (expand_call_stmt): Likewise.
10416         (expand_return): Likewise.
10417         (expand_gimple_stmt_1): Likewise.
10418         (pass_expand::execute): Likewise.
10419         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10420         (cgraph_node::remove): Likewise.
10421         (cgraph_node::dump): Likewise.
10422         (cgraph_node::verify_node): Likewise.
10423         * cgraph.h (chkp_function_instrumented_p): Likewise.
10424         (symtab_node::get_alias_target): Likewise.
10425         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10426         (cgraph_local_p): Likewise.
10427         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10428         (cgraph_edge::rebuild_references): Likewise.
10429         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10430         (walk_polymorphic_call_targets): Likewise.
10431         (cgraph_node::expand_thunk): Likewise.
10432         (symbol_table::output_weakrefs): Likewise.
10433         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10434         (ix86_handle_option): Likewise.
10435         * config/i386/constraints.md: Likewise.
10436         * config/i386/i386-builtin-types.def (BND): Likewise.
10437         (VOID): Likewise.
10438         (PVOID): Likewise.
10439         (ULONG): Likewise.
10440         * config/i386/i386-builtin.def (BDESC_END): Likewise.
10441         (BDESC_FIRST): Likewise.
10442         (BDESC): Likewise.
10443         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10444         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10445         * config/i386/i386.c (enum reg_class): Likewise.
10446         (ix86_target_string): Likewise.
10447         (ix86_option_override_internal): Likewise.
10448         (ix86_conditional_register_usage): Likewise.
10449         (ix86_valid_target_attribute_inner_p): Likewise.
10450         (ix86_set_indirect_branch_type): Likewise.
10451         (ix86_set_current_function): Likewise.
10452         (ix86_function_arg_regno_p): Likewise.
10453         (init_cumulative_args): Likewise.
10454         (ix86_function_arg_advance): Likewise.
10455         (ix86_function_arg): Likewise.
10456         (ix86_pass_by_reference): Likewise.
10457         (ix86_function_value_regno_p): Likewise.
10458         (ix86_function_value_1): Likewise.
10459         (ix86_function_value_bounds): Likewise.
10460         (ix86_return_in_memory): Likewise.
10461         (ix86_setup_incoming_vararg_bounds): Likewise.
10462         (ix86_va_start): Likewise.
10463         (indirect_thunk_need_prefix): Likewise.
10464         (print_reg): Likewise.
10465         (ix86_print_operand): Likewise.
10466         (ix86_expand_call): Likewise.
10467         (ix86_output_function_return): Likewise.
10468         (reg_encoded_number): Likewise.
10469         (BDESC_VERIFYS): Likewise.
10470         (ix86_init_mpx_builtins): Likewise.
10471         (ix86_init_builtins): Likewise.
10472         (ix86_emit_cmove): Likewise.
10473         (ix86_emit_move_max): Likewise.
10474         (ix86_expand_builtin): Likewise.
10475         (ix86_builtin_mpx_function): Likewise.
10476         (ix86_get_arg_address_for_bt): Likewise.
10477         (ix86_load_bounds): Likewise.
10478         (ix86_store_bounds): Likewise.
10479         (ix86_load_returned_bounds): Likewise.
10480         (ix86_store_returned_bounds): Likewise.
10481         (ix86_class_likely_spilled_p): Likewise.
10482         (ix86_hard_regno_mode_ok): Likewise.
10483         (x86_order_regs_for_local_alloc): Likewise.
10484         (ix86_mitigate_rop): Likewise.
10485         (ix86_bnd_prefixed_insn_p): Likewise.
10486         (ix86_mpx_bound_mode): Likewise.
10487         (ix86_make_bounds_constant): Likewise.
10488         (ix86_initialize_bounds): Likewise.
10489         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10490         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10491         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10492         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10493         (TARGET_CHKP_BOUND_MODE): Likewise.
10494         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10495         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10496         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10497         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10498         * config/i386/i386.h (TARGET_MPX): Likewise.
10499         (TARGET_MPX_P): Likewise.
10500         (VALID_BND_REG_MODE): Likewise.
10501         (FIRST_BND_REG): Likewise.
10502         (LAST_BND_REG): Likewise.
10503         (enum reg_class): Likewise.
10504         (BND_REG_P): Likewise.
10505         (BND_REGNO_P): Likewise.
10506         (BNDmode): Likewise.
10507         (ADJUST_INSN_LENGTH): Likewise.
10508         * config/i386/i386.md: Likewise.
10509         * config/i386/i386.opt: Likewise.
10510         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10511         (defined): Likewise.
10512         (LINK_MPX): Likewise.
10513         (MPX_SPEC): Likewise.
10514         (LIBMPX_SPEC): Likewise.
10515         (LIBMPXWRAPPERS_SPEC): Likewise.
10516         (CHKP_SPEC): Likewise.
10517         * config/i386/predicates.md: Likewise.
10518         * dbxout.c (dbxout_type): Likewise.
10519         * doc/extend.texi: Likewise.
10520         * doc/invoke.texi: Likewise.
10521         * doc/md.texi: Likewise.
10522         * doc/tm.texi: Likewise.
10523         * doc/tm.texi.in: Likewise.
10524         * dwarf2out.c (is_base_type): Likewise.
10525         (gen_formal_types_die): Likewise.
10526         (gen_subprogram_die): Likewise.
10527         (gen_type_die_with_usage): Likewise.
10528         (gen_decl_die): Likewise.
10529         (dwarf2out_late_global_decl): Likewise.
10530         * expr.c (expand_assignment): Likewise.
10531         (emit_storent_insn): Likewise.
10532         (store_expr_with_bounds): Likewise.
10533         (store_expr): Likewise.
10534         (expand_expr_real_1): Likewise.
10535         * expr.h (store_expr_with_bounds): Likewise.
10536         * function.c (use_register_for_decl): Likewise.
10537         (struct bounds_parm_data): Likewise.
10538         (assign_parms_augmented_arg_list): Likewise.
10539         (assign_parm_find_entry_rtl): Likewise.
10540         (assign_parm_is_stack_parm): Likewise.
10541         (assign_parm_load_bounds): Likewise.
10542         (assign_bounds): Likewise.
10543         (assign_parms): Likewise.
10544         (expand_function_start): Likewise.
10545         * gcc.c (CHKP_SPEC): Likewise.
10546         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10547         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10548         (wrestrict_dom_walker::check_call): Likewise.
10549         * gimple.c (gimple_build_call_from_tree): Likewise.
10550         * gimple.h (enum gf_mask): Likewise.
10551         (gimple_call_with_bounds_p): Likewise.
10552         (gimple_call_set_with_bounds): Likewise.
10553         * gimplify.c (gimplify_init_constructor): Likewise.
10554         * ipa-cp.c (initialize_node_lattices): Likewise.
10555         (propagate_constants_across_call): Likewise.
10556         (find_more_scalar_values_for_callers_subset): Likewise.
10557         * ipa-hsa.c (process_hsa_functions): Likewise.
10558         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10559         * ipa-icf.c (sem_function::merge): Likewise.
10560         * ipa-inline.c (early_inliner): Likewise.
10561         * ipa-pure-const.c (warn_function_noreturn): Likewise.
10562         (warn_function_cold): Likewise.
10563         (propagate_pure_const): Likewise.
10564         * ipa-ref.h (enum GTY): Likewise.
10565         * ipa-split.c (find_retbnd): Likewise.
10566         (consider_split): Likewise.
10567         (split_function): Likewise.
10568         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10569         * ipa.c (walk_polymorphic_call_targets): Likewise.
10570         (symbol_table::remove_unreachable_nodes): Likewise.
10571         (process_references): Likewise.
10572         (cgraph_build_static_cdtor_1): Likewise.
10573         * lto-cgraph.c (lto_output_node): Likewise.
10574         (output_refs): Likewise.
10575         (compute_ltrans_boundary): Likewise.
10576         (input_overwrite_node): Likewise.
10577         (input_node): Likewise.
10578         (input_cgraph_1): Likewise.
10579         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10580         * passes.c (pass_manager::execute_early_local_passes): Likewise.
10581         (class pass_chkp_instrumentation_passes): Likewise.
10582         (make_pass_chkp_instrumentation_passes): Likewise.
10583         * passes.def: Likewise.
10584         * rtl.h (struct GTY): Likewise.
10585         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10586         * stor-layout.c (layout_type): Likewise.
10587         * symtab.c: Likewise.
10588         * target.def: Likewise.
10589         * targhooks.c (default_chkp_bound_type): Likewise.
10590         (default_chkp_bound_mode): Likewise.
10591         (default_builtin_chkp_function): Likewise.
10592         (default_chkp_function_value_bounds): Likewise.
10593         (default_chkp_make_bounds_constant): Likewise.
10594         (default_chkp_initialize_bounds): Likewise.
10595         * targhooks.h (default_chkp_bound_type): Likewise.
10596         (default_chkp_bound_mode): Likewise.
10597         (default_builtin_chkp_function): Likewise.
10598         (default_chkp_function_value_bounds): Likewise.
10599         (default_chkp_make_bounds_constant): Likewise.
10600         (default_chkp_initialize_bounds): Likewise.
10601         * toplev.c (compile_file): Likewise.
10602         (process_options): Likewise.
10603         * tree-core.h (DEF_BUILTIN): Likewise.
10604         (DEF_BUILTIN_CHKP): Likewise.
10605         * tree-inline.c (declare_return_variable): Likewise.
10606         (remap_gimple_stmt): Likewise.
10607         (copy_bb): Likewise.
10608         (initialize_inlined_parameters): Likewise.
10609         (expand_call_inline): Likewise.
10610         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10611         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10612         (make_pass_ipa_chkp_produce_thunks): Likewise.
10613         (make_pass_chkp): Likewise.
10614         (make_pass_chkp_opt): Likewise.
10615         (make_pass_chkp_instrumentation_passes): Likewise.
10616         * tree-pretty-print.c (dump_generic_node): Likewise.
10617         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10618         * tree-ssa-dce.c (propagate_necessity): Likewise.
10619         (eliminate_unnecessary_stmts): Likewise.
10620         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10621         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10622         * tree-ssa-sccvn.h: Likewise.
10623         * tree-ssa-strlen.c (get_string_length): Likewise.
10624         (valid_builtin_call): Likewise.
10625         (adjust_last_stmt): Likewise.
10626         (handle_builtin_strchr): Likewise.
10627         (handle_builtin_strcpy): Likewise.
10628         (handle_builtin_stxncpy): Likewise.
10629         (handle_builtin_memcpy): Likewise.
10630         (handle_builtin_strcat): Likewise.
10631         (strlen_check_and_optimize_stmt): Likewise.
10632         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10633         * tree-streamer-in.c: Likewise.
10634         * tree-streamer.c (record_common_node): Likewise.
10635         * tree.c (tree_code_size): Likewise.
10636         (wide_int_to_tree_1): Likewise.
10637         (type_contains_placeholder_1): Likewise.
10638         (build_common_tree_nodes): Likewise.
10639         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10640         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10641         (POINTER_BOUNDS_P): Likewise.
10642         (BOUNDED_TYPE_P): Likewise.
10643         (BOUNDED_P): Likewise.
10644         (CALL_WITH_BOUNDS_P): Likewise.
10645         (pointer_bounds_type_node): Likewise.
10646         * value-prof.c (gimple_ic): Likewise.
10647         * var-tracking.c (vt_add_function_parameters): Likewise.
10648         * varasm.c (make_decl_rtl): Likewise.
10649         (assemble_start_function): Likewise.
10650         (output_constant): Likewise.
10651         (maybe_assemble_visibility): Likewise.
10652         * varpool.c (ctor_for_folding): Likewise.
10653         * chkp-builtins.def: Remove.
10654         * ipa-chkp.c: Remove.
10655         * ipa-chkp.h: Remove.
10656         * rtl-chkp.c: Remove.
10657         * rtl-chkp.h: Remove.
10658         * tree-chkp-opt.c: Remove.
10659         * tree-chkp.c: Remove.
10660         * tree-chkp.h: Remove.
10662 2018-06-07  Carl Love  <cel@us.ibm.com>
10664         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10665         vextract_fp_from_shortl): Add BE support.
10667 2018-06-07  Paul Koning  <ni1d@arrl.net>
10669         * compare-elim.c (try_merge_compare): Don't merge compare if
10670         address contains a side effect.
10671         (try_eliminate_compare): Likewise.
10673 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
10675         * config.gcc: Support "tremont".
10676         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10677         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10678         PROCESSOR_TREMONT.
10679         * config/i386/i386.c (m_TREMONT): Define.
10680         (processor_target_table): Add "tremont".
10681         (PTA_TREMONT): Define.
10682         (ix86_lea_outperforms): Add TARGET_TREMONT.
10683         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10684         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10685         and M_INTEL_GOLDMONT_PLUS.
10686         (fold_builtin_cpu): Add "tremont".
10687         (ix86_add_stmt_cost): Add TARGET_TREMONT.
10688         (ix86_option_override_internal): Add "tremont".
10689         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10690         (processor_type): Add PROCESSOR_TREMONT.
10691         * config/i386/x86-tune.def: Add m_TREMONT.
10692         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10694 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10696         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10697         symbol defined for msp430i* devices to be lower case.
10699 2018-06-07  Richard Biener  <rguenther@suse.de>
10701         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10702         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
10703         Properly wrap signed arithmetic if overflow wraps.
10705 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
10707         PR tree-optimization/69615
10708         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10709         of a cast from a same precision integral SSA_NAME in a bb dominated
10710         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
10711         cast to utype if rhs2 has already a compatible type.
10713 2018-06-07  Richard Biener  <rguenther@suse.de>
10715         PR tree-optimization/85935
10716         * graphite-scop-detection.c (find_params_in_bb): Analyze
10717         condition operands with respect to the correct loop.  Assert
10718         the analysis doesn't fail.
10720 2018-06-04  Carl Love  <cel@us.ibm.com>
10722         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10723         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
10724         as it is slightly cheaper.
10725         (first_match_or_eos_index_<mode>):
10726         Calculate index using natural element order.
10727         (first_match_index_<mode>):
10728         Calculate index using natural element order.
10729         (first_match_or_eos_index_<mode>):
10730         Calculate index using natural order.
10731         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10732         for BE and LE modes.
10733         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10734         P9V_BUILTIN_VCLZLSBB_V16QI.
10735         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10736         specific.
10738 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10740         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10741         indentation and line wrap for many prototypes.  Add missing
10742         @smallexample directives around block of prototypes for vec_xl and
10743         vec_xst.
10745 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
10747         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10748         track if we pass or return IEEE 128-bit floating point.
10749         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10750         C++ mangling that is compatible with GCC 8.1.
10751         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10752         (init_cumulative_args): Note if we pass or return IEEE 128-bit
10753         floating point types.
10754         (rs6000_function_arg_advance_1): Likewise.
10755         (rs6000_mangle_type): Optionally generate mangled names that match
10756         what GCC 8.1 generated for IEEE 128-bit floating point types.
10757         (rs6000_globalize_decl_name): If we have an external function that
10758         passes or returns IEEE 128-bit types, generate a weak reference
10759         from the mangled name used in GCC 8.1 to the current mangled
10760         name.
10761         (rs6000_init_builtins): Make __ibm128 use the long double type if
10762         long double is IBM extended double.  Make __float128 use the long
10763         double type if long double is IEEE 128-bit.
10765         PR target/85657
10766         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10767         macro for __ibm128 built-in functions.
10768         (PACK_IF): Add __ibm128 pack/unpack functions.
10769         (UNPACK_IF): Likewise.
10770         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10771         enable long double built-in functions if long double is IEEE
10772         128-bit floating point.
10773         (rs6000_invalid_builtin): Update long double built-in function
10774         error message.
10775         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10776         functions, adjust the built-in function to use the long double
10777         built-in function if __ibm128 and long double are the same type.
10778         * doc/extend.texi (PowerPC builtins): Update documention for
10779         __builtin_{,un}pack_longdouble.  Add documentation for
10780         __builtin_{,un}pack_ibm128.
10782 2018-06-06  Jim Wilson  <jimw@sifive.com>
10784         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10785         (struct machine_function): New field interrupt_mode.
10786         (riscv_handle_type_attribute): New function.  Add forward declaration.
10787         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10788         (riscv_expand_epilogue): Check interrupt_mode field.
10789         (riscv_set_current_function): Check interrupt attribute args and
10790         set interrupt_mode field.
10791         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10792         (riscv_sret, riscv_uret): New.
10793         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10794         new arguments to interrupt attribute.
10796 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
10798         PR target/63177
10799         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10800         Don't handle -mcpu=power8 if -mpower9-vector is also used.
10802 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10804         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10805         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10806         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10807         several redundant entries.
10809 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
10811         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10812         type from "rtx" to "rtx_insn *".
10813         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10814         for local "call_insn", removing cast.
10815         (ix86_expand_call): Likewise, introducing a "call_insn" local.
10817 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10819         PR tree-optimization/86066
10820         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10821         for BIT_INSERT_EXPR stores.
10823 2018-06-06  Richard Biener  <rguenther@suse.de>
10825         PR tree-optimization/86062
10826         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10827         component refs ontop
10828         of to be offsetted base.
10830 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10832         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10833         to be static and remove check on interrupt attribute name.
10835 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10837         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10838         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10840 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
10842         PR target/79924
10843         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10844         second argument.
10845         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10846         Remove second argument, change how error is called.
10847         (aarch64_layout_arg): Remove second argument from
10848         aarch64_err_no_fpadvsimd call.
10849         (aarch64_init_cumulative_args): Ditto.
10850         (aarch64_gimplify_va_arg_expr): Ditto.
10851         * config/aarch64/aarch64.md (mov<mode>): Ditto.
10853 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
10855         * config/i386/i386.md (simple_return_indirect_internal): New expander.
10856         (*simple_return_indirect_internal<mode>): Rename from
10857         simple_return_indirect_internal.  Use W mode iterator.
10858         (rstorssp): New expander.
10859         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
10860         (clrssbsy): New expander.
10861         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
10863 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10865         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10866         __typeof__.
10867         (cmse_check_pointed_object): Likewise.
10869 2018-06-05  Martin Liska  <mliska@suse.cz>
10871         PR gcov-profile/47618
10872         * doc/invoke.texi: Document how -fprofile-dir format
10873         is extended.
10875 2018-06-05  Richard Biener  <rguenther@suse.de>
10877         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10878         removal pretend DOM info isn't available so we do not update
10879         it and only remove edges, not dominated blocks.  Actually free
10880         DOM info in case we removed something.  Remove unreachable blocks.
10881         (mfb_keep_latches): Work with either DOM info or marked backedges.
10882         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10883         first.  Mark backedges if DOM info isn't available.
10884         (Re-)compute DOM info after cleanup_control_flow_pre.
10886 2018-06-05  Richard Biener  <rguenther@suse.de>
10888         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10889         (locus_discrim_hasher::hash): Adjust.
10890         (locus_discrim_hasher::equal): Likewise.
10891         (next_discriminator_for_locus): Work on line directly.
10892         (same_line_p): Pass in expanded locus1 as well.
10893         (assign_discriminators): Avoid redundant location expansions.
10895 2018-06-05  Richard Biener  <rguenther@suse.de>
10897         PR tree-optimization/86046
10898         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10899         if required after clearing TREE_ADDRESSABLE.
10901 2018-06-05  Richard Biener  <rguenther@suse.de>
10903         PR tree-optimization/86047
10904         * tree-ssa-loop.c (for_each_index): Glob handling of all
10905         decls and constants and really handle all of them.
10907 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10909         PR target/81497
10910         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10911         qualifier_void_pointer and qualifier_const_void_pointer.
10912         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10913         (arm_init_builtins): Handle the above.
10914         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10915         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10916         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10917         void intrinsics.
10919 2018-06-05  Martin Liska  <mliska@suse.cz>
10921         * auto-profile.c (read_autofdo_file): Do not use
10922         gcov_ctr_summary struct.
10923         (afdo_callsite_hot_enough_for_early_inline): Likewise.
10924         * coverage.c (struct counts_entry): Likewise.
10925         (read_counts_file): Read just single summary entry.
10926         (get_coverage_counts): Use gcov_summary struct.
10927         * coverage.h (get_coverage_counts): Likewise.
10928         * gcov-dump.c (dump_working_sets): Likewise.
10929         (tag_summary): Dump just single summary.
10930         * gcov-io.c (gcov_write_summary): Write just histogram
10931         summary.
10932         (gcov_read_summary): Read just single summary.
10933         (compute_working_sets): Use gcov_summary struct.
10934         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10935         of GCOV_COUNTERS_SUMMABLE.
10936         (GCOV_COUNTERS_SUMMABLE): Remove.
10937         (GCOV_FIRST_VALUE_COUNTER): Replace with
10938         GCOV_COUNTER_V_INTERVAL.
10939         (struct gcov_ctr_summary): Remove.
10940         (struct gcov_summary): Directly use fields of former
10941         gcov_ctr_summary.
10942         (compute_working_sets): Use gcov_summary struct.
10943         * gcov.c (read_count_file): Do not use ctrs fields.
10944         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10945         struct.
10946         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10947         struct.
10948         * profile.c: Likewise.
10949         * profile.h: Likewise.
10951 2018-06-05  Martin Liska  <mliska@suse.cz>
10953         PR gcov-profile/84846
10954         * gcov.c (output_lines): Print working directory only
10955         in intermediate format.
10957 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
10959         * config/s390/s390-builtin-types.def: Add void function type.
10960         * config/s390/s390-builtins.def: Use the function type for the
10961         tbeginc builtin.
10963 2018-06-04  Jim Wilson  <jimw@sifive.com>
10965         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10966         to int.
10967         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10968         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
10969         handle EH_RETURN_DATA_REGNO registers properly.
10970         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10971         (riscv_expand_epilogue): Update comment.  Change argument name and
10972         type.  Update code to use new name and type.  Pass new args to
10973         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
10974         EXCEPTION_RETURN.
10975         * config/riscv/riscv.md (NORMAL_RETURN): New.
10976         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10977         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10978         (eh_return): Call gen_eh_return_internal and emit barrier.
10979         (eh_return_internal): Call riscv_expand_epilogue.
10981 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
10983         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10984         bit_insertion field and declare can_be_merged_into method.
10985         (merged_store_group::can_be_merged_into): New method.
10986         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10987         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
10988         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10990 2018-06-04  Richard Biener  <rguenther@suse.de>
10992         PR tree-optimization/85955
10993         * builtins.c (fold_builtin_sincos): Convert pointers to
10994         destination to appropriate type before dereferencing.
10996 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
10998         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
11000 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
11002         * expr.c (expand_expr_real_1): Force the operand into memory if
11003         its TYPE_MODE is BLKmode and if there is no integer mode for
11004         the number of bits being extracted.
11006 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
11008         PR target/85832
11009         PR target/86036
11010         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11011         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
11013 2018-06-04  Richard Biener  <rguenther@suse.de>
11015         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
11016         (cleanup_tree_cfg_noloop): ... single caller.  Do
11017         start_recording_case_labels later.
11019 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
11021         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
11022         to _IMMINTRIN_H_INCLUDED.
11023         * config/i386/pconfigintrin.h: Ditto.
11024         * config/i386/waitpkgintrin.h: Ditto.
11025         * config/i386/immintrin.h: Add includes for sgxintrin.h,
11026         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
11027         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
11028         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
11029         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
11030         waitpkgintrin.h and cldemoteintrin.h.
11032 2018-06-04  Richard Biener  <rguenther@suse.de>
11034         PR tree-optimization/86038
11035         * tracer.c (find_best_successor): Check probability for
11036         being initialized, bail out if not.
11038 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
11040         PR target/86003
11041         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
11042         of bits to ignore when comparing architectures.
11044 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
11046         PR tree-optimization/69615
11047         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11048         maximum or minimum of the type, try to merge it also as if
11049         range1 is + [-, x - 1] or + [x + 1, -].
11051         PR c++/86025
11052         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11054 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
11056         PR tree-optimization/86034
11057         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11058         the unsigned bitfield type in a bit insertion sequence if it does not
11059         have a larger precision than the bitfield size.
11060         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11062 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
11064         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11066 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11068         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11069         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11070         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11071         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11073 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11075         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11076         Disable -fdelete-null-pointer-checks for ELF toolchain.
11078 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11079             Kito Cheng  <kito.cheng@gmail.com>
11081         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11082         (nds32le-*-*, nds32be-*-*): Integrate checking process.
11083         (nds32*-*-*): Add glibc and uclibc conditions.
11084         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11085         (TARGET_EXCEPT_UNWIND_INFO): Define.
11086         * config/nds32/elf.h: New file.
11087         * config/nds32/linux.h: New file.
11088         * config/nds32/nds32-elf.opt: New file.
11089         * config/nds32/nds32-linux.opt: New file.
11090         * config/nds32/nds32-fp-as-gp.c
11091         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11092         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11093         TARGET_LINUX_ABI.
11094         (nds32_asm_file_end): Ditto.
11095         (nds32_print_operand): Ditto.
11096         (nds32_insert_attributes): Ditto.
11097         (nds32_init_libfuncs): New function.
11098         (TARGET_HAVE_TLS): Define.
11099         (TARGET_INIT_LIBFUNCS): Define.
11100         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11101         spec content.
11102         (TARGET_ELF): Apply different mcmodel setting.
11103         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11104         been migrated into elf.h and linux.h files.
11105         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11106         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11107         (mcmodel): The content has been migrated into nds32-elf.opt and
11108         nds32-linux.opt files.
11109         * config/nds32/t-elf: New file.
11110         * config/nds32/t-linux: New file.
11112 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11113             Shiva Chen  <shiva0217@gmail.com>
11115         * config/nds32/constants.md (unspec_volatile_element): Add
11116         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11117         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11118         optimization.
11119         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11120         (make_pass_nds32_fp_as_gp): Declare.
11121         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11122         optmization pass.
11123         (nds32_asm_function_end_prologue): Remove unused asm output.
11124         (nds32_asm_function_begin_epilogue): Remove unused asm output.
11125         (nds32_asm_file_start): Output necessary fp_as_gp information.
11126         (nds32_option_override): Adjust register usage.
11127         (nds32_expand_prologue): Consider fp_as_gp situation.
11128         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11129         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11130         (epilogue): Ditto.
11131         (return): Ditto.
11132         (simple_return): Ditto.
11133         (omit_fp_begin): Output special directive for fp_as_gp.
11134         (omit_fp_end): Output special directive for fp_as_gp.
11135         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11136         mforbid-fp-as-gp): New options.
11138 2018-06-01  Mark Wielaard  <mark@klomp.org>
11140         * dwarf2out.c (dwarf2out_finish): Remove generation of
11141         DW_AT_loclists_base.
11143 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
11145         * gimple-ssa-store-merging.c: Include gimple-fold.h.
11146         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11147         (struct merged_store_group): Add bit_insertion field.
11148         (dump_char_array): Use standard hexadecimal format.
11149         (merged_store_group::merged_store_group): Set bit_insertion to false.
11150         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
11151         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
11152         also print the mask in the dump file.
11153         (pass_store_merging::gate): Minor tweak.
11154         (imm_store_chain_info::coalesce_immediate): Fix wrong association
11155         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
11156         stores with INTEGER_CST stores.
11157         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11158         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11159         and use it throughout.  Generate bit insertion sequences if need be.
11160         (pass_store_merging::process_store): Remove redundant condition.
11161         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11163 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
11165         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11166         the 128-bit floating point types.  Fix function comment.
11168 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11170         * config/aarch64/aarch64-simd.md
11171         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11172         mnemonics.
11173         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11174         mnemonics.
11176 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
11178         PR tree-optimization/85989
11179         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11180         variable.
11181         (backprop::intersect_uses): Check it when deciding whether this
11182         is a backedge reference.
11183         (backprop::process_block): Add each phi to m_visited_phis
11184         after visiting it, then clear it at the end.
11186 2018-06-01  Richard Biener  <rguenther@suse.de>
11188         * tree-vectorizer.h (vect_dr_stmt): New function.
11189         (vect_get_load_cost): Adjust.
11190         (vect_get_store_cost): Likewise.
11191         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11192         Use vect_dr_stmt instead of DR_SMTT.
11193         (vect_record_base_alignments): Likewise.
11194         (vect_calculate_target_alignment): Likewise.
11195         (vect_compute_data_ref_alignment): Likewise and make static.
11196         (vect_update_misalignment_for_peel): Likewise.
11197         (vect_verify_datarefs_alignment): Likewise.
11198         (vector_alignment_reachable_p): Likewise.
11199         (vect_get_data_access_cost): Likewise.  Pass down
11200         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11201         (vect_get_peeling_costs_all_drs): Likewise.
11202         (vect_peeling_hash_get_lowest_cost): Likewise.
11203         (vect_enhance_data_refs_alignment): Likewise.
11204         (vect_find_same_alignment_drs): Likewise.
11205         (vect_analyze_data_refs_alignment): Likewise.
11206         (vect_analyze_group_access_1): Likewise.
11207         (vect_analyze_group_access): Likewise.
11208         (vect_analyze_data_ref_access): Likewise.
11209         (vect_analyze_data_ref_accesses): Likewise.
11210         (vect_vfa_segment_size): Likewise.
11211         (vect_small_gap_p): Likewise.
11212         (vectorizable_with_step_bound_p): Likewise.
11213         (vect_prune_runtime_alias_test_list): Likewise.
11214         (vect_analyze_data_refs): Likewise.
11215         (vect_supportable_dr_alignment): Likewise.
11216         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11217         (vect_gen_prolog_loop_niters): Likewise.
11218         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11219         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11220         modify DR_STMT.
11221         (vect_recog_mask_conversion_pattern): Likewise.
11222         (vect_try_gather_scatter_pattern): Likewise.
11223         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11224         to vect_get_store_cost.
11225         (vect_get_store_cost): Get stmt_info instead of DR.
11226         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11227         (vect_get_load_cost): Get stmt_info instead of DR.
11229 2018-06-01  Richard Biener  <rguenther@suse.de>
11231         PR middle-end/86017
11232         * gimple-fold.c (var_decl_component_p): Also allow offsetted
11233         vars wrapped in MEM_REFs.
11235 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
11237         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11238         Fix subreg tests so that we only return a choice between
11239         GENERAL_REGS and FP_REGS if the original classes included both.
11241 2018-06-01  Richard Biener  <rguenther@suse.de>
11243         PR ipa/85960
11244         * tree-ssa-structalias.c (get_function_part_constraint):
11245         Handle NULL fi->decl.
11246         (find_func_aliases_for_call): Properly handle indirect
11247         fi from direct call.
11248         (find_func_clobbers): Likewise.
11249         (ipa_pta_execute): Likewise.
11250         (create_variable_info_for): For functions that are ifunc_resolver
11251         resolve to a varinfo that contains the result of the resolver call.
11252         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11253         aliases.
11255 2018-05-31  Michael Collison  <michael.collison@arm.com>
11257         * config/aarch64/aarch64.md:
11258         (*fix_to_zero_extenddfdi2): New pattern.
11259         * gcc.target/aarch64/fix_extend1.c: New testcase.
11261 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
11263         PR middle-end/78809
11264         PR middle-end/83026
11265         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11266         and BUILT_IN_STRNCMP_EQ.
11267         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11268         BUILT_IN_STRNCMP_EQ.
11269         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11270         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11271         (gimple_fold_builtin): Likewise.
11272         * tree-ssa-strlen.c (compute_string_length): New function.
11273         (determine_min_obsize): New function.
11274         (handle_builtin_string_cmp): New function to handle calls to
11275         string compare functions.
11276         (strlen_optimize_stmt): Add handling to builtin string compare
11277         calls.
11278         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11279         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11280         * tree.c (build_common_builtin_nodes): Add new defines of
11281         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11283 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
11285         PR target/85984
11286         * bb-reorder.c (pass_partition_blocks::gate): Return false for
11287         functions with naked attribute.
11289 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
11291         * config/i386/sse.md (avx_vec_concat<mode>):
11292         Substitute concat_tg_mode mode attribute with xtg_mode.
11293         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11294         (concat_tg_mode): Remove mode attribute.
11296 2018-05-31  Martin Sebor  <msebor@redhat.com>
11298         PR c/82063
11299         * calls.c (alloc_max_size): Correct a logic error/typo.
11300         Treat excessive arguments as infinite.  Warn for invalid arguments.
11301         * doc/invoke.texi (-Walloc-size-larger-than): Update.
11303 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
11305         PR target/85829
11306         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11307         and movx for Haswell.
11309 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
11310             Cesar Philippidis  <cesar@codesourcery.com>
11312         PR middle-end/85879
11313         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11314         when emitting error on private/firstprivate reductions.
11315         * omp-low.c (lower_omp_target): Avoid reference-type processing
11316         on pointers for firstprivate clause.
11318 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
11320         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11321         (st1x2): Likewise.
11322         (st1x3): Likewise.
11323         * config/aarch64/aarch64-simd.md
11324         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11325         (aarch64_ld1_x3_<mode>): Likewise
11326         (aarch64_st1x2<VALLDIF:mode>): Likewise
11327         (aarch64_st1_x2_<mode>): Likewise
11328         (aarch64_st1x3<VALLDIF:mode>): Likewise
11329         (aarch64_st1_x3_<mode>): Likewise
11330         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11331         (vld1_s8_x3): Likewise.
11332         (vld1_u16_x3): Likewise.
11333         (vld1_s16_x3): Likewise.
11334         (vld1_u32_x3): Likewise.
11335         (vld1_s32_x3): Likewise.
11336         (vld1_u64_x3): Likewise.
11337         (vld1_s64_x3): Likewise.
11338         (vld1_f16_x3): Likewise.
11339         (vld1_f32_x3): Likewise.
11340         (vld1_f64_x3): Likewise.
11341         (vld1_p8_x3): Likewise.
11342         (vld1_p16_x3): Likewise.
11343         (vld1_p64_x3): Likewise.
11344         (vld1q_u8_x3): Likewise.
11345         (vld1q_s8_x3): Likewise.
11346         (vld1q_u16_x3): Likewise.
11347         (vld1q_s16_x3): Likewise.
11348         (vld1q_u32_x3): Likewise.
11349         (vld1q_s32_x3): Likewise.
11350         (vld1q_u64_x3): Likewise.
11351         (vld1q_s64_x3): Likewise.
11352         (vld1q_f16_x3): Likewise.
11353         (vld1q_f32_x3): Likewise.
11354         (vld1q_f64_x3): Likewise.
11355         (vld1q_p8_x3): Likewise.
11356         (vld1q_p16_x3): Likewise.
11357         (vld1q_p64_x3): Likewise.
11358         (vst1_s64_x2): Likewise.
11359         (vst1_u64_x2): Likewise.
11360         (vst1_f64_x2): Likewise.
11361         (vst1_s8_x2): Likewise.
11362         (vst1_p8_x2): Likewise.
11363         (vst1_s16_x2): Likewise.
11364         (vst1_p16_x2): Likewise.
11365         (vst1_s32_x2): Likewise.
11366         (vst1_u8_x2): Likewise.
11367         (vst1_u16_x2): Likewise.
11368         (vst1_u32_x2): Likewise.
11369         (vst1_f16_x2): Likewise.
11370         (vst1_f32_x2): Likewise.
11371         (vst1_p64_x2): Likewise.
11372         (vst1q_s8_x2): Likewise.
11373         (vst1q_p8_x2): Likewise.
11374         (vst1q_s16_x2): Likewise.
11375         (vst1q_p16_x2): Likewise.
11376         (vst1q_s32_x2): Likewise.
11377         (vst1q_s64_x2): Likewise.
11378         (vst1q_u8_x2): Likewise.
11379         (vst1q_u16_x2): Likewise.
11380         (vst1q_u32_x2): Likewise.
11381         (vst1q_u64_x2): Likewise.
11382         (vst1q_f16_x2): Likewise.
11383         (vst1q_f32_x2): Likewise.
11384         (vst1q_f64_x2): Likewise.
11385         (vst1q_p64_x2): Likewise.
11386         (vst1_s64_x3): Likewise.
11387         (vst1_u64_x3): Likewise.
11388         (vst1_f64_x3): Likewise.
11389         (vst1_s8_x3): Likewise.
11390         (vst1_p8_x3): Likewise.
11391         (vst1_s16_x3): Likewise.
11392         (vst1_p16_x3): Likewise.
11393         (vst1_s32_x3): Likewise.
11394         (vst1_u8_x3): Likewise.
11395         (vst1_u16_x3): Likewise.
11396         (vst1_u32_x3): Likewise.
11397         (vst1_f16_x3): Likewise.
11398         (vst1_f32_x3): Likewise.
11399         (vst1_p64_x3): Likewise.
11400         (vst1q_s8_x3): Likewise.
11401         (vst1q_p8_x3): Likewise.
11402         (vst1q_s16_x3): Likewise.
11403         (vst1q_p16_x3): Likewise.
11404         (vst1q_s32_x3): Likewise.
11405         (vst1q_s64_x3): Likewise.
11406         (vst1q_u8_x3): Likewise.
11407         (vst1q_u16_x3): Likewise.
11408         (vst1q_u32_x3): Likewise.
11409         (vst1q_u64_x3): Likewise.
11410         (vst1q_f16_x3): Likewise.
11411         (vst1q_f32_x3): Likewise.
11412         (vst1q_f64_x3): Likewise.
11413         (vst1q_p64_x3): Likewise.
11415 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11417         * config/msp430/msp430.c (msp430_output_labelref): Prepend
11418         user_label_prefix to name.
11420         * tree-core.h: Update comment about the format of NAME string
11421         passed to handler in attribute_spec.
11423         * config/msp430/msp430.md: Remove erroneous subreg expression from
11424         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11425         zero_extend{q,h}isi2.
11427 2018-05-30  Borislav Petkov  <bp@suse.de>
11429         * doc/extend.texi: Document some architecture specific
11430         constraints and sort entries.
11432 2018-05-30  Martin Sebor  <msebor@redhat.com>
11434         PR middle-end/85369
11435         * builtins.c (expand_builtin_stpcpy_1): New function.
11436         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11437         only if the former succeeds.
11439 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
11441         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11442         in saphira.
11444 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11446         * doc/invoke.texi (-flinker-output): Document
11448 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11450         * passes.c (ipa_write_summaries): Only modify statements if body
11451         is in memory.
11452         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11453         incrementally linking.
11454         (ipa_passes): Likewise.
11455         * lto-cgraph.c (lto_output_node): When incrementally linking do not
11456         pass down resolution info.
11457         * common.opt (flag_incremental_link): Update info.
11458         * gcc.c (plugin specs): Turn flinker-output=* to
11459         -plugin-opt=-linker-output-known
11460         * toplev.c (compile_file): Also cut compilation when doing incremental
11461         link.
11462         * flag-types. (enum lto_partition_model): Add
11463         LTO_LINKER_OUTPUT_NOLTOREL.
11464         (invoke.texi): Add -flinker-output docs.
11465         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11466         link same way as WPA; do not stream in dead initializers.
11468         * dwarf2out.c (dwarf2out_die_ref_for_decl,
11469         darf2out_register_external_decl): Support incremental link.
11471 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11473         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11475 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11477         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11478         it down to simple_object_copy_lto_debug_sections.
11479         (run_gcc): Determine incremental LTO link time and configure
11480         lto1 into non-wpa mode, disable renaming of debug sections.
11482 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11484         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11485         descriptions of various incorrectly documented functions.
11487 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11489         Revert:
11490         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11491         address check not strict.
11493 2018-05-30  Richard Biener  <rguenther@suse.de>
11495         PR tree-optimization/85964
11496         * tracer.c (better_p): Drop initialized count check, we only
11497         call the function with initialized counts now.
11498         (find_best_successor): Do find a best edge if one
11499         has uninitialized count.
11500         (find_best_predecessor): Likewise.  Do BB frequency check only
11501         if count is initialized.
11503 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
11505         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11506         (aarch64_ldrstr_offset_compare): New.
11507         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11508         load/store orderings.
11509         (aarch64_gen_adjusted_ldpstp): Likewise.
11511 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
11513         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11514         Check for subset of GENERAL_REGS and FP_REGS.
11515         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11516         r=w alternative.
11518 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
11520         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11521         and wi::to_poly_offset.  Add the current offset and then check
11522         whether the sum fits, rather than using an unchecked addition of
11523         a checked term.  Check for a shwi rather than a uhwi.
11524         * expr.c (get_bit_range): Use tree_to_poly_uint64.
11525         (store_constructor): Use poly_int_tree_p.
11526         (expand_expr_real_1): Likewise.
11527         * function.c (assign_temp): Likewise.
11528         * fold-const.c (const_binop): Use poly_int_tree_p and
11529         wi::to_poly_offset.
11530         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
11531         division.
11532         * ipa-icf-gimple.c (func_checker::compare_operand): Use
11533         to_poly_offset for MEM offsets.
11534         * ipa-icf.c (sem_variable::equals): Likewise.
11535         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11536         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11537         wi::to_poly_offset for BIT_FIELD_REF offsets.
11538         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11539         wi::to_poly_offset.
11540         * var-tracking.c (emit_note_insn_var_location): Use
11541         tree_to_poly_uint64.
11543 2018-05-29  Jim Wilson  <jimw@sifive.com>
11545         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11547 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
11549         PR target/85950
11550         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11551         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11552         sequence.
11553         (sse4_1_round<mode>2): Use nonimmediate_operand
11554         for operand 1 predicate.
11556 2018-05-29  Martin Sebor  <msebor@redhat.com>
11557             Richard Biener  <rguenther@suse.de>
11559         PR testsuite/85888
11560         * calls.c (get_size_range): Call determine_value_range instead
11561         of get_value_range..
11562         * tree-vrp.h (determine_value_range): Declared new function.
11563         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11565 2018-05-29  Richard Biener  <rguenther@suse.de>
11567         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11568         sure to use non-pattern stmts for get_earlier_stmt arguments.
11569         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11570         called on pattern stmts.
11571         (get_later_stmt): Likewise.
11573 2018-05-29  Martin Liska  <mliska@suse.cz>
11575         PR gcov-profile/85759
11576         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11577         env variables.
11579 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
11581         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11582         VEC_UNPACK_*_EXPR.
11583         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11584         VEC_PACK_*_EXPR.
11586         PR target/85918
11587         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11588         VEC_PACK_FLOAT_EXPR): New tree codes.
11589         * tree-pretty-print.c (op_code_prio): Handle
11590         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11591         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11592         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11593         * tree-inline.c (estimate_operator_cost): Likewise.
11594         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11595         * fold-const.c (const_binop): Likewise.
11596         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11597         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11598         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11599         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11600         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11601         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11602         * expr.c (expand_expr_real_2): Likewise.
11603         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11604         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11605         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11606         optabs.
11607         * optabs.c (expand_widen_pattern_expr): For
11608         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11609         sign from result type rather than operand's type.
11610         (expand_binop_directly): For vec_packu_float_optab and
11611         vec_packs_float_optab allow result type to be different from operand's
11612         type.
11613         * optabs-tree.c (optab_for_tree_code): Handle
11614         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11615         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
11616         * tree-vect-generic.c (expand_vector_operations_1):  Handle
11617         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11618         VEC_PACK_FLOAT_EXPR.
11619         * tree-vect-stmts.c (supportable_widening_operation): Handle
11620         FIX_TRUNC_EXPR.
11621         (supportable_narrowing_operation): Handle FLOAT_EXPR.
11622         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11623         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11624         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
11625         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11626         mode attributes.
11627         (vec_pack<floatprefix>_float_<mode>): New expander.
11628         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11629         attributes.
11630         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11631         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11632         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11633         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11634         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11635         Document.
11636         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11637         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11638         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11639         VEC_PACK_FLOAT_EXPR): Document.
11641 2018-05-29  Richard Biener  <rguenther@suse.de>
11643         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11644         member.
11645         (stmt_vec_info_vec): Make pointer.
11646         (init_stmt_vec_info_vec): Remove.
11647         (free_stmt_vec_info_vec): Likewise.
11648         (set_stmt_vec_info_vec): New function.
11649         (free_stmt_vec_infos): Likewise.
11650         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11651         (set_vinfo_for_stmt): Likewise.
11652         (get_earlier_stmt): Likewise.
11653         (get_later_stmt): Likewise.
11654         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11655         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11656         (vec_info::~vec_info): Free stmt_vec_infos.
11657         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11658         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11659         (pass_slp_vectorize::execute): Likewise.
11660         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11661         (free_stmt_vec_info_vec): Likewise.
11662         (set_stmt_vec_info_vec): New function.
11663         (free_stmt_vec_infos): Likewise.
11664         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11665         the global stmt_vec_info_vec.
11666         * tree-parloops.c (gather_scalar_reductions): Use
11667         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11668         vector.
11670 2018-05-29  Richard Biener  <rguenther@suse.de>
11672         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11674 2018-05-29  Martin Liska  <mliska@suse.cz>
11675             David Malcolm  <dmalcolm@redhat.com>
11677         * vec.c (test_reverse): New.
11678         (vec_c_tests): Add new test.
11679         * vec.h (vl_ptr>::reverse): New function.
11681 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
11683         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11685         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11686         and later.
11688 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11690         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11692 2018-05-28  Richard Biener  <rguenther@suse.de>
11694         PR tree-optimization/85933
11695         * tree-vect-data-refs.c (vect_record_base_alignments): Only
11696         look at stmts marked as vectorizable.
11698 2018-05-28  Richard Biener  <rguenther@suse.de>
11700         PR tree-optimization/85934
11701         * tree-vect-generic.c (expand_vector_operations_1): Hoist
11702         vector boolean check before scalar optimization.
11704 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
11706         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11707         for armv5te.
11709 2018-05-28  Mark Wielaard  <mark@klomp.org>
11711         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11712         if it is an expression containing a minus sign.
11714 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
11716         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11718 2018-05-27  Paul Koning  <ni1d@arrl.net>
11720         * config/pdp11/pdp11.md (truncsihi2): Remove.
11722 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
11723             Chung-Ju Wu  <jasonwucj@gmail.com>
11725         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11726         implementation.
11727         (unaligned_store_dw): Ditto.
11728         * config/nds32/nds32-memory-manipulation.c
11729         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11730         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11731         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11732         (emit_setmem_word_loop): Rename to ...
11733         (emit_setmem_doubleword_loop): ... this.
11734         (nds32_gen_dup_4_byte_to_word_value): New function.
11735         (nds32_gen_dup_8_byte_to_double_word_value): New function.
11736         (nds32_expand_setmem_loop): Refine implementation.
11737         (nds32_expand_setmem_loop_v3m): Ditto.
11738         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11739         pattern.
11741 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11743         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11745 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11747         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11748         (nds32_init_machine_status): Initialize machine->attr_naked_p and
11749         machine->attr_no_prologue_p.
11750         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11751         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11752         (nds32_expand_epilogue): Consider attr_naked_p.
11753         (nds32_expand_epilogue_v3pop): Likewise.
11754         (nds32_can_use_return_insn): Likewise.
11755         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11756         attr_no_prologue_p fields.
11757         * config/nds32/nds32.opt (mret-in-naked-func): New option.
11759 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
11761         PR target/85918
11762         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11763         attributes.
11764         * config/i386/sse.md
11765         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11766         Rename to ...
11767         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11768         ... this.
11769         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11770         Rename to ...
11771         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11772         ... this.
11773         (*<floatsuffix>floatv2div2sf2): Rename to ...
11774         (*float<floatunssuffix>v2div2sf2): ... this.
11775         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11776         (float<floatunssuffix>v2div2sf2_mask): ... this.
11777         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11778         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11779         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11780         to ...
11781         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11782         ... this.
11783         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11784         Rename to ...
11785         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11786         ... this.
11787         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11788         Rename to ...
11789         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11790         ... this.
11791         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11792         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11793         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11794         gen_ufix_truncv8dfv8si2.
11795         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11796         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11797         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11798         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11799         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11800         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11801         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11802         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11804 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11806         PR target/85900
11807         PR target/85345
11808         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11810 2018-05-25  Jim Wilson  <jimw@sifive.com>
11812         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11813         * config/riscv/riscv.c (struct machine_function): Add
11814         interrupt_handler_p and attribute_checked_p fields.
11815         (riscv_attribute_table): Add interrupt.
11816         (riscv_interrupt_type_p): New.
11817         (riscv_save_reg_p): Save extra regs for interrupt handler.
11818         (riscv_use_save_libcall): Return false  for interrupt handler.
11819         (riscv_first_stack_step): Add forward declaration.
11820         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
11821         for interrupt handler with large frame.  Use it for saved reg list.
11822         (riscv_expand_prologue): Move flag_stack_usage_info support to
11823         eliminate duplication.
11824         (riscv_expand_epilogue): Generate mret for interrupt handler.
11825         (riscv_epilogue_uses): New.
11826         (riscv_can_use_return_insn): Return false for interrupt handler.
11827         (riscv_function_ok_for_sibcall): Likewise.
11828         (riscv_set_current_function): Add interrupt handler support.
11829         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11830         * config/riscv/riscv.md (UNSPECV_MRET): New.
11831         (GP_REGNUM): New.
11832         (riscv_frflags, riscv_fsflags): Use tab after opcode.
11833         (riscv_mret): New.
11834         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11836 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
11838         PR tree-optimization/85712
11839         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11840         this candidate has already been replaced in-situ by a copy.
11842 2018-05-25  Jason Merrill  <jason@redhat.com>
11844         PR c++/80485 - inline function non-zero address.
11845         * symtab.c (nonzero_address): Check DECL_COMDAT.
11847 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
11849         PR target/83628
11850         * config/alpha/alpha.md (ashlsi3): New insn pattern.
11851         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
11852         extension of SImode operation.  Use const123_operand predicate.
11853         (*saddsi_1): Remove.
11854         (*saddl_se_1): Ditto.
11855         (*ssubsi_1): Ditto.
11856         (*ssubl_se_1): Ditto.
11857         * config/alpha/predicates.md (const123_operand): New predicate.
11858         * config/alpha/constraints.md (P): Use IN_RANGE.
11860 2018-05-25  Richard Biener  <rguenther@suse.de>
11862         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11863         defaulted to true.
11864         (ref_maybe_used_by_stmt_p): Likewise.
11865         (stmt_may_clobber_ref_p): Likewise.
11866         (stmt_may_clobber_ref_p_1): Likewise.
11867         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11868         and pass it along.
11869         (ref_maybe_used_by_stmt_p): Likewise.
11870         (stmt_may_clobber_ref_p): Likewise.
11871         (stmt_may_clobber_ref_p_1): Likewise.
11872         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11873         the alias oracle to disambiguate DRs with stmts DR analysis
11874         couldn't handle.
11875         (vect_analyze_data_refs): Do not give up on not analyzable
11876         DRs for BB vectorization.  Remove code truncating the dataref
11877         vector.
11879 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
11881         PR target/85832
11882         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11883         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
11884         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11886 2018-05-25  Richard Biener  <rguenther@suse.de>
11888         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11889         function, combining stmt data ref gathering and fatal analysis
11890         parts.
11891         (vect_analyze_data_refs): Remove now redudnant code and simplify.
11892         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11893         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11894         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11895         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11897 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11899         PR tree-optimization/85720
11900         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11901         SCC if all partitions are builtins.
11902         (version_loop_by_alias_check): New parameter.  Generate cancelable
11903         runtime alias check if all partitions are builtins.
11904         (distribute_loop): Update call to above function.
11906 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11908         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11909         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11910         (parm_default_def_partition_arg): Ditto.
11911         (set_parm_default_def_partition): Ditto.
11912         (get_parm_default_def_partitions): Ditto and make it static.
11913         (get_undefined_value_partitions): Ditto and make it static.
11914         (remove_ssa_form): Refactor call to init_var_map here.
11915         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11916         computation for loop region.
11917         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11918         (register_default_def): Delete.
11919         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11920         (parm_default_def_partition_arg): Ditto.
11921         (set_parm_default_def_partition): Ditto.
11922         (get_parm_default_def_partitions): Ditto and make it static.
11923         (get_undefined_value_partitions): Ditto and make it static.
11924         (coalesce_with_default, coalesce_with_default): Update comment.
11925         (create_coalesce_list_for_region): New func factored out from
11926         create_outofssa_var_map.
11927         (populate_coalesce_list_for_outofssa): New func factored out from
11928         create_outofssa_var_map and coalesce_ssa_name.
11929         (create_outofssa_var_map): Delete.
11930         (coalesce_ssa_name): Refactor to support live range computation.
11931         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11932         (get_parm_default_def_partitions): Delete.
11933         (get_undefined_value_partitions): Ditto.
11934         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11935         computation for loop region.
11936         (new_tree_live_info, loe_visit_block): Ditto.
11937         (live_worklist, set_var_live_on_entry): Ditto.
11938         (calculate_live_on_exit, verify_live_on_entry): Ditto.
11939         * tree-ssa-live.h (struct _var_map): New fields.
11940         (init_var_map): Change decl.
11941         (region_contains_p): New.
11943 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11945         * tree-ssa-live.h (live_merge_and_clear): Delete.
11947 2018-05-25  Richard Biener  <rguenther@suse.de>
11949         PR c++/85912
11950         * tree-dump.c (dequeue_and_dump): Remove access to removed
11951         operand 2 of a SWITCH_EXPR.
11953 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11955         * doc/sourcebuild.texi (vect_double_cond_arith): Include
11956         multiplication and division.
11957         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11958         (cond_udiv@var{m}, cond_umod@var{m}): Document.
11959         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11960         (cond_udiv_optab, cond_umod_optab): New optabs.
11961         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11962         (IFN_COND_RDIV): New internal functions.
11963         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11964         TRUNC_MOD_EXPR and RDIV_EXPR.
11965         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11966         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11967         New unspecs.
11968         (SVE_INT_BINARY): Include mult.
11969         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11970         (optab, sve_int_op): Handle mult.
11971         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11972         UNSPEC_COND_DIV.
11973         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11974         for SVE_INT_BINARY_SD.
11976 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11978         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11979         (optab, sve_int_op): Handle div and udiv.
11980         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11981         for SVE_INT_BINARY_SD.
11982         (*<optab><mode>3): New insn for the same.
11984 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11986         * tree-vect-patterns.c: Include predict.h.
11987         (vect_recog_divmod_pattern): Restrict check for division support
11988         to when optimizing for size.
11990 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11992         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11993         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11994         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11995         (gimple_match_op::set_op): Likewise.
11996         (gimple_resimplify4): Declare.
11997         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11998         (expr::gen_transform): Likewise.
11999         (decision_tree::gen): Generate a simplification routine for 4 operands.
12000         * gimple-match-head.c (gimple_simplify): Add an overload for
12001         4 operands.  In the top-level function, handle up to 4 call
12002         arguments and call gimple_resimplify4.
12003         (gimple_resimplify4): New function.
12004         (build_call_internal): Pass a fourth operand.
12005         (maybe_push_to_seq): Likewise.
12006         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
12007         Fold VEC_COND_EXPRs of an operation and a default value into
12008         an IFN_COND_* function if possible.
12009         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
12010         New unspecs.
12011         (SVE_COND_FP_BINARY): Include them.
12012         (optab, sve_fp_op): Handle them.
12013         (SVE_INT_BINARY_REV): New code iterator.
12014         (SVE_COND_FP_BINARY_REV): New int iterator.
12015         (commutative): New int attribute.
12016         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
12017         Declare.
12018         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
12019         function.
12020         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
12021         (*cond_<optab><mode>): New patterns for reversed operands.
12023 2018-05-25  Richard Biener  <rguenther@suse.de>
12025         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
12026         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
12027         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
12028         (STMT_VINFO_GROUPED_ACCESS): Adjust.
12029         * tree-vect-data-refs.c (everywhere): Adjust users.
12030         * tree-vect-loop.c (everywhere): Likewise.
12031         * tree-vect-slp.c (everywhere): Likewise.
12032         * tree-vect-stmts.c (everywhere): Likewise.
12033         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12035 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12037         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
12038         Rename to...
12039         (gcc_cv_as_section_exclude): ... this.
12040         Try Solaris as #exclude syntax.
12041         * configure: Regenerate.
12042         * config.in: Regenerate.
12043         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
12044         SECTION_EXCLUDE.
12045         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
12046         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
12048         * varasm.c (default_elf_asm_named_section): Don't check if
12049         HAVE_GAS_SECTION_EXCLUDE is defined.
12051 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12053         * doc/md.texi: Update the documentation of the cond_* optabs
12054         to mention the new final operand.  Fix GET_MODE_NUNITS call.
12055         Describe the scalar case too.
12056         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12057         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12058         instead of 2.
12059         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12060         (get_conditional_internal_fn): Update comment.
12061         * tree-vect-loop.c (vectorizable_reduction): Pass the original
12062         accumulator value as a final argument to conditional functions.
12063         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12064         a define_expand and add an "else" operand.  Assert for now that
12065         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
12066         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12067         (*cond_<optab><mode>): New patterns.
12068         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12069         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12070         (UNSPEC_COND_EOR): Delete.
12071         (optab): Remove associated mappings.
12072         (SVE_INT_BINARY): New code iterator.
12073         (sve_int_op): Remove int attribute and add "minus" to the code
12074         attribute.
12075         (SVE_COND_INT_OP): Delete.
12076         (SVE_COND_FP_OP): Rename to...
12077         (SVE_COND_FP_BINARY): ...this.
12079 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12081         * optabs.c (can_reuse_operands_p): New function.
12082         (maybe_legitimize_operands): Try to reuse the results for
12083         earlier operands.
12085 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
12087         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12088         Add {q} suffix to insn mnemonic.
12090 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12092         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12093         (msp430_warn_func_return): New.
12095 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
12097         * fold-const.c (tree_nonzero_bits): New function.
12098         * fold-const.h (tree_nonzero_bits): Likewise.
12099         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12100         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12102 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
12104         PR target/85900
12105         PR target/85345
12106         * varasm.c (assemble_alias): Check ifunc_resolver only on
12107         FUNCTION_DECL.
12109 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
12111         PR target/85903
12112         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12113         when memory input operand is handled.
12115 2018-05-24  Luis Machado  <luis.machado@linaro.org>
12117         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12118         global.
12119         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12121 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
12123         * match.pd: Delay FMA folds until after vectorization.
12125 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12127         PR target/83009
12128         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12129         address check not strict.
12131 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
12133         * gimple-match.h (gimple_match_op): New class.
12134         (mprts_hook): Replace parameters with a gimple_match_op *.
12135         (maybe_build_generic_op): Likewise.
12136         (gimple_simplified_result_is_gimple_val): Replace parameters with
12137         a const gimple_match_op *.
12138         (gimple_simplify): Replace code_helper * and tree * parameters with
12139         a gimple_match_op * parameter.
12140         (gimple_resimplify1): Replace code_helper *, tree and tree *
12141         parameters with a gimple_match_op * parameter.
12142         (gimple_resimplify2): Likewise.
12143         (gimple_resimplify3): Likewise.
12144         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12145         parameters with a gimple_match_op * parameter.
12146         * gimple-match-head.c (gimple_simplify): Change prototypes of
12147         auto-generated functions to take a gimple_match_op * instead of
12148         separate code_helper * and tree * parameters.  Make the same
12149         change in the top-level overload and update calls to the
12150         gimple_resimplify routines.  Update calls to the auto-generated
12151         functions and to maybe_push_res_to_seq in the publicly-facing
12152         operation-specific gimple_simplify overloads.
12153         (gimple_match_op::MAX_NUM_OPS): Define.
12154         (gimple_resimplify1): Replace rcode and ops with a single res_op
12155         parameter.  Update call to gimple_simplify.
12156         (gimple_resimplify2): Likewise.
12157         (gimple_resimplify3): Likewise.
12158         (mprts_hook): Replace parameters with a gimple_match_op *.
12159         (maybe_build_generic_op): Likewise.
12160         (build_call_internal): Replace type, nargs and ops with
12161         a gimple_match_op *.
12162         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12163         with a single gimple_match_op *.  Update calls to mprts_hook,
12164         build_call_internal and gimple_simplified_result_is_gimple_val.
12165         Factor out code that is common to the tree_code and combined_fn cases.
12166         * genmatch.c (expr::gen_transform): Replace tem_code and
12167         tem_ops with a gimple_match_op called tem_op.  Update calls
12168         to the gimple_resimplify functions and maybe_push_res_to_seq.
12169         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12170         res_ops.  Update call to the gimple_resimplify functions.
12171         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12172         (decision_tree::gen): Make the functions take a gimple_match_op *
12173         called res_op instead of separate res_code and res_ops parameters.
12174         Update call accordingly.
12175         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12176         and ops with a single res_op parameter.  Update calls to
12177         maybe_build_generic_op and maybe_push_res_to_seq.
12178         (fold_stmt_1): Update calls to gimple_simplify and
12179         replace_stmt_with_simplification.
12180         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12181         and gimple_simplified_result_is_gimple_val.
12182         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12183         gimple_simplify.
12184         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12185         with a gimple_match_op *.
12186         (vn_nary_build_or_lookup): Likewise.  Update call to
12187         vn_nary_build_or_lookup_1.
12188         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12189         gimple_match_op *.  Update calls to the gimple_resimplify routines
12190         and to gimple_simplified_result_is_gimple_val.
12191         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12192         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12193         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12194         (visit_nary_op): Likewise.
12195         (visit_reference_op_load): Likewise.
12197 2018-05-23  Luis Machado  <luis.machado@linaro.org>
12199         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12200         modifier for printing the step amount.
12202 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
12204         PR target/78849
12205         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12206         types.
12208 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
12210         * doc/sourcebuild.texi (Endianness): New subsubsection.
12212 2018-05-23  Luis Machado  <luis.machado@linaro.org>
12214         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12215         <prefetch_dynamic_strides>: New const bool field.
12216         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12217         prefetch_dynamic_strides.
12218         (exynosm1_prefetch_tune): Likewise.
12219         (thunderxt88_prefetch_tune): Likewise.
12220         (thunderx_prefetch_tune): Likewise.
12221         (thunderx2t99_prefetch_tune): Likewise.
12222         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12223         false.
12224         (aarch64_override_options_internal): Update to set
12225         PARAM_PREFETCH_DYNAMIC_STRIDES.
12226         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12227         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12228         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12229         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12230         prefetch-dynamic-strides setting.
12232 2018-05-23  Luis Machado  <luis.machado@linaro.org>
12234         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12235         <minimum_stride>: New const int field.
12236         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12237         minimum_stride field defaulting to -1.
12238         (exynosm1_prefetch_tune): Likewise.
12239         (thunderxt88_prefetch_tune): Likewise.
12240         (thunderx_prefetch_tune): Likewise.
12241         (thunderx2t99_prefetch_tune): Likewise.
12242         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12243         <default_opt_level>: Set to 3.
12244         (aarch64_override_options_internal): Update to set
12245         PARAM_PREFETCH_MINIMUM_STRIDE.
12246         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12247         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12248         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12249         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12250         stride is constant and is below the minimum stride threshold.
12252 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12254         * config/arm/arm-cpus.in (mode26): Delete.
12255         (armv4): Delete mode26 reference.
12256         * config/arm/arm.c (arm_configure_build_target): Delete use of
12257         isa_bit_mode26.
12259 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
12261         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12262         New insn pattern.
12263         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12264         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
12265         for non-SSE modes.
12266         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
12267         (floatunsdidf2): Ditto.
12269 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
12271         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12272         (fixuns_trunc<mode>si2_avx512f): Ditto.
12273         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12274         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12275         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12277 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
12279         PR rtl-optimization/79985
12280         * df-scan.c (df_insn_refs_collect): Remove special case for
12281         global registers and asm statements.
12283 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
12285         * extend.texi (Global Register Variables): Rewrite the bullet list.
12286         Note that the register is available for allocation. Note that access
12287         via inline asm must use constraints. Add note about async-signal
12288         handlers. Remove paragraph about automagic register selection.
12290 2018-05-23  Richard Biener  <rguenther@suse.de>
12292         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12293         of fixed offset from memset VN.
12295 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
12297         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12298         first_interp field.
12299         (alloc_cand_and_find_basis): Initialize first_interp field.
12300         (slsr_process_mul): Modify first_interp field.
12301         (slsr_process_add): Likewise.
12302         (slsr_process_cast): Modify first_interp field for each new
12303         interpretation.
12304         (slsr_process_copy): Likewise.
12305         (dump_candidate): Dump first_interp field.
12306         (replace_mult_candidate): Process all interpretations, not just
12307         subsequent ones.
12308         (replace_rhs_if_not_dup): Likewise.
12309         (replace_one_candidate): Likewise.
12311 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
12313         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12314         Add new boolean.
12315         (aarch64_needs_frame_chain): New function.
12316         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12318 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
12320         PR target/84882
12321         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12322         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12323         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12324         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12325         as true for strict-align.
12326         (aarch64_can_inline_p): Perform checks even when callee has no
12327         attributes to check for strict alignment.
12328         * doc/extend.texi (AArch64 Function Attributes): Document
12329         no-strict-align.
12330         * doc/invoke.texi: (AArch64 Options): Likewise.
12332 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
12334         PR tree-optimization/85853
12335         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12336         the handling of the root of the node to...
12337         (vect_slp_analyze_node_operations_1): ...this new function,
12338         and run the whole thing with the child nodes' def types
12339         set according to their SLP node's def type.
12341 2018-05-23  Richard Biener  <rguenther@suse.de>
12343         PR middle-end/85874
12344         * tree-data-ref.c (create_runtime_alias_checks): Defer
12345         and ignore overflow warnings.
12347 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
12349         PR tree-optimization/85822
12350         * tree-vrp.c (is_masked_range_test): Fix handling of negative
12351         constants.
12353 2018-05-23  Richard Biener  <rguenther@suse.de>
12355         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12356         memset constants via native_interpret_expr.
12358 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
12360         PR target/85345
12361         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12362         attribute.
12363         (cgraph_node::create_alias): Likewise.
12364         (cgraph_node::get_availability): Check ifunc_resolver instead
12365         of looking up ifunc attribute.
12366         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12367         * varasm.c (do_assemble_alias): Likewise.
12368         (assemble_alias): Likewise.
12369         (default_binds_local_p_3): Likewise.
12370         * cgraph.h (cgraph_node): Add ifunc_resolver.
12371         (cgraph_node::only_called_directly_or_aliased_p): Return false
12372         for IFUNC resolver.
12373         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12374         attribute.
12375         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12376         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12377         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12378         instead of looking up ifunc attribute.
12380 2018-05-22  Luis Machado  <luis.machado@linaro.org>
12382         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12384 2018-05-22  Martin Sebor  <msebor@redhat.com>
12386         PR middle-end/85359
12387         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12388         only when expasion succeeds.
12389         (expand_builtin_strcmp): Same.
12390         (expand_builtin_strncmp): Same.
12392 2018-05-22  Martin Sebor  <msebor@redhat.com>
12394         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12396 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
12397             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12399         * config/aarch64/aarch64-ldpstp.md: Replace uses of
12400         aarch64_mem_pair_operand with memory_operand and delete operand swapping
12401         code.
12402         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12403         Add check for legitimate_address.
12404         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12405         (aarch64_swap_ldrstr_operands): New.
12406         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12407         Define prototype.
12409 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
12410             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12412         * config/aarch64/aarch64.md: New patterns to generate stp
12413         and ldp.
12414         (store_pair_sw, store_pair_dw): New patterns to generate stp for
12415         single words and double words.
12416         (load_pair_sw, load_pair_dw): Likewise.
12417         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12418         Delete.
12419         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12420         Delete.
12421         * config/aarch64/aarch64-ldpstp.md: Modify peephole
12422         for different mode ldpstp and add peephole for merged zero stores.
12423         Likewise for loads.
12424         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12425         Add size check.
12426         (aarch64_gen_store_pair): Rename calls to match new patterns.
12427         (aarch64_gen_load_pair): Rename calls to match new patterns.
12428         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12429         (load_pair<DREG:mode><DREG2:mode>): ... This.
12430         (store_pair<mode>): Rename to...
12431         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12432         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12433         New mode iterators.
12434         (V_INT_EQUIV): Handle SImode.
12435         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12436         New predicate.
12438 2018-05-22  Martin Sebor  <msebor@redhat.com>
12440         PR c/85623
12441         * calls.c (maybe_warn_nonstring_arg): Use string length to set
12442         or ajust the presumed bound on an operation to avoid unnecessary
12443         warnings.
12445 2018-05-22  Martin Sebor  <msebor@redhat.com>
12447         PR tree-optimization/85826
12448         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12449         assuming that a DECL necesarily has a constant size.
12451 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
12453         PR middle-end/85862
12454         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12456 2018-05-22  Richard Biener  <rguenther@suse.de>
12458         PR tree-optimization/85834
12459         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12460         non-constant and non-zero memset arguments.
12462 2018-05-22  Martin Liska  <mliska@suse.cz>
12464         PR ipa/85607
12465         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12467 2018-05-22  Richard Biener  <rguenther@suse.de>
12469         PR tree-optimization/85863
12470         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12471         comparisons when vectype is specified.
12472         (vectorizable_condition): Do not specify vectype for
12473         vect_is_simple_cond when SLP vectorizing.
12475 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
12477         PR target/85657
12478         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12479         define __ibm128 as long double.
12480         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12481         as a distinct type when IEEE 128-bit support is enabled.
12482         (init_float128_ieee): Fix up conversions between IFmode and IEEE
12483         128-bit types to use the correct functions.
12484         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12485         convert between 128-bit floating point types that have different
12486         modes but the same representation, instead of using gen_lowpart to
12487         makean alias.
12488         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12489         KFmode.
12490         (IFKF_reg): New attributes to give the register constraints for
12491         IFmode and KFmode.
12492         (extend<mode>tf2_internal): New insns to mark an explicit
12493         conversion between 128-bit floating point types that have a
12494         different mode but share the same representation.
12496 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
12498         PR tree-optimization/85814
12499         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12500         a null return from get_strinfo when unsharing the next
12501         strinfo in the chain.
12503 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12505         PR gcc/84923
12506         * varasm.c (weak_finish): Clean up weak_decls.
12508 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12510         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12511         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12512         UNSPEC_UADALP values.
12513         * config/aarch64/iterators.md (ABAL): New int iterator.
12514         (ABDL2): Likewise.
12515         (ADALP): Likewise.
12516         (sur): Add mappings for the above.
12517         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12518         New define_insn.
12519         (aarch64_<sur>abal<mode>_4): Likewise.
12520         (aarch64_<sur>adalp<mode>_3): Likewise.
12521         (<sur>sadv16qi): New define_expand.
12523 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
12525         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12526         (*movdf_internal): Ditto.
12527         (*rcpsf2_sse): Ditto.
12528         (*rsqrtsf2_sse): Ditto.
12529         (*sqrt<mode>2_sse): Ditto.
12531 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
12533         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12534         eor3q<mode>4.
12535         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12536         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12537         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12538         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12539         vbcaxq_s64): New.
12540         * config/aarch64/arm_neon.h: Likewise.
12541         * config/aarch64/iterators.md (VQ_I): New.
12543 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
12545         * config.gcc: Add arc/t-multilib-linux to tmake_file for
12546         arc*-*-linux*.
12547         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12548         MULTILIB_DIRNAMES
12550 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
12552         * config/nds32/constraints.md (S): New constraint.
12553         * config/nds32/nds32.md (call_internal): Use constraint S.
12554         (call_value_internal): Likewise.
12555         (sibcall_internal): Likewise.
12556         (sibcall_value_internal): Likewise.
12558 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
12559             Chung-Ju Wu  <jasonwucj@gmail.com>
12561         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12562         into consideration.
12564 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
12565             Chung-Ju Wu  <jasonwucj@gmail.com>
12567         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12568         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12569         (nds32_rtx_costs_impl): Simplify.
12570         (nds32_address_cost_impl): Simplify.
12571         (nds32_init_rtx_costs): New function.
12572         (nds32_rtx_costs_speed_prefer): Likewise.
12573         (nds32_rtx_costs_size_prefer): Likewise.
12574         (nds32_address_cost_speed_prefer): Likewise.
12575         (nds32_address_cost_speed_fwprop): Likewise.
12576         (nds32_address_cost_size_prefer): Likewise.
12577         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12578         * config/nds32/nds32.c (nds32_option_override): Use
12579         nds32_init_rtx_costs function.
12581 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
12583         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12584         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12585         (TARGET_PIPELINE_N8): Likewise.
12586         (TARGET_PIPELINE_N10): Likewise.
12587         (TARGET_PIPELINE_N13): Likewise.
12588         (TARGET_PIPELINE_GRAYWOLF): Likewise.
12590 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
12592         * config/nds32/nds32-fpu.md: Update copyright year.
12594 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12596         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12598 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12600         * config/nds32/nds32.c
12601         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12602         * config/nds32/nds32.opt (minline-asm-r15): New option.
12604 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12606         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12607         MASK_HW_ABS.
12608         * config/nds32/nds32.md (abssi2): New pattern.
12610 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
12612         * config/i386/i386.md (rex64namesuffix): New mode attribute.
12613         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12614         Merge insn pattern from sse_cvtsi2ss<round_name> and
12615         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12616         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12617         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12618         using SWI48 mode iterator.
12619         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12620         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12621         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12622         pattern from sse_cvttss2si<round_saeonly_name>
12623         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12624         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12625         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12626         using SWI48 mode iterator.
12627         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12628         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12629         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12630         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12631         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12632         using SWI48 mode iterator.
12633         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12634         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12635         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12636         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12637         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12638         SWI48 mode iterator.
12639         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12640         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12641         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12642         pattern from sse_cvttsd2si<round_saeonly_name>
12643         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12645 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12647         * config/nds32/nds32-md-auxiliary.c
12648         (nds32_valid_smw_lwm_base_p): Refine.
12649         (nds32_output_smw_single_word): Refine.
12650         (nds32_output_smw_double_word): New.
12651         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12653 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12655         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12656         (nds32_output_stack_pop): Refine.
12657         (nds32_expand_unaligned_load): Refine.
12658         (nds32_expand_unaligned_store): Refine.
12660 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12661             Chung-Ju Wu  <jasonwucj@gmail.com>
12663         * config/nds32/constants.md: Add TP_REGNUM constant.
12664         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12665         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12666         UNSPEC_ADD32.
12667         * config/nds32/nds32-doubleword.md: Consider flag_pic.
12668         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12669         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12670         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12671         and PIC code generation.
12672         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12673         code generation.
12674         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12675         optimization.
12676         * config/nds32/nds32.md: Support TLS and PIC.
12677         * config/nds32/nds32.c: Support TLS and PIC.
12678         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12679         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12680         predicate.
12682 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12684         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12685         mode with E_ prefix.
12687 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12688             Chung-Ju Wu  <jasonwucj@gmail.com>
12690         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12691         * config/nds32/nds32-md-auxiliary.c
12692         (symbolic_reference_mentioned_p): New.
12693         (nds32_legitimize_ict_address): New.
12694         (nds32_expand_ict_move): New.
12695         (nds32_indirect_call_referenced_p): New.
12696         (nds32_symbol_binds_local_p): Delete.
12697         (nds32_long_call_p): Modify.
12698         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12699         * config/nds32/nds32-protos.h
12700         (symbolic_reference_mentioned_p): Declare.
12701         (nds32_legitimize_ict_address): Declare.
12702         (nds32_expand_ict_move): Declare.
12703         (nds32_indirect_call_referenced_p): Declare.
12704         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12705         (nds32_relax_group): Use nds32_ict_const_p as condition.
12706         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12707         (nds32_asm_file_start): Output ict_model directive in asm code.
12708         (nds32_legitimate_address_p): Consider indirect call.
12709         (nds32_print_operand): Consider indirect call.
12710         (nds32_print_operand_address): Consider indirect call.
12711         (nds32_insert_attributes): Handle "indirect_call" attribute.
12712         (TARGET_LEGITIMATE_ADDRESS_P): Define.
12713         (TARGET_LEGITIMATE_CONSTANT_P): Define.
12714         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12715         (TARGET_DELEGITIMIZE_ADDRESS): Define.
12716         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12717         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12718         (TARGET_ICT_MODEL_SMALL): Define.
12719         (TARGET_ICT_MODEL_LARGE): Define.
12720         * config/nds32/nds32.md (movsi): Consider ict model.
12721         (call, call_value): Consider ict model.
12722         (sibcall, sibcall_value): Consider ict model.
12723         * config/nds32/nds32.opt (mict-model): New option.
12724         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12725         model.
12727 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
12728             Monk Chiang  <sh.chiang04@gmail.com>
12729             Jim Wilson <jimw@sifive.com>
12731         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12732         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
12733         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12734         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12735         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
12736         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12737         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12738         compute save_libcall_adjustment properly.
12739         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12740         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12741         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12742         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12743         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12744         (ABI_SPEC): Handle mabi=ilp32e.
12745         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12746         (RVE): Add RVE mask.
12747         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12748         <-march>: Add rv32e as an example.
12750 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
12752         PR c++/82899
12753         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12754         (intra_create_variable_infos): Handle C++ constructors.
12756 2018-05-18  Martin Liska  <mliska@suse.cz>
12758         * passes.def: Remove a redundant pass.
12760 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
12762         PR bootstrap/85838
12763         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12765 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12767         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12768         (ARMv4): Update.
12769         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12770         (ARMv6m): Update.
12771         (armv2, armv2a, armv3, armv3m): Delete architectures.
12772         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12773         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12774         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12775         Delete cpus.
12776         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12777         (*mulsidi3adddi): Likewise.
12778         (mulsidi3): Likewise.
12779         (*mulsidi3_nov6): Likewise.
12780         (umulsidi3): Likewise.
12781         (umulsidi3_nov6): Likewise.
12782         (umaddsidi4): Likewise.
12783         (*umulsidi3adddi): Likewise.
12784         (smulsi3_highpart): Likewise.
12785         (*smulsi3_highpart_nov6): Likewise.
12786         (umulsi3_highpart): Likewise.
12787         (*umulsi3_highpart_nov6): Likewise.
12788         * config/arm/arm.h (arm_arch3m): Delete.
12789         * config/arm/arm.c (arm_arch3m): Delete.
12790         (arm_option_override_internal): Update armv3-related comment.
12791         (arm_configure_build_target): Delete use of isa_bit_mode32.
12792         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12793         (arm_rtx_costs_internal): Delete check of arm_arch3m.
12794         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12795         (mulsa3): Likewise.
12796         (mulusa3): Likewise.
12797         * config/arm/arm-protos.h (arm_arch3m): Delete.
12798         * config/arm/arm-tables.opt: Regenerate.
12799         * config/arm/arm-tune.md: Likewise.
12800         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12801         deleted architectures.
12803 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12805         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12806         (armv5t, armv5te): New features.
12807         (ARMv5, ARMv5e): Delete fgroups.
12808         (ARMv5t, ARMv5te): Adjust for above changes.
12809         (ARMv6m): Likewise.
12810         (armv5, armv5e): Delete arches.
12811         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12812         arm_arch5.
12813         (*call_reg_arm): Likewise.
12814         (*call_value_reg_armv5): Likewise.
12815         (*call_value_reg_arm): Likewise.
12816         (*call_symbol): Likewise.
12817         (*call_value_symbol): Likewise.
12818         (*sibcall_insn): Likewise.
12819         (*sibcall_value_insn): Likewise.
12820         (clzsi2): Likewise.
12821         (prefetch): Likewise.
12822         (define_split and define_peephole2 dependent on arm_arch5):
12823         Likewise.
12824         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12825         arm_arch5e.
12826         (TARGET_ARM_QBIT): Likewise.
12827         (TARGET_DSP_MULTIPLY): Likewise.
12828         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12829         (arm_arch5, arm_arch5e): Delete.
12830         (arm_arch5t, arm_arch5te): Declare.
12831         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12832         (arm_arch5t): Declare.
12833         (arm_option_reconfigure_globals): Update for the above.
12834         (arm_options_perform_arch_sanity_checks): Update comment, replace
12835         use of arm_arch5 with arm_arch5t.
12836         (use_return_insn): Likewise.
12837         (arm_emit_call_insn): Likewise.
12838         (output_return_instruction): Likewise.
12839         (arm_final_prescan_insn): Likewise.
12840         (arm_coproc_builtin_available): Likewise.
12841         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12842         arm_arch5e with arm_arch5t and arm_arch5te.
12843         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12844         (arm_arch5t, arm_arch5te): Declare.
12845         * config/arm/arm-tables.opt: Regenerate.
12846         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12847         * config/arm/t-multilib: Likewise.
12848         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12849         instead of arm_arch5.
12850         (*call_reg_thumb1): Likewise.
12851         (*call_value_reg_thumb1_v5): Likewise.
12852         (*call_value_reg_thumb1): Likewise.
12853         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12854         unreachable path.
12855         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12857 2018-05-18  Martin Liska  <mliska@suse.cz>
12859         PR gcov-profile/84846
12860         * doc/gcov.texi: Document -t option of gcov tool.
12862 2018-05-18  Martin Liska  <mliska@suse.cz>
12864         PR gcov-profile/84846
12865         * gcov.c (print_usage): Add new -t option.
12866         (process_args): Handle the option.
12867         (generate_results): Use stdout as output when requested by
12868         the option.
12870 2018-05-18  Martin Liska  <mliska@suse.cz>
12872         PR gcov-profile/84846
12873         * coverage.c (coverage_init): Write PWD to .gcno file.
12874         * doc/gcov.texi: Document how working directory is printed.
12875         * gcov-dump.c (dump_gcov_file): Print PWD.
12876         * gcov.c (output_intermediate_file): Likewise.
12877         (read_graph_file): Read PWD string.
12878         (output_lines): Print PWD.
12880 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12882         PR middle-end/85817
12883         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12884         for retval and return false if all args to phi are zero.
12886 2018-05-18  Richard Biener  <rguenther@suse.de>
12888         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12889         method.
12890         (evrp_dom_walker::before_dom_children): Call it.
12892 2018-05-18  Richard Biener  <rguenther@suse.de>
12894         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12895         results when processing array refs with variable index.
12897 2018-05-18  Toon Moene  <toon@moene.org>
12899         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12900         directly after that of -floop-interchange. Indicate that both
12901         options are enabled by default when specifying -O3.
12903 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12905         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12906         iterator.  Delete separate integer-mode vec_set<mode> expander.
12907         (aarch64_simd_vec_setv2di): Delete.
12908         (vec_setv2di): Delete.
12909         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12910         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
12911         the "w, r" alternative.
12913 2018-05-18  Martin Liska  <mliska@suse.cz>
12915         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12916         * tree-pass.h (make_pass_lower_switch_O0): New function.
12917         * tree-switch-conversion.c (node_has_low_bound): Remove.
12918         (node_has_high_bound): Likewise.
12919         (node_is_bounded): Likewise.
12920         (class pass_lower_switch): Make it a template type and create
12921         two instances.
12922         (pass_lower_switch::execute): Add template argument.
12923         (make_pass_lower_switch): New function.
12924         (make_pass_lower_switch_O0): New function.
12925         (do_jump_if_equal): Remove.
12926         (emit_case_nodes): Simplify to just handle all 3 cases and leave
12927         all the hard work to tree optimization passes.
12929 2018-05-18  Martin Liska  <mliska@suse.cz>
12931         * dbgcnt.c (limit_low): Renamed from limit.
12932         (limit_high): New variable.
12933         (dbg_cnt_is_enabled): Check for upper limit.
12934         (dbg_cnt): Adjust dumping.
12935         (dbg_cnt_set_limit_by_index): Add new argument for high
12936         value.
12937         (dbg_cnt_set_limit_by_name): Likewise.
12938         (dbg_cnt_process_single_pair): Parse new format.
12939         (dbg_cnt_process_opt): Use strtok.
12940         (dbg_cnt_list_all_counters): Remove 'value' and add
12941         'limit_high'.
12942         * doc/invoke.texi: Document changes.
12944 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
12946         * doc/sourcebuild.texi (scalar_all_fma): Document.
12947         * tree.def (FMA_EXPR): Delete.
12948         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12949         * internal-fn.c (ternary_direct): New macro.
12950         (expand_ternary_optab_fn): Likewise.
12951         (direct_ternary_optab_supported_p): Likewise.
12952         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12953         * builtins.c (fold_builtin_fma): Delete.
12954         (fold_builtin_3): Don't call it.
12955         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12956         * expr.c (expand_expr_real_2): Likewise.
12957         * fold-const.c (operand_equal_p): Likewise.
12958         (fold_ternary_loc): Likewise.
12959         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12960         * gimple.c (DEFTREECODE): Likewise.
12961         * gimplify.c (gimplify_expr): Likewise.
12962         * optabs-tree.c (optab_for_tree_code): Likewise.
12963         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12964         * tree-eh.c (operation_could_trap_p): Likewise.
12965         (stmt_could_throw_1_p): Likewise.
12966         * tree-inline.c (estimate_operator_cost): Likewise.
12967         * tree-pretty-print.c (dump_generic_node): Likewise.
12968         (op_code_prio): Likewise.
12969         * tree-ssa-loop-im.c (stmt_cost): Likewise.
12970         * tree-ssa-operands.c (get_expr_operands): Likewise.
12971         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12972         * fold-const-call.h (fold_fma): Delete.
12973         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12974         CFN_FNMA and CFN_FNMS.
12975         (fold_fma): Delete.
12976         * genmatch.c (combined_fn): New enum.
12977         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12978         (commutative_op): New function.
12979         (commutate): Use it.  Handle more than 2 operands.
12980         (dt_operand::gen_gimple_expr): Use commutative_op.
12981         (parser::parse_expr): Allow :c to be used with non-binary
12982         operators if the commutative operand is known.
12983         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12984         CFN_FMS, CFN_FNMA and CFN_FNMS.
12985         (backprop::process_assign_use): Remove FMA_EXPR handling.
12986         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12987         (gen_hsa_fma): New function.
12988         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12989         IFN_FNMA and IFN_FNMS.
12990         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12991         * gimple-fold.h (follow_all_ssa_edges): Declare.
12992         * gimple-fold.c (follow_all_ssa_edges): New function.
12993         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12994         gimple_build interface and use follow_all_ssa_edges to fold the result.
12995         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12996         instead of checking for optabs directly.
12997         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12998         rather than FMA_EXPRs.
12999         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
13000         call to IFN_FMA instead of an FMA_EXPR.
13002 2018-05-17  Jim Wilson  <jimw@sifive.com>
13004         * expr.c (do_tablejump): When converting index to Pmode, if we have a
13005         sign extended promoted subreg, and the range does not have the sign bit
13006         set, then do a sign extend.
13008         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
13009         test, check for sign extended subreg and/or constant operands, and
13010         do a sign extend in that case.
13012 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
13014         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
13015         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
13016         Add untyped.
13017         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
13018         Change logics_shift_reg to logics_shift_imm.
13019         (thunderx2t99_fp_loadpair_basic): Delete.
13020         (thunderx2t99_fp_storepair_basic): Delete.
13021         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
13022         (thunderx2t99_asimd_polynomial): Delete.
13023         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
13024         and neon_fp_mul_d_scalar_q.
13025         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
13026         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
13027         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
13028         (thunderx2t99_asimd_lut): Add missing tbl types.
13029         (thunderx2t99_asimd_ext): Delete.
13030         (thunderx2t99_asimd_load1_1_mult): Delete.
13031         (thunderx2t99_asimd_load1_2_mult): Delete.
13032         (thunderx2t99_asimd_load1_ldp): New.
13033         (thunderx2t99_asimd_load1): New.
13034         (thunderx2t99_asimd_load2): Add missing *load2* types.
13035         (thunderx2t99_asimd_load3): New.
13036         (thunderx2t99_asimd_load4): New.
13037         (thunderx2t99_asimd_store1_1_mult): Delete.
13038         (thunderx2t99_asimd_store1_2_mult): Delete.
13039         (thunderx2t99_asimd_store2_mult): Delete.
13040         (thunderx2t99_asimd_store2_onelane): Delete.
13041         (thunderx2t99_asimd_store_stp): New.
13042         (thunderx2t99_asimd_store1): New.
13043         (thunderx2t99_asimd_store2): New.
13044         (thunderx2t99_asimd_store3): New.
13045         (thunderx2t99_asimd_store4): New.
13047 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
13049         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13050         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
13052 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
13053             Segher Boessenkool  <segher@kernel.crashing.org>
13055         PR target/85698
13056         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13057         operand.
13059 2018-05-17  Richard Biener  <rguenther@suse.de>
13061         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13062         for pruning loop and prune defs feeding only already visited PHIs.
13064 2018-05-17  Richard Biener  <rguenther@suse.de>
13066         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13068 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
13069             Richard Biener  <rguenther@suse.de>
13071         PR tree-optimization/85793
13072         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13073         for VMAT_ELEMENTWISE.
13075 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
13077         * internal-fn.h (lookup_internal_fn): Declare
13078         * internal-fn.c (lookup_internal_fn): New function.
13079         * gimple.c (gimple_build_call_from_tree): Handle calls to
13080         internal functions.
13081         * gimple-pretty-print.c (dump_gimple_call): Print "." before
13082         internal function names.
13083         * tree-pretty-print.c (dump_generic_node): Likewise.
13084         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13086 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
13088         * gimple-fold.h (gimple_build): Make the function forms take
13089         combined_fn rather than built_in_function.
13090         (gimple_simplify): Likewise.
13091         * gimple-match-head.c (gimple_simplify): Likewise.
13092         * gimple-fold.c (gimple_build): Likewise.
13093         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13094         rather than gimple_build_call_internal.
13095         (get_initial_defs_for_reduction): Likewise.
13096         (vect_create_epilog_for_reduction): Likewise.
13097         (vectorizable_live_operation): Likewise.
13099 2018-05-17  Martin Liska  <mliska@suse.cz>
13101         * gimple-ssa-sprintf.c (format_directive): Do not use
13102         space in between 'G_' and '('.
13104 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
13106         PR target/85323
13107         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13108         even if the mask is not all ones.
13110         PR target/85323
13111         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13112         vector.
13113         (ix86_gimple_fold_builtin): Likewise.
13115         PR target/85323
13116         * config/i386/i386.c: Include tree-vector-builder.h.
13117         (ix86_vector_shift_count): New function.
13118         (ix86_fold_builtin): Fold shift builtins by scalar count.
13119         (ix86_gimple_fold_builtin): Likewise.
13121         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13122         _mm512_setzero): New intrinsics.
13124 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
13125             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13127         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13128         code generation for cases where splatting a value is not useful.
13129         * simplify-rtx.c (simplify_ternary_operation): Simplify
13130         vec_merge across a vec_duplicate and a paradoxical subreg forming
13131         a vector mode to a vec_concat.
13133 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
13135         * config.gcc: Support "goldmont-plus".
13136         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13137         "goldmont-plus".
13138         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13139         PROCESSOR_GOLDMONT_PLUS.
13140         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13141         (processor_target_table): Add "goldmont-plus".
13142         (PTA_GOLDMONT_PLUS): Define.
13143         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13144         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13145         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13146         (fold_builtin_cpu): Add "goldmont-plus".
13147         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13148         (ix86_option_override_internal): Add "goldmont-plus".
13149         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13150         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13151         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13152         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13154 2018-05-17  Richard Biener  <rguenther@suse.de>
13156         PR tree-optimization/85757
13157         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13158         remove defs that only feed that PHI from further processing.
13160 2018-05-16  Jim Wilson  <jimw@sifive.com>
13162         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13163         asterisk to name.
13164         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13166 2018-05-16  Mark Wielaard  <mark@klomp.org>
13168         * dwarf2out.c (count_index_strings): New function.
13169         (output_indirect_strings): Call count_index_strings and generate
13170         header for dwarf_version >= 5.
13172 2018-05-16  Mark Wielaard  <mark@klomp.org>
13174         * dwarf2out.c (dwarf_FORM): New function.
13175         (set_indirect_string): Use dwarf_FORM.
13176         (reset_indirect_string): Likewise.
13177         (size_of_die): Likewise.
13178         (value_format): Likewise.
13179         (output_die): Likewise.
13180         (add_skeleton_AT_string): Likewise.
13181         (output_macinfo_op): Likewise.
13182         (index_string): Likewise.
13183         (output_index_string_offset): Likewise.
13184         (output_index_string): Likewise.
13185         (count_index_strings): Likewise.
13187 2018-05-16  Carl Love  <cel@us.ibm.com>
13189         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13190         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13192 2018-05-16  Martin Jambor  <mjambor@suse.cz>
13194         * ipa-prop.c (ipa_free_all_edge_args): Remove.
13195         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13197 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
13199         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13200         (fnma<mode>4): Likewise.
13201         (fms<mode>4): Likewise.
13202         (fnms<mode>4): Likewise.
13203         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13204         (aarch64_fnma<mode>4): Likewise.
13205         (aarch64_fms<mode>4): Likewise.
13206         (aarch64_fnms<mode>4): Likewise.
13207         (aarch64_fnmadd<mode>4): Likewise.
13209 2018-05-16  Jason Merrill  <jason@redhat.com>
13211         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
13213 2018-05-16  Richard Biener  <rguenther@suse.de>
13215         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13216         (dump_stmt_cost): Declare.
13217         (add_stmt_cost): Dump cost we add.
13218         (add_stmt_costs): New function.
13219         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13220         No longer exported.
13221         (vect_analyze_stmt): Adjust prototype.
13222         (vectorizable_condition): Likewise.
13223         (vectorizable_live_operation): Likewise.
13224         (vectorizable_reduction): Likewise.
13225         (vectorizable_induction): Likewise.
13226         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13227         cost vector to pass to vectorizable_ and record afterwards.
13228         (vect_model_reduction_cost): Take cost vector argument and adjust.
13229         (vect_model_induction_cost): Likewise.
13230         (vectorizable_reduction): Likewise.
13231         (vectorizable_induction): Likewise.
13232         (vectorizable_live_operation): Likewise.
13233         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13234         SLP_TREE_NUMBER_OF_VEC_STMTS.
13235         (vect_analyze_slp_cost_1): Remove.
13236         (vect_analyze_slp_cost): Likewise.
13237         (vect_slp_analyze_node_operations): Take visited args and
13238         a target cost vector.  Avoid processing already visited stmt sets.
13239         (vect_slp_analyze_operations): Use a local cost vector to gather
13240         costs and register those of non-discarded instances.
13241         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13242         (vect_schedule_slp_instance): Remove copying of
13243         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
13244         zero.
13245         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13246         adding cost.  Record cost entry location.
13247         (vect_prologue_cost_for_slp_op): Function to compute cost of
13248         a constant or invariant generated for SLP vect in the prologue,
13249         split out from vect_analyze_slp_cost_1.
13250         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
13251         (vect_model_promotion_demotion_cost): Likewise.
13252         (vect_model_store_cost): Likewise, make static.
13253         (vect_model_load_cost): Likewise.
13254         (vectorizable_bswap): Add cost vector arg and adjust.
13255         (vectorizable_call): Likewise.
13256         (vectorizable_simd_clone_call): Likewise.
13257         (vectorizable_conversion): Likewise.
13258         (vectorizable_assignment): Likewise.
13259         (vectorizable_shift): Likewise.
13260         (vectorizable_operation): Likewise.
13261         (vectorizable_store): Likewise.
13262         (vectorizable_load): Likewise.
13263         (vectorizable_condition): Likewise.
13264         (vectorizable_comparison): Likewise.
13265         (can_vectorize_live_stmts): Likewise.
13266         (vect_analyze_stmt): Likewise.
13267         (vect_transform_stmt): Adjust calls to vectorizable_*.
13268         * tree-vectorizer.c: Include gimple-pretty-print.h.
13269         (dump_stmt_cost): New function.
13271 2018-05-16  Richard Biener  <rguenther@suse.de>
13273         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13274         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13275         * tree-ssa-dse.c: Include tree-ssa-loop.h.
13276         (check_name): New callback.
13277         (dse_classify_store): Track cycles via a visited bitmap of PHI
13278         defs and simplify handling of in-loop and across loop dead stores
13279         and properly fail for loop-variant refs.  Handle byte-tracking with
13280         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13281         limiting the walk.
13283 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
13285         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13286         (vect_get_mask_type_for_stmt): Likewise.
13287         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13288         split out from...
13289         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
13290         to determine the statement's vector type and the vector type that
13291         should be used for calculating nunits.  Deal with cases in which
13292         the type has to be deferred.
13293         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13294         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13295         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13296         (vect_determine_vf_for_stmt): New functions, split out from...
13297         (vect_determine_vectorization_factor): ...here.
13298         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13299         (vect_get_mask_type_for_stmt): New functions, split out from
13300         vect_determine_vectorization_factor.
13302 2018-05-16  Richard Biener  <rguenther@suse.de>
13304         * tree-cfg.c (verify_gimple_assign_ternary): Properly
13305         verify the [VEC_]COND_EXPR embedded comparison.
13307 2018-05-15  Martin Sebor  <msebor@redhat.com>
13309         PR tree-optimization/85753
13310         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13311         RECORD_TYPE in addition to ARRAY_TYPE.
13313 2018-05-15  Martin Sebor  <msebor@redhat.com>
13315         PR middle-end/85643
13316         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13318 2018-05-15  Richard Biener  <rguenther@suse.de>
13320         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13321         add by_clobber_p one.  Change algorithm to collect all defs
13322         representing uses we need to walk and try reducing them to
13323         a single one before failing.
13324         (dse_dom_walker::dse_optimize_stmt): Adjust.
13326 2018-05-13  Mark Wielaard  <mark@klomp.org>
13328         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13329         (size_of_loc_descr): Likewise.
13330         (output_loc_operands): Likewise.
13331         (output_loc_operands_raw): Likewise.
13332         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13333         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13334         (hash_loc_operands): Likewise.
13335         (compare_loc_operands): Likewise.
13337 2018-05-14  Mark Wielaard  <mark@klomp.org>
13339         * dwarf2out.c (count_index_addrs): New function.
13340         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13342 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13344         PR tree-optimization/83648
13345         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13346         return value as malloc candidate.
13348 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13350         PR ipa/85734
13351         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13352         param as true in call to suggest_attribute.
13354 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
13356         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13357         -mreadonly-in-sdata.
13359 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13361         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13362         New pattern.
13363         (aarch64_crypto_aesd_fused): Likewise.
13365 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
13367         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13368         (movsi_aarch64): Likewise.
13369         (load_pairsi): Likewise.
13370         (load_pairdi): Likewise.
13371         (store_pairsi): Likewise.
13372         (store_pairdi): Likewise.
13373         (load_pairsf): Likewise.
13374         (load_pairdf): Likewise.
13375         (store_pairsf): Likewise.
13376         (store_pairdf): Likewise.
13377         (zero_extend): Likewise.
13378         (trunc): Swap alternatives.
13379         (fcvt_target): Add '?' to prefer w over r.
13381 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
13383         PR target/85756
13384         * config/i386/i386.md: Disallow non-commutative arithmetics in
13385         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13386         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
13387         in the peephole2 before it.
13389 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
13391         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13392         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13393         (ix86_handle_option): Handle -mcldemote.
13394         * config.gcc: New header.
13395         * config/i386/cldemoteintrin.h: New file.
13396         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13397         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13398         -mcldemote.
13399         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13400         OPTION_MASK_ISA_CLDEMOTE.
13401         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13402         (ix86_valid_target_attribute_inner_p): Ditto.
13403         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13404         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13405         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13406         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13407         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13408         (cldemote): New.
13409         * config/i386/i386.opt: Add -mcldemote.
13410         * config/i386/x86intrin.h: New header.
13411         * doc/invoke.texi: Add -mcldemote.
13413 2018-05-14  Richard Biener  <rguenther@suse.de>
13415         * doc/match-and-simplify.texi: Adjust :s documentation.
13417 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
13419         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13420         intended memcpy size.
13421         (REORDER_45): Likewise.
13423 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
13425         * sort.cc: New file.
13426         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13427         * vec.c (qsort_chk): Use gcc_qsort.
13428         * Makefile.in (OBJS-libcommon): Add sort.o.
13429         (build/sort.o): New target.  Use it...
13430         (BUILD_RTL): ... here, and...
13431         (build/gencfn-macros): ... here, and...
13432         (build/genmatch): ... here.
13434 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13435             Chung-Ju Wu  <jasonwucj@gmail.com>
13437         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13438         * config/nds32/nds32-graywolf.md: New file.
13439         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13440         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13441         pipeline.
13442         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13443         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13444         * config/nds32/nds32.md (pipeline_model): Add graywolf.
13445         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13446         * config/nds32/pipelines.md: Include n15 settings.
13448 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13449             Chung-Ju Wu  <jasonwucj@gmail.com>
13451         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13452         * config/nds32/nds32-n13.md: New file.
13453         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13454         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13455         pipeline.
13456         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13457         * config/nds32/nds32.md (pipeline_model): Add n13.
13458         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13459         * config/nds32/pipelines.md: Include n13 settings.
13461 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13462             Chung-Ju Wu  <jasonwucj@gmail.com>
13464         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13465         * config/nds32/nds32-n10.md: New file.
13466         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13467         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13468         pipeline.
13469         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13470         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13471         * config/nds32/nds32.md (pipeline_model): Add n10.
13472         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13473         * config/nds32/pipelines.md: Include n10 settings.
13475 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
13476             Kito Cheng  <kito.cheng@gmail.com>
13477             Chung-Ju Wu  <jasonwucj@gmail.com>
13479         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13480         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13481         Add enum values for DSP extension instructions.
13482         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13483         New constraints.
13484         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13485         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13486         New code iterators.
13487         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13488         * config/nds32/nds32-dspext.md: New file for DSP implementation.
13489         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13490         * config/nds32/nds32-intrinsic.md: Likewise.
13491         * config/nds32/nds32_intrinsic.h: Likewise.
13492         * config/nds32/nds32-md-auxiliary.c: Likewise.
13493         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13494         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13495         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13496         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13497         * config/nds32/nds32-protos.h: New declarations for DSP extension.
13498         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13499         TYPE_DMAC in switch statement.
13500         * config/nds32/nds32.c: New checking and implementation for DSP
13501         extension instructions.
13502         * config/nds32/nds32.h: Likewise.
13503         * config/nds32/nds32.md: Likewise.
13504         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13505         * config/nds32/predicates.md: Implement new predicates for DSP
13506         extension.
13508 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
13510         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13511         Reformat alternatives and attributes so it is easier to identify
13512         which constraints/attributes go with which instruction.
13513         (mov<mode>_hardfloat32, FMOVE64): Likewise.
13514         (mov<mode>_softfloat32, FMOVE64): Likewise.
13515         (mov<mode>_hardfloat64, FMOVE64): Likewise.
13516         (mov<mode>_softfloat64, FMOVE64): Likewise.
13518 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13520         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13521         subsection.
13522         (Basic PowerPC Built-in Functions): The new name of the
13523         subsection previously known as "PowerPC Built-in Functions".
13524         (Basic PowerPC Built-in Functions Available on all Configurations):
13525         New subsubsection.
13526         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13527         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13528         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13529         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13531 2018-05-11  Martin Jambor  <mjambor@suse.cz>
13533         PR ipa/85655
13534         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13535         single const.
13537 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
13539         PR target/85733
13540         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13542 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
13544         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13545         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13546         (ix86_handle_option): Handle -mwaitpkg.
13547         * config.gcc: New header.
13548         * config/i386/cpuid.h (bit_WAITPKG): New bit.
13549         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13550         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13551         function type.
13552         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13553         OPTION_MASK_ISA_WAITPKG.
13554         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13555         (ix86_option_override_internal): Add PTA_WAITPKG.
13556         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13557         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13558         IX86_BUILTIN_TPAUSE.
13559         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13560         __builtin_ia32_umwait and __builtin_ia32_tpause.
13561         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13562         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13563         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13564         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13565         UNSPECV_TPAUSE): New.
13566         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13567         * config/i386/i386.opt: Add -mwaitpkg.
13568         * config/i386/waitpkgintrin.h: New file.
13569         * config/i386/x86intrin.h: New header.
13570         * doc/invoke.texi: Add -mwaitpkg.
13572 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
13574         PR target/85606
13575         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13576         equivalent.
13577         (cortex-m0): Use armv6s-m isa.
13578         (cortex-m0plus): Likewise.
13579         (cortex-m1): Likewise.
13580         (cortex-m0.small-multiply): Likewise.
13581         (cortex-m0plus.small-multiply): Likewise.
13582         (cortex-m1.small-multiply): Likewise.
13584 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
13585             Jakub Jelinek  <jakub@redhat.com>
13587         PR tree-optimization/85692
13588         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13589         source permute as well.
13591 2018-05-11  Martin Liska  <mliska@suse.cz>
13593         PR sanitizer/85556
13594         * doc/extend.texi: Document LLVM style format for no_sanitize
13595         attribute.
13597 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
13599         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13600         mode_supports_vsx_dform_quad to mode_supports_dq_form.
13601         (mode_supports_vsx_dform_quad): Likewise.
13602         (mode_supports_vmx_dform): Move these functions to be next to the
13603         other mode_supports functions.
13604         (mode_supports_dq_form): Likewise.
13605         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13606         mode_supports_dq_form.
13607         (reg_offset_addressing_ok_p): Likewise.
13608         (offsettable_ok_by_alignment): Likewise.
13609         (rs6000_legitimate_offset_address_p): Likewise.
13610         (legitimate_lo_sum_address_p): Likewise.
13611         (rs6000_legitimize_address): Likewise.
13612         (rs6000_legitimize_reload_address): Likewise.
13613         (rs6000_secondary_reload_inner): Likewise.
13614         (rs6000_preferred_reload_class): Likewise.
13615         (rs6000_output_move_128bit): Likewise.
13617 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
13619         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13620         Generate SImode target register for null target.
13621         <case IX86_BUILTIN_XGETBV>: Ditto.
13622         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13623         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13625 2018-05-10  Carl Love  <cel@us.ibm.com>
13627         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13628         dcbtt and dcbtstt if operands[2] is 0.
13630 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
13632         PR target/85693
13633         * config/i386/sse.md (usadv64qi): New expander.
13635 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
13637         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13638         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13639         -maltivec=be support.
13640         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13641         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13642         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13643         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13644         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13645         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13646         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13647         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13648         altivec_vsumsws): Adjust.
13649         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13650         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13651         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13652         support.
13653         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13654         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13655         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13656         (altivec_lve<VI_char>x): Delete expand.
13657         (*altivec_lve<VI_char>x_internal): Rename to...
13658         (altivec_lve<VI_char>x): ... this.
13659         (altivec_lvxl_<mode>): Delete expand.
13660         (*altivec_lvxl_<mode>_internal): Rename to ...
13661         (altivec_lvxl_<mode>): ... this.
13662         (altivec_stvxl_<mode>): Delete expand.
13663         (*altivec_stvxl_<mode>_internal): Rename to ...
13664         (altivec_stvxl_<mode>): ... this.
13665         (altivec_stve<VI_char>x): Delete expand.
13666         (*altivec_stve<VI_char>x_internal): Rename to ...
13667         (altivec_stve<VI_char>x): ... this.
13668         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13669         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13670         reduc_plus_scal_<mode>): Adjust.
13671         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13672         comment.
13673         (rs6000_cpu_cpp_builtins): Adjust.
13674         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13675         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13676         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13677         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13678         -maltivec=be support.
13679         (rs6000_split_vec_extract_var): Adjust.
13680         (rs6000_split_v4si_init): Adjust.
13681         (swap_selector_for_mode): Delete.
13682         (altivec_expand_lvx_be, altivec_expand_stvx_be,
13683         altivec_expand_stvex_be): Delete.
13684         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13685         -maltivec=be support.
13686         (rs6000_gimple_fold_builtin): Ditto.
13687         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13688         Adjust.
13689         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13690         (TARGET_DIRECT_MOVE_64BIT): Adjust.
13691         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13692         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13693         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13694         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13695         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13696         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13697         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13698         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13699         anonymous split): Adjust.
13700         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13701         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13703 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13705         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13706         when --with-gxx-include-dir is also specified.
13707         * configure: Regenerate.
13709 2018-05-09  Jim Wilson  <jimw@sifive.com>
13711         PR target/84797
13712         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13713         * config/riscv/t-withmultilib: New.
13714         * config/riscv/withmultilib.h: New.
13715         * doc/install.texi: Document RISC-V --with-multilib-list support.
13717 2018-05-09  Richard Biener  <rguenther@suse.de>
13719         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13720         vector.
13721         (vect_bb_vectorization_profitable_p): Adjust.  Compute
13722         actual scalar cost using the cost vector and the add_stmt_cost
13723         machinery.
13725 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13727         PR rtl-optimization/85645
13728         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13729         in the REG_CFA_REGISTER note for LR, don't leave it empty.
13731 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13733         PR rtl-optimization/85645
13734         * shrink-wrap.c (spread_components): Return a boolean saying if
13735         anything was changed.
13736         (try_shrink_wrapping_separate): Iterate spread_components until
13737         nothing changes anymore.
13739 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13741         PR rtl-optimization/85645
13742         * regrename.c (build_def_use): Also kill the chains that include the
13743         destination of a REG_CFA_REGISTER note.
13745 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13747         PR rtl-optimization/85645
13748         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13749         insn that has a REG_CFA_REGISTER note.
13751 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
13753         * cfgexpand.c (expand_clobber): New function.
13754         (expand_gimple_stmt_1): Use it.
13755         * tree-vect-stmts.c (vect_clobber_variable): New function,
13756         split out from...
13757         (vectorizable_simd_clone_call): ...here.
13758         (vectorizable_store): Emit a clobber either side of an
13759         IFN_STORE_LANES sequence.
13760         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13762 2018-05-09  Tom de Vries  <tom@codesourcery.com>
13764         PR target/85626
13765         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13766         (define_insn "trap_if_false"): Add exit after trap.
13768 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
13770         PR rtl-optimization/85638
13771         * bb-reorder.c: Include common/common-target.h.
13772         (create_forwarder_block): New function extracted from...
13773         (fix_up_crossing_landing_pad): ...here.  Rename into...
13774         (dw2_fix_up_crossing_landing_pad): ...this.
13775         (sjlj_fix_up_crossing_landing_pad): New function.
13776         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13777         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13778         from both partitions and exit the loop after one iteration.
13780 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13782         Revert:
13783         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13784         subsection.
13785         (Basic PowerPC Built-in Functions): The new name of the
13786         subsection previously known as "PowerPC Built-in Functions".
13787         (Basic PowerPC Built-in Functions Available on all Configurations):
13788         New subsubsection.
13789         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13790         subsubsection.
13791         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13792         subsubsection.
13793         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13794         subsubsection.
13795         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13796         subsubsection.
13798 2018-05-08  Jim Wilson  <jimw@sifive.com>
13800         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13801         (LD_EMUL_SUFFIX): New.
13802         (LINK_SPEC): Use it.
13804 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13806         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13807         subsection.
13808         (Basic PowerPC Built-in Functions): The new name of the
13809         subsection previously known as "PowerPC Built-in Functions".
13810         (Basic PowerPC Built-in Functions Available on all Configurations):
13811         New subsubsection.
13812         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13813         subsubsection.
13814         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13815         subsubsection.
13816         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13817         subsubsection.
13818         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13819         subsubsection.
13821 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13823         PR target/85683
13824         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13825         after cmpelim optimization.
13827 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
13829         * config.gcc: Support "goldmont".
13830         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13831         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13832         PROCESSOR_GOLDMONT.
13833         * config/i386/i386.c (m_GOLDMONT): Define.
13834         (processor_target_table): Add "goldmont".
13835         (PTA_GOLDMONT): Define.
13836         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13837         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13838         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13839         (fold_builtin_cpu): Add "goldmont".
13840         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13841         (ix86_option_override_internal): Add "goldmont".
13842         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13843         (processor_type): Add PROCESSOR_GOLDMONT.
13844         * config/i386/i386.md: Add CPU "glm".
13845         * config/i386/glm.md: New file.
13846         * config/i386/x86-tune.def: Add m_GOLDMONT.
13847         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13849 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13851         PR target/85572
13852         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13853         E_V4DImode.
13854         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13855         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
13856         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
13858         PR target/85317
13859         * config/i386/i386.c (ix86_fold_builtin): Handle
13860         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13862         PR target/85480
13863         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13864         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13866 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
13868         PR target/85658
13869         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13870         (check_arch): Likewise.
13871         (check_fpu): Return the result rather than printing it.
13872         (end arch): Fix operator precedence.
13873         (end cpu): Likewise.
13874         (END): Print the result from check_fpu.
13876 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13877             Alan Hayward  <alan.hayward@arm.com>
13878             David Sherwood  <david.sherwood@arm.com>
13880         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13881         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13882         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13883         (*fcmuo<mode>_and): New patterns.
13885 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13887         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13888         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13889         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13890         (cmp_op, sve_imm_con): New code attributes.
13891         (SVE_COND_INT_CMP, imm_con): Delete.
13892         (cmp_op): Remove above unspecs from int attribute.
13893         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13894         to...
13895         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
13896         comparison-specific unspecs.
13897         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13898         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13899         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13900         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13901         (*vec_fcm<cmp_op><mode>): Rename to...
13902         (*fcm<cmp_op><mode>): ...this and adjust likewise.
13903         (*vec_fcmuo<mode>): Rename to...
13904         (*fcmuo<mode>): ...this and adjust likewise.
13905         (*pred_fcm<cmp_op><mode>): New pattern.
13906         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13907         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13908         functions.
13909         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13910         and UNORDERED.
13911         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13912         (aarch64_emit_sve_predicated_cond): New function.
13913         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13914         (aarch64_emit_unspec_cond_or): Replace with...
13915         (aarch64_emit_sve_or_conds): ...this new function.  Use
13916         aarch64_emit_sve_ptrue_op for the individual comparisons and
13917         aarch64_emit_binop to OR them together.
13918         (aarch64_emit_inverted_unspec_cond): Replace with...
13919         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
13920         aarch64_emit_sve_ptrue_op for the comparison and
13921         aarch64_emit_unop to invert the result.
13922         (aarch64_expand_sve_vec_cmp_float): Update after the above
13923         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
13925 2018-05-07  Nathan Sidwell  <nathan@acm.org>
13927         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13928         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13929         (Backwards Compatibility): Likewise.
13931 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13933         PR bootstrap/85681
13934         Revert:
13935         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13937         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13938         <prefetch_dynamic_strides>: New const bool field.
13939         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13940         prefetch_dynamic_strides.
13941         (exynosm1_prefetch_tune): Likewise.
13942         (thunderxt88_prefetch_tune): Likewise.
13943         (thunderx_prefetch_tune): Likewise.
13944         (thunderx2t99_prefetch_tune): Likewise.
13945         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13946         to false.
13947         (aarch64_override_options_internal): Update to set
13948         PARAM_PREFETCH_DYNAMIC_STRIDES.
13949         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13950         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13951         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13952         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13953         prefetch-dynamic-strides setting.
13955         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13957         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13958         <minimum_stride>: New const int field.
13959         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13960         minimum_stride field.
13961         (exynosm1_prefetch_tune): Likewise.
13962         (thunderxt88_prefetch_tune): Likewise.
13963         (thunderx_prefetch_tune): Likewise.
13964         (thunderx2t99_prefetch_tune): Likewise.
13965         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13966         (aarch64_override_options_internal): Update to set
13967         PARAM_PREFETCH_MINIMUM_STRIDE.
13968         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13969         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13970         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13971         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13972         stride is constant and is below the minimum stride threshold.
13974 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13976         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13977         to 512.
13979 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13981         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13982         <prefetch_dynamic_strides>: New const bool field.
13983         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13984         prefetch_dynamic_strides.
13985         (exynosm1_prefetch_tune): Likewise.
13986         (thunderxt88_prefetch_tune): Likewise.
13987         (thunderx_prefetch_tune): Likewise.
13988         (thunderx2t99_prefetch_tune): Likewise.
13989         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13990         to false.
13991         (aarch64_override_options_internal): Update to set
13992         PARAM_PREFETCH_DYNAMIC_STRIDES.
13993         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13994         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13995         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13996         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13997         prefetch-dynamic-strides setting.
13999 2018-05-07  Luis Machado  <luis.machado@linaro.org>
14001         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14002         <minimum_stride>: New const int field.
14003         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14004         minimum_stride field.
14005         (exynosm1_prefetch_tune): Likewise.
14006         (thunderxt88_prefetch_tune): Likewise.
14007         (thunderx_prefetch_tune): Likewise.
14008         (thunderx2t99_prefetch_tune): Likewise.
14009         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14010         (aarch64_override_options_internal): Update to set
14011         PARAM_PREFETCH_MINIMUM_STRIDE.
14012         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14013         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14014         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14015         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14016         stride is constant and is below the minimum stride threshold.
14018 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
14020         PR c++/85659
14021         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
14022         the type is addressable.  Don't force op into register if it has
14023         BLKmode.
14025 2018-05-05  Roland McGrath  <mcgrathr@google.com>
14027         PR other/77609
14028         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
14029         any section for which we don't know a specific type it should have,
14030         regardless of name.  Previously this was done only for the exact
14031         names ".init_array", ".fini_array", and ".preinit_array".
14032         (default_elf_asm_named_section): Add comment about
14033         relationship with default_section_type_flags and SECTION_NOTYPE.
14034         (get_section): Don't consider it a type conflict if one side has
14035         SECTION_NOTYPE and the other doesn't, as long as neither has the
14036         SECTION_BSS et al used in the default_section_type_flags logic.
14038 2018-05-05  Tom de Vries  <tom@codesourcery.com>
14040         PR target/85653
14041         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
14042         (workaround_barsyncs): New function.
14043         (nvptx_reorg): Use workaround_barsyncs.
14044         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14045         (define_expand "nvptx_membar_cta"): New define_expand.
14046         (define_insn "*nvptx_membar_cta"): New insn.
14048 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
14050         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14051         To improve optimization opportunities.
14052         * builtin-types.def: The new needed builtin types for the above.
14054 2018-05-04  Richard Biener  <rguenther@suse.de>
14056         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14057         * gimple-ssa-store-merging.c
14058         (imm_store_chain_info::output_merged_store): Remove redundant create,
14059         release split_store vector contents on failure.
14060         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14061         scalar stmt vector on cache hit.
14063 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
14065         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14066         Xilinx FP support.
14067         * config.gcc (powerpc-xilinx-eabi*): Remove.
14068         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14069         support.
14070         (fusion_addis_mem_combo_load): Ditto.
14071         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14072         FP support.
14073         (rs6000_cpu_cpp_builtins): Ditto.
14074         * config/rs6000/rs6000-linux.c
14075         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14076         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14077         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14078         support.
14079         (rs6000_setup_reg_addr_masks): Ditto.
14080         (rs6000_init_hard_regno_mode_ok): Ditto.
14081         (rs6000_option_override_internal): Ditto.
14082         (legitimate_lo_sum_address_p): Ditto.
14083         (rs6000_legitimize_address): Ditto.
14084         (rs6000_legitimize_reload_address): Ditto.
14085         (rs6000_legitimate_address_p): Ditto.
14086         (abi_v4_pass_in_fpr): Ditto.
14087         (setup_incoming_varargs): Ditto.
14088         (rs6000_gimplify_va_arg): Ditto.
14089         (rs6000_split_multireg_move): Ditto.
14090         (rs6000_savres_strategy): Ditto.
14091         (rs6000_emit_prologue_components): Ditto.
14092         (rs6000_emit_epilogue_components): Ditto.
14093         (rs6000_emit_prologue): Ditto.
14094         (rs6000_emit_epilogue): Ditto.
14095         (rs6000_elf_file_end): Ditto.
14096         (rs6000_function_value): Ditto.
14097         (rs6000_libcall_value): Ditto.
14098         * config/rs6000/rs6000.h: Ditto.
14099         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14100         (TARGET_MINMAX): ... this.  New.
14101         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14102         * config/rs6000/rs6000.md: Remove Xilinx FP support.
14103         (*movsi_internal1_single): Delete.
14104         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14105         mfpu=, mxilinx-fpu): Delete.
14106         * config/rs6000/singlefp.h: Delete.
14107         * config/rs6000/sysv4.h: Remove Xilinx FP support.
14108         * config/rs6000/t-rs6000: Ditto.
14109         * config/rs6000/t-xilinx: Delete.
14110         * config/rs6000/titan.md: Adjust for fp_type removal.
14111         * config/rs6000/vsx.md: Remove Xilinx FP support.
14112         (VStype_simple): Delete.
14113         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14114         * config/rs6000/xfpu.h: Delete.
14115         * config/rs6000/xfpu.md: Delete.
14116         * config/rs6000/xilinx.h: Delete.
14117         * config/rs6000/xilinx.opt: Delete.
14118         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14119         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14121 2018-05-04  Tom de Vries  <tom@codesourcery.com>
14123         PR libgomp/85639
14124         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14125         if ignore == 0.
14127 2018-05-04  Richard Biener  <rguenther@suse.de>
14129         PR middle-end/85627
14130         * tree-complex.c (update_complex_assignment): We are always in SSA form.
14131         (expand_complex_div_wide): Likewise.
14132         (expand_complex_operations_1): Likewise.
14133         (expand_complex_libcall): Preserve EH info of the original stmt.
14134         (tree_lower_complex): Handle removed blocks.
14135         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14136         on complex multiplication and division libcall builtins.
14138 2018-05-04  Richard Biener  <rguenther@suse.de>
14140         PR middle-end/85574
14141         * fold-const.c (negate_expr_p): Restrict negation of operand
14142         zero of a division to when we know that can happen without
14143         overflow.
14144         (fold_negate_expr_1): Likewise.
14146 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
14148         PR libstdc++/85466
14149         * real.h (real_nextafter): Declare.
14150         * real.c (real_nextafter): New function.
14151         * fold-const-call.c (fold_const_nextafter): New function.
14152         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14153         CASE_CFN_NEXTTOWARD.
14154         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14155         even when arg1_mode is different from arg0_mode.
14157 2018-05-03  Nathan Sidwell  <nathan@acm.org>
14159         * doc/extend.texi (Deprecated Features): Remove
14160         -ffriend-injection.
14161         (Backwards Compatibility): Likewise.
14162         * doc/invoke.texi (C++ Language Options): Likewise.
14163         (C++ Dialect Options): Likewise.
14165 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
14167         PR target/85530
14168         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14169         _mm512_mask_mullox_epi64): New intrinsics.
14171 2018-05-03  Tom de Vries  <tom@codesourcery.com>
14173         PR testsuite/85106
14174         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14175         dump files): Add offload-tree.
14177 2018-05-03  Richard Biener  <rguenther@suse.de>
14179         PR tree-optimization/85615
14180         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14181         to loops not nested in BBs loop father to avoid creating multi-entry
14182         loops.
14184 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14186         PR tree-optimization/70291
14187         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14188         arguments.  Change return type to tree.  Emit libcall as a new
14189         statement rather than replacing existing one when inplace_p is true.
14190         (expand_complex_multiplication_components): New function.
14191         (expand_complex_multiplication): Expand floating-point complex
14192         multiplication using the above.
14193         (expand_complex_division): Rename inner_type parameter to type.
14194         Update expand_complex_libcall call-site.
14195         (expand_complex_operations_1): Update expand_complex_multiplication
14196         and expand_complex_division call-sites.
14198 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
14200         PR target/85582
14201         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14202         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14203         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14204         the highest significant bit of the shift count mask is clear.  In
14205         check whether and[sq]i3 is needed verify that all significant bits
14206         of the shift count other than the highest are set.
14208 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14210         PR libgomp/82428
14211         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14212         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14213         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14214         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14215         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14216         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14217         __builtin_goacc_parlevel_size.
14219 2018-05-02  Richard Biener  <rguenther@suse.de>
14221         PR tree-optimization/85597
14222         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14223         do not use split vect_get_vec_defs call but call vect_get_slp_defs
14224         directly.
14226 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14228         PR testsuite/85106
14229         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14230         dump files): Add ltrans-tree.
14232 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14234         PR testsuite/85106
14235         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14236         dump files): Add wpa-ipa.
14238 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
14240         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
14241         powerpc*-*-linux*paired* target.
14242         * config/rs6000/750cl.h: Delete.
14243         * config/rs6000/paired.h: Delete.
14244         * config/rs6000/paired.md: Delete.
14245         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14246         float support.
14247         * config/rs6000/rs6000-builtin.def: Remove paired float support.
14248         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14249         comment.  Remove paired float support.
14250         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14251         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14252         VECTOR_PAIRED.
14253         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14254         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14255         declarations.
14256         * config/rs6000/rs6000.c: Remove paired float support.
14257         (paired_expand_vector_init, paired_expand_vector_move,
14258         paired_emit_vector_compare, paired_emit_vector_cond_expr,
14259         (paired_expand_lv_builtin, paired_expand_stv_builtin,
14260         paired_expand_builtin, paired_expand_predicate_builtin,
14261         paired_init_builtins): Delete.
14262         * config/rs6000/rs6000.h: Remove paired float support.
14263         * config/rs6000/rs6000.md: Remove paired float support.
14264         (move_from_CR_ov_bit): Delete.
14265         * config/rs6000/rs6000.opt (mpaired): Delete.
14266         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14267         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14269 2018-05-02  Richard Biener  <rguenther@suse.de>
14271         PR middle-end/85567
14272         * gimplify.c (gimplify_save_expr): When in SSA form allow
14273         SAVE_EXPRs to compute to SSA vars.
14275 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
14277         PR target/85582
14278         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14279         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14280         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14281         clobber operands[2], instead use a new pseudo.  Formatting fixes.
14283 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
14285         PR tree-optimization/85586
14286         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14287         exit early for statements in the same group if the accesses are
14288         not strided.
14290 2018-05-02  Tom de Vries  <tom@codesourcery.com>
14292         PR lto/85451
14293         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14294         error message.
14296 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
14298         PR tree-optimization/85143
14299         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14301 2018-05-01  Tom de Vries  <tom@codesourcery.com>
14303         PR lto/85451
14304         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14305         not found" error message.
14307 2018-05-01  Tom de Vries  <tom@codesourcery.com>
14309         PR other/83786
14310         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14311         * vec.c (test_ordered_remove_if): New function.
14312         (vec_c_tests): Call test_ordered_remove_if.
14313         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14314         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14315         * tree-vect-patterns.c (vect_pattern_recog_1): Use
14316         VEC_ORDERED_REMOVE_IF.
14318 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14320         PR tree-optimization/82665
14321         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14322         pointer subtraction where arguments come from a memchr call.
14324 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
14326         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14327         --push-state --as-needed and --pop-state instead of --as-needed and
14328         --no-as-needed if ld supports it.
14329         * configure: Regenerated.
14331         PR web/85578
14332         * doc/install.texi2html: Replace _002d with - and _002a with * in
14333         generated html files using sed.
14335 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14337         PR c++/85523
14338         * gcc-rich-location.c (blank_line_before_p): New function.
14339         (use_new_line): New function.
14340         (gcc_rich_location::add_fixit_insert_formatted): New function.
14341         * gcc-rich-location.h
14342         (gcc_rich_location::add_fixit_insert_formatted): New function.
14344 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14346         * selftest.c (assert_streq): Rename "expected" and "actual" to
14347         "val1" and "val2".  Extend NULL-handling to cover both inputs
14348         symmetrically, while still requiring both to be non-NULL for a pass.
14349         * selftest.h (assert_streq): Rename "expected" and "actual" to
14350         "val1" and "val2".
14351         (ASSERT_EQ): Likewise.
14352         (ASSERT_EQ_AT): Likewise.
14353         (ASSERT_KNOWN_EQ): Likewise.
14354         (ASSERT_KNOWN_EQ_AT): Likewise.
14355         (ASSERT_NE): Likewise.
14356         (ASSERT_MAYBE_NE): Likewise.
14357         (ASSERT_MAYBE_NE_AT): Likewise.
14358         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
14359         the assertion to pass.
14360         (ASSERT_STREQ_AT): Likewise.
14362 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
14364         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14365         interaction with -pie.
14367 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14369         * selftest.h: Fix alphabetization of per-source-file selftest
14370         declarations.
14372 2018-04-30  Jason Merrill  <jason@redhat.com>
14374         PR c++/61982 - dead stores to destroyed objects.
14375         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14376         of clobber.
14378 2018-04-30  Jason Merrill  <jason@redhat.com>
14380         * tree.c (build_clobber): New.
14381         * tree.h: Declare it.
14382         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14384 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14386         * diagnostic-show-locus.c (layout::layout): Update for
14387         location_get_source_line returning a char_span.
14388         (struct char_span): Move to input.h.
14389         (struct correction): Update for fields in char_span becoming
14390         private.
14391         (struct source_line): Update for location_get_source_line
14392         returning a char_span.
14393         (layout::print_line): Likewise.
14394         * edit-context.c (edited_file::print_content): Likewise.
14395         (edited_file::print_diff_hunk): Likewise.
14396         (edited_file::print_run_of_changed_lines): Likewise.
14397         (edited_file::get_num_lines): Likewise.
14398         (edited_line::edited_line): Likewise.
14399         * final.c (asm_show_source): Likewise.
14400         * input.c (location_get_source_line): Convert return type
14401         from const char * to char_span, losing the final "line_len"
14402         param.
14403         (dump_location_info): Update for the above.
14404         (get_substring_ranges_for_loc): Likewise.  Use a char_span
14405         when handling the literal within the line.
14406         (test_reading_source_line): Update for location_get_source_line
14407         returning a char_span.
14408         * input.h (class char_span): Move here from
14409         diagnostic-show-locus.c, converting from a struct to a class.
14410         Make data members private.
14411         (char_span::operator bool): New.
14412         (char_span::length): New.
14413         (char_span::get_buffer): New.
14414         (char_span::operator[]): New.
14415         (char_span::subspan): Make const.
14416         (char_span::xstrdup): New.
14417         (location_get_source_line): Convert return type from const char *
14418         to char_span, losing the final "line_size" param.
14420 2018-04-30  Jan Hubicka  <jh@suse.cz>
14422         * lto-wrapper.c (ltrans_priorities): New static var.
14423         (cmp_priority): New.
14424         (run_gcc): Read priorities and if doing parallel build order
14425         the Makefile by them.
14427 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14429         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14431 2018-04-30  Richard Biener  <rguenther@suse.de>
14433         * tree-cfg.c (verify_address): Remove base argument, add
14434         flag whether to check TREE_ADDRESSABLE and do that.
14435         (verify_expr): Remove.
14436         (verify_types_in_gimple_reference): Add pieces from verify_expr.
14437         (verify_gimple_assign_single): Likewise.
14438         (verify_gimple_switch): Likewise.
14439         (verify_expr_location_1): Dereference tp once.  Add (disabled)
14440         piece from verify_expr.
14441         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14443 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14445         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14447 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14449         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14450         (small_data_pattern): Likewise.
14451         (arc_rewrite_small_data): Likewise.
14452         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14453         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14454         (get_symbol_alignment): New function.
14455         (legitimate_small_data_address_p): Likewise.
14456         (legitimate_scaled_address): Update, call
14457         legitimate_small_data_address_p.
14458         (output_sdata): New static variable.
14459         (arc_print_operand): Update how we handle small data operands.
14460         (arc_print_operand_address): Likewise.
14461         (arc_legitimate_address_p): Update, use
14462         legitimate_small_data_address_p.
14463         (arc_rewrite_small_data_p): Remove.
14464         (arc_rewrite_small_data_1): Likewise.
14465         (arc_rewrite_small_data): Likewise.
14466         (small_data_pattern): Likewise.
14467         (compact_sda_memory_operand): Update to use
14468         legitimate_small_data_address_p and get_symbol_alignment.
14469         (prepare_move_operands): Don't rewite sdata pattern.
14470         (prepare_extend_operands): Remove.
14471         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14472         pattern.
14473         (zero_extendqisi2): Likewise.
14474         (zero_extendhisi2): Likewise.
14475         (extendqihi2): Likewise.
14476         (extendqisi2): Likewise.
14477         (extendhisi2): Likewise.
14478         (addsi3): Likewise.
14479         (subsi3): Likewise.
14480         (andsi3): Likewise.
14481         * config/arc/constraints.md (Usd): Change it to memory constraint.
14483 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14485         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14486         as source of std instructions.
14487         * config/arc/arc.md (movsi_insn): Update pattern predicate to
14488         allow 6-bit constants as source for store instructions.
14489         (movdi_insn): Update instruction pattern to allow 6-bit constants
14490         as source for store instructions.
14492 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
14494         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14496 2018-04-30  Nathan Sidwell  <nathan@acm.org>
14497             Sandra Loosemore <sandra@codesourcery.com>
14499         * dumpfile.c (dump_open): Allow '-' for stdout.
14500         * doc/invoke.texi (Developer Options): Document dump filename
14501         determination early.  Document stdin/stdout selection.
14503 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
14505         Microblaze Target: PIC data text relative
14507         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14508         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14509         Add declaration.
14510         * config/microblaze/microblaze.h (microblaze_constant_address_p):
14511         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14512         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14513         New addressing mode for data-text relative position indepenedent code.
14514         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14515         'ADDRESS_SYMBOLIC_TXT_REL'.
14516         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14517         (microblaze_legitimate_pic_operand): Exclude function calls from
14518         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14519         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14520         addresses cases.
14521         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14522         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14523         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14524         for 'address + offset'.
14525         (microblaze_expand_prologue): Add new function prologue call for
14526         'r20' assignation.
14527         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14528         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14529         table in case of TARGET_PIC_DATA_TEXT_REL.
14530         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14531         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14532         Add new macros 'UNSPEC_TEXT',
14533         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14534         + exclude function calls from 'UNSPEC_PLT' in case of data text
14535         relative mode.
14536         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14537         new target hook for generating address diff vector tables in case of
14538         flag_pic.
14539         * doc/tm.texi : Regenerate.
14540         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14541         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14542         of addr diff vector generation.
14543         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14544         target hook definition.
14545         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14546         Add default function for generate_pic_addr_diff_vec -> flag_pic.
14547         * doc/invoke.texi (Add new pic option): Add new microblaze pic
14548         option for data text relative.
14550 2018-04-30  Richard Biener  <rguenther@suse.de>
14552         * tree-chrec.h (evolution_function_is_constant_p): Remove
14553         redundant check.
14554         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14556 2018-04-30  Richard Biener  <rguenther@suse.de>
14558         PR bootstrap/85571
14559         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14561 2018-04-30  Richard Biener  <rguenther@suse.de>
14563         PR tree-optimization/28364
14564         PR tree-optimization/85275
14565         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14566         copying first exit test.
14568 2018-04-28  Mark Wielaard  <mark@klomp.org>
14570         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14571         dwarf_version >= 5.
14572         (dwarf_AT): Handle DW_AT_addr_base.
14573         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14575 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
14577         PR target/84431
14578         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14579         (*ashl<dwi>3_doubleword_mask_1): Ditto.
14580         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14581         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14583 2018-04-28  Richard Biener  <rguenther@suse.de>
14585         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14586         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14587         to reflect use.  Only add interesting stmts.
14589 2018-04-27  Martin Jambor  <mjambor@suse.cz>
14591         PR ipa/85549
14592         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14593         the jump function allows for passing through aggregate values.
14595 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
14597         * input.h (in_system_header_at): Convert from macro to inline
14598         function.
14599         (from_macro_expansion_at): Likewise.
14600         (from_macro_definition_at): Likewise.
14602 2018-04-27  Jeff Law  <law@redhat.com>
14604         * config.gcc: Mark tile* targets as deprecated/obsolete.
14606 2018-04-27  Richard Biener  <rguenther@suse.de>
14608         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14609         fix for ILP32.
14611 2018-04-27  Richard Biener  <rguenther@suse.de>
14613         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14615 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
14617         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14618         with Yd constraint. Set "preferred_for_speed" attribute from
14619         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14620         with Yd constraint.
14621         (*movdi_internal): Ditto.
14622         (movti_interunit splitters): Remove
14623         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14624         (movdi_interunit splitters): Ditto.
14625         * config/i386/constraints.md (Ye): Remove.
14626         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14628 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14630         PR target/85512
14631         * config/aarch64/constraints.md (Usg): Limit to 31.
14632         (Usj): Limit to 63.
14634 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
14636         PR tree-optimization/85529
14637         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14638         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14639         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14640         zero extension or masking of the MSB bit.
14641         (optimize_range_tests): Add FIRST_BB argument, pass it through
14642         to optimize_range_tests_var_bound.
14643         (maybe_optimize_range_tests, reassociate_bb): Adjust
14644         optimize_range_tests callers.
14646 2018-04-26  Richard Biener  <rguenther@suse.de>
14647             Jakub Jelinek  <jakub@redhat.com>
14649         * cgraph.h (symbol_table): Just declare debug method here.
14650         * symtab.c (symbol_table::debug): Define.
14652 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
14654         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14656 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
14658         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14659         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14660         (*movdi_internal): Substitute Yi and Yj constraint with x
14661         and Ym and Yn constraint with y constraint.  Update "isa"
14662         attribute and set "preferred_for_speed" attribute from
14663         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14664         (*movsi_internal): Ditto.
14665         (*movdf_internal): Ditto.
14666         (*movsf_internal): Ditto.
14667         (*zero_extendsidi2): Ditto.
14668         * config/i386/sse.md (vec_set<mode>_0): Ditto.
14669         (sse2_loadld): Ditto.
14670         (*vec_extract<ssevecmodelower>_0): Ditto.
14671         (*vec_extractv4si_0_zext_sse4): Ditto.
14672         (vec_concatv2di): Ditto.
14673         (*vec_dup<mode>): Ditto.
14674         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14675         * config/i386/constraints.md (Yi): Remove.
14676         (Yj): Remove.
14677         (Ym): Remove.
14678         (Yn): Remove.
14680 2018-04-26  Nathan Sidwell  <nathan@acm.org>
14682         * dumpfile.c (dump_open): New.
14683         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14684         (dump_finish): Detect stdio/stderr by value not name.
14686 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
14688         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14690 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14692         PR target/84952
14693         * config/nvptx/nvptx.c (verify_neutering_jumps)
14694         (verify_neutering_labels): New function
14695         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14697 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14699         PR target/84025
14700         * config/nvptx/nvptx.c (needs_neutering_p): New function.
14701         (nvptx_single): Use needs_neutering_p to skip over insns that do not
14702         need neutering.
14704 2018-04-26  Richard Biener <rguenther@suse.de>
14705             Tom de Vries  <tom@codesourcery.com>
14707         PR lto/85422
14708         * lto-streamer-out.c (output_function): Fixup loops if required to match
14709         discovery done in the reader.
14711 2018-04-26  Richard Biener  <rguenther@suse.de>
14713         PR tree-optimization/85116
14714         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14715         have a loop exit from the single latch predecessor.  Remove
14716         case of header with just condition.
14717         (ch_base::copy_headers): Exclude infinite loops from any
14718         processing.
14719         (pass_ch::execute): Record exits.
14721 2018-04-26  Richard Biener  <rguenther@suse.de>
14723         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14724         prologue cost vector and pass it to vect_get_load_cost.
14725         (vect_get_peeling_costs_all_drs): Likewise.
14726         (vect_peeling_hash_get_lowest_cost): Likewise.
14727         (vect_enhance_data_refs_alignment): Likewise.
14729 2018-04-26  Richard Biener  <rguenther@suse.de>
14731         PR middle-end/85450
14732         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14733         checking of integer<->pointer conversions.
14734         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14735         sign-/zero-extending pointer types.
14736         (expand_omp_for_static_chunk): Likewise.
14738 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
14739             Jean Lee  <xiaoyur347@gmail.com>
14741         * config/mips/mips.c (mips_asan_shadow_offset): New function.
14742         (TARGET_ASAN_SHADOW_OFFSET): Define.
14743         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14744         true for -fsanitize=address.
14746 2018-04-25  Mark Wielaard  <mark@klomp.org>
14748         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14749         shorter ones.
14751 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14753         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14754         than "alu", remove explicit "memory" and "imm_disp" attributes.
14755         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14757         PR middle-end/85414
14758         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14759         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14760         gen_lowpart_no_emit.
14762 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
14764         PR target/85473
14765         * config/i386/i386.c (ix86_expand_builtin): Change memory
14766         operand to XI, extend p0 to Pmode.
14767         * config/i386/i386.md: Change unspec volatile and operand
14768         1 mode to XI, change operand 0 mode to P.
14770 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14772         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14773         GET_MODE_MASK before any checking.
14774         (nds32_can_use_bset_p): Likewise.
14775         (nds32_can_use_btgl_p): Likewise.
14777 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14779         * config/nds32/nds32-doubleword.md: New define_split pattern for
14780         illegal register number.
14782 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14784         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14786 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14788         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14790 2018-04-25  Richard Biener  <rguenther@suse.de>
14792         * lto-streamer.h (LTO_major_version): Bump to 8.
14794 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14796         * BASE-VER: Set to 9.0.0.
14798 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
14800         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14801         in __abskf2 and __powikf2.
14803 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14805         PR target/85512
14806         * config/aarch64/constraints.md (Usg, Usj): New constraints.
14807         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14808         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14809         Use the above on operand 2.  Reindent.
14810         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14812 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14814         PR target/85485
14815         * common/config/i386/i386-common.c (ix86_handle_option): Don't
14816         handle OPT_mcet.
14817         * config/i386/i386.opt (mcet): Removed.
14818         * doc/install.texi: Remove -mcet documentation.
14819         * doc/invoke.texi: Likewise.
14821 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14823         PR target/85485
14824         * doc/install.texi: Remove -mcet from bootstrap-cet.
14826 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14828         PR target/85511
14829         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14830         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14831         if TARGET_64BIT.
14833         PR target/85503
14834         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14835         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14836         containing a CONST_VECTOR.
14838 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
14840         * doc/install.texi: Update newlib dependency for nvptx.
14842 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14844         PR target/85508
14845         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14846         instead of INTVAL when shifting x left.
14848 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
14850         PR tree-optimization/85478
14851         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14852         vect_grouped_store_supported for single element vectors.
14854 2018-04-24  Richard Biener  <rguenther@suse.de>
14856         PR target/85491
14857         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14858         load cost increase to the case of non-constant step.
14860 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14862         PR target/84828
14863         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14864         destination if any_malformed_asm.
14866 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
14868         PR middle-end/85496
14869         * expr.c (store_field): In the bitfield case, if the value comes from
14870         a function call and is returned in registers by means of a PARALLEL,
14871         do not change the mode of the temporary unless BLKmode and VOIDmode.
14873 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
14875         PR rtl-optimization/85423
14876         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14877         dependencies to debug insns when the previous insn is non-debug.
14879 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14881         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14882         enums into a single definition.
14883         (fls): Fix predicates and printing.
14884         (seti): Likewise.
14886 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14888         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14889         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14890         and short u6 immediate.
14891         (check_if_valid_sleep_operand): Remove.
14892         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14894 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14896         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14897         flag_always_save_lp condition.
14898         * config/nds32/nds32.opt (malways-save-lp): New option.
14900 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14902         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14903         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14904         * config/nds32/nds32.h
14905         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14906         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14908 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14910         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14911         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14913 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14914             Chung-Ju Wu  <jasonwucj@gmail.com>
14916         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14917         Declare.
14918         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14919         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14921 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14923         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14925 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14927         * config/nds32/nds32-protos.h (nds32_data_alignment,
14928         nds32_local_alignment): Declare.
14929         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14930         nds32_local_alignment): New functions.
14931         (TARGET_CONSTANT_ALIGNMENT): Define.
14932         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14934 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14936         * config/nds32/nds32.c
14937         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14938         (TARGET_MODES_TIEABLE_P): Likewise.
14940 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14942         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14943         level Ofast and Og.
14945 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
14946             Chung-Ju Wu  <jasonwucj@gmail.com>
14948         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14949         for unaligned access.
14950         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14951         unaligned access.
14952         * config/nds32/nds32-intrinsic.md: Likewise.
14953         * config/nds32/nds32_intrinsic.h: Likewise.
14954         * config/nds32/nds32.h (nds32_builtins): Likewise.
14955         * config/nds32/nds32.opt (munaligned-access): New option.
14956         * config/nds32/nds32.c (nds32_asm_file_start): Display
14957         flag_unaligned_access status.
14959 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14961         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14962         -mno-relax is present.
14963         * config/riscv/linux.h (LINK_SPEC): Ditto.
14965 2018-04-20  Martin Sebor  <msebor@redhat.com>
14967         PR c/85365
14968         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14969         for null pointers.
14970         (gimple_fold_builtin_stxcpy_chk): Same.
14971         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14973 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
14975         PR target/85456
14976         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14977         __powikf2 when long double is IEEE 128-bit.
14979 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14981         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14982         step to make sure stack always aligned.
14984 2018-04-20  Carl Love  <cel@us.ibm.com>
14986         PR target/83402
14987         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14988         size check for arg0.
14990 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14991             Tom de Vries  <tom@codesourcery.com>
14993         PR target/85445
14994         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14995         Emit insns for calls too.
14996         (nvptx_find_par): Always look for worker-level predecessor insn.
14997         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
14998         calls.
14999         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
15000         (nvptx_process_pars): Propagate frames for calls.
15002 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
15004         PR target/85469
15005         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
15006         Removed.
15007         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
15008         (ix86_handle_option): Don't handle OPT_mibt.
15009         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
15010         __SHSTK__.
15011         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
15012         has_ibt and ibt.
15013         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
15014         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
15015         (ix86_target_macros): Define __CET__ with flag_cf_protection
15016         for -fcf-protection.
15017         * config/i386/i386.c (isa2_opts): Remove -mibt.
15018         * config/i386/i386.h (TARGET_IBT): Removed.
15019         (TARGET_IBT_P): Likewise.
15020         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
15021         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
15022         * config/i386/i386.opt (mcet): Update help message.
15023         (mshstk): Likewise.
15024         (mibt): Removed.
15025         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
15026         -mcet as an alias for -mshstk.
15028 2018-04-20  Richard Biener <rguenther@suse.de>
15030         PR middle-end/85475
15031         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
15032         complexity by forcing a single use of the multiply operand.
15034 2018-04-20  Martin Jambor  <mjambor@suse.cz>
15036         ipa/85449
15037         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
15038         recursion dependency to only apply to non-clones.
15040 2018-04-20  Martin Jambor  <mjambor@suse.cz>
15042         ipa/85447
15043         * ipa-cp.c (create_specialized_node): Check that clones of
15044         self-recursive edges exist during IPA-CP.
15046 2018-04-19  Toon Moene  <toon@moene.org>
15048         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15049         by -O3.
15051 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
15053         PR tree-optimization/85467
15054         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15055         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
15056         VECTOR_CST element to type.
15058 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
15060         PR target/85397
15061         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15062         * config/i386/i386.md (builtin_setjmp_setup): Removed.
15063         (builtin_longjmp): Likewise.
15064         (save_stack_nonlocal): New pattern.
15065         (restore_stack_nonlocal): Likewise.
15067 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
15069         PR target/85404
15070         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15071         Replace ASM_OUTPUT_LABEL with fprintf.
15073 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
15075         PR target/85417
15076         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15077         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15078         * config/i386/i386-c.c (ix86_target_macros_internal): Also
15079         define __IBT__ and __SHSTK__ for -fcf-protection.
15080         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15081         TARGET_IBT.
15082         (ix86_trampoline_init): Likewise.
15083         (x86_output_mi_thunk): Likewise.
15084         (ix86_notrack_prefixed_insn_p): Likewise.
15085         (ix86_option_override_internal): Don't disallow -fcf-protection.
15086         * config/i386/i386.md (rdssp<mode>): Also enable for
15087         -fcf-protection.
15088         (incssp<mode>): Likewise.
15089         (nop_endbr): Likewise.
15090         * config/i386/i386.opt (mcet): Change help message to built-in
15091         functions only.
15092         (mibt): Likewise.
15093         (mshstk): Likewise.
15094         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15095         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
15096         enable CET built-in functions.
15098 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
15100         * common/config/i386/i386-common.c
15101         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15102         OPTION_MASK_ISA_MOVDIRI_UNSET,
15103         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15104         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15105         * config.gcc (movdirintrin.h): New header.
15106         * config/i386/cpuid.h (bit_MOVDIRI,
15107         bit_MOVDIR64B): New bits.
15108         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15109         and -mmvodir64b.
15110         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15111         (VOID, PVOID, PCVOID)): New function types.
15112         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15113         __builtin_ia32_directstoreu_u64,
15114         __builtin_ia32_movdir64b): New builtins.
15115         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15116         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15117         and -mmovdiri.
15118         (ix86_valid_target_attribute_inner_p): Ditto.
15119         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15120         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15121         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15122         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15123         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15124         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15125         (movdiri<mode>, movdir64b_<mode>): New.
15126         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15127         * config/i386/immintrin.h: Include movdirintrin.h.
15128         * config/i386/movdirintrin.h: New file.
15129         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15131 2018-04-19  Richard Biener  <rguenther@suse.de>
15133         PR middle-end/85455
15134         * cfg.c (clear_bb_flags): When loop state says we have
15135         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15137 2018-04-19  Richard Biener  <rguenther@suse.de>
15139         PR tree-optimization/84737
15140         * tree-vect-data-refs.c (vect_copy_ref_info): New function
15141         copying restrict info.
15142         (vect_setup_realignment): Use it.
15143         * tree-vectorizer.h (vect_copy_ref_info): Declare.
15144         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15145         the first DR to all generated stores.
15146         (vectorizable_load): Likewise for loads.
15148 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
15150         PR tree-optimization/85446
15151         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15152         the integral and pointer types to have the same precision.
15154         * doc/install.texi: Document --disable-cet being the default and
15155         --enable-cet=auto.
15157 2018-04-18  Martin Liska  <mliska@suse.cz>
15159         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15160         style.
15162 2018-04-18  Martin Liska  <mliska@suse.cz>
15164         Revert
15165         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15167         PR ipa/83983
15168         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15169         arguments if they are comparable.
15171 2018-04-18  Martin Liska  <mliska@suse.cz>
15173         Revert
15174         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15176         PR lto/84805
15177         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15178         incomplete types.
15180 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
15182         PR target/85388
15183         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15184         ENDBR after calling __morestack.
15186 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
15188         PR jit/85384
15189         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15190         by using gcc_base_ver to generate a gcc_driver_version, and use
15191         it when generating GCC_DRIVER_NAME.
15192         * configure: Regenerate.
15194 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
15196         PR target/81084
15197         * config.gcc: Obsolete powerpc*-*-*spe*.
15199 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15201         PR debug/84637
15202         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15203         (stabstr_D): Change type of unum from unsigned int to
15204         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
15205         type.
15207 2018-04-17  Jim Wilson  <jimw@sifive.com>
15209         PR 84856
15210         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15211         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15212         Set arg_pointer_offset after using pretend_args_size.
15214 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15216         PR rtl-optimization/85431
15217         * dse.c (record_store): Ignore zero width stores.
15219         PR sanitizer/85230
15220         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
15221         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15222         __builtin_stack_restore rather than after it.
15223         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15224         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15225         argument instead of virtual_dynamic_stack_rtx.
15227 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15229         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15230         New prototype.
15231         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15232         Add note to error message to explain internal mapping of overloaded
15233         built-in function name to non-overloaded built-in function name.
15234         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15235         function.
15237 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
15239         PR target/85424
15240         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15241         where the inputs overlap with the output.
15243 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15245         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15246         (=v, v) alternative and explicit "memory" attribute.
15247         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
15248         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15249         attributes.
15250         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15251         "sselog1" type instead of "sselog".
15252         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15253         "sselog".  Remove explicit "memory" attribute.
15254         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15255         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15256         attributes.
15257         (vec_extract_hi_v32hi): Merge all alternatives into one, use
15258         "sselog1" type instead of "sselog".  Remove explicit "memory"
15259         attribute.
15260         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15261         use "sselog1" type instead of "sselog".  Remove explicit "memory"
15262         attribute.
15263         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15264         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15265         attributes.
15266         (vec_extract_hi_v64qi): Merge all alternatives into one, use
15267         "sselog1" type instead of "sselog".  Remove explicit "memory"
15268         attribute.
15269         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15270         use "sselog1" type instead of "sselog".  Remove explicit "memory"
15271         attribute.
15273         PR target/85430
15274         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15276         PR middle-end/85414
15277         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15278         on a SUBREG.
15280 2018-04-17  Martin Jambor  <mjambor@suse.cz>
15282         PR ipa/85421
15283         * ipa-cp.c (create_specialized_node): Call
15284         expand_all_artificial_thunks if necessary.
15286 2018-04-17  Martin Liska  <mliska@suse.cz>
15288         PR lto/85405
15289         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15290         in message, remote space in between '_G' and '('.
15292 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
15294         PR target/85281
15295         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15296         avx512f_vmcmp<mode>3<round_saeonly_name>,
15297         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15298         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15299         avx512f_rndscale<mode><round_saeonly_name>,
15300         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15301         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15302         Use %<iptr>2 instead of %2 for -masm=intel.
15303         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15304         avx512f_vcvttss2usi<round_saeonly_name>,
15305         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15306         -masm=intel.
15307         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15308         avx512f_vcvttsd2usi<round_saeonly_name>,
15309         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15310         Use %q1 instead of %1 for -masm=intel.
15311         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15312         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15313         of %3 for -masm=intel.
15314         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15315         -masm=intel.
15316         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15317         -masm=intel.
15318         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15319         -masm=intel.
15320         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15321         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15322         %g1.
15323         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15324         -masm=intel.
15325         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15326         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15327         %g1 and one with %0 and %1.
15328         (avx512er_vmrcp28<mode><round_saeonly_name>,
15329         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15330         %1 for -masm=intel.
15331         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15332         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15333         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15334         of %0 and %{%4%} for -masm=intel.
15335         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15336         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15337         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15338         order of %0 and %{%5%}%{z%} for -masm=intel.
15340 2018-04-17  Jan Hubicka  <jh@suse.cz>
15342         PR lto/85405
15343         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15345 2018-04-17  Martin Liska  <mliska@suse.cz>
15347         PR ipa/85329
15348         * multiple_target.c (create_dispatcher_calls): Set apostrophes
15349         for target_clone error message.  Make default implementation
15350         clone to be a local declaration.
15351         (separate_attrs): Add new argument and check for an empty
15352         string.
15353         (expand_target_clones): Handle it.
15354         (ipa_target_clone): Make redirection just for target_clones
15355         functions.
15357 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
15358             Tom de Vries  <tom@codesourcery.com>
15360         PR middle-end/84955
15361         * omp-expand.c (expand_oacc_for): Add dummy false branch for
15362         tiled basic blocks without omp continue statements.
15364 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
15366         PR target/83660
15367         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15368         vec_extract expression as having side effects to make sure it gets
15369         a cleanup point.
15371 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
15373         PR target/85403
15374         * config/i386/i386.c (get_builtin_code_for_version): Check
15375         error_mark_node.
15377 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
15379         PR target/84331
15380         * config.gcc: Support "skylake".
15381         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15382         PROCESSOR_SKYLAKE.
15383         * config/i386/i386.c (m_SKYLAKE): Define.
15384         (processor_target_table): Add "skylake".
15385         (ix86_option_override_internal): Add "skylake".
15386         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15387         PROCESSOR_CANNONLAKE.
15388         (get_builtin_code_for_version): Fix priority for
15389         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15390         PROCESSOR_SKYLAKE-AVX512.
15391         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15392         (processor_type): Add PROCESSOR_SKYLAKE.
15394 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
15395             Jason Merrill  <jason@redhat.com>
15397         PR c++/85112
15398         * convert.c (convert_to_integer_1): Use direct recursion for
15399         enumeral types and types with a precision less than the number
15400         of bits in their mode.
15402 2018-04-16  Julia Koval  <julia.koval@intel.com>
15404         PR target/84413
15405         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15406         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15408 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
15410         PR target/85293
15411         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15412         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15413         and -mno-direct-move.
15415 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
15417         PR target/83402
15418         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15419         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15420         Ensure negative shifts result in {0}.
15422 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
15424         PR rtl-optimization/79916
15425         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15426         regs (if any) to define how to gnerate SD moves when LRA is in
15427         progress.
15429 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
15431         PR rtl-optimization/85393
15432         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15433         * except.c (expand_dw2_landing_pad_for_region): Make static.
15434         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15435         a label and unconditional jump to old_bb, rather than
15436         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15437         basic block.
15439         PR rtl-optimization/85376
15440         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15441         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15442         instead of a specific value.
15444 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
15445             Bin Cheng  <bin.cheng@arm.com>
15447         PR tree-optimization/82965
15448         PR tree-optimization/83991
15449         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15450         by_profile_only parameter.
15451         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15452         information if the loop was predicted to iterate too many times.
15453         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15455 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
15457         PR lto/71991
15458         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15459         always inline.
15461 2018-04-13  Martin Liska  <mliska@suse.cz>
15462             Jakub Jelinek  <jakub@redhat.com>
15464         PR middle-end/81657
15465         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15466         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15467         * builtins.c (expand_builtin_memory_copy_args): Use
15468         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15469         handle dest_addr == pc_rtx.
15471 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
15473         PR target/85291
15474         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15475         asked to not generate direct moves.
15476         (fix_trunc<mode>si2_stfiwx): Similar.
15477         (fix_trunc<mode>si2_internal): Similar.
15479 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15481         PR debug/83157
15482         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15483         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15484         lookup if dest in some wider mode is known to be const0_rtx and
15485         if so, record permanent equivalence for it to be ZERO_EXTEND of
15486         the narrower mode destination.
15488 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
15490         * lto-streamer-out.c (output_function): Revert 259346.
15491         * omp-expand.c (expand_oacc_for): Likewise.
15493 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
15495         PR rtl-optimization/85354
15496         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15497         * sel-sched.c (sel_global_init): ... here.
15499 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
15501         PR target/85238
15502         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15503         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15504         mode for PE-COFF targets.
15505         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15506         (i386_pe_asm_lto_end): Likewise.
15507         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15508         (TARGET_ASM_LTO_END): Likewise.
15509         * config/i386/winnt.c (saved_debug_info_level): New static variable.
15510         (i386_pe_asm_lto_start): New function.
15511         (i386_pe_asm_lto_end): Likewise.
15513 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
15514             Richard Biener  <rguenther@suse.de>
15516         PR middle-end/84955
15517         * lto-streamer-out.c (output_function): Fix CFG loop state before
15518         streaming out.
15519         * omp-expand.c (expand_oacc_for): Handle calls to internal
15520         functions like regular functions.
15522 2018-04-12  Richard Biener  <rguenther@suse.de>
15524         PR lto/85371
15525         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15526         for the early LTO debug to properly generate references to it
15527         during DIE emission.  Do not re-use that for the skeleton for
15528         split-dwarf.
15529         (dwarf2out_early_finish): Likewise.
15531 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15533         PR target/85328
15534         * config/i386/sse.md
15535         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15536         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15537         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15538         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15539         and output is a reg, avoid creating invalid lowpart subreg, but
15540         instead split into a 512-bit move.  Don't split if not AVX512VL,
15541         input is xmm16+ reg and output is a mem.
15542         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15543         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15544         xmm16+ reg and output is a mem.
15546 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15548         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15549         also for flag_dwarf2_cfi_asm.
15551 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15553         PR rtl-optimization/85342
15554         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15555         a bool scalar var inside of the loop instead.  Don't try to update
15556         recog_data.operand after failed apply_change_group.
15558 2018-04-12  Tom de Vries  <tom@codesourcery.com>
15560         PR target/85296
15561         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15562         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
15563         array with flexible array member as array without given dimension.
15564         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15565         argument for undefined param to true.
15567 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
15569         PR target/85321
15570         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15571         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15572         from PowerPC section.
15573         * config/rs6000/sysv4.opt (mcall-): Improve help text.
15574         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15575         help text that is too long.
15576         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15577         help text that is too long.
15578         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15579         help text that is too long.
15581 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
15583         * config/alpha/alpha.md (stack_probe_internal): Rename
15584         from "probe_stack".  Update all callers.
15586 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15588         PR rtl-optimization/84566
15589         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15590         sched_macro_fuse_insns.
15592 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15594         PR target/84301
15595         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15596         (compute_block_dependences): ... from here.
15598 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15600         PR tree-optimization/85331
15601         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15602         from int to HOST_WIDE_INT.
15604 2018-04-11  Martin Jambor  <mjambor@suse.cz>
15606         PR ipa/84149
15607         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15608         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15609         not the same as the source val.
15610         (cgraph_edge_brings_value_p): New parameter.
15611         (gather_edges_for_value): Pass destination value to
15612         cgraph_edge_brings_value_p.
15613         (perhaps_add_new_callers): Likewise.
15614         (get_info_about_necessary_edges): Likewise and exclude values brought
15615         only by self-recursive edges.
15616         (create_specialized_node): Redirect only clones of self-calling edges.
15617         (+self_recursive_pass_through_p): New function.
15618         (find_more_scalar_values_for_callers_subset): Use it.
15619         (find_aggregate_values_for_callers_subset): Likewise.
15620         (known_aggs_to_agg_replacement_list): Removed.
15621         (decide_whether_version_node): Re-calculate known constants for all
15622         remaining context clones.
15624 2018-04-11  Richard Biener  <rguenther@suse.de>
15626         PR lto/85339
15627         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15628         from early DWARF output.
15629         (dwarf2out_early_finish): Output line info unconditionally into
15630         early DWARF and add reference to it.
15632 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15634         PR target/85281
15635         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15636         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15637         other than V2DFmode using iptr mode attribute.
15638         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15640 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15642         PR rtl-optimization/84659
15643         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15645 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15647         PR debug/85302
15648         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15649         SIZEP is NULL.
15650         (output_loc_list): Pass address of a dummy size variable even in the
15651         locview handling loop.
15652         (index_location_lists): Add comment on why skip_loc_list_entry can't
15653         call size_of_locs.
15655 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15657         PR target/85261
15658         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15659         into register.
15661 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
15663         PR target/85321
15664         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15665         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15666         and -mstring-compare-inline-limit.
15668 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15670         PR target/85287
15671         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15672         for stack clash protection in a register whenever we need it to be in
15673         a register.
15675 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15677         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15678         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15680 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15682         PR target/85321
15683         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15684         the help text.
15685         (mlong-double-): Ditto.
15686         * config/rs6000/sysv4.opt (msdata=): Ditto.
15687         (mtls-size=): Ditto.
15689 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15691         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15692         erroneous entries for
15693         "vector int vec_ldl (int, long int *)", and
15694         "vector unsigned int vec_ldl (int, unsigned long int *)".
15695         Add comments and entries for
15696         "vector bool char vec_ldl (int, bool char *)",
15697         "vector bool short vec_ldl (int, bool short *)",
15698         "vector bool int vec_ldl (int, bool int *)",
15699         "vector bool long long vec_ldl (int, bool long long *)",
15700         "vector pixel vec_ldl (int, pixel *)",
15701         "vector long long vec_ldl (int, long long *)",
15702         "vector unsigned long long vec_ldl (int, unsigned long long *)".
15703         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15704         type tree bool_long_long_type_node and correct definition of
15705         bool_V2DI_type_node to make reference to this new type tree.
15706         (rs6000_mangle_type): Replace erroneous reference to
15707         bool_long_type_node with bool_long_long_type_node.
15708         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15709         comments to emphasize sign distinctions for char and int types and
15710         replace RS6000_BTI_bool_long constant with
15711         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
15712         use of RS6000_BTI_pixel.
15713         (bool_long_type_node): Remove this macro definition.
15714         (bool_long_long_type_node): New macro definition
15716 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15718         PR rtl-optimization/85300
15719         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15720         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15721         simplify_unary_operation fails.
15723 2018-04-10  Martin Liska  <mliska@suse.cz>
15725         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15726         cgraph_edge and ipa_ref.
15728 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15730         PR target/85177
15731         PR target/85255
15732         * config/i386/sse.md
15733         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15734         computation of the VEC_MERGE selector from mask.
15735         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15736         Fix decoding of the VEC_MERGE selector into mask.
15738 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15740         PR tree-optimization/85286
15741         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15743 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15745         * final.c (final_1): Set insn_last_address as well as
15746         insn_current_address.
15748 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15750         PR target/85173
15751         * explow.c (emit_stack_probe): Call validize_mem on memory location
15752         before passing it to gen_probe_stack.  Create address operand and
15753         legitimize it for the probe_stack_address case.
15755 2018-04-09  Jan Hubicka  <jh@suse.cz>
15757         PR lto/85078
15758         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15759         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15760         * tree.c (free_lang_data_in_type): Fix handling of binfos;
15761         walk basetypes.
15762         (free_lang_data): Rebuild type inheritance graph.
15764 2018-04-09  Martin Sebor  <msebor@redhat.com>
15766         * invoke.texi (-finline-small-functions): Mention other optimization
15767         options.
15768         (-findirect-inlining, -fpartial-inlining): Same.
15769         (-finline-functions-called-once): Same.
15770         (-freorder-blocks-and-partition): Same.
15772 2018-04-09  Jan Hubicka  <jh@suse.cz>
15774         PR rtl/84058
15775         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15776         jumps; choose last target that matches the criteria (i.e.
15777         no partition changes for non-crossing jumps).
15778         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15779         support for redirecting crossing jumps to non-crossing.
15781 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
15783         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15784         also for naked functions.
15786 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
15788         * config/arc/arc.md (add_shift): New pattern.
15789         (add_shift2): Likewise.
15790         (sub_shift): Likewise.
15791         (sub_shift_cmp0_noout): Likewise.
15792         (compare_si_ashiftsi): Likewise.
15793         (xbfu_cmp0_noout): New combine pattern.
15794         (xbfu_cmp0"): Likewise.
15795         (movsi_set_cc_insn): Place the predicable variant first.
15796         (commutative_binary_cmp0_noout): Remove clobber.
15797         (commutative_binary_cmp0): New pattern.
15798         (noncommutative_binary_cmp0): Likewise.
15799         (noncommutative_binary_cmp0_noout): Likewise.
15800         (noncommutative_binary_comparison_result_used): Removed.
15801         (rsub_cmp0): New pattern.
15802         (rsub_cmp0_noout): Likewise.
15803         (extzvsi): Changed, keep only meaningful variants.
15804         (SQH, SEZ): New iterators.
15805         (SQH_postfix): New mode attribute.
15806         (SEZ_prefix): New code attribute.
15807         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15808         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15809         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15810         of numerical value.
15811         (noncommutative_operator): Check the availability of barrel
15812         shifter option.
15814 2018-04-09  Richard Biener  <rguenther@suse.de>
15816         PR tree-optimization/85284
15817         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15818         Only use the niter constraining form of simple_iv when the exit
15819         is always executed.
15821 2018-04-09  Tom de Vries  <tom@codesourcery.com>
15823         PR target/84041
15824         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15825         (define_expand "*memory_barrier"): New define_expand.
15826         (define_insn "memory_barrier"): New insn.
15828 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15830         PR rtl-optimization/80463
15831         PR rtl-optimization/83972
15832         PR rtl-optimization/83480
15834         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15835         correct producer for the insn.
15836         (tidy_control_flow): Fixup seqnos in case of debug insns.
15838 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15840         PR rtl-optimization/83913
15842         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15843         different sched-times when merging exprs.
15845 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15847         PR rtl-optimization/83962
15849         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15850         tidy_fallthru_edge and tidy_control_flow.
15852 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15854         PR rtl-optimization/83530
15856         * sel-sched.c (force_next_insn): New global variable.
15857         (remove_insn_for_debug): When force_next_insn is true, also leave only
15858         next insn in the ready list.
15859         (sel_sched_region): When the region wasn't scheduled, make another pass
15860         over it with force_next_insn set to 1.
15862 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15864         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15865         into tm_file.
15866         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15867         for interrupt control.
15868         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15869         functions for interrupt control.
15870         * config/nds32/nds32-intrinsic.md: Likewise.
15871         * config/nds32/nds32_intrinsic.h: Likewise.
15872         * config/nds32/nds32.h (nds32_builtins): Likewise.
15874 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15876         * config/nds32/nds32.c (nds32_init_machine_status,
15877         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15878         strict_aligned_p field.
15879         (nds32_expand_to_rtl_hook): New function.
15880         (TARGET_EXPAND_TO_RTL_HOOK): Define.
15881         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15883 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15884             Chung-Ju Wu  <jasonwucj@gmail.com>
15886         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15887         * config/nds32/nds32-n7.md: New file.
15888         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15889         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15890         pipeline.
15891         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15892         * config/nds32/nds32.md (pipeline_model): Add n7.
15893         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15894         * config/nds32/pipelines.md: Include n7 settings.
15896 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15897             Chung-Ju Wu  <jasonwucj@gmail.com>
15899         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15900         * config/nds32/nds32-e8.md: New file.
15901         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15902         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15903         pipeline.
15904         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15905         * config/nds32/nds32.md (pipeline_model): Add e8.
15906         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15907         * config/nds32/pipelines.md: Include e8 settings.
15909 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15910             Chung-Ju Wu  <jasonwucj@gmail.com>
15912         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15913         * config/nds32/nds32-n8.md: New file.
15914         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15915         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15916         pipeline.
15917         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15918         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15919         * config/nds32/nds32.md (pipeline_model): Add n8.
15920         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15921         * config/nds32/pipelines.md: Include n8 settings.
15923 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15924             Chung-Ju Wu  <jasonwucj@gmail.com>
15926         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15927         * config/nds32/nds32-n9-2r1w.md: New file.
15928         * config/nds32/nds32-n9-3r2w.md: New file.
15929         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15930         nds32_register_ports): New or modify for cpu n9.
15931         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15932         pipeline.
15933         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15934         * config/nds32/nds32-utils.c: New file.
15935         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15936         TARGET_MUL_SLOW): Define.
15937         * config/nds32/nds32.md (pipeline_model): New attribute.
15938         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15939         New options that support cpu n9.
15940         * config/nds32/pipelines.md: Include n9 settings.
15941         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15943 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15945         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15946         information if necessary.
15947         (output_cond_branch_compare_zero): Likewise.
15948         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15949         (nds32_target_alignment): Refine for alignment.
15950         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15951         (FUNCTION_BOUNDARY): Modify.
15952         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15953         align case.
15954         * config/nds32/nds32.opt (malways-align, malign-functions): New.
15956 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15958         * config/nds32/constants.md (unspec_volatile_element): Add values for
15959         TLB operation and data prefetch.
15960         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15961         functions for TLB operation and data prefetch.
15962         * config/nds32/nds32-intrinsic.md: Likewise.
15963         * config/nds32/nds32_intrinsic.h: Likewise.
15964         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15965         (nds32_print_operand): Likewise.
15966         * config/nds32/nds32.h (nds32_builtins): Likewise.
15968 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15969         Andrew Pinski <pinsika@gcc.gnu.org>
15971         PR middle-end/82976
15972         * match.pd: Use constant_boolean_node of correct type instead of
15973         boolean_true_node or boolean_false_node for simplifying
15974         pointer comparisons to zero.
15976 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15978         PR tree-optimization/80021
15979         * tree.c (verify_type_variant): Make error call in verify_variant_match
15980         translatable and remove final full stop.
15982 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15984         * config/nds32/constants.md (unspec_volatile_element): Add
15985         UNSPEC_VOLATILE_EH_RETURN.
15986         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15987         nds32_output_stack_pop): Support dwarf exception handling process.
15988         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15989         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15990         exception handling process.
15991         (nds32_compute_stack_frame): Likewise.
15992         (nds32_return_addr_rtx): Likewise.
15993         (nds32_initial_elimination_offset): Likewise.
15994         (nds32_expand_prologue): Likewise.
15995         (nds32_expand_epilogue): Likewise.
15996         (nds32_dynamic_chain_address): New function.
15997         * config/nds32/nds32.h (machine_function): Add fields for dwarf
15998         exception handling.
15999         (DYNAMIC_CHAIN_ADDRESS): Define.
16000         (EH_RETURN_DATA_REGNO): Define.
16001         (EH_RETURN_STACKADJ_RTX): Define.
16002         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
16003         patterns for dwarf exception handling.
16005 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16007         * config/nds32/nds32.h: Clean up obsolete macros.
16009 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16011         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16012         Add enum values for particular instructions.
16013         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16014         particular intrinsic functions.
16015         * config/nds32/nds32-intrinsic.md: Likewise.
16016         * config/nds32/nds32_intrinsic.h: Likewise.
16017         * config/nds32/nds32.h (nds32_builtins): Likewise.
16018         * config/nds32/nds32.md (type): Add pbsad and pbsada.
16019         (btst, ave): New patterns for particular instructions.
16021 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16023         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16024         Add enum values for atomic load/store and memory sync.
16025         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
16026         and memory sync.
16027         * config/nds32/nds32-intrinsic.md: Likewise.
16028         * config/nds32/nds32_intrinsic.h: Likewise.
16029         * config/nds32/nds32.h (nds32_builtins): Likewise.
16031 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
16033         PR tree-optimization/85257
16034         * fold-const.c (native_encode_vector): If not all elts could fit
16035         and off is -1, return 0 rather than offset.
16036         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
16037         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
16038         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
16039         adjust buffer in native_interpret_expr call.
16041 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16043         * config/nds32/constants.md (unspec_volatile_element): Add cache
16044         control enum values.
16045         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
16046         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
16047         * config/nds32/nds32.c (nds32_cctl_names): New.
16048         (nds32_print_operand): Handle cache control register names.
16049         * config/nds32/nds32.h (nds32_builtins): New enum values.
16050         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16051         macros.
16052         * config/nds32/nds32.md (type): Add mmu.
16053         * config/nds32/pipelines.md (simple_insn): Add mmu.
16055 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16057         * config/nds32/nds32.md (type): Remove call.
16058         * config/nds32/pipelines.md (simple_insn): Likewise.
16060 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16062         * config/nds32/constants.md (unspec_volatile_element): Add
16063         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16064         UNSPEC_VOLATILE_FMFCFG.
16065         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16066         description for fmfcfg and fmfcsr.
16067         (bdesc_1arg): Add fmtcsr.
16068         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16069         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16070         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16071         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16072         unspec_fmfcfg): New patterns.
16073         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16074         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16075         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16076         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16077         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16078         __nds32__fmfcfg): Define.
16080 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
16082         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16083         intrinsic register names.
16084         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16085         intrinsic register enum values and macros.
16087 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
16089         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16090         for load/store addressing form.
16091         (nds32_print_operand_address): Likewise.
16093 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
16095         PR target/85196
16096         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16097         based on LABEL_REF.  Remove useless assertion.
16098         (pic_address_needs_scratch): Fix formatting.
16099         (sparc_legitimize_pic_address): Minor tweaks.
16100         (sparc_delegitimize_address): Adjust assertion accordingly.
16101         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16102         into symbolic_operand.
16103         (movsi_high_pic_label_ref): Likewise.
16104         (movsi_lo_sum_pic_label_ref): Likewise.
16105         (movdi_pic_label_ref): Likewise.
16106         (movdi_high_pic_label_ref): Likewise.
16107         (movdi_lo_sum_pic_label_ref): Likewise.
16109 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
16111         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16112         custom LIB_SPEC setup.
16114 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
16115             Kito Cheng  <kito.cheng@gmail.com>
16117         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16118         * config/riscv/freebsd.h: New.
16120 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
16122         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16123         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16124         file.
16126 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
16127             Kito Cheng  <kito.cheng@gmail.com>
16129         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16130         nds32_output_call, nds32_symbol_binds_local_p): New functions.
16131         * config/nds32/nds32-protos.h (nds32_output_call,
16132         nds32_output_return): Declare.
16133         * config/nds32/nds32.md: Refine all the call and return patterns.
16135 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
16137         PR debug/85252
16138         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16139         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16141         PR rtl-optimization/84872
16142         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16143         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16144         EDGE_CROSSING edge.
16146 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
16148         * expr.c (copy_blkmode_to_reg): Revert 254862.
16149         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16151 2018-04-06  Richard Biener  <rguenther@suse.de>
16153         PR middle-end/85244
16154         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16155         after seeing a component reference with an adjacent field.  Treat
16156         refs to arrays at struct end of external decls similar to
16157         refs to unconstrained commons.
16159 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
16161         PR sanitizer/85213
16162         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16163         look through SAVE_EXPRs with non-side-effects argument.  Adjust
16164         recursive calls.
16165         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16166         save_p here.
16168 2018-04-06  Richard Biener  <rguenther@suse.de>
16170         PR middle-end/85180
16171         * alias.c (find_base_term): New wrapper around find_base_term
16172         unwinding CSELIB_VAL_PTR changes.
16173         (find_base_term): Do not restore CSELIB_VAL_PTR during the
16174         recursion.
16176 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16178         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16179         instructions.
16180         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16181         constant definitions.
16182         ("nop"): lr 0,0 -> nopr r0
16183         ("nop_lr0", "nop_lr1"): New insn definitions.
16185 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
16187         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16188         NDS32_V3PUSH_AVAILABLE_P macro.
16190 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
16191             Chung-Ju Wu  <jasonwucj@gmail.com>
16193         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16194         (nds32*-*-*): Add float and fpu_config into supported_defaults.
16195         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16196         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16197         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16198         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16199         * config/nds32/constraints.md: New constraints and checking for hard
16200         float configuration.
16201         * config/nds32/iterators.md: New mode iterator and attribute for hard
16202         float configuration.
16203         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16204         patterns.
16205         * config/nds32/nds32-fpu.md: New file.
16206         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16207         deal with hard float code generation.
16208         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16209         ARCH_V3S.
16210         (abi_type, float_reg_number): New enum type.
16211         * config/nds32/nds32-predicates.c: New predicates for hard float.
16212         * config/nds32/nds32-protos.h: Declare functions for hard float.
16213         * config/nds32/nds32.c: Implementation for hard float configuration.
16214         * config/nds32/nds32.h: Definitions for hard float configuration.
16215         * config/nds32/nds32.md: Include hard float machine description and
16216         modify patterns for hard float configuration.
16217         * config/nds32/nds32.opt: New options for hard float configuration.
16218         * config/nds32/predicates.md: New predicates for hard float
16219         configuration.
16221 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
16223         * common/config/nds32/nds32-common.c
16224         (nds32_option_optimization_table): Enable -mreleax-hint by default.
16226 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
16228         PR middle-end/85195
16229         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16230         CONSTRUCTOR_ELT (ctor, ...)->value.
16232 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
16234         PR target/85193
16235         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16237 2018-04-05  Tom de Vries  <tom@codesourcery.com>
16239         PR target/85204
16240         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16241         cond jump.
16243 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
16244             Kito Cheng  <kito.cheng@gmail.com>
16246         * config/nds32/constraints.md (U33): Fine-tune checking condition.
16247         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16248         * config/nds32/nds32.h (nds32_16bit_address_type): Add
16249         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16251 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
16252             Kito Cheng  <kito.cheng@gmail.com>
16254         * config/nds32/constraints.md (Ufe): New memory constraint.
16255         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16256         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16257         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16258         operands.
16259         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16260         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16262 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16264         * config/nds32/nds32.md: Use optimize_size in the condition for
16265         alu-shift instructions.
16267 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16269         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16271 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16273         * config/nds32/nds32.md (negsi2): Refine pattern.
16275 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
16276             Chung-Ju Wu  <jasonwucj@gmail.com>
16278         * config/nds32/iterators.md (shift_rotate): New code iterator.
16279         (shift): New code attribute.
16280         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16281         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16282         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16283         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16284         bit-wise operations.
16285         (andsi3, *andsi3): Ditto.
16286         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16287         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16288         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16289         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16290         nds32_ior_operand, nds32_xor_operand): New predicates.
16292 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16294         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16295         (addsi3, subsi3): ... this.
16297 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16299         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16301 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16303         * config/nds32/nds32.md: Adjust indention.
16305 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
16307         * config/nds32/nds32.md (feature): New attribute.
16309 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
16311         * config/nds32/nds32.md (subtype): New attribute.
16313 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16315         PR target/85203
16316         * config/arm/arm-builtins.c (arm_expand_builtin): Change
16317         expansion to perform a bitwise AND of the argument followed by a
16318         boolean negation of the result.
16320 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
16322         PR rtl-optimization/84878
16323         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16324         the basic block.  Assert the use reference is not artificial and that
16325         it has an associated insn.
16327 2018-04-04  Michael Matz  <matz@suse.de>
16329         * builtins.c (compute_objsize): Pass correct operand
16330         to array_at_struct_end_p.
16332 2018-04-04  Richard Biener  <rguenther@suse.de>
16334         PR lto/85176
16335         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16336         from contexts for DINFO_LEVEL_TERSE and below.
16338 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
16340         * config/nds32/nds32-doubleword.md (move_<mode>): Require
16341         resiter_operand condition.
16342         * config/nds32/nds32.md (*move<mode>): Ditto.
16344 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
16345             Monk Chiang  <sh.chiang04@gmail.com>
16347         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16349 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16351         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16353 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16354             Kito Cheng  <kito.cheng@gmail.com>
16356         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16357         nds32_cond_code_str, output_cond_branch,
16358         output_cond_branch_compare_zero, nds32_expand_cbranch,
16359         nds32_expand_cstore, nds32_expand_movcc,
16360         nds32_output_cbranchsi4_equality_zero,
16361         nds32_output_cbranchsi4_equality_reg,
16362         nds32_output_cbranchsi4_equality_reg_or_const_int,
16363         nds32_output_cbranchsi4_greater_less_zero: New functions.
16364         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16365         nds32_expand_cstore, nds32_expand_movcc,
16366         nds32_output_cbranchsi4_equality_zero,
16367         nds32_output_cbranchsi4_equality_reg,
16368         nds32_output_cbranchsi4_equality_reg_or_const_int,
16369         nds32_output_cbranchsi4_greater_less_zero): Declare.
16370         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16371         nds32_rimm11s_operand): New predicates.
16372         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16373         * config/nds32/nds32.md: Rewrite all the branch and conditional move
16374         patterns.
16376 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
16378         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16379         * config/nds32/nds32.md: Ditto.
16380         * config/nds32/pipelines.md: Ditto.
16382 2018-04-04  Richard Biener  <rguenther@suse.de>
16384         PR tree-optimization/85168
16385         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16386         propagating abnormals.
16388 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16390         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16392 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16393             Kito Cheng  <kito.cheng@gmail.com>
16395         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16396         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16397         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16398         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16399         * config/nds32/nds32.md (sibcall_internal): New.
16400         (sibcall_register): Remove.
16401         (sibcall_immediate): Remove.
16402         (sibcall_value_internal): New.
16403         (sibcall_value_register): Remove.
16404         (sibcall_value_immediate): Remove.
16405         * config/nds32/predicates.md (nds32_general_register_operand): New.
16406         (nds32_call_address_operand): New.
16408 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
16410         PR rtl-optimization/85167
16411         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16412         bb_defs if *split_p, instead preinitialize it to NULL.
16414         PR tree-optimization/85156
16415         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16416         evaluating the argument multiple times.
16418 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
16420         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16421         than vector.
16422         (_mm_cvtpd_ps): Likewise.
16423         (_mm_cvttpd_epi32): Likewise.
16424         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16425         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16426         vector, pixel, and bool following altivec.h include.
16428 2018-04-03  Martin Sebor  <msebor@redhat.com>
16430         * doc/extend.texi (Common Function Attributes): Clarify.
16431         (const attribute): Likewise.
16432         (pure attribute): Likewise.
16434 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
16436         PR target/85169
16437         * config/i386/i386.c (ix86_expand_vector_set): Use
16438         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
16440 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
16442         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16443         instructions when changing rounding bits to preserve precision bits
16444         in the x87 control word.
16446 2018-04-03  Martin Liska  <mliska@suse.cz>
16448         PR tree-optimization/82491
16449         * rtl.h (strip_offset_and_add): Replace += suboffset with
16450         poly_uint64 () + suboffset.
16452 2018-03-29  Martin Liska  <mliska@suse.cz>
16453             Martin Jambor  <mjambor@suse.cz>
16455         PR ipa/84947
16456         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16457         param_type is not an integral or pointer type.
16459 2018-04-03  Richard Biener  <rguenther@suse.de>
16461         * sese.h (recompute_all_dominators): Remove.
16463 2018-04-02  Martin Sebor  <msebor@redhat.com>
16465         * doc/invoke.texi (-Wrestrict): Fix typos.
16467 2018-04-02  Jim Wilson  <jimw@sifive.com>
16469         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16470         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16471         (<optab>di3, <optab>si3_extend): Likewise.
16472         (<optab>si3_mask, <optab>si3_mask_1): New.
16473         (<optab>di3_mask, <optab>di3_mask_1): New.
16474         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16475         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16476         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16478 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
16480         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16481         example.
16483 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16485         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16486         (nds32_canonicalize_comparison): New function.
16488 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16489             Kito Cheng  <kito.cheng@gmail.com>
16490             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
16492         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16493         * config/nds32/constants.md (unspec_volatile_element): Add
16494         UNSPEC_VOLATILE_RELAX_GROUP.
16495         * config/nds32/nds32-relax-opt.c: New file.
16496         * config/nds32/nds32-predicates.c
16497         (nds32_symbol_load_store_p): New function.
16498         * config/nds32/nds32-protos.h
16499         (nds32_symbol_load_store_p): Declare function.
16500         (make_pass_nds32_relax_opt): Declare new rtl pass function.
16501         * config/nds32/nds32.c
16502         (nds32_register_pass): New function to register pass.
16503         (nds32_register_passes): New function to register passes.
16504         * config/nds32/nds32.md (relax_group): New pattern.
16505         * config/nds32/nds32.opt (mrelax-hint): New option.
16506         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16508 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
16510         * config/nds32/t-nds32: Modify files dependency.
16512 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16514         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16515         (PROFILE_HOOK): Define its implementation.
16517 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16519         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16520         type and 32-bit size.
16522 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
16524         PR middle-end/85090
16525         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16526         (V_128_256): New mode iterator.
16527         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16528         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16529         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16530         of V.
16531         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16532         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16534 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
16536         PR target/83315
16537         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16538         NaN inputs correctly.
16540 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
16542         PR target/80546
16543         * config/rs6000/vsx.md (??r): New mode attribute.
16544         (*vsx_mov<mode>_64bit): Use it.
16545         (*vsx_mov<mode>_32bit): Likewise.
16547 2018-03-30  Martin Sebor  <msebor@redhat.com>
16549         PR tree-optimization/84818
16550         * builtins.c (check_access): Use warning_n.
16552 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16554         PR target/83822
16555         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16556         condition.
16557         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16558         condition.
16560 2018-03-30  Julia Koval  <julia.koval@intel.com>
16562         PR target/84413
16563         * x86-tune.def (movx, partial_reg_dependency): Enable for
16564         m_SKYLAKE_AVX512.
16566 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
16568         PR inline-asm/84985
16569         * lra-constraints.c (process_alt_operands): Move setting
16570         this_alternative_matches below.
16572 2018-03-29  Martin Liska  <mliska@suse.cz>
16574         PR lto/84995.
16575         * doc/invoke.texi: Document how LTO works with debug info.
16576         Describe auto-load support of binutils.  Mention 'x86-64'
16577         as valid option value of -march option.
16579 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
16581         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16583         PR c/85094
16584         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16585         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16586         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16587         checking.
16589 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
16591         PR target/84912
16592         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16593         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16594         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16595         for RS6000_BTM_POWERPC64.
16596         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16597         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16598         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16599         definition.
16600         (DIVDE): Use it.
16601         (DIVDEU): Likewise.
16603 2018-03-28  Carl Love  <cel@us.ibm.com>
16605         Revert
16606         2017-09-27  Carl Love  <cel@us.ibm.com>
16608         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16609         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16610         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16611         fctiw instruction.
16613 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16615         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16616         instead of __vector bool.
16617         (_mm_max_pu8): Likewise.
16618         (_mm_min_pi16): Likewise.
16620 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
16622         PR target/84912
16623         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16624         (DIVWEUO): Likewise.
16625         (DIVDEO): Likewise.
16626         (DIVDEUO): Likewise.
16627         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16628         DIVWEUO and DIVDEUO.
16629         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16630         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16631         (div_extend): Likewise.
16632         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16633         builtin function.
16634         (__builtin_divweuo): Likewise.
16635         (__builtin_divdeo): Likewise.
16636         (__builtin_divdeuo): Likewise.
16638 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16640         PR target/85095
16641         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16642         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16644         PR tree-optimization/82004
16645         * gimple-match-head.c (optimize_pow_to_exp): New function.
16646         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16647         Don't fold to exp if optimize_pow_to_exp is false.
16649 2018-03-28  Martin Liska  <mliska@suse.cz>
16651         PR other/84819
16652         * calls.c (initialize_argument_information): Fix trailing space.
16653         * common.opt: Fix typo and provide better explanation for
16654         -fsanitize-coverage option.
16655         * config/i386/i386.opt: Fix typo.
16657 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16658             Martin Liska  <mliska@suse.cz>
16660         PR sanitizer/85081
16661         * gimplify.c (asan_poison_variable): Don't do the check for
16662         gimplify_omp_ctxp here.
16663         (gimplify_decl_expr): Do it here.
16664         (gimplify_target_expr): Likewise.
16666 2018-03-28  Martin Liska  <mliska@suse.cz>
16668         PR target/84988
16669         * config/i386/i386.c (ix86_function_arg_advance): Do not call
16670         chkp_type_bounds_count if MPX is not enabled.
16672 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
16674         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16676 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
16678         PR target/84914
16679         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16680         function to create the function decl for complex long double
16681         multiply and divide for -mabi=ieeelongdouble.
16682         (init_float128_ieee): Call it.
16684 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
16686         PR target/85044
16687         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16688         -fcf-protection=branch -mibt.
16689         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16691 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16693         PR target/81863
16694         * config/arm/arm.c (arm_valid_symbolic_address): Handle
16695         arm_word_relocations.
16697 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
16699         PR target/85056
16700         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16701         extern array declarations.
16703 2018-03-27  Richard Biener  <rguenther@suse.de>
16705         PR middle-end/84067
16706         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16707         explicit single_use checks.
16709 2018-03-27  Richard Biener  <rguenther@suse.de>
16711         PR tree-optimization/85082
16712         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16713         Valueize the VUSE.
16715 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16717         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16718         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16719         Turn on fasynchronous-unwind-tables and funwind-tables.
16721 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
16723         PR target/85073
16724         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16725         (*bmi_blsr_<mode>_ccz): Ditto.
16727 2018-03-26  Tom de Vries  <tom@codesourcery.com>
16729         PR tree-optimization/85063
16730         * omp-general.c (offloading_function_p): New function.  Factor out
16731         of ...
16732         * omp-offload.c (pass_omp_target_link::gate): ... here.
16733         * omp-general.h (offloading_function_p): Declare.
16734         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16735         with attribute omp declare target for offloading functions.
16737 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
16739         PR tree-optimization/84005
16740         * tree-data-ref.h (get_base_for_alignment): Declare.
16741         * tree-data-ref.c (get_base_for_alignment_1): New function.
16742         (get_base_for_alignment): Likewise.
16743         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16744         get_base_for_alignment to find a suitable base object, instead
16745         of always using drb->base_address.
16747 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16749         PR inline-asm/85022
16750         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16751         known size by default.
16753 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
16755         PR inline-asm/85030
16756         * lra-constraints.c (process_alt_operands): Don't match BLKmode
16757         and non BLKmode operands.
16759 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16761         PR target/85026
16762         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16763         Clean up attributes.
16765 2018-03-23  Richard Biener  <rguenther@suse.de>
16767         PR debug/85020
16768         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16769         we are going to emit early debug for LTO.
16771 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16773         PR inline-asm/85034
16774         * function.c (match_asm_constraints_1): Don't optimize if input
16775         doesn't satisfy general_operand predicate for output's mode.
16777         PR inline-asm/85022
16778         * alias.c (write_dependence_p): Don't require for x_canonicalized
16779         non-VOIDmode if x has VOIDmode.
16781         PR sanitizer/85029
16782         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16783         just don't try to optimize it rather than assert it never happens.
16785 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16787         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16788         macro expansions for definition of ST_INTERNAL_<mode> and
16789         LD_INTERNAL_<mode> builtins.
16790         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16791         Remove prototype.
16792         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16793         function.
16794         (altivec_expand_st_builtin): Likewise.
16795         (altivec_expand_builtin): Remove calls to deleted functions.
16796         (rs6000_address_for_altivec): Delete this function.
16797         * config/rs6000/vector.md: Remove expands for
16798         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16800 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
16802         PR target/84826
16803         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16804         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16805         re-computing once computed.
16806         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16807         (arm_init_machine_status): Initialize
16808         machine->static_chain_stack_bytes.
16810 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16812         PR target/84760
16813         * doc/extend.texi: Add four new prototypes for vec_ld.
16814         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16815         definitions for more logical presentation.
16816         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16817         entries for V1TI variants of __builtin_altivec_ld builtin.
16818         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16819         handling of V1TI variant of LVX icode pattern.
16820         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16821         (rs6000_gimple_fold_builtin): Likewise.
16822         (altivec_init_builtins): Add code to define
16823         __builtin_altivec_lvx_v1ti function.
16825 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16827         PR inline-asm/84941
16828         * function.c (match_asm_constraints_1): Don't do the optimization
16829         if input isn't a REG, SUBREG, MEM or constant.
16831 2018-03-22  Tom de Vries  <tom@codesourcery.com>
16833         PR tree-optimization/84956
16834         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16835         bb_has_abnormal_pred.
16837 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16839         PR sanitizer/85018
16840         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16841         DECL_INITIAL (decl) to decl at the end.
16842         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16843         adjust the comment.
16845 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
16847         * doc/extend.texi (__builtin_tgmath): Document when complex
16848         integer types are treated as _Complex _Float64.
16850 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16852         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16854 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16856         PR tree-optimization/84960
16857         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16858         if it is ENTRY block, move them into single succ of ENTRY in that case.
16860 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
16862         PR tree-optimization/84811
16863         * poly-int.h (poly_span_traits): Remove the T3 parameter and
16864         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16865         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16866         (known_subrange_p): Update accordingly.  Cast each value involved
16867         in the size comparison, rather than casting the result of the
16868         subtraction.
16870 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16872         PR tree-optimization/84982
16873         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16874         by flipping the least significant bit rather than all bits from
16875         bitpos to bitpos + bitsize - 1.
16877 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16879         * doc/extend.texi (Deprecated Features): Remove mention of
16880         long-deleted deprecations.
16882 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16884         PR jit/84288
16885         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16886         * configure: Regenerate.
16888 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16890         PR tree-optimization/83126
16891         * tree-parloops.c (num_phis): New function.
16892         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16894 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16896         * doc/extend.texi (Deprecated Features): Update deprecated flags,
16897         mention anon-struct/union members and trailing attributes.
16899 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
16901         PR tree-optimization/84969
16902         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16903         builtin memset partitions if they set different rhs values.
16905 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16907         PR rtl-optimization/84989
16908         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16909         VEC_DUPLICATE with scalar result mode.
16911 2018-03-21  Martin Liska  <mliska@suse.cz>
16913         PR ipa/84963
16914         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16915         not intended return statement.
16917 2018-03-21  Martin Liska  <mliska@suse.cz>
16919         PR target/84988
16920         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16921         (chkp_find_bound_slots_1): Limit number of iterations.
16923 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
16925         PR target/84838
16926         * Minor grammar fixes for x86 options.
16928 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16930         PR debug/84875
16931         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16932         holding REG_CFA_RESTORE notes, instead turn them into a USE.
16934 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
16936         PR target/83789
16937         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16938         (altivec_lvx_<mode>_1op): Likewise.
16939         (altivec_stvx_<mode>_2op): Likewise.
16940         (altivec_stvx_<mode>_1op): Likewise.
16941         (altivec_lvx_<VM2:mode>): New define_expand.
16942         (altivec_stvx_<VM2:mode>): Likewise.
16943         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16944         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16945         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16946         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16947         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16948         (rs6000_gen_lvx): Likewise.
16949         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16950         (altivec_expand_stv_builtin): Likewise.
16951         (altivec_expand_builtin): Likewise.
16952         * config/rs6000/vector.md: Likewise.
16954 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16956         PR target/82518
16957         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16958         BYTES_BIG_ENDIAN.
16960 2018-03-20  Richard Biener  <rguenther@suse.de>
16962         PR target/84986
16963         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16964         sign-conversions as zero, fall back to standard scalar_stmt
16965         cost for the rest.
16967 2018-03-20  Martin Liska  <mliska@suse.cz>
16969         PR ipa/84825
16970         * predict.c (rebuild_frequencies): Handle case when we have
16971         PROFILE_ABSENT, but flag_guess_branch_prob is false.
16973 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16975         PR target/84990
16976         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16977         flag_section_anchors.
16978         * varasm.c (use_blocks_for_decl_p): Remove hack for
16979         dw2_force_const_mem.
16981         PR target/84845
16982         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16983         to ...
16984         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
16985         be created, use lowpart_subreg of operands[0] rather than operands[0]
16986         itself.
16987         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16988         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16989         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16990         and n constraint instead of aarch64_shift_imm_di and Usd.
16991         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16992         (*aarch64_<optab>_reg_minus<mode>3): ... this.
16994 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
16996         PR target/82989
16997         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16998         to favor GPR over NEON registers.
16999         (<shift>di3_neon): Likewise.
17001 2018-03-20  Tom de Vries  <tom@codesourcery.com>
17003         PR target/84952
17004         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
17005         (nvptx_process_pars): Emit bar.sync asap and alap.
17007 2018-03-20  Tom de Vries  <tom@codesourcery.com>
17009         PR target/84954
17010         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
17011         seen_label if seen_label is already set.
17013 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
17015         PR target/84945
17016         * config/i386/i386.c (fold_builtin_cpu): For features above 31
17017         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
17018         Use 1U instead of 1.  Formatting fixes.
17020         PR c/84953
17021         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
17022         instead of TREE_TYPE (s1) for the return value.
17024 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
17026         PR tree-optimization/84946
17027         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
17028         bitsize + bitsize in poly_uint64 rather than poly_int64.
17030         PR sanitizer/78651
17031         * dwarf2asm.c: Include fold-const.c.
17032         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
17033         of decl rather than decl itself.
17035         PR rtl-optimization/84643
17036         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
17038 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
17040         PR sanitizer/78651
17041         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
17042         calling assemble_variable.
17044 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
17046         PR target/81647
17047         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17048         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17050 2018-03-19  Jim Wilson  <jimw@sifive.com>
17052         PR bootstrap/84856
17053         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17054         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17055         (riscv_first_stack_step): Likewise.
17056         (riscv_option_override): Use STACK_BOUNDARY instead of
17057         MIN_STACK_BOUNDARY.
17058         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17059         MIN_STACK_BOUNDARY.
17060         (BIGGEST_ALIGNMENT): Set to 128.
17061         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17062         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17063         STACK_BOUNDARY.
17065 2018-03-19  Richard Biener  <rguenther@suse.de>
17067         PR tree-optimization/84933
17068         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17069         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17071 2018-03-19  Richard Biener  <rguenther@suse.de>
17073         PR tree-optimization/84859
17074         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17075         (cond_if_else_store_replacement): Perform sinking operation on
17076         single-store BBs regardless of MAX_STORES_TO_SINK setting.
17077         Generalize what a BB with a single eligible store is.
17079 2018-03-19  Richard Biener  <rguenther@suse.de>
17081         PR tree-optimization/84929
17082         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17083         chrec_is_positive against non-chrec arg.
17085 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
17087         PR target/84711
17088         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17090 2018-03-18  Martin Liska  <mliska@suse.cz>
17092         PR rtl-optimization/84635
17093         * regrename.c (build_def_use): Use matches_mode only when
17094         matches >= 0.
17096 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
17098         PR tree-optimization/84913
17099         * tree-vect-loop.c (vectorizable_reduction): Don't try to
17100         vectorize chains of COND_EXPRs.
17102 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
17104         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17106 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
17108         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17110 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
17112         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17114 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
17115             Kito Cheng  <kito.cheng@gmail.com>
17117         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17118         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17119         (nds32_adjust_reg_alloc_order): New function.
17120         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17122 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
17124         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17125         nds32_print_operand, nds32_print_operand_address): Use
17126         HOST_WIDE_INT_PRINT_DEC instead.
17128 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
17130         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17132 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
17134         PR target/84902
17135         * config/i386/i386.c (initial_ix86_tune_features,
17136         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17137         unsigned long long.
17138         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17139         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17140         rather than 1u << ix86_tune.  Formatting fix.
17141         (ix86_option_override_internal): Change ix86_arch_mask from
17142         unsigned int to unsigned HOST_WIDE_INT, initialize to
17143         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17144         (ix86_function_specific_restore): Likewise.
17146 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
17148         PR target/84899
17149         * postreload.c (reload_combine_recognize_pattern): Perform
17150         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17151         truncate_int_for_mode the result for the destination's mode.
17153         PR c/84909
17154         * hsa-gen.c (mem_type_for_type): Fix comment typo.
17155         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17156         Likewise.
17157         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17158         Likewise.
17160 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
17162         PR target/84876
17163         * lra-assigns.c (lra_split_hard_reg_for): Don't use
17164         regno_allocno_class_array and sorted_pseudos.
17165         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17166         insns where regno is used.
17168 2018-03-16  Martin Liska  <mliska@suse.cz>
17170         PR ipa/84833
17171         * multiple_target.c (create_dispatcher_calls): Redirect
17172         reference in the symbol table.
17174 2018-03-16  Martin Liska  <mliska@suse.cz>
17176         PR ipa/84722
17177         * multiple_target.c (create_dispatcher_calls): Redirect also
17178         an alias.
17180 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
17182         PR c++/79937
17183         PR c++/82410
17184         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17185         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17186         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17188 2018-03-16  Julia Koval  <julia.koval@intel.com>
17190         * doc/invoke.texi (Skylake Server): Add CLWB.
17191         Cannonlake): Remove CLWB.
17193 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
17195         PR tree-optimization/84841
17196         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17197         1 << 3.
17198         (FLOAT_ONE_CONST_TYPE): Define.
17199         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17200         (sort_by_operand_rank): Put entries with higher constant_type last
17201         rather than first to match comments.
17203 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
17205         * config/nios2/nios2.md (movsi_internal): Fix thinko in
17206         split predicate.
17208 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
17210         PR c++/79085
17211         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17212         check and use address of target always.
17214 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
17216         PR target/84574
17217         * config/i386/i386.c (indirect_thunk_needed): Update comments.
17218         (indirect_thunk_bnd_needed): Likewise.
17219         (indirect_thunks_used): Likewise.
17220         (indirect_thunks_bnd_used): Likewise.
17221         (indirect_return_needed): New.
17222         (indirect_return_bnd_needed): Likewise.
17223         (output_indirect_thunk_function): Add a bool argument for
17224         function return.
17225         (output_indirect_thunk_function): Don't generate alias for
17226         function return thunk.
17227         (ix86_code_end): Call output_indirect_thunk_function to generate
17228         function return thunks.
17229         (ix86_output_function_return): Set indirect_return_bnd_needed
17230         and indirect_return_needed instead of indirect_thunk_bnd_needed
17231         and indirect_thunk_needed.
17233 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
17235         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17236         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17237         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17239 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
17240             Paul Hua <paul.hua.gm@gmail.com>
17242         PR c/84852
17243         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17245 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
17247         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17248         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17249         resp. SFmode cases.
17251 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
17253         PR target/84711
17254         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17255         instead of GET_MODE_SIZE when comparing Units.
17257 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
17259         PR target/68256
17260         * varasm.c (hash_section): Return an unchangeble hash value
17261         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17262         Return !aarch64_can_use_per_function_literal_pools_p ().
17264 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
17266         PR target/84860
17267         * optabs.c (emit_conditional_move): Pass address of cmode's copy
17268         rather than address of cmode as last argument to prepare_cmp_insn.
17270 2018-03-15  Julia Koval  <julia.koval@intel.com>
17272         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17273         F_AVX512VNNI, F_AVX512BITALG): New.
17275 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
17277         PR target/83451
17278         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
17279         insn for floating-point loads and stores.
17281 2018-03-14  Carl Love  <cel@us.ibm.com>
17283         * config/rs6000/rs6000-c.c: Add macro definitions for
17284         ALTIVEC_BUILTIN_VEC_PERMXOR.
17285         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17286         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17287         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17288         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17289         UNSPEC_VPERMXOR.
17290         * config/doc/extend.texi: Add prototypes for vec_permxor.
17292 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
17294         PR c/84852
17295         * diagnostic-show-locus.c (class layout_point): Convert m_line
17296         from int to linenum_type.
17297         (line_span::comparator): Use linenum "compare" function when
17298         comparing line numbers.
17299         (test_line_span): New function.
17300         (layout_range::contains_point): Convert param "row" from int to
17301         linenum_type.
17302         (layout_range::intersects_line_p): Likewise.
17303         (layout::will_show_line_p): Likewise.
17304         (layout::print_source_line): Likewise.
17305         (layout::should_print_annotation_line_p): Likewise.
17306         (layout::print_annotation_line): Likewise.
17307         (layout::print_leading_fixits): Likewise.
17308         (layout::annotation_line_showed_range_p): Likewise.
17309         (struct line_corrections): Likewise for field m_row.
17310         (line_corrections::line_corrections): Likewise for param "row".
17311         (layout::print_trailing_fixits): Likewise.
17312         (layout::get_state_at_point): Likewise.
17313         (layout::get_x_bound_for_row): Likewise.
17314         (layout::print_line): Likewise.
17315         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17316         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17317         * input.c (selftest::test_linenum_comparisons): New function.
17318         (selftest::input_c_tests): Call it.
17319         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17320         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17321         * selftest.h (ASSERT_GT): New macro.
17322         (ASSERT_GT_AT): New macro.
17323         (ASSERT_LT): New macro.
17324         (ASSERT_LT_AT): New macro.
17326 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
17328         PR rtl-optimization/84780
17329         * combine.c (distribute_links): Don't make a link based on pc_rtx.
17331 2018-03-14  Martin Liska  <mliska@suse.cz>
17333         * tree.c (record_node_allocation_statistics): Use
17334         get_stats_node_kind.
17335         (get_stats_node_kind): New function extracted from
17336         record_node_allocation_statistics.
17337         (free_node): Use get_stats_node_kind.
17339 2018-03-14  Richard Biener  <rguenther@suse.de>
17341         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17342         that the value-set of ANTIC_IN doesn't grow.
17344         Revert
17345         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17346         member.
17347         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17348         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17350 2018-03-14  Julia Koval  <julia.koval@intel.com>
17352         * config.gcc (icelake-client, icelake-server): New.
17353         (icelake): Remove.
17354         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17355         (initial_ix86_arch_features): Ditto.
17356         (PTA_SKYLAKE): Add SGX.
17357         (PTA_ICELAKE): Remove.
17358         (PTA_ICELAKE_CLIENT): New.
17359         (PTA_ICELAKE_SERVER): New.
17360         (ix86_option_override_internal): Split up icelake on icelake client and
17361         icelake server.
17362         (get_builtin_code_for_version): Ditto.
17363         (fold_builtin_cpu): Ditto.
17364         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17365         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17366         * config/i386/i386.h (processor_type): Ditto.
17367         * doc/invoke.texi: Ditto.
17369 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
17371         PR sanitizer/83392
17372         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17373         INTEGER_CST offset, add it together with bitpos / 8 and
17374         sign extend based on POINTER_SIZE.
17376         PR target/84844
17377         Revert
17378         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
17380         PR target/78090
17381         * config/i386/constraints.md (Yc): New register constraint.
17382         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17383         Use Yc constraint for alternative 2 of operand 0.  Remove
17384         preferred_for_speed attribute.
17386 2018-03-14  Richard Biener  <rguenther@suse.de>
17388         PR tree-optimization/84830
17389         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17390         with the old one to avoid oscillations.
17392 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
17394         PR target/83712
17395         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17396         pseudos.
17397         (assign_by_spills): Return a flag of reload assignment failure.
17398         Do not process the reload assignment failures.  Do not spill other
17399         reload pseudos if they has the same reg class.  Update n if
17400         necessary.
17401         (lra_assign): Add a return arg.  Set up from the result of
17402         assign_by_spills call.
17403         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17404         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17405         usage_insns if it is not NULL.
17406         (spill_hard_reg_in_range): New function.
17407         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17408         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17409         function prototypes.
17410         (lra_assign): Change prototype.
17411         * lra.c (lra): Add code to deal with fails by splitting hard reg
17412         live ranges.
17414 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
17416         * config/riscv/riscv.opt (mrelax): New option.
17417         * config/riscv/riscv.c (riscv_file_start): Emit ".option
17418         "norelax" when riscv_mrelax is disabled.
17419         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17421 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17423         PR target/84743
17424         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17425         reassociation for int modes.
17427 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17429         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17430         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17431         for big-endian.
17432         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17433         * config/aarch64/aarch64-sve.md
17434         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17435         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17436         (*extend<mode><Vwide>2): Rename to...
17437         (aarch64_sve_extend<mode><Vwide>2): ...this.
17438         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17439         renaming the old pattern to...
17440         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
17441         unsigned packs.
17442         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17443         define_expand, renaming the old pattern to...
17444         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17445         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17446         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17447         account when deciding which SVE instruction the optab should use.
17448         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17450 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17452         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17453         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17454         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17455         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17456         (tlsdesc_small_<mode>): Turn a define_expand and use
17457         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
17458         (tlsdesc_small_advsimd_<mode>): ...this.
17459         (tlsdesc_small_sve_<mode>): New pattern.
17461 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17463         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17464         (UNSPEC_UMUL_HIGHPART): New constants.
17465         (MUL_HIGHPART): New int iteraor.
17466         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17467         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17468         define_expand.
17469         (*<su>mul<mode>3_highpart): New define_insn.
17471 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17473         PR lto/84805
17474         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17475         incomplete types.
17477 2018-03-13  Martin Liska  <mliska@suse.cz>
17479         PR ipa/84658.
17480         * (sem_item_optimizer::sem_item_optimizer): Initialize new
17481         vector.
17482         (sem_item_optimizer::~sem_item_optimizer): Release it.
17483         (sem_item_optimizer::merge_classes): Register variable aliases.
17484         (sem_item_optimizer::fixup_pt_set): New function.
17485         (sem_item_optimizer::fixup_points_to_sets): Likewise.
17486         * ipa-icf.h: Declare new variables and functions.
17488 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
17490         PR middle-end/84834
17491         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17492         integer_pow2p@2 and test integer_pow2p in condition.
17493         (A < 0 ? C : 0): Similarly for @1.
17495         PR middle-end/84831
17496         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17497         characters starting at p contain '\0' character, don't look beyond
17498         that.
17500         PR target/84827
17501         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17502         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17504         PR target/84828
17505         * reg-stack.c (change_stack): Change update_end var from int to
17506         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17507         also call set_block_for_insn on the newly added insns and rescan.
17509         PR target/84786
17510         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17511         on the last operand.
17513         PR c++/84704
17514         * tree.c (stabilize_reference_1): Return save_expr (e) for
17515         STATEMENT_LIST even if it doesn't have side-effects.
17517 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
17519         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17521 2018-03-12  Renlin Li  <renlin.li@arm.com>
17523         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17524         aarch64_output_scalar_simd_mov_immediate.
17526 2018-03-12  Martin Sebor  <msebor@redhat.com>
17528         PR tree-optimization/83456
17529         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17530         for perfectly overlapping calls to memcpy.
17531         (gimple_fold_builtin_memory_chk): Same.
17532         (gimple_fold_builtin_strcpy): Handle no-warning.
17533         (gimple_fold_builtin_stxcpy_chk): Same.
17534         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17536 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
17538         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17539         parameter.  Use it for SFmode.
17540         (rs6000_function_arg_advance_1): Adjust.
17541         (rs6000_function_arg): Adjust.
17542         (rs6000_gimplify_va_arg): Pass false for that new parameter.
17544 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
17546         PR rtl-optimization/84169
17547         PR rtl-optimization/84780
17548         * combine.c (can_combine_p): Check for a 2-insn combination whether
17549         the destination register is used between the two insns, too.
17551 2018-03-12  Richard Biener  <rguenther@suse.de>
17553         PR tree-optimization/84803
17554         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17555         for refs DR analysis didn't process.
17557 2018-03-12  Richard Biener  <rguenther@suse.de>
17559         PR tree-optimization/84777
17560         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17561         force-vectorize loops ignore whether we are optimizing for size.
17563 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17565         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17566         (TARGET_MD_ASM_ADJUST): Define.
17568 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
17569             Kito Cheng  <kito.cheng@gmail.com>
17570             Chung-Ju Wu  <jasonwucj@gmail.com>
17572         * config/nds32/nds32.c (nds32_compute_stack_frame,
17573         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17574         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17575         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17576         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17577         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17578         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17579         * config/nds32/nds32.md (prologue, epilogue): Use macro
17580         NDS32_V3PUSH_AVAILABLE_P to do checking.
17582 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
17584         PR debug/58150
17585         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17586         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17587         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
17588         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
17589         addition of most attributes on !orig_type_die or the attribute not
17590         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17592 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17593             Chung-Ju Wu  <jasonwucj@gmail.com>
17595         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17596         __NDS32_VH__ macro.
17597         * config/nds32/nds32.opt (mvh): New option.
17599 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17600             Chung-Ju Wu  <jasonwucj@gmail.com>
17602         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17603         function.
17604         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17605         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17606         definition.
17608 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17609             Chung-Ju Wu  <jasonwucj@gmail.com>
17611         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17612         function.
17613         * config/nds32/nds32-multiple.md (strlensi): New pattern.
17614         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17616 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
17617             Kito Cheng  <kito.cheng@gmail.com>
17618             Chung-Ju Wu  <jasonwucj@gmail.com>
17620         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17621         UNSPEC_FFMISM and UNSPEC_FLMISM.
17622         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17623         for ffb, ffmism and flmism.
17624         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17625         (unspec_ffmism): Ditto.
17626         (unspec_flmism): Ditto.
17627         (nds32_expand_builtin_impl): Check if string extension is available.
17628         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17629         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17631 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
17633         Reverting patch:
17634         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17636         PR target/83712
17637         * lra-assigns.c (assign_by_spills): Return a flag of reload
17638         assignment failure.  Do not process the reload assignment
17639         failures.  Do not spill other reload pseudos if they has the same
17640         reg class.
17641         (lra_assign): Add a return arg.  Set up from the result of
17642         assign_by_spills call.
17643         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17644         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17645         usage_insns if it is not NULL.
17646         (spill_hard_reg_in_range): New function.
17647         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17648         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17649         function prototypes.
17650         (lra_assign): Change prototype.
17651         * lra.c (lra): Add code to deal with fails by splitting hard reg
17652         live ranges.
17654 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
17656         PR target/84807
17657         * config/i386/i386.opt: Replace Enforcment with Enforcement.
17659 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
17661         PR debug/84620
17662         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17663         (dw_val_node): Add val_symbolic_view.
17664         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17665         (symview_upper_bound): New.
17666         (new_line_info_table): Initialize symviews_since_reset.
17667         (dwarf2out_source_line): Count symviews_since_reset and set
17668         symview_upper_bound.
17669         (dw_val_equal_p): Handle symview.
17670         (add_AT_symview): New.
17671         (print_dw_val): Handle symview.
17672         (attr_checksum, attr_checksum_ordered): Likewise.
17673         (same_dw_val_p, size_of_die): Likewise.
17674         (value_format, output_die): Likewise.
17675         (add_high_low_attributes): Use add_AT_symview for entry_view.
17676         (dwarf2out_finish): Reset symview_upper_bound, clear
17677         zero_view_p.
17679 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
17681         PR target/83969
17682         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17683         Add strict argument and use it.
17684         (rs6000_split_multireg_move): Update for new strict argument.
17685         (mem_operand_gpr): Disallow all non-offsettable addresses.
17686         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17688 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
17690         PR target/84772
17691         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17692         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17693         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17695         PR c++/84767
17696         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17697         decl, use remap_type if we want to use the type.
17699 2018-03-09  Martin Sebor  <msebor@redhat.com>
17701         PR tree-optimization/84526
17702         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17703         Remove dead code.
17704         (builtin_access::generic_overlap): Be prepared to handle non-array
17705         base objects.
17707 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
17709         PR rtl-optimization/84682
17710         * lra-constraints.c (process_address_1): Check is_address flag
17711         for address constraints.
17712         (process_alt_operands): Likewise.
17713         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17714         preprocess_constraints.
17715         * recog.h (preprocess_constraints): Add oploc parameter.
17716         Adjust callers.
17717         * recog.c (preprocess_constraints): Test address_operand for
17718         CT_ADDRESS constraints.
17720 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17722         PR target/83712
17723         * lra-assigns.c (assign_by_spills): Return a flag of reload
17724         assignment failure.  Do not process the reload assignment
17725         failures.  Do not spill other reload pseudos if they has the same
17726         reg class.
17727         (lra_assign): Add a return arg.  Set up from the result of
17728         assign_by_spills call.
17729         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17730         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17731         usage_insns if it is not NULL.
17732         (spill_hard_reg_in_range): New function.
17733         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17734         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17735         function prototypes.
17736         (lra_assign): Change prototype.
17737         * lra.c (lra): Add code to deal with fails by splitting hard reg
17738         live ranges.
17740 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17742         PR target/83193
17743         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17744         Accept complain bool parameter.  Only emit errors if it is true.
17745         (arm_parse_cpu_option_name): Likewise.
17746         (arm_target_thumb_only): Adjust callers of the above.
17747         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17748         prototype to take a default true bool parameter.
17749         (arm_parse_arch_option_name): Likewise.
17751 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
17752             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
17754         PR jit/64089
17755         PR jit/84288
17756         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17757         * configure: Regenerate.
17758         * configure.ac ("linker --version-script option"): New.
17759         ("linker soname option"): New.
17761 2018-03-09  Richard Biener  <rguenther@suse.de>
17763         PR tree-optimization/84775
17764         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17765         immediate uses of predicate stmts and mark them modified.
17767         Revert
17768         PR tree-optimization/84178
17769         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17770         to caller.
17771         (version_loop_for_if_conversion): Delay update_ssa call.
17772         (tree_if_conversion): Delay update_ssa until after predicate
17773         insertion.
17775 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17777         PR target/84763
17778         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17779         when the function accesses prior frames.
17781 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17783         PR debug/84456
17784         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17785         gen_llsym, otherwise call maybe_gen_llsym.
17787         PR inline-asm/84742
17788         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17789         has ',' character inside of it.
17791 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17793         PR target/84748
17794         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17795         as clobbering CC_REGNUM.
17797 2018-03-08  Richard Biener  <rguenther@suse.de>
17799         PR middle-end/84552
17800         * tree-scalar-evolution.c: Include tree-into-ssa.h.
17801         (follow_copies_to_constant): Do not follow SSA names registered
17802         for update.
17804 2018-03-08  Richard Biener  <rguenther@suse.de>
17806         PR tree-optimization/84178
17807         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17808         to caller.
17809         (version_loop_for_if_conversion): Delay update_ssa call.
17810         (tree_if_conversion): Delay update_ssa until after predicate
17811         insertion.
17813 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
17815         PR tree-optimization/84178
17816         * tree-if-conv.c (release_bb_predicate): Remove the
17817         the assertion that the stmts have NULL use_ops.
17818         Discard the statements, asserting that they haven't
17819         yet been added to a BB.
17821 2018-03-08  Richard Biener  <rguenther@suse.de>
17823         PR tree-optimization/84746
17824         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17825         (phi_translate): Pass in destination ANTIC_OUT set.
17826         (phi_translate_1): Likewise.  For a simplified result lookup
17827         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17828         (phi_translate_set): Adjust.
17829         (do_pre_regular_insertion): Likewise.
17830         (do_pre_partial_partial_insertion): Likewise.
17832 2018-03-08  Martin Liska  <mliska@suse.cz>
17834         PR gcov-profile/84735
17835         * doc/gcov.texi: Document usage of profile files.
17836         * gcov-io.h: Document changes in the format.
17838 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
17840         PR debug/84404
17841         PR debug/84408
17842         * dwarf2out.c (struct dw_line_info_table): Update comments for
17843         view == -1.
17844         (FORCE_RESET_NEXT_VIEW): New.
17845         (FORCE_RESETTING_VIEW_P): New.
17846         (RESETTING_VIEW_P): Check for -1 too.
17847         (ZERO_VIEW_P): Likewise.
17848         (new_line_info_table): Force-reset next view.
17849         (dwarf2out_begin_function): Likewise.
17850         (dwarf2out_source_line): Simplify zero_view_p initialization.
17851         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17852         view directly.  Omit view when omitting .loc at line 0.
17854 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17856         PR tree-optimization/84740
17857         * tree-switch-conversion.c (process_switch): Call build_constructors
17858         only if info.phi_count is non-zero.
17860         PR tree-optimization/84739
17861         * tree-tailcall.c (find_tail_calls): Check call arguments against
17862         DECL_ARGUMENTS (current_function_decl) rather than
17863         DECL_ARGUMENTS (func) when checking for tail recursion.
17865 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17867         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17868         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17869         Volker Reichelt's entry and add entries for people that perform
17870         GCC fuzzy testing and report numerous bugs.
17872 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
17874         PR target/82411
17875         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17876         readonly data in sdata, if that is disabled.
17877         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17878         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17879         -mreadonly-in-sdata option.
17881 2018-03-07  Martin Sebor  <msebor@redhat.com>
17883         PR tree-optimization/84468
17884         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17885         basic block when looking for nul assignment.
17887 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
17889         PR target/84277
17890         * except.h (output_function_exception_table): Adjust prototype.
17891         * except.c (output_function_exception_table): Remove FNNAME parameter
17892         and add SECTION parameter.  Ouput one part of the table at a time.
17893         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17894         the first part of the exception table and emit unwind directives.
17895         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17896         (i386_pe_seh_cold_init): Likewise.
17897         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17898         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17899         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17900         (ix86_output_call_insn): Emit a nop in one more case for SEH.
17901         * config/i386/winnt.c: Include except.h.
17902         (struct seh_frame_state): Add reg_offset, after_prologue and
17903         in_cold_section fields.
17904         (i386_pe_seh_end_prologue): Set seh->after_prologue.
17905         (i386_pe_seh_cold_init): New function.
17906         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17907         to seh->in_cold_section.
17908         (seh_emit_push): Record the offset of the push.
17909         (seh_emit_save): Record the offet of the save.
17910         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17911         Test seh->after_prologue to disregard the epilogue.
17912         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17913         (i386_pe_end_cold_function): New function.
17915 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17917         PR fortran/84565
17918         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17919         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17921         PR c++/84704
17922         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17923         on tmp_var.
17924         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17925         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17927         PR middle-end/84723
17928         * multiple_target.c: Include tree-inline.h and intl.h.
17929         (expand_target_clones): Diagnose and fail if node->definition and
17930         !tree_versionable_function_p (node->decl).
17932 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
17934         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17935         sprint_ul.
17936         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17937         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17938         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17940 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17942         PR target/84710
17943         * combine.c (try_combine): Use reg_or_subregno instead of handling
17944         just paradoxical SUBREGs and REGs.
17946 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
17948         * config/arc/arc.c (arc_finalize_pic): Remove function.
17949         (arc_must_save_register): We use single base PIC register, remove
17950         checks to save/restore the PIC register.
17951         (arc_expand_prologue): Likewise.
17952         * config/arc/arc-protos.h (arc_set_default_type_attributes):
17953         Remove.
17954         (arc_verify_short): Likewise.
17955         (arc_attr_type): Likewise.
17956         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17957         (walk_stores): Likewise.
17958         (arc_address_cost): Make it static.
17959         (arc_verify_short): Likewise.
17960         (branch_dest): Likewise.
17961         (arc_attr_type): Likewise.
17962         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17963         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17964         (arc_final_prescan_insn): Remove inserting the nops due to
17965         hardware hazards.  It is done in reorg step.
17966         (insn_length_variant_t): Remove.
17967         (insn_length_parameters_t): Likewise.
17968         (arc_insn_length_parameters): Likewise.
17969         (arc_get_insn_variants): Likewise.
17970         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17972 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17974         PR inline-asm/84683
17975         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17976         assertion failure.
17978         PR tree-optimization/84687
17979         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17980         on new_node->decl.
17981         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17983 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17985         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17986         Rename to ppc_speculation_barrier.
17987         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17988         __builtin_ppc_speculation_barrier.
17990 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17992         PR target/84700
17993         * combine.c (combine_simplify_rtx): Don't try to simplify if
17994         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17995         are equal to x.
17997 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
17999         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
18000         to 32 bytes when compiling for POWER9.
18002 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
18004         PR target/84564
18005         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
18006         regparm >= 3 with no arg reg available also for calls with
18007         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
18009         PR target/84524
18010         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
18011         orig,vex.
18012         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
18014 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
18016         PR target/84264
18017         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
18019 2018-03-05  Richard Biener  <rguenther@suse.de>
18021         PR tree-optimization/84486
18022         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
18023         When inserting a __builtin_assume_aligned call set the LHS
18024         SSA name alignment info accordingly.
18026 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
18028         PR tree-optimization/84114
18029         * config/aarch64/aarch64.c (aarch64_reassociation_width)
18030         Avoid reassociation of FLOAT_MODE addition.
18032 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
18034         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
18035         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
18036         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
18037         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
18038         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
18039         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
18040         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
18041         and -mwbnoinvd.
18042         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
18043         __builtin_ia32_wbinvd): New builtins.
18044         (SPECIAL_ARGS2): New.
18045         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
18046         (SPECIAL_ARGS2): New.
18047         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18048         (ix86_valid_target_attribute_inner_p): Ditto.
18049         (ix86_init_mmx_sse_builtins): Add special_args2.
18050         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18051         TARGET_WBNOINVD_P): New.
18052         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18053         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18054         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18055         * config/i386/immintrin.h (_wbinvd): New intrinsic.
18056         * config/i386/pconfigintrin.h: New file.
18057         * config/i386/wbnoinvdintrin.h: Ditto.
18058         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18059         wbnoinvdintrin.h.
18060         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18062 2018-03-05  Richard Biener  <rguenther@suse.de>
18064         PR tree-optimization/84670
18065         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18066         member.
18067         (BB_VISITED_WITH_VISITED_SUCCS): New define.
18068         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18069         (compute_antic_aux): Only assert the number of values in ANTIC_IN
18070         doesn't grow if all successors (recursively) were visited at least
18071         once.
18073 2018-03-05  Richard Biener  <rguenther@suse.de>
18075         PR tree-optimization/84650
18076         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18077         if executed in the loop pipeline.
18079 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
18081         * doc/configfiles.texi (Configuration Files): Move info about
18082         conditionalizing $target-protos.h to...
18083         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
18084         differs from $target-protos.h.
18086 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
18087             Chung-Ju Wu  <jasonwucj@gmail.com>
18089         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18090         * config/nds32/nds32-multiple.md (setmemsi): Define.
18091         * config/nds32/nds32-memory-manipulation.c
18092         (nds32_gen_dup_4_byte_to_word_value): New.
18093         (emit_setmem_word_loop): New.
18094         (emit_setmem_byte_loop): New.
18095         (nds32_expand_setmem_loop): New.
18096         (nds32_expand_setmem_loop_v3m): New.
18097         (nds32_expand_setmem_unroll): New.
18098         (nds32_expand_setmem): New.
18100 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
18101             Chung-Ju Wu  <jasonwucj@gmail.com>
18103         * config/nds32/nds32-memory-manipulation.c
18104         (nds32_emit_load_store): New.
18105         (nds32_emit_post_inc_load_store): New.
18106         (nds32_emit_mem_move): New.
18107         (nds32_emit_mem_move_block): New.
18108         (nds32_expand_movmemsi_loop_unknown_size): New.
18109         (nds32_expand_movmemsi_loop_known_size): New.
18110         (nds32_expand_movmemsi_loop): New.
18111         (nds32_expand_movmemsi_unroll): New.
18112         (nds32_expand_movmemqi): Rename ...
18113         (nds32_expand_movmemsi): ... to this.
18114         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18115         (movmemsi): ... to this.
18116         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18117         (nds32_expand_movmemsi): ... to this.
18119 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
18120             Monk Chiang  <sh.chiang04@gmail.com>
18121             Chung-Ju Wu  <jasonwucj@gmail.com>
18123         * config/nds32/nds32-protos.h
18124         (nds32_expand_load_multiple): New arguments.
18125         (nds32_expand_store_multiple): Ditto.
18126         (nds32_valid_multiple_load_store): Rename ...
18127         (nds32_valid_multiple_load_store_p): ... to this.
18128         * config/nds32/nds32-memory-manipulation.c
18129         (nds32_expand_load_multiple): Refine implementation.
18130         (nds32_expand_store_multiple): Ditto.
18131         * config/nds32/nds32-multiple.md
18132         (load_multiple): Update nds32_expand_load_multiple interface.
18133         (store_multiple): Update nds32_expand_store_multiple interface.
18134         * config/nds32/nds32-predicates.c
18135         (nds32_valid_multiple_load_store): Rename ...
18136         (nds32_valid_multiple_load_store_p): ... to this and refine
18137         implementation.
18138         * config/nds32/predicates.md
18139         (nds32_load_multiple_and_update_address_operation): New predicate.
18140         (nds32_store_multiple_and_update_address_operation): New predicate.
18142 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
18143             Chung-Ju Wu  <jasonwucj@gmail.com>
18145         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18146         (combo): New attribute.
18147         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18149 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
18151         * config/nds32/nds32.opt: Change -mcmodel= default value.
18153 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
18154             Monk Chiang  <sh.chiang04@gmail.com>
18155             Chung-Ju Wu  <jasonwucj@gmail.com>
18157         * config/nds32/constants.md (unspec_element): New enum.
18158         * config/nds32/constraints.md (Umw): New constraint.
18159         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18160         * config/nds32/nds32-intrinsic.md: Likewise.
18161         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18162         (nds32_valid_smw_lwm_base_p): New.
18163         (nds32_output_smw_single_word): New.
18164         (nds32_output_lmw_single_word): New.
18165         (nds32_expand_unaligned_load): New.
18166         (nds32_expand_unaligned_store): New.
18167         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18168         (nds32_output_smw_single_word): Declare.
18169         (nds32_output_lmw_single_word): Declare.
18170         (nds32_expand_unaligned_load): Declare.
18171         (nds32_expand_unaligned_store): Declare.
18172         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18173         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18174         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18175         NDS32_BUILTIN_UASTORE_DW.
18176         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18177         predicate.
18179 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
18180             Kito Cheng  <kito.cheng@gmail.com>
18181             Chung-Ju Wu  <jasonwucj@gmail.com>
18183         * config/nds32/nds32-intrinsic.c
18184         (nds32_expand_builtin_null_ftype_reg): Delete.
18185         (nds32_expand_builtin_reg_ftype_imm): Ditto.
18186         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18187         (nds32_read_argument): New.
18188         (nds32_legitimize_target): Ditto.
18189         (nds32_legitimize_argument): Ditto.
18190         (nds32_check_constant_argument): Ditto.
18191         (nds32_expand_unop_builtin): Ditto.
18192         (nds32_expand_unopimm_builtin): Ditto.
18193         (nds32_expand_binop_builtin): Ditto.
18194         (nds32_builtin_decl_impl): Ditto.
18195         (builtin_description): Ditto.
18196         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18197         (nds32_init_builtins_impl): Ditto.
18198         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18199         (nds32_builtin_decl): New.
18200         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18201         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18203 2018-03-02  Jeff Law  <law@redhat.com>
18205         * reorg.c (stop_search_p): Handle DEBUG_INSN.
18206         (redundant_insn, fill_simple_delay_slots): Likewise.
18207         (fill_slots_from_thread): Likewise.
18208         * resource.c (mark_referenced_resources): Likewise.
18209         (mark_set_resources, find_dead_or_set_registers): Likewise.
18211 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18213         * substring-locations.h (format_warning_va): Formatting fix for
18214         ATTRIBUTE_GCC_DIAG.
18215         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18216         argument.
18217         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18218         * substring-locations.c: Include intl.h.
18219         (format_warning_va): Turned into small wrapper around
18220         format_warning_n_va, renamed to ...
18221         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18222         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18223         use ngettext.
18224         (format_warning_at_substring_n): New function.
18225         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18226         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
18227         format_warning_at_substring with just a shorter name instead of
18228         const function pointer.
18229         (fmtwarn_n): New function.
18230         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18231         appropriate, get rid of all the fmtstr temporaries, move conditionals
18232         with G_() wrapped string literals directly into fmtwarn arguments,
18233         cast dir.len to (int), formatting fixes.
18235 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
18237         * doc/invoke.texi: Remove "Cilk Plus" references.
18239 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18240             Richard Biener  <rguenther@suse.de>
18242         PR ipa/84628
18243         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18244         for error or warning attributes if CALL_FROM_THUNK_P is set.
18245         Formatting fixes.
18247 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18249         PR target/56540
18250         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18251         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18253         PR target/56540
18254         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18255         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18257         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18258         instead of -1U in last predictors element's probability member.
18260 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
18262         PR ipa/83983
18263         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18264         arguments if they are comparable.
18266 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
18268         PR tree-optimization/84634
18269         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18270         masks and masked_loop_p with a single loop_masks, making sure it's
18271         null for bb vectorization.
18273 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
18275         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18276         (vect_analyze_data_ref_access): Use loop->safe_len rather than
18277         loop->force_vectorize to check whether there is no alias.
18279 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
18281         PR target/84614
18282         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18283         prototypes.
18284         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18285         comments.
18286         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18287         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18288         instead of a loop around prev_real_insn.
18289         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18290         prev_real_insn.
18292         PR inline-asm/84625
18293         * config/i386/i386.c (ix86_print_operand): Use conditional
18294         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18295         zero vector.
18297 2018-03-02  Richard Biener  <rguenther@suse.de>
18299         PR tree-optimization/84427
18300         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18301         (bitmap_set_subtract_values): Rewrite to handle multiple
18302         exprs per value.
18303         (clean): Likewise.
18304         (prune_clobbered_mems): Likewise.
18305         (phi_translate): Take edge instead of pred/phiblock.
18306         (phi_translate_1): Likewise.
18307         (phi_translate_set): Likewise.  Insert all translated
18308         exprs for a value into the set, keeping possibly multiple
18309         expressions per value.
18310         (compute_antic_aux): Adjust for phi_translate changes.
18311         When intersecting union the expressions and prune those
18312         not in the final value set, keeping possibly multiple
18313         expressions per value.  Do not use value-insertion
18314         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18315         all expressions.  Add verification that the value-sets
18316         only shrink during iteration.
18317         (compute_partial_antic_aux): Adjust for the phi_translate changes.
18318         (do_pre_regular_insertion): Likewise.
18319         (do_pre_partial_partial_insertion): Likewise.
18321 2018-03-02  Richard Biener  <rguenther@suse.de>
18323         PR target/82005
18324         * config/darwin.c (saved_debug_info_level): New static global.
18325         (darwin_asm_lto_start): Disable debug info generation for LTO out.
18326         (darwin_asm_lto_end): Restore debug info generation settings.
18328 2018-03-01  Martin Liska  <mliska@suse.cz>
18330         PR sanitizer/82484
18331         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18332         volatile arguments.
18334 2018-03-01  Richard Biener  <rguenther@suse.de>
18336         PR debug/84645
18337         * dwarf2out.c (gen_variable_die): Properly handle late VLA
18338         type annotation with LTO when debug was disabled at compile-time.
18340 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
18342         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18343         XINT with INTVAL.
18344         (mips_final_postscan_insn): Likewise.
18346 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
18348         PR rtl-optimization/84528
18349         * alias.c (init_alias_target): Add commentary.
18350         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18351         a unique base value if the frame pointer is not eliminated
18352         to the stack pointer.
18354 2018-03-01  Tom de Vries  <tom@codesourcery.com>
18356         PR rtl-optimization/83327
18357         * lra-int.h (hard_regs_spilled_into): Declare.
18358         * lra.c (hard_regs_spilled_into): Define.
18359         (init_reg_info): Init hard_regs_spilled_into.
18360         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18361         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18362         (process_bb_lives): Handle hard_regs_spilled_into.
18363         (lra_create_live_ranges_1): Before doing liveness propagation, clear
18364         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18366 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
18368         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18369         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18370         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18371         * config/rs6000/aix72.h: New file.
18373 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
18375         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18376         instead of warning_at with conditional singular and plural messages
18377         where possible.
18379         PR target/52991
18380         * stor-layout.c (update_alignment_for_field): For
18381         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18382         && !DECL_PACKED (field), do the alignment update, just use
18383         only desired_align instead of MAX (type_align, desired_align)
18384         as the alignment.
18385         (place_field): Don't do known_align < desired_align handling
18386         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18387         is non-NULL, instead do it after rli->prev_field handling and
18388         only if not within a bitfield word.  For DECL_PACKED (field)
18389         use type_align of BITS_PER_UNIT.
18391 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
18393         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18394         superfluous parentheses and trailing spaces.
18396 2018-02-28  Richard Biener  <rguenther@suse.de>
18398         PR tree-optimization/84584
18399         * graphite-scop-detection.c (scop_detection::add_scop): Discard
18400         SCoPs with fake exit edge.
18402 2018-02-28  Martin Liska  <mliska@suse.cz>
18404         PR testsuite/84597
18405         * timevar.c (timer::print): Fix format to properly print 100%
18406         values.
18408 2018-02-28  Richard Biener  <rguenther@suse.de>
18410         PR middle-end/84607
18411         * genmatch.c (capture_info::walk_match): Do not mark
18412         captured expressions without operands as expr_p given
18413         they act more like predicates and should be subject to
18414         "lost tail" side-effect preserving.
18416 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
18418         PR rtl-optimization/81611
18419         * auto-inc-dec.c (attempt_change): Move dead note from
18420         mem_insn if it's the next use of regno
18421         (find_address): Take address use of reg holding
18422         non-incremented value.  Add parm to limit search to the named
18423         reg only.
18424         (merge_in_block): Attempt to use a mem insn that is the next
18425         use of the original regno.
18427 2018-02-27  Martin Sebor  <msebor@redhat.com>
18429         PR c++/83871
18430         * doc/invoke.texi (-Wmissing-attributes): New option.
18431         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18433 2018-02-27  Martin Sebor  <msebor@redhat.com>
18435         PR translation/84207
18436         * diagnostic-core.h (warning_n, error_n, inform_n): Change
18437         n argument to unsigned HOST_WIDE_INT.
18438         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18439         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
18440         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18441         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18443 2018-02-27  Richard Biener  <rguenther@suse.de>
18445         PR tree-optimization/84512
18446         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18447         Do not use the estimate returned from record_stmt_cost for
18448         the scalar iteration cost but sum properly using add_stmt_cost.
18450 2018-02-27  Richard Biener  <rguenther@suse.de>
18452         PR tree-optimization/84466
18453         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18454         Adjust last change to less strictly validate use operands.
18456 2018-02-27  Martin Liska  <mliska@suse.cz>
18458         PR gcov-profile/84548
18459         * gcov.c (process_file): Allow partial overlap and consider it
18460         also as group functions.
18461         (output_lines): Properly calculate range of lines for a group.
18463 2018-02-27  Martin Liska  <mliska@suse.cz>
18465         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18466         'ggc' suffixes.  Change first column width.
18467         (timer::print): Fix formatting of the column.
18469 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
18471         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18472         preserve inline entry blocks for the sake of debug inline
18473         entry point markers alone.
18474         (remove_unused_locals): Suggest in comments a better place to
18475         force the preservation of inline entry blocks that are
18476         otherwise unused, but do not preserve them.
18478 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18480         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18482 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18484         PR target/84039
18485         * config/i386/constraints.md (Bs): Replace
18486         ix86_indirect_branch_register with
18487         TARGET_INDIRECT_BRANCH_REGISTER.
18488         (Bw): Likewise.
18489         * config/i386/i386.md (indirect_jump): Likewise.
18490         (tablejump): Likewise.
18491         (*sibcall_memory): Likewise.
18492         (*sibcall_value_memory): Likewise.
18493         Peepholes of indirect call and jump via memory: Likewise.
18494         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18495         (*sibcall_value_GOT_32): Likewise.
18496         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18497         (GOT_memory_operand): Likewise.
18498         (call_insn_operand): Likewise.
18499         (sibcall_insn_operand): Likewise.
18500         (GOT32_symbol_operand): Likewise.
18501         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18503 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
18505         PR rtl-optimization/83496
18506         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18507         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
18508         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18509         redundant insn, if any.
18510         (relax_delay_slots): Likewise.
18511         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18513 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
18515         PR tree-optimization/83965
18516         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18517         that grouped statements are part of a reduction chain.  Return
18518         true if the statement is not marked as a reduction itself but
18519         is part of a group.
18520         (vect_recog_dot_prod_pattern): Don't check whether the statement
18521         is part of a group here.
18522         (vect_recog_sad_pattern): Likewise.
18523         (vect_recog_widen_sum_pattern): Likewise.
18525 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
18527         PR debug/84545
18528         * final.c (rest_of_clean_state): Also look for calls inside sequences.
18530 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18532         PR target/84530
18533         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18534         the bool argument.
18535         (ix86_output_indirect_function_return): New prototype.
18536         (ix86_split_simple_return_pop_internal): Likewise.
18537         * config/i386/i386.c (indirect_return_via_cx): New.
18538         (indirect_return_via_cx_bnd): Likewise.
18539         (indirect_thunk_name): Handle return va CX_REG.
18540         (output_indirect_thunk_function): Create alias for
18541         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18542         (ix86_output_indirect_jmp): Remove the bool argument.
18543         (ix86_output_indirect_function_return): New function.
18544         (ix86_split_simple_return_pop_internal): Likewise.
18545         * config/i386/i386.md (*indirect_jump): Don't pass false
18546         to ix86_output_indirect_jmp.
18547         (*tablejump_1): Likewise.
18548         (simple_return_pop_internal): Change it to define_insn_and_split.
18549         Call ix86_split_simple_return_pop_internal to split it for
18550         -mfunction-return=.
18551         (simple_return_indirect_internal): Call
18552         ix86_output_indirect_function_return instead of
18553         ix86_output_indirect_jmp.
18555 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
18557         PR bootstrap/84405
18558         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18559         memset and value initialization afterwards.
18561 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
18563         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18565 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18567         PR target/84521
18568         * common/config/aarch64/aarch64-common.c
18569         (aarch_option_optimization_table[]): Switch
18570         off fomit-frame-pointer
18572 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
18573             Chung-Ju Wu  <jasonwucj@gmail.com>
18575         * config/nds32/nds32-multiple.md (load_multiple): Disallow
18576         volatile memory.
18577         (store_multiple): Ditto.
18579 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
18581         * config.gcc: Add --with-cpu support for nds32 target.
18582         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18583         * config/nds32/nds32.opt: Add -mcpu= option.
18585 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
18587         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18588         isel=yes): Warn for these deprecated options.
18590 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
18592         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18593         ISA_2_5_MASKS_EMBEDDED.
18595 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
18597         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18598         p->max as pointers rather than using iterative_hash_expr.
18600 2018-02-23  Carl Love  <cel@us.ibm.com>
18602         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18603         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18604         BU_P8V_OVERLOAD_2.
18605         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18606         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18607         P8V_BUILTIN_VEC_VUNSIGNED2.
18609 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
18611         PR target/81572
18612         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18613         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18614         LRA_UNKNOWN_ALT.
18615         * lra-constraints.c (curr_insn_transform): Set up
18616         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
18617         LRA_UNKNOWN_ALT.
18618         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18619         * lra-eliminations.c (spill_pseudos): Ditto.
18620         (process_insn_for_elimination): Ditto.
18621         * lra-lives.c (reg_early_clobber_p): Use the new macros.
18622         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18623         LRA_NON_CLOBBERED_ALT.
18625 2018-02-22  Martin Sebor  <msebor@redhat.com>
18627         PR tree-optimization/84480
18628         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18629         to maybe_diag_stxncpy_trunc.  Call it.
18630         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18631         from gimple_fold_builtin_strcpy.  Print inlining stack.
18632         (handle_builtin_stxncpy): Print inlining stack.
18633         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18635 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
18637         PR target/84176
18638         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18639         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18640         and -fcheck-pointer-bounds are used together.
18641         (indirect_thunk_prefix): New enum.
18642         (indirect_thunk_need_prefix): New function.
18643         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
18644         "_nt" instead of "_bnd" for NOTRACK prefix.
18645         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18646         (output_indirect_thunk_function): Likewise.
18647         (): Likewise.
18648         (ix86_code_end): Update output_indirect_thunk_function calls.
18649         (ix86_output_indirect_branch_via_reg): Replace
18650         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18651         (ix86_output_indirect_branch_via_push): Likewise.
18652         (ix86_output_function_return): Likewise.
18653         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18654         incompatible with -fcf-protection=branch and
18655         -fcheck-pointer-bounds.
18657 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18659         PR target/83335
18660         * config/aarch64/aarch64.c (aarch64_print_address_internal):
18661         Change gcc_assert call to output_operand_lossage.
18663 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18665         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18667 2018-02-22  DJ Delorie  <dj@redhat.com>
18668             Sebastian Perta  <sebastian.perta@renesas.com>
18669             Oleg Endo  <olegendo@gcc.gnu.org>
18671         * config/rx/rx.c (rx_rtx_costs): New function.
18672         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18674 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18676         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18678 2018-02-22  Martin Liska  <mliska@suse.cz>
18680         PR driver/83193
18681         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18682         Add "native" as a possible value.
18684 2018-02-22  Martin Liska  <mliska@suse.cz>
18686         PR driver/83193
18687         * config/i386/i386.c (ix86_option_override_internal):
18688         Add "native" as a possible value for -march and -mtune.
18690 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
18692         PR target/84502
18693         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18694         to all type variants.
18696         PR tree-optimization/84503
18697         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18698         width as info->bitpos + info->bitsize - start.
18699         (merged_store_group::merge_overlapping): Simplify width computation.
18700         (check_no_overlap): New function.
18701         (imm_store_chain_info::try_coalesce_bswap): Compute expected
18702         start + width and last_order of the group, fail if check_no_overlap
18703         fails.
18704         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18705         to group if check_no_overlap fails.
18707 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18709         * config/rs6000/altivec.md: Delete contraint arguments to
18710         define_expand, define_split, and define_peephole2, and in
18711         define_insn_and_split if always unused.
18712         * config/rs6000/darwin.md: Ditto.
18713         * config/rs6000/dfp.md: Ditto.
18714         * config/rs6000/rs6000.md: Ditto.
18715         * config/rs6000/sync.md: Ditto.
18716         * config/rs6000/vector.md: Ditto.
18717         * config/rs6000/vsx.md: Ditto.
18719 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18721         * config/rs6000/altivec.md: Write output control strings as braced
18722         blocks instead of double-quoted strings.
18723         * config/rs6000/darwin.md: Ditto.
18724         * config/rs6000/rs6000.md: Ditto.
18725         * config/rs6000/vector.md: Ditto.
18726         * config/rs6000/vsx.md: Ditto.
18728 2018-02-21  Jason Merrill  <jason@redhat.com>
18730         PR c++/84314 - ICE with templates and fastcall attribute.
18731         * attribs.c (build_type_attribute_qual_variant): Remove assert.
18733 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18735         * ipa-cp.c (determine_versionability): Fix comment typos.
18737 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18739         PR c/84229
18740         * ipa-cp.c (determine_versionability): Do not version functions caling
18741         va_arg_pack.
18743 2018-02-21  Martin Liska  <mliska@suse.cz>
18745         PR driver/83193
18746         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18747         Add "native" as a possible value.
18748         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
18749         the macro when native cpu detection is available.
18751 2018-02-21  Martin Liska  <mliska@suse.cz>
18753         PR driver/83193
18754         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18755         Add "native" as a possible value.
18756         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18757         when native cpu detection is available.
18759 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
18760             Martin Sebor  <msebor@redhat.com>
18762         PR tree-optimization/84478
18763         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18764         false.
18765         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18766         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18767         support which is conservatively correct, for 2 only stay conservative
18768         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
18769         argument to the 2 argument get_range_strlen, adjust 6 arg
18770         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18771         false.
18772         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18773         (gimple_fold_builtin_strlen): Pass true as last argument to
18774         get_range_strlen.
18776 2018-02-20  Martin Sebor  <msebor@redhat.com>
18778         PR middle-end/84095
18779         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18780         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
18781         (builtin_memref::builtin_memref): Factor out parts into
18782         set_base_and_offset and call it.
18784 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18786         PR middle-end/84406
18787         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18788         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18789         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
18790         search at the associated MODE_INT.
18792 2018-02-20  Jeff Law  <law@redhat.com>
18794         PR middle-end/82123
18795         PR tree-optimization/81592
18796         PR middle-end/79257
18797         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18798         for range data rather than using global data.
18799         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18800         range data rather than using global data.
18801         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18802         pass it to children as needed.
18803         (struct directive::fmtresult): Similarly.
18804         (struct directive::set_width): Similarly.
18805         (struct directive::set_precision): Similarly.
18806         (format_integer, format_directive, parse_directive): Similarly.
18807         (format_none): Accept unnamed vr_values parameter.
18808         (format_percent, format_floating, format_character): Similarly.
18809         (format_string, format_plain): Similarly.
18810         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18811         the EVRP range analyzer for range data rather than using global data.
18812         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18813         gimple-ssa-evrp-analyze.h
18814         (class sprintf_dom_walker): Add after_dom_children member function.
18815         Add evrp_range_analyzer member.
18816         (sprintf_dom_walker::before_dom_children): Call into the EVRP
18817         range analyzer as needed.
18818         (sprintf_dom_walker::after_dom_children): New member function.
18819         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18820         if not optimizing.
18821         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18822         (evrp_range_analyzer::pop_to_marker): Likewise.
18824 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18826         PR tree-optimization/84419
18827         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18828         with the required type if its current type is compatible but
18829         different.
18831 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
18833         PR middle-end/82004
18834         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18835         after vectorization.
18837 2018-02-20  Martin Liska  <mliska@suse.cz>
18839         PR driver/83193
18840         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18841         possible values if we don't have a hint.
18843 2018-02-20  Martin Liska  <mliska@suse.cz>
18845         PR c/84310
18846         PR target/79747
18847         * final.c (shorten_branches): Build align_tab array with one
18848         more element.
18849         * opts.c (finish_options): Add alignment option limit check.
18850         (MAX_CODE_ALIGN): Likewise.
18851         (MAX_CODE_ALIGN_VALUE): Likewise.
18852         * doc/invoke.texi: Document maximum allowed option value for
18853         all -falign-* options.
18855 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
18857         PR target/84146
18858         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18859         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18860         * var-tracking.c (emit_note_insn_var_location): Remove all references
18861         to NOTE_INSN_CALL_ARG_LOCATION.
18862         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18863         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18864         Use copy_rtx_if_shared.
18865         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18866         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18867         (dwarf2out_var_location): Remove handling of
18868         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18869         on call_insn.
18870         * final.c (final_scan_insn): Remove all references to
18871         NOTE_INSN_CALL_ARG_LOCATION.
18872         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
18873         before dumping final insns.
18874         * except.c (emit_note_eh_region_end): Remove all references to
18875         NOTE_INSN_CALL_ARG_LOCATION.
18876         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18877         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18878         * config/arc/arc.c (hwloop_optimize): Likewise.
18879         * config/arm/arm.c (create_fix_barrier): Likewise.
18880         * config/s390/s390.c (s390_chunkify_start): Likewise.
18881         * config/sh/sh.c (find_barrier): Likewise.
18882         * config/i386/i386.c (rest_of_insert_endbranch,
18883         ix86_seh_fixup_eh_fallthru): Likewise.
18884         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18885         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18886         * config/frv/frv.c (frv_function_prologue): Likewise.
18887         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
18888         reg note.
18889         (note_outside_basic_block_p): Remove all references to
18890         NOTE_INSN_CALL_ARG_LOCATION.
18891         * gengtype.c (adjust_field_rtx_def): Likewise.
18892         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18893         Likewise.
18894         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18895         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18897         PR c++/84444
18898         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18899         is ADDR_EXPR.
18901         PR tree-optimization/84452
18902         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18903         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18904         is NULL.
18906 2018-02-19  Martin Liska  <mliska@suse.cz>
18908         PR sanitizer/82183
18909         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18911 2018-02-19  Martin Liska  <mliska@suse.cz>
18912             Richard Sandiford  <richard.sandiford@linaro.org>
18914         PR tree-optimization/82491
18915         * gimple-fold.c (get_base_constructor): Make earlier bail out
18916         to prevent ubsan.
18918 2018-02-19  Carl Love  <cel@us.ibm.com>
18920         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18921         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18922         BU_P8V_OVERLOAD_1.
18923         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18924         P8V_BUILTIN_VEC_NEG.
18926 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
18928         * config/rl78/rl78.md (movdf): New define expand.
18930 2018-02-19  Martin Liska  <mliska@suse.cz>
18932         PR other/80589
18933         * doc/invoke.texi: Fix typo.
18934         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18936 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
18938         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18939         handle rs6000_single_float and rs6000_double_float specially for
18940         e500 family CPUs.
18942 2018-02-16  Jeff Law  <law@redhat.com>
18944         * config/rx/rx.c (add_pop_cfi_notes): New function.;
18945         (pop_regs): Use it.
18947 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18949         PR ipa/84425
18950         * ipa-inline.c (inline_small_functions): Fix a typo.
18952 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18954         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18956 2018-02-16  Carl Love  <cel@us.ibm.com>
18958         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18959         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18960         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18961         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18962         expansion to P8V_BUILTIN_VEC_FLOAT2.
18964 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
18966         PR rtl-optimization/70023
18967         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18968         src_regno into account.
18970 2018-02-16  Carl Love  <cel@us.ibm.com>
18972         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18973         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18974         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18975         * config/rs6000/rs6000.c: Remove case statements for
18976         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18977         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18978         and P9V_BUILTIN_VEC_VINSERT4B.
18979         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18980         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18981         * config/rs6000/vsx.md:
18982         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18983         vec_insert4b.
18985 2018-02-16  Carl Love  <cel@us.ibm.com>
18987         * config/rs6000/altivec.h: Add builtin names vec_extract4b
18988         vec_insert4b.
18989         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18990         definitions.
18991         * config/rs6000/rs6000-c.c: Add the definitions for
18992         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18993         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18994         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18995         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
18996         definition for insert4b and define insn *insert3b_internal.
18997         * doc/extend.texi: Add documentation for vec_extract4b.
18999 2018-02-16  Nathan Sidwell  <nathan@acm.org>
19001         * doc/extend.texi (Backwards Compatibility): Mention friend
19002         injection.  Note for-scope is deprecated.
19003         * doc/invoke.texi (-ffriend-injection): Deprecate.
19005 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
19007         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
19008         that moved to I2, also allow destinations that are a paradoxical
19009         subreg (instead of a normal reg).
19011 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
19013         PR target/83831
19014         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
19015         to QImode.
19017 2018-02-16  Richard Biener  <rguenther@suse.de>
19019         PR tree-optimization/84037
19020         PR tree-optimization/84016
19021         PR target/82862
19022         * config/i386/i386.c (ix86_builtin_vectorization_cost):
19023         Adjust vec_construct for the fact we need additional higher latency
19024         128bit inserts for AVX256 and AVX512 vector builds.
19025         (ix86_add_stmt_cost): Scale vector construction cost for
19026         elementwise loads.
19028 2018-02-16  Richard Biener  <rguenther@suse.de>
19030         PR tree-optimization/84417
19031         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
19032         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
19033         (non_rewritable_lvalue_p): Likewise, use poly-ints.
19035 2018-02-16  Martin Liska  <mliska@suse.cz>
19037         PR sanitizer/84307
19038         * internal-fn.def (ASAN_CHECK): Set proper flags.
19039         (ASAN_MARK): Likewise.
19041 2018-02-16  Julia Koval  <julia.koval@intel.com>
19043         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
19044         from PTA_CANNONLAKE.
19046 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
19048         PR target/84272
19049         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19050         Use ++iter rather than iter++ for std::list iterators.
19051         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
19052         defer deleting them until all nodes in the forest are processed.  Do
19053         free even leaf nodes.  Change to_process into auto_vec.
19055         PR bootstrap/84405
19056         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19057         * vec.h (vec_default_construct): Use memset instead of placement new
19058         if BROKEN_VALUE_INITIALIZATION is defined.
19059         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19060         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19061         is defined.
19063         PR rtl-optimization/83723
19064         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19065         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
19066         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
19067         recursive calls.
19068         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19069         callers.
19070         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19072 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
19074         PR rtl-optimization/81443
19075         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19076         from inner REGs to paradoxical SUBREGs.
19078 2018-02-16  Richard Biener  <rguenther@suse.de>
19080         PR tree-optimization/84399
19081         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19082         For operands we can analyze at their definition make sure we can
19083         analyze them at each use as well.
19085 2018-02-16  Richard Biener  <rguenther@suse.de>
19087         PR tree-optimization/84190
19088         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19089         volatile accesses if the decl isn't volatile.
19091 2018-02-15  Jason Merrill  <jason@redhat.com>
19093         PR c++/84314 - ICE with templates and fastcall attribute.
19094         * attribs.c (build_type_attribute_qual_variant): Don't clobber
19095         TYPE_CANONICAL on an existing type.
19097 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
19099         PR tree-optimization/84383
19100         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19101         dstoff nor call operand_equal_p if dstbase is NULL.
19103         PR tree-optimization/84334
19104         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19105         also a CONSTANT_CLASS_P, punt.
19107 2018-02-14  Jim Wilson  <jimw@sifive.com>
19109         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19110         first SMALL_OPERAND check.  New local min_second_step.  Move assert
19111         to where locals are set.  Add TARGET_RVC support.
19112         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19114 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
19116         * doc/invoke.texi: Correct -Wformat-overflow code sample.
19118 2018-02-14  Martin Sebor  <msebor@redhat.com>
19120         PR tree-optimization/83698
19121         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19122         arrays constrain the offset range to their bounds.
19123         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19124         (builtin_access::overlap): Avoid setting the size of overlap if it's
19125         already been set.
19126         (maybe_diag_overlap): Also consider arrays when deciding what values
19127         of offsets to include in diagnostics.
19129 2018-02-14  Martin Sebor  <msebor@redhat.com>
19131         PR c/84108
19132         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19133         that correspond to the kind of a declaration.
19135 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
19137         PR target/83984
19138         * config/pa/pa.md: Load address of PIC label using the linkage table
19139         if the label is nonlocal.
19141 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19143         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19144         warning message if user requests -maltivec=be.
19145         * doc/invoke.texi: Document deprecation of -maltivec=be.
19147 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
19149         PR target/84220
19150         * config/rs6000/rs6000-c.c: Update definitions for
19151         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19152         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19154 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19156         PR target/84239
19157         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19158         add _get_ssp intrinsics. Remove argument from
19159         __builtin_ia32_rdssp[d|q].
19160         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19161         * config/i386/i386-builtin.def: Remove argument from
19162         __builtin_ia32_rdssp[d|q].
19163         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19164         ix86_expand_special_args_builtin for _rdssp[d|q].
19165         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19166         Clear register before usage.
19167         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19168         Add documentation for new _get_ssp and _inc_ssp intrinsics.
19170 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
19172         PR tree-optimization/84357
19173         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19174         operand 1 of an ARRAY_REF too.
19176 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
19178         PR target/83831
19179         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19180         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19181         declarations.
19182         (set_of_reg): New struct.
19183         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19184         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19185         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19186         functions.
19187         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19188         Split into bitclr, bitset, bitinvert patterns if appropriate.
19189         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19190         use rx_fuse_in_memory_bitop.
19191         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19192         to named insn, correct maximum insn length.
19194 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
19196         PR target/79242
19197         * machmode.def: Define a complex mode for PARTIAL_INT.
19198         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19199         MODE_PARTIAL_INT.
19200         * doc/rtl.texi: Document CSPImode.
19201         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19202         handling.
19203         (msp430_hard_regno_nregs_with_padding): Likewise.
19205 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
19207         PR target/84279
19208         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19210 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
19212         PR rtl-optimization/84169
19213         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
19214         we generated a parallel as new i3 and we split that to new i2 and i3
19215         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
19216         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
19217         those to i2, not i1.  Partially rewrite this scan code.
19219 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
19221         PR c/82210
19222         * stor-layout.c (place_field): For variable length fields, adjust
19223         offset_align afterwards not just based on the field's alignment,
19224         but also on the size.
19226         PR middle-end/84309
19227         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19228         of exps and logs in the use_exp2 case.
19230 2018-02-13  Jeff Law  <law@redhat.com>
19232         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19233         entry for "vector".
19235         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19236         ARGS as unused.
19238 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
19240         PR debug/84342
19241         PR debug/84319
19242         * common.opt (gas-loc-support, gas-locview-support): New.
19243         (ginline-points, ginternal-reset-location-views): New.
19244         * doc/invoke.texi: Document them.  Use @itemx where intended.
19245         (gvariable-location-views): Adjust.
19246         * target.def (reset_location_view): New.
19247         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19248         (TARGET_RESET_LOCATION_VIEW): New.
19249         * doc/tm.texi: Rebuilt.
19250         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19251         (dwarf2out_default_as_locview_support): New.
19252         (output_asm_line_debug_info): Use option variables.
19253         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19254         (output_loc_list): Likewise.
19255         (add_high_low_attributes): Check option variables.
19256         Don't output entry view attribute in strict mode.
19257         (gen_inlined_subroutine_die): Check option variables.
19258         (dwarf2out_inline_entry): Likewise.
19259         (init_sections_and_labels): Likewise.
19260         (dwarf2out_early_finish): Likewise.
19261         (maybe_reset_location_view): New, from...
19262         (dwarf2out_var_location): ... here.  Call it.
19263         * debug.h (dwarf2out_default_as_loc_support): Declare.
19264         (dwarf2out_default_as_locview_support): Declare.
19265         * hooks.c (hook_int_rtx_insn_0): New.
19266         * hooks.h (hook_int_rtx_insn_0): Declare.
19267         * toplev.c (process_options): Take -gas-loc-support and
19268         -gas-locview-support from dwarf2out.  Enable
19269         -gvariable-location-views by default only with locview
19270         assembler support.  Enable -ginternal-reset-location-views by
19271         default only if the target defines the corresponding hook.
19272         Enable -ginline-points by default if location views are
19273         enabled; force it disabled if statement frontiers are
19274         disabled.
19275         * tree-inline.c (expand_call_inline): Check option variables.
19276         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19278 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
19280         PR tree-optimization/84321
19281         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19282         handling.  Also check whether the anti-range contains any values
19283         that satisfy the mask; switch to a VR_RANGE if not.
19285 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
19287         PR sanitizer/84340
19288         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19290 2018-02-13  Martin Jambor  <mjambor@suse.cz>
19292         PR c++/83990
19293         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19294         of call statements, also set location of a load to a temporary.
19296 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
19298         * config/rl78/rl78.c (add_vector_labels): New function.
19299         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19300         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19301         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19302         which checks that no arguments are passed.
19303         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19304         * doc/extend.texi: Documentation for the new attribute.
19306 2018-02-13  Andreas Schwab  <schwab@suse.de>
19308         * config/riscv/linux.h (CPP_SPEC): Define.
19310 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
19312         PR target/84335
19313         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19314         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19315         OPTION_MASK_ISA_AES as first argument to def_builtin_const
19316         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19317         instead of OPTION_MASK_ISA_PCLMUL as first argument to
19318         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19319         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19320         temporarily for AES and PCLMUL builtins.
19322         PR tree-optimization/84339
19323         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19324         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19325         Formatting fixes.
19327         PR middle-end/84309
19328         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19329         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19330         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19331         inline function.
19332         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19333         inline function.
19334         * omp-simd-clone.h: New file.
19335         * omp-simd-clone.c: Include omp-simd-clone.h.
19336         (expand_simd_clones): No longer static.
19337         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19338         cgraph.h and omp-simd-clone.h.
19339         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19340         (vect_recog_widen_shift_pattern): Formatting fix.
19341         (vect_pattern_recog_1): Don't check optab for calls.
19343         PR target/84336
19344         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19345         operands[2] into a REG before using gen_lowpart on it.
19347 2018-02-12  Jeff Law  <law@redhat.com>
19349         PR target/83760
19350         * config/sh/sh.c (find_barrier): Consider a sibling call
19351         a barrier as well.
19353         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19354         successfully back substituting a reg.
19356 2018-02-12  Richard Biener  <rguenther@suse.de>
19358         PR tree-optimization/84037
19359         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19360         parameter, move visited init to caller.
19361         (vect_slp_analyze_operations): Separate cost from validity
19362         check, initialize visited once for all instances.
19363         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19364         for all instances.
19365         * tree-vect-stmts.c (vect_model_simple_cost): Make early
19366         out an assert.
19367         (vect_model_promotion_demotion_cost): Likewise.
19368         (vectorizable_bswap): Guard cost modeling with !slp_node
19369         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19370         SLP stmts.
19371         (vectorizable_call): Likewise.
19372         (vectorizable_conversion): Likewise.
19373         (vectorizable_assignment): Likewise.
19374         (vectorizable_shift): Likewise.
19375         (vectorizable_operation): Likewise.
19376         (vectorizable_store): Likewise.
19377         (vectorizable_load): Likewise.
19378         (vectorizable_condition): Likewise.
19379         (vectorizable_comparison): Likewise.
19381 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
19383         PR sanitizer/84307
19384         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19385         (ASAN_MARK): Fix fnspec to account for return value, change pointer
19386         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19388 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19390         PR middle-end/83665
19391         * params.def (inline-min-speedup): Increase from 8 to 15.
19392         (max-inline-insns-auto): Decrease from 40 to 30.
19393         * ipa-split.c (consider_split): Add some buffer for function to
19394         be considered inlining candidate.
19395         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19396         default values.
19398 2018-02-12  Richard Biener  <rguenther@suse.de>
19400         PR tree-optimization/84037
19401         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19402         matched stmts if we cannot swap the non-matched ones.
19404 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
19406         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19407         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19408         _mm_maskz_scalef_round_ss): New intrinsics.
19409         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19410         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19411         __builtin_ia32_scalefss_round): Remove.
19412         (__builtin_ia32_scalefsd_mask_round,
19413         __builtin_ia32_scalefss_mask_round): New intrinsics.
19414         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19415         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19416         ((match_operand:VF_128 2 "<round_nimm_predicate>"
19417         "<round_constraint>")): Changed to ...
19418         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19419         "<round_scalar_constraint>")): ... this.
19420         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19421         %0, %1, %2<round_op3>}"): Changed to ...
19422         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19423         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19424         %2<round_scalar_mask_op3>}"): ... this.
19425         * config/i386/subst.md (round_scalar_nimm_predicate): New.
19427 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
19429         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19430         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19431         (_mm_maskz_sqrt_round_ss): New intrinsics.
19432         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19433         (__builtin_ia32_sqrtsd_mask_round)
19434         (__builtin_ia32_sqrtss_mask_round): New builtins.
19435         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19436         (__builtin_ia32_sqrtss_round): Remove.
19437         (__builtin_ia32_sqrtsd_mask_round)
19438         (__builtin_ia32_sqrtss_mask_round): New builtins.
19439         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19440         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19441         ((match_operand:VF_128 1 "vector_operand"
19442         "xBm,<round_constraint>")): Changed to ...
19443         ((match_operand:VF_128 1 "vector_operand"
19444         "xBm,<round_scalar_constraint>")): ... this.
19445         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19446         %0, %2, %<iptr>1<round_op3>}): Changed to ...
19447         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19448         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19449         %<iptr>1<round_scalar_mask_op3>}): ... this.
19450         ((set_attr "prefix" "<round_prefix>")): Changed to ...
19451         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19453 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
19455         PR target/84266
19456         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19457         Cast vec_cmpeq result to correct type.
19458         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19459         Cast vec_cmpgt result to correct type.
19461 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
19463         * final.c (final_scan_insn_1): Renamed from...
19464         (final_scan_insn): ... this.  New wrapper, to recover
19465         seen from the outermost call in recursive ones.
19466         * config/sparc/sparc.c (output_return): Drop seen from call.
19467         (output_sibcall): Likewise.
19468         * config/visium/visium.c (output_branch): Likewise.
19470 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
19472         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19473         function label.
19475 2018-02-10  Alan Modra  <amodra@gmail.com>
19477         PR target/84300
19478         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19479         Specify LR as an input.
19481 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
19483         PR sanitizer/83987
19484         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19485         remove_member_access_dummy_vars): New functions.
19486         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19487         lower_omp_1, execute_lower_omp): Use them.
19489         PR rtl-optimization/84308
19490         * shrink-wrap.c (spread_components): Release todo vector.
19492 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
19494         PR rtl-optimization/57193
19495         * ira-color.c (struct allocno_color_data): Add member
19496         conflict_allocno_hard_prefs.
19497         (update_conflict_allocno_hard_prefs): New.
19498         (bucket_allocno_compare_func): Add a preference based on
19499         conflict_allocno_hard_prefs.
19500         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19501         (color_allocnos): Remove a dead code.  Initiate
19502         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
19504 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
19506         PR target/84226
19507         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19508         constraint from =wa to wa.  Avoid a subreg on the output operand,
19509         instead use a pseudo and subreg it in a move.
19510         (p9_xxbrd_<mode>): Changed to ...
19511         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19512         (p9_xxbrd_v2df): New expander.
19513         (p9_xxbrw_<mode>): Changed to ...
19514         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19515         (p9_xxbrw_v4sf): New expander.
19517 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
19519         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19521 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
19523         PR target/83926
19524         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19525         multiply in 32-bit mode.
19526         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19527         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19528         mode.
19530 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
19532         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19533         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19534         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19535         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19537 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
19539         PR lto/84213
19540         * dwarf2out.c (is_trivial_indirect_ref): New function.
19541         (dwarf2out_late_global_decl): Do not generate a location
19542         attribute for variables that have a non-trivial DECL_VALUE_EXPR
19543         and that are not defined in the current unit.
19545 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
19547         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19548         instead of a libcall for UNORDERED.
19550 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
19552         PR target/82641
19553         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19554         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19556 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19558         PR target/PR84295
19559         * config/s390/s390.c (s390_set_current_function): Invoke
19560         s390_indirect_branch_settings also if fndecl didn't change.
19562 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
19564         * config/rs6000/rs6000.md (blockage): Set length to zero.
19566 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
19568         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19570 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
19572         PR sanitizer/84285
19573         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19574         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19575         -static-lib*san.
19577         PR debug/84252
19578         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19579         PARALLEL incoming that failed vt_get_decl_and_offset check.
19581         PR middle-end/84237
19582         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19583         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19584         TREE_READONLY bit.
19585         (get_variable_section): For decls in named .bss* sections pass true as
19586         second argument to bss_initializer_p.
19588 2018-02-09  Marek Polacek  <polacek@redhat.com>
19589             Jakub Jelinek  <jakub@redhat.com>
19591         PR c++/83659
19592         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19593         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
19594         Sync some changes from cxx_fold_indirect_ref.
19596 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
19598         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19599         markers.
19600         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19601         (BLOCK_INLINE_ENTRY_LABEL): New.
19602         (dwarf2out_var_location): Disregard inline entry markers.
19603         (inline_entry_data): New struct.
19604         (inline_entry_data_hasher): New hashtable type.
19605         (inline_entry_data_hasher::hash): New.
19606         (inline_entry_data_hasher::equal): New.
19607         (inline_entry_data_table): New variable.
19608         (add_high_low_attributes): Add DW_AT_entry_pc and
19609         DW_AT_GNU_entry_view attributes if a pending entry is found
19610         in inline_entry_data_table.  Add old entry_pc attribute only
19611         if debug nonbinding markers are disabled.
19612         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19613         markers are enabled.
19614         (block_within_block_p, dwarf2out_inline_entry): New.
19615         (dwarf2out_finish): Check that no entries remained in
19616         inline_entry_data_table.
19617         * final.c (reemit_insn_block_notes): Handle inline entry notes.
19618         (final_scan_insn, notice_source_line): Likewise.
19619         (rest_of_clean_state): Skip inline entry markers.
19620         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19621         markers.
19622         * gimple.c (gimple_build_debug_inline_entry): New.
19623         * gimple.h (enum gimple_debug_subcode): Add
19624         GIMPLE_DEBUG_INLINE_ENTRY.
19625         (gimple_build_debug_inline_entry): Declare.
19626         (gimple_debug_inline_entry_p): New.
19627         (gimple_debug_nonbind_marker_p): Adjust.
19628         * insn-notes.def (INLINE_ENTRY): New.
19629         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19630         inline entry marker notes.
19631         (print_insn): Likewise.
19632         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19633         (INSN_DEBUG_MARKER_KIND): Likewise.
19634         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19635         * tree-inline.c (expand_call_inline): Build and insert
19636         debug_inline_entry stmt.
19637         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19638         inline entry blocks early, if nonbind markers are enabled.
19639         (dump_scope_block): Dump fragment info.
19640         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19641         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19642         (gimple_build_debug_inline_entry): New.
19643         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19644         Enable/disable inline entry points too.
19645         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19646         (DEBUG_INSN): Describe inline entry markers.
19648         * common.opt (gvariable-location-views): New.
19649         (gvariable-location-views=incompat5): New.
19650         * config.in: Rebuilt.
19651         * configure: Rebuilt.
19652         * configure.ac: Test assembler for view support.
19653         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19654         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19655         * dwarf2out.c (var_loc_view): New typedef.
19656         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19657         (dwarf2out_locviews_in_attribute): New.
19658         (dwarf2out_locviews_in_loclist): New.
19659         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19660         (enum dw_line_info_opcode): Add LI_adv_address.
19661         (struct dw_line_info_table): Add view.
19662         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19663         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19664         (zero_view_p): New variable.
19665         (ZERO_VIEW_P): New macro.
19666         (output_asm_line_debug_info): New.
19667         (struct var_loc_node): Add view.
19668         (add_AT_view_list, AT_loc_list): New.
19669         (add_var_loc_to_decl): Add view param.  Test it against last.
19670         (new_loc_list): Add view params.  Record them.
19671         (AT_loc_list_ptr): Handle loc and view lists.
19672         (view_list_to_loc_list_val_node): New.
19673         (print_dw_val): Handle dw_val_class_view_list.
19674         (size_of_die): Likewise.
19675         (value_format): Likewise.
19676         (loc_list_has_views): New.
19677         (gen_llsym): Set vl_symbol too.
19678         (maybe_gen_llsym, skip_loc_list_entry): New.
19679         (dwarf2out_maybe_output_loclist_view_pair): New.
19680         (output_loc_list): Output view list or entries too.
19681         (output_view_list_offset): New.
19682         (output_die): Handle dw_val_class_view_list.
19683         (output_dwarf_version): New.
19684         (output_compilation_unit_header): Use it.
19685         (output_skeleton_debug_sections): Likewise.
19686         (output_rnglists, output_line_info): Likewise.
19687         (output_pubnames, output_aranges): Update version comments.
19688         (output_one_line_info_table): Output view numbers in asm comments.
19689         (dw_loc_list): Determine current endview, pass it to new_loc_list.
19690         Call maybe_gen_llsym.
19691         (loc_list_from_tree_1): Adjust.
19692         (add_AT_location_description): Create view list attribute if
19693         needed, check it's absent otherwise.
19694         (convert_cfa_to_fb_loc_list): Adjust.
19695         (maybe_emit_file): Call output_asm_line_debug_info for test.
19696         (dwarf2out_var_location): Reset views as needed.  Precompute
19697         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
19698         attribute.  Set view.
19699         (new_line_info_table): Reset next view.
19700         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19701         (dwarf2out_source_line): Likewise.  Output view resets and labels to
19702         the assembler, or select appropriate line info opcodes.
19703         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19704         (optimize_string_length): Catch it.  Adjust.
19705         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
19706         dw_val_class_view_list, and remove it if no longer needed.
19707         (hash_loc_list): Hash view numbers.
19708         (loc_list_hasher::equal): Compare them.
19709         (optimize_location_lists): Check whether a view list symbol is
19710         needed, and whether the locview attribute is present, and
19711         whether they match.  Remove the locview attribute if no longer
19712         needed.
19713         (index_location_lists): Call skip_loc_list_entry for test.
19714         (dwarf2out_finish): Call output_asm_line_debug_info for test.
19715         Use output_dwarf_version.
19716         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19717         (struct dw_val_node): Add val_view_list.
19718         * final.c (SEEN_NEXT_VIEW): New.
19719         (set_next_view_needed): New.
19720         (clear_next_view_needed): New.
19721         (maybe_output_next_view): New.
19722         (final_start_function): Rename to...
19723         (final_start_function_1): ... this.  Take pointer to FIRST,
19724         add SEEN parameter.  Emit param bindings in the initial view.
19725         (final_start_function): Reintroduce SEEN-less interface.
19726         (final): Rename to...
19727         (final_1): ... this.  Take SEEN parameter.  Output final pending
19728         next view at the end.
19729         (final): Reintroduce seen-less interface.
19730         (final_scan_insn): Output pending next view before switching
19731         sections or ending a block.  Mark the next view as needed when
19732         outputting variable locations.  Notify debug backend of section
19733         changes, and of location view changes.
19734         (rest_of_handle_final): Adjust.
19735         * toplev.c (process_options): Autodetect value for debug variable
19736         location views option.  Warn on incompat5 without -gdwarf-5.
19737         * doc/invoke.texi (gvariable-location-views): New.
19738         (gvariable-location-views=incompat5): New.
19739         (gno-variable-location-views): New.
19741 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
19743         PR tree-optimization/84136
19744         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19745         that the result of find_edge is non-NULL.
19747 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19749         PR target/83008
19750         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19751         storing integer register in SImode.  Fix cost of 256 and 512
19752         byte aligned SSE register store.
19754 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19756         * config/i386/i386.c (ix86_multiplication_cost): Fix
19757         multiplication cost for TARGET_AVX512DQ.
19759 2018-02-08  Marek Polacek  <polacek@redhat.com>
19761         PR tree-optimization/84238
19762         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19763         get_range_strlen.
19765 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19767         PR tree-optimization/84265
19768         * tree-vect-stmts.c (vectorizable_store): Don't treat
19769         VMAT_CONTIGUOUS accesses as grouped.
19770         (vectorizable_load): Likewise.
19772 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19774         PR tree-optimization/81635
19775         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19776         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19777         (test_round_for_mask): New functions.
19778         (wide_int_cc_tests): Call test_round_for_mask.
19779         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19780         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19781         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19782         range returned by get_range_info.
19784 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19786         PR ipa/81360
19787         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19788         * symtab.c: Include builtins.h
19789         (symtab_node::output_to_lto_symbol_table_p): Move here
19790         from lto-streamer-out.c:output_symbol_p.
19791         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19792         (output_symbol_p): Move all logic to symtab.c
19793         (produce_symtab): Update.
19795 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19797         * config/s390/s390-opts.h (enum indirect_branch): Define.
19798         * config/s390/s390-protos.h (s390_return_addr_from_memory)
19799         (s390_indirect_branch_via_thunk)
19800         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19801         (enum s390_indirect_branch_type): Define.
19802         * config/s390/s390.c (struct s390_frame_layout, struct
19803         machine_function): Remove.
19804         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19805         (indirect_branch_table_label_no, indirect_branch_table_name):
19806         Define variables.
19807         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19808         (enum s390_indirect_branch_option): Define.
19809         (s390_return_addr_from_memory): New function.
19810         (s390_handle_string_attribute): New function.
19811         (s390_attribute_table): Add new attribute handler.
19812         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19813         (s390_indirect_branch_via_thunk): New function.
19814         (s390_indirect_branch_via_inline_thunk): New function.
19815         (s390_function_ok_for_sibcall): When jumping via thunk disallow
19816         sibling call optimization for non z10 compiles.
19817         (s390_emit_call): Force indirect branch target to be a single
19818         register.  Add r1 clobber for non-z10 compiles.
19819         (s390_emit_epilogue): Emit return jump via return_use expander.
19820         (s390_reorg): Handle JUMP_INSNs as execute targets.
19821         (s390_option_override_internal): Perform validity checks for the
19822         new command line options.
19823         (s390_indirect_branch_attrvalue): New function.
19824         (s390_indirect_branch_settings): New function.
19825         (s390_set_current_function): Invoke s390_indirect_branch_settings.
19826         (s390_output_indirect_thunk_function):  New function.
19827         (s390_code_end): Implement target hook.
19828         (s390_case_values_threshold): Implement target hook.
19829         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19830         macros.
19831         * config/s390/s390.h (struct s390_frame_layout)
19832         (struct machine_function): Move here from s390.c.
19833         (TARGET_INDIRECT_BRANCH_NOBP_RET)
19834         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19835         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19836         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19837         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19838         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19839         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19840         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19841         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19842         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19843         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19844         (mnemonic attribute): Add values which aren't recognized
19845         automatically.
19846         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19847         pattern for branch conversion.  Fix mnemonic attribute.
19848         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19849         indirect branch via thunk if requested.
19850         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19851         ("*indirect_jump"): Disable for branch conversion using out of
19852         line thunks.
19853         ("indirect_jump_via_thunk<mode>_z10")
19854         ("indirect_jump_via_thunk<mode>")
19855         ("indirect_jump_via_inlinethunk<mode>_z10")
19856         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19857         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19858         ("casesi_jump_via_inlinethunk<mode>_z10")
19859         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19860         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19861         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19862         ("*indirect2_jump"): Disable for branch conversion.
19863         ("casesi_jump"): Turn into expander and expand patterns for branch
19864         conversion.
19865         ("return_use"): New expander.
19866         ("*return"): Emit return via thunk and rename it to ...
19867         ("*return<mode>"): ... this one.
19868         * config/s390/s390.opt: Add new options and and enum for the
19869         option values.
19871 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19873         * lra-constraints.c (match_reload): Unconditionally use
19874         gen_lowpart_SUBREG, rather than selecting between that
19875         and equivalent gen_rtx_SUBREG code.
19877 2018-02-08  Richard Biener  <rguenther@suse.de>
19879         PR tree-optimization/84233
19880         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19881         changed flag instead of boguously re-using phi_inserted.
19883 2018-02-08  Martin Jambor  <mjambor@suse.cz>
19885         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19886         static local variables.
19888 2018-02-08  Richard Biener  <rguenther@suse.de>
19890         PR tree-optimization/84278
19891         * tree-vect-stmts.c (vectorizable_store): When looking for
19892         smaller vector types to perform grouped strided loads/stores
19893         make sure the mode is supported by the target.
19894         (vectorizable_load): Likewise.
19896 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19898         * config/aarch64/aarch64.c (aarch64_components_for_bb):
19899         Increase LDP/STP opportunities by adding adjacent callee-saves.
19901 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19903         PR rtl-optimization/84068
19904         PR rtl-optimization/83459
19905         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19907 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
19909         PR tree-optimization/84224
19910         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19911         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19912         non-zero arguments.
19914 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
19916         PR target/84113
19917         * config/rs6000/altivec.md (*restore_world): Remove LR use.
19918         * config/rs6000/predicates.md (restore_world_operation): Adjust op
19919         count, remove one USE.
19921 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19923         * doc/install.texi (Configuration): Document the
19924         --with-long-double-format={ibm,ieee} PowerPC configuration
19925         options.
19927         PR target/84154
19928         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19929         Convert from define_expand to be define_insn_and_split.  Rework
19930         float/double/_Float128 conversions to QI/HI/SImode to work with
19931         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
19932         conversions to QI/HImode types did a store and then a load to
19933         truncate the value.  For conversions to VSX registers, don't split
19934         the insn, instead emit the code directly.  Use the code iterator
19935         any_fix to combine signed and unsigned conversions.
19936         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19937         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19938         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19939         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19940         (fix_<mode>di2_hw): Likewise.
19941         (fixuns_<mode>di2_hw): Likewise.
19942         (fix_<mode>si2_hw): Likewise.
19943         (fixuns_<mode>si2_hw): Likewise.
19944         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19945         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19946         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19947         fix<uns>_trunc<SFDF:mode>si2_p8.
19948         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19949         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19950         (fix<uns>_<mode>_mem): Likewise.
19951         (fctiw<u>z_<mode>_mem): Likewise.
19952         (fix<uns>_<mode>_mem): Likewise.
19953         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19954         the register allocator from doing a direct move to the GPRs to do
19955         a store, and instead use the ISA 3.0 store byte/half-word from
19956         vector register instruction.  For IEEE 128-bit floating point,
19957         also optimize stores of 32-bit ints.
19958         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19960 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
19962         * genextract.c (push_pathstr_operand): New function to support
19963         [a-zA-Z].
19964         (walk_rtx): Call push_pathstr_operand.
19965         (print_path): Support [a-zA-Z].
19967 2018-02-07  Richard Biener  <rguenther@suse.de>
19969         PR tree-optimization/84037
19970         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19971         (cse_and_gimplify_to_preheader): Declare.
19972         (vect_get_place_in_interleaving_chain): Likewise.
19973         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19974         ivexpr_map.
19975         (_loop_vec_info::~_loop_vec_info): Delete it.
19976         (cse_and_gimplify_to_preheader): New function.
19977         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19978         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19979         (vectorizable_load): Likewise.  For grouped stores always base
19980         the IV on the first element.
19981         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19982         condition before gimplifying.
19984 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19986         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19987         *DIV_EXPR and *MOD_EXPR.
19989 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
19991         PR target/84248
19992         * config/i386/i386.c (ix86_option_override_internal): Mask out
19993         the CF_SET bit when checking -fcf-protection.
19995 2018-02-07  Tom de Vries  <tom@codesourcery.com>
19997         PR libgomp/84217
19998         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19999         enough.
20001 2018-02-07  Richard Biener  <rguenther@suse.de>
20003         PR tree-optimization/84204
20004         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
20005         this place.
20007         PR tree-optimization/84205
20008         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
20009         special-case isl_ast_op_zdiv_r.
20011         PR tree-optimization/84223
20012         * graphite-scop-detection.c (gather_bbs::before_dom_children):
20013         Only add conditions from within the region.
20014         (gather_bbs::after_dom_children): Adjust.
20016 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
20018         PR target/84209
20019         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
20020         * config/avr/avr.md: Only post-reload split REG-REG moves if
20021         either register is GENERAL_REG_P.
20023 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
20025         PR tree-optimization/84235
20026         * tree-ssa-scopedtables.c
20027         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
20028         if the subtraction is performed in floating point type where NaNs are
20029         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
20030         build 1.  Formatting fix.
20032 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
20034         PR target/84146
20035         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
20036         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
20037         and skip it regardless of bb boundaries.  Use CALL_P macro,
20038         don't test INSN_P (insn) together with CALL_P or JUMP_P check
20039         unnecessarily, formatting fix.
20041 2018-02-06  Michael Collison  <michael.collison@arm.com>
20043         * config/arm/thumb2.md:
20044         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
20045         (*thumb_mov_notscc): Ditto.
20047 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
20049         PR target/84154
20050         * config/rs6000/rs6000.md (su code attribute): Use "u" for
20051         unsigned_fix, not "s".
20053 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20055         * configure.ac (gcc_fn_eh_frame_ro): New function.
20056         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20057         correct .eh_frame permissions.
20058         * configure: Regenerate.
20060 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
20062         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20063         irrelevant options.
20065 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20067         * config/rs6000/rs6000.c (rs6000_option_override_internal):
20068         Display warning message for -mno-speculate-indirect-jumps.
20070 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
20072         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20073         Undocumented.
20074         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20076 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
20078         PR tree-optimization/84225
20079         * tree-eh.c (find_trapping_overflow): Only call
20080         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20082 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20084         PR target/84145
20085         * config/i386/i386.c: Reimplement the check of possible options
20086         -mibt/-mshstk conbination. Change error messages.
20087         * doc/invoke.texi: Fix a typo: remove extra '='.
20089 2018-02-06  Marek Polacek  <polacek@redhat.com>
20091         PR tree-optimization/84228
20092         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20094 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
20096         PR target/82641
20097         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20098         emitted arch directives.
20099         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20100         __ARM_FEATURE_COPROC before changing architectures.
20102 2018-02-06  Richard Biener  <rguenther@suse.de>
20104         * config/i386/i386.c (print_reg): Fix typo.
20105         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20107 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
20109         * configure: Regenerate.
20111 2018-02-05  Martin Sebor  <msebor@redhat.com>
20113         PR tree-optimization/83369
20114         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20115         inlining context.
20117 2018-02-05  Martin Liska  <mliska@suse.cz>
20119         * doc/invoke.texi: Cherry-pick upstream r323995.
20121 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
20123         * ira.c (ira_init_register_move_cost): Adjust comment.
20125 2018-02-05  Martin Liska  <mliska@suse.cz>
20127         PR gcov-profile/84137
20128         * doc/gcov.texi: Fix typo in documentation.
20130 2018-02-05  Martin Liska  <mliska@suse.cz>
20132         PR gcov-profile/83879
20133         * doc/gcov.texi: Document necessity of --dynamic-list-data when
20134         using dlopen functionality.
20136 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
20138         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20139         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20140         _mm_maskz_range_ss, _mm_mask_range_round_ss,
20141         _mm_maskz_range_round_ss): New intrinsics.
20142         (__builtin_ia32_rangesd128_round)
20143         (__builtin_ia32_rangess128_round): Remove.
20144         (__builtin_ia32_rangesd128_mask_round,
20145         __builtin_ia32_rangess128_mask_round): New builtins.
20146         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20147         __builtin_ia32_rangess128_round): Remove.
20148         (__builtin_ia32_rangesd128_mask_round,
20149         __builtin_ia32_rangess128_mask_round): New builtins.
20150         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20151         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20152         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20153         "<round_saeonly_constraint>")): Changed to ...
20154         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20155         "<round_saeonly_scalar_constraint>")): ... this.
20156         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20157         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20158         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20159         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20160         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20162 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
20164         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20165         options.
20166         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20167         Remove all values except native, 8540 and 8548.
20169 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
20171         * config/i386/i386.c (ix86_output_function_return): Pass
20172         INVALID_REGNUM, instead of -1, as invalid register number to
20173         indirect_thunk_name and output_indirect_thunk.
20175 2018-02-02  Julia Koval  <julia.koval@intel.com>
20177         * config.gcc: Add -march=icelake.
20178         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20179         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20180         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20181         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20182         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20183         (processor_target_table): Add icelake.
20184         (ix86_option_override_internal): Handle new PTAs.
20185         (get_builtin_code_for_version): Handle icelake.
20186         (M_INTEL_COREI7_ICELAKE): New.
20187         (fold_builtin_cpu): Handle icelake.
20188         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20189         * doc/invoke.texi: Add -march=icelake.
20191 2018-02-02  Julia Koval  <julia.koval@intel.com>
20193         * config/i386/i386.c (ix86_option_override_internal): Change flags type
20194         to wide_int_bitmask.
20195         * wide-int-bitmask.h: New.
20197 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20199         PR target/84066
20200         * config/i386/i386.md: Replace Pmode with word_mode in
20201         builtin_setjmp_setup and builtin_longjmp to support x32.
20203 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
20205         PR target/56010
20206         PR target/83743
20207         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20208         #include "opts.h".
20209         (rs6000_supported_cpu_names): New static variable.
20210         (linux_cpu_translation_table): Likewise.
20211         (elf_platform) <cpu>: Define new static variable and use it.
20212         Translate kernel AT_PLATFORM name to canonical name if needed.
20213         Error if platform name is unknown.
20215 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
20217         PR target/84089
20218         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20220 2018-02-01  Jeff Law  <law@redhat.com>
20222         PR target/84128
20223         * config/i386/i386.c (release_scratch_register_on_entry): Add new
20224         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
20225         the scratch if RELEASE_VIA_POP is false.
20226         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20227         If we have to save a temporary register, decrement SIZE appropriately.
20228         Pass new arguments to release_scratch_register_on_entry.
20229         (ix86_adjust_stack_and_probe): Likewise.
20230         (ix86_emit_probe_stack_range): Pass new arguments to
20231         release_scratch_register_on_entry.
20233 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
20235         PR rtl-optimization/84157
20236         * combine.c (change_zero_ext): Use REG_P predicate in
20237         front of HARD_REGISTER_P predicate.
20239 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
20241         * config/avr/avr.c (avr_option_override): Move disabling of
20242         -fdelete-null-pointer-checks to...
20243         * common/config/avr/avr-common.c (avr_option_optimization_table):
20244         ...here.
20246 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20248         PR tree-optimization/81635
20249         * tree-data-ref.c (split_constant_offset_1): For types that
20250         wrap on overflow, try to use range info to prove that wrapping
20251         cannot occur.
20253 2018-02-01  Renlin Li  <renlin.li@arm.com>
20255         PR target/83370
20256         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20257         TAILCALL_ADDR_REGS.
20258         (aarch64_register_move_cost): Likewise.
20259         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20260         TAILCALL_ADDR_REGS.
20261         (REG_CLASS_NAMES): Likewise.
20262         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20263         TAILCALL_ADDR_REGS. Remove IP registers.
20264         * config/aarch64/aarch64.md (Ucs): Update register constraint.
20266 2018-02-01  Richard Biener  <rguenther@suse.de>
20268         * domwalk.h (dom_walker::dom_walker): Add additional constructor
20269         for specifying RPO order and allow NULL for that.
20270         * domwalk.c (dom_walker::dom_walker): Likewise.
20271         (dom_walker::walk): Handle NULL RPO order.
20272         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20273         in RPO order.
20274         (rewrite_update_dom_walker): Likewise.
20275         (mark_def_dom_walker): Likewise.
20277 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20279         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20280         (aarch64_maybe_expand_sve_subreg_move): Declare.
20281         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20282         * config/aarch64/predicates.md (aarch64_any_register_operand): New
20283         predicate.
20284         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20285         that are semantically a reverse operation.
20286         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20287         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20288         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20289         functions.
20290         (aarch64_can_change_mode_class): For big-endian, forbid changes
20291         between two SVE modes if they have different element sizes.
20293 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20295         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20296         the TImode handling for big-endian targets.
20298 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20300         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20301         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
20302         not just bytes.
20303         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20304         Remove BSWAP handing for big-endian targets and use the form of
20305         LD1RQ appropariate for the mode.
20307 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20309         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20310         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20311         duplicated element.
20313 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
20315         PR tearget/83845
20316         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20317         check for operands that need to go through aarch64_sve_reload_be.
20319 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
20321         PR tree-optimization/81661
20322         PR tree-optimization/84117
20323         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20324         * tree-eh.c: Include gimplify.h.
20325         (find_trapping_overflow, replace_trapping_overflow,
20326         rewrite_to_non_trapping_overflow): New functions.
20327         * tree-vect-loop.c: Include tree-eh.h.
20328         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20329         * tree-data-ref.c: Include tree-eh.h.
20330         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20332 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
20334         PR rtl-optimization/84123
20335         * combine.c (change_zero_ext): Check if hard register satisfies
20336         can_change_dest_mode before calling gen_lowpart_SUBREG.
20338 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
20340         PR target/82444
20341         * ira.c (ira_init_register_move_cost): Remove assert.
20343 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
20345         PR rtl-optimization/84071
20346         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20347         * doc/tm.texi: Regenerate.
20349 2018-01-31  Richard Biener  <rguenther@suse.de>
20351         PR tree-optimization/84132
20352         * tree-data-ref.c (analyze_miv_subscript): Properly
20353         check whether evolution_function_is_affine_multivariate_p
20354         before calling gcd_of_steps_may_divide_p.
20356 2018-01-31  Julia Koval  <julia.koval@intel.com>
20358         PR target/83618
20359         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20360         * config/i386/i386.md (rdpid_rex64) New.
20361         (rdpid): Make 32bit only.
20363 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
20365         PR lto/84105
20366         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20367         an IDENTIFIER_NODE for FUNCTION_TYPE's.
20369 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
20371         Revert
20372         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20374         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20376 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
20378         PR rtl-optimization/84071
20379         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20380         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20382 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
20384         * config/arc/arc.c (arc_handle_aux_attribute): New function.
20385         (arc_attribute_table): Add 'aux' attribute.
20386         (arc_in_small_data_p): Consider aux like variables.
20387         (arc_is_aux_reg_p): New function.
20388         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20389         (arc_get_aux_arg): New function.
20390         (prepare_move_operands): Handle aux-register access.
20391         (arc_handle_aux_attribute): New function.
20392         * doc/extend.texi (ARC Variable attributes): Add subsection.
20394 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
20396         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20397         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20398         (arc_attribute_table): Add 'uncached' attribute.
20399         (arc_print_operand): Print '.di' flag for uncached memory
20400         accesses.
20401         (arc_in_small_data_p): Do not consider for small data the uncached
20402         types.
20403         (arc_is_uncached_mem_p): New function.
20404         * config/arc/predicates.md (compact_store_memory_operand): Check
20405         for uncached memory accesses.
20406         (nonvol_nonimm_operand): Likewise.
20407         * doc/extend.texi (ARC Type Attribute): New subsection.
20409 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
20411         PR c/84100
20412         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20413         falign-loops=): Add Optimization flag.
20415 2018-01-30  Jeff Law  <law@redhat.com>
20417         PR target/84064
20418         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20419         INT_REGISTERS_SAVED.  Check it prior to calling
20420         get_scratch_register_on_entry.
20421         (ix86_adjust_stack_and_probe): Similarly.
20422         (ix86_emit_probe_stack_range): Similarly.
20423         (ix86_expand_prologue): Corresponding changes.
20425 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20427         PR target/40411
20428         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20429         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20431 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
20433         PR target/84112
20434         * lra-constraints.c (curr_insn_transform): Process AND in the
20435         address.
20437 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
20439         PR rtl-optimization/83986
20440         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20441         dependence against last_pending_memory_flush in addition to
20442         pending_jump_insns.
20444 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
20446         PR tree-optimization/81611
20447         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20448         copies.
20450 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20452         PR target/83758
20453         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20454         a reg rtx.
20456 2018-01-30  Richard Biener  <rguenther@suse.de>
20457             Jakub Jelinek  <jakub@redhat.com>
20459         PR tree-optimization/84111
20460         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20461         inner loops added during recursion, as they don't have up-to-date
20462         SSA form.
20464 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
20466         PR ipa/81360
20467         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20468         (can_inline_edge_by_limits_p): ... here.
20469         (can_early_inline_edge_p, check_callers,
20470         update_caller_keys, update_callee_keys, recursive_inlining,
20471         add_new_edges_to_heap, speculation_useful_p,
20472         inline_small_functions,
20473         inline_small_functions, flatten_function,
20474         inline_to_all_callers_1): Update.
20476 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
20478         * profile-count.c (profile_count::combine_with_ipa_count): Handle
20479         zeros correctly.
20481 2018-01-30  Richard Biener  <rguenther@suse.de>
20483         PR tree-optimization/83008
20484         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20485         invariant and constant vector uses in stmts when they need
20486         more than one stmt.
20488 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20490         PR bootstrap/84017
20491         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20492         * configure: Regenerate.
20494 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20496         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20497         pattern.
20498         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20499         Use gen_rtx_REG rather than gen_lowpart.
20501 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20503         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20504         rather than 0 when creating partial subregs.
20506 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20508         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20509         of usage.
20511 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
20513         PR target/81550
20514         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20515         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20516         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20517         flags.  This restores the settings used before the 2017-07-24.
20518         Turning off pre increment/decrement/modify allows IVOPTS to
20519         optimize DF/SF loops where the index is an int.
20521 2018-01-29  Richard Biener  <rguenther@suse.de>
20522             Kelvin Nilsen  <kelvin@gcc.gnu.org>
20524         PR bootstrap/80867
20525         * tree-vect-stmts.c (vectorizable_call): Don't call
20526         targetm.vectorize_builtin_md_vectorized_function if callee is
20527         NULL.
20529 2018-01-22  Carl Love  <cel@us.ibm.com>
20531         * doc/extend.tex: Fix typo in second arg in
20532         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20534 2018-01-29  Richard Biener  <rguenther@suse.de>
20536         PR tree-optimization/84086
20537         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20538         (flush_ssaname_freelist): When SSA names were released reset
20539         the SCEV hash table.
20541 2018-01-29  Richard Biener  <rguenther@suse.de>
20543         PR tree-optimization/84057
20544         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20545         removed paths when removing edges.
20547 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
20549         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20550         -mfunction-return=@var{choice}.
20552 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20554         PR diagnostic/84034
20555         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20556         Handle CR like TAB.
20557         (layout::print_source_line): Likewise.
20558         (test_get_line_width_without_trailing_whitespace): Add test cases.
20560 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
20562         PR middle-end/84040
20563         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20564         debug insns.
20566 2018-01-26  Jim Wilson  <jimw@sifive.com>
20568         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20570         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20571         specified.
20573 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20575         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20576         and CMP + SUB-immediate -> SUBS.
20578 2018-01-26  Martin Sebor  <msebor@redhat.com>
20580         PR tree-optimization/83896
20581         * tree-ssa-strlen.c (get_string_len): Rename...
20582         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
20583         Avoid assuming length is constant.
20584         (handle_char_store): Use HOST_WIDE_INT for string length.
20586 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
20588         PR target/81763
20589         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20590         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20592 2018-01-26  Richard Biener  <rguenther@suse.de>
20594         PR rtl-optimization/84003
20595         * dse.c (record_store): Only record redundant stores when
20596         the earlier store aliases at least all accesses the later one does.
20598 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
20600         PR rtl-optimization/83985
20601         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20602         REG_CFA_RESTORE insns.
20603         (delete_unmarked_insns): Don't ignore separate shrink wrapping
20604         REG_CFA_RESTORE insns here.
20606         PR c/83989
20607         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20608         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20610 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20612         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20613         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20614         (arc_init): Likewise.
20615         (arc_override_options): Likewise.
20616         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20617         value.
20618         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20619         support.
20620         * config/arc/arc.h (TARGET_DBNZ): Define.
20621         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20622         properly set the tune attribute.
20623         (dbnz): Use TARGET_DBNZ guard.
20624         * config/arc/arc.opt (mtune): Add core3 option.
20626 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20628         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20629         recognize new pic like addresses.
20630         (arc_delegitimize_address): Clean up.
20632 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20634         * config/arc/arc-arches.def: Option mrf16 valid for all
20635         architectures.
20636         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20637         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20638         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20639         * config/arc/arc-tables.opt: Regenerate.
20640         * config/arc/arc.c (arc_conditional_register_usage): Handle
20641         reduced register file case.
20642         (arc_file_start): Set must have build attributes.
20643         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20644         mrf16 option value.
20645         * config/arc/arc.opt (mrf16): Add new option.
20646         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20647         * config/arc/genmultilib.awk: Handle new mrf16 option.
20648         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20649         * config/arc/t-multilib: Regenerate.
20650         * doc/invoke.texi (ARC Options): Document mrf16 option.
20652 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20654         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20655         * config/arc/arc.c (arc_handle_secure_attribute): New function.
20656         (arc_attribute_table): Add 'secure_call' attribute.
20657         (arc_print_operand): Print secure call operand.
20658         (arc_function_ok_for_sibcall): Don't optimize tail calls when
20659         secure.
20660         (arc_is_secure_call_p): New function.  * config/arc/arc.md
20661         (call_i): Add support for sjli instruction.
20662         (call_value_i): Likewise.
20663         * config/arc/constraints.md (Csc): New constraint.
20665 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20666             John Eric Martin  <John.Martin@emmicro-us.com>
20668         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20669         * config/arc/arc.c (_arc_jli_section): New struct.
20670         (arc_jli_section): New type.
20671         (rc_jli_sections): New static variable.
20672         (arc_handle_jli_attribute): New function.
20673         (arc_attribute_table): Add jli_always and jli_fixed attribute.
20674         (arc_file_end): New function.
20675         (TARGET_ASM_FILE_END): Define.
20676         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20677         (arc_add_jli_section): New function.
20678         (jli_call_scan): Likewise.
20679         (arc_reorg): Call jli_call_scan.
20680         (arc_output_addsi): Remove 'S' from printing asm operand.
20681         (arc_is_jli_call_p): New function.
20682         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20683         operand.
20684         (movhi_insn): Likewise.
20685         (movsi_insn): Likewise.
20686         (movsi_set_cc_insn): Likewise.
20687         (loadqi_update): Likewise.
20688         (load_zeroextendqisi_update): Likewise.
20689         (load_signextendqisi_update): Likewise.
20690         (loadhi_update): Likewise.
20691         (load_zeroextendhisi_update): Likewise.
20692         (load_signextendhisi_update): Likewise.
20693         (loadsi_update): Likewise.
20694         (loadsf_update): Likewise.
20695         (movsicc_insn): Likewise.
20696         (bset_insn): Likewise.
20697         (bxor_insn): Likewise.
20698         (bclr_insn): Likewise.
20699         (bmsk_insn): Likewise.
20700         (bicsi3_insn): Likewise.
20701         (cmpsi_cc_c_insn): Likewise.
20702         (movsi_ne): Likewise.
20703         (movsi_cond_exec): Likewise.
20704         (clrsbsi2): Likewise.
20705         (norm_f): Likewise.
20706         (normw): Likewise.
20707         (swap): Likewise.
20708         (divaw): Likewise.
20709         (flag): Likewise.
20710         (sr): Likewise.
20711         (kflag): Likewise.
20712         (ffs): Likewise.
20713         (ffs_f): Likewise.
20714         (fls): Likewise.
20715         (call_i): Remove 'S' asm letter, add jli instruction.
20716         (call_value_i): Likewise.
20717         * config/arc/arc.op (mjli-always): New option.
20718         * config/arc/constraints.md (Cji): New constraint.
20719         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20720         operand.
20721         (subsf3_fpx): Likewise.
20722         (mulsf3_fpx): Likewise.
20723         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20724         asm operand.
20725         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20726         function attrbutes.
20727         * doc/invoke.texi (ARC): Document mjli-always option.
20729 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
20731         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20732         avoid addition with 0 and use incw and decw where possible.
20734 2018-01-26  Richard Biener  <rguenther@suse.de>
20736         PR tree-optimization/81082
20737         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20738         association if it requires casting to unsigned.
20739         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20740         from fold_plusminus_mult_expr to catch important cases late when
20741         range info is available.
20743 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20745         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20746         * configure.ac (hidden_linkonce): New test.
20747         * configure: Regenerate.
20748         * config.in: Regenerate.
20750 2018-01-26  Julia Koval  <julia.koval@intel.com>
20752         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20753         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20754         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20755         _mm_mask_bitshuffle_epi64_mask): Fix type.
20756         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20757         USI_FTYPE_V4DI_V4DI_USI): Remove.
20758         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20759         __builtin_ia32_vpshufbitqmb256_mask,
20760         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20761         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20762         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20764 2018-01-26  Alan Modra  <amodra@gmail.com>
20766         PR target/84033
20767         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20768         UNSPEC_VBPERMQ.  Sort other unspecs.
20770 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
20772         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20774 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
20776         PR middle-end/83055
20777         * predict.c (drop_profile): Do not push/pop cfun; update also
20778         node->count.
20779         (handle_missing_profiles): Fix logic looking for zero profiles.
20781 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
20783         PR middle-end/83977
20784         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20785         on functions with #pragma omp declare simd or functions with simd
20786         attribute.
20787         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20788         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20789         Remove trailing \n from warning_at calls.
20791 2018-01-25  Tom de Vries  <tom@codesourcery.com>
20793         PR target/84028
20794         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20795         for neutered workers.
20797 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
20799         PR target/68467
20800         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20801         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20803 2018-01-24  Jeff Law  <law@redhat.com>
20805         PR target/83994
20806         * i386.c (get_probe_interval): Move to earlier point.
20807         (ix86_compute_frame_layout): If -fstack-clash-protection and
20808         the frame is larger than the probe interval, then use pushes
20809         to save registers rather than reg->mem moves.
20810         (ix86_expand_prologue): Remove conditional for int_registers_saved
20811         assertion.
20813 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
20815         PR target/84014
20816         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20817         min/max for never referenced object.
20819 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
20821         PR middle-end/83977
20822         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20823         here.
20824         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20825         attributes from DECL_ATTRIBUTES (decl) without affecting
20826         DECL_ATTRIBUTES (current_function_decl).
20827         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20828         functions with non-NULL DECL_ABSTRACT_ORIGIN.
20830 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
20832         PR tree-optimization/83979
20833         * fold-const.c (fold_comparison): Use constant_boolean_node
20834         instead of boolean_{true,false}_node.
20836 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
20838         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20839         with zero counts.
20841 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20843         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20844         Simplify the clause that sets the length attribute.
20845         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20846         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20847         clause that sets the length attribute.
20848         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20850 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20852         PR target/83589
20853         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20854         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20855         Add strict parameter.
20856         (prevent_branch_around_nothing): Insert dummy insn between branch to
20857         label and label with no ptx insn inbetween.
20858         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20860 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20862         PR target/81352
20863         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20864         for neutered threads in warp.
20865         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20867 2018-01-24  Richard Biener  <rguenther@suse.de>
20869         PR tree-optimization/83176
20870         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20871         operands.
20873 2018-01-24  Richard Biener  <rguenther@suse.de>
20875         PR tree-optimization/82819
20876         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20877         code generating pluses that are no-ops in the target precision.
20879 2018-01-24  Richard Biener  <rguenther@suse.de>
20881         PR middle-end/84000
20882         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20884 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20886         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20887         to merge probabilities.
20888         * predict.c (probably_never_executed): Also mark as cold functions
20889         with global 0 profile and guessed local profile.
20890         * profile-count.c (profile_probability::combine_with_count): New
20891         member function.
20892         * profile-count.h (profile_probability::operator*,
20893         profile_probability::operator*=, profile_probability::operator/,
20894         profile_probability::operator/=): Reduce precision to adjusted
20895         and set value to guessed on contradictory divisions.
20896         (profile_probability::combine_with_freq): Remove.
20897         (profile_probability::combine_wiht_count): Declare.
20898         (profile_count::force_nonzero):: Set to adjusted.
20899         (profile_count::probability_in):: Set quality to adjusted.
20900         * tree-ssa-tail-merge.c (replace_block_by): Use
20901         combine_with_count.
20903 2018-01-23  Andrew Waterman  <andrew@sifive.com>
20904             Jim Wilson  <jimw@sifive.com>
20906         * config/riscv/riscv.c (riscv_stack_boundary): New.
20907         (riscv_option_override): Set riscv_stack_boundary.  Handle
20908         riscv_preferred_stack_boundary_arg.
20909         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20910         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20911         (STACK_BOUNDARY): Set to riscv_stack_boundary.
20912         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20913         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20914         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20916 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
20918         PR target/83905
20919         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20920         of struct ix86_frame.
20921         (ix86_expand_epilogue): Likewise.  Add a local variable for
20922         the reg_save_offset field in struct ix86_frame.
20924 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
20926         PR tree-optimization/82604
20927         * tree-loop-distribution.c (enum partition_kind): New enum item
20928         PKIND_PARTIAL_MEMSET.
20929         (partition_builtin_p): Support above new enum item.
20930         (generate_code_for_partition): Ditto.
20931         (compute_access_range): Differentiate cases that equality can be
20932         proven at all loops, the innermost loops or no loops.
20933         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20934         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
20935         (finalize_partitions, distribute_loop): Don't fuse partition of
20936         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20937         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20938         parloop is enabled.
20940 2018-01-23  Martin Liska  <mliska@suse.cz>
20942         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20943         order to ignore the predictor.
20944         (PRED_POLYMORPHIC_CALL): Likewise.
20945         (PRED_RECURSIVE_CALL): Likewise.
20947 2018-01-23  Martin Liska  <mliska@suse.cz>
20949         * tree-profile.c (tree_profiling): Print function header to
20950         aware reader which function we are working on.
20951         * value-prof.c (gimple_find_values_to_profile): Do not print
20952         not interesting value histograms.
20954 2018-01-23  Martin Liska  <mliska@suse.cz>
20956         * profile-count.h (enum profile_quality): Add
20957         profile_uninitialized as the first value. Do not number values
20958         as they are zero based.
20959         (profile_count::verify): Update sanity check.
20960         (profile_probability::verify): Likewise.
20962 2018-01-23  Nathan Sidwell  <nathan@acm.org>
20964         * doc/invoke.texi (ffor-scope): Deprecate.
20966 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20968         PR tree-optimization/83510
20969         * domwalk.c (set_all_edges_as_executable): New function.
20970         (dom_walker::dom_walker): Convert bool param
20971         "skip_unreachable_blocks" to enum reachability.  Move setup of
20972         edge flags to set_all_edges_as_executable and only do it when
20973         reachability is REACHABLE_BLOCKS.
20974         * domwalk.h (enum dom_walker::reachability): New enum.
20975         (dom_walker::dom_walker): Convert bool param
20976         "skip_unreachable_blocks" to enum reachability.
20977         (set_all_edges_as_executable): New decl.
20978         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
20979         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20980         "reachability".
20981         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20982         but converting true to REACHABLE_BLOCKS.
20983         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20984         * tree-vrp.c
20985         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20986         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20987         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20988         REACHABLE_BLOCKS.
20989         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20990         if check_all_array_refs will be called.
20992 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20994         * tree.c (selftest::test_location_wrappers): Add more test
20995         coverage.
20997 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20999         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
21000         (selftest::test_bit_in_range): Likewise.
21002 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
21004         PR testsuite/83888
21005         * doc/sourcebuild.texi (vect_float): Say that the selector
21006         only describes the situation when -funsafe-math-optimizations is on.
21007         (vect_float_strict): Document.
21009 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
21011         PR tree-optimization/83965
21012         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
21013         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
21014         instead of checking only for a reduction.
21015         (vect_recog_widen_sum_pattern): Likewise.
21017 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
21019         * predict.c (probably_never_executed): Only use precise profile info.
21020         (compute_function_frequency): Skip after inlining hack since we now
21021         have quality checking.
21023 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
21025         * profile-count.h (profile_probability::very_unlikely,
21026         profile_probability::unlikely, profile_probability::even): Set
21027         precision to guessed.
21029 2018-01-23  Richard Biener  <rguenther@suse.de>
21031         PR tree-optimization/83963
21032         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
21033         Properly terminate dominator walk when crossing the exit edge not
21034         when visiting its source block.
21036 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
21038         PR c++/83918
21039         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
21040         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
21042 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
21044         PR tree-optimization/83957
21045         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
21046         semicolon after for body surrounded by braces.
21048         PR tree-optimization/83081
21049         * profile-count.h (profile_probability::split): New method.
21050         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21051         Use profile_probability::split.
21052         (do_compare_rtx_and_jump): Fix adjustment of probabilities
21053         when splitting a single conditional jump into 2.
21055 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
21057         PR tree-optimization/69452
21058         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21059         decl.
21061 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21063         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21064         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21065         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21067 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21069         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21070         declaration.
21071         * config/rl78/rl78.md (movdi): New define_expand.
21072         * config/rl78/rl78.c (rl78_split_movdi): New function.
21074 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
21076         PR target/83862
21077         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21078         no longer used.
21079         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21080         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21081         128-bit to produce an UNSPEC move to get the double word with the
21082         signbit and then a shift directly to do signbit.
21083         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21084         implementation with a new version that just does either a direct
21085         move or a regular move.  Move memory interface to separate insns.
21086         Move insns so they are next to the expander.
21087         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21088         with signbit move.  Split big and little endian case.
21089         (signbit<mode>2_dm_mem_le): Likewise.
21090         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21091         (signbit<mode>2_dm2): Likewise.
21093 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21095         * config/rl78/rl78.md (anddi3): New define_expand.
21097 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21099         * config/rl78/rl78.md (umindi3): New define_expand.
21101 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21103         * config/rl78/rl78.md (smindi3): New define_expand.
21105 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21107         * config/rl78/rl78.md (smaxdi3): New define_expand.
21109 2018-01-22  Carl Love  <cel@us.ibm.com>
21111         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21112         LVX_V1TI): Add macro expansion.
21113         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21114         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21115         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21116         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21117         Change check to determine if the instruction is a byte reversing
21118         entry.  Fix typo in comment.
21119         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21120         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21121         Add def_builtin calls for new builtins.
21122         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21123         Add define_insn expansion.
21125 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21127         * config/rl78/rl78.md (umaxdi3): New define_expand.
21129 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
21131         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21132         for non-QImode registers.
21134 2018-01-22  Richard Biener  <rguenther@suse.de>
21136         PR tree-optimization/83963
21137         * graphite-scop-detection.c (scop_detection::get_sese): Delay
21138         including the loop exit block.
21139         (scop_detection::merge_sese): Likewise.
21140         (scop_detection::add_scop): Do it here instead.
21142 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21144         * doc/sourcebuild.texi (arm_softfloat): Document.
21146 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
21148         PR gcc/77734
21149         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21150         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21151         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21153 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21154             David Edelsohn  <dje.gcc@gmail.com>
21156         PR target/83946
21157         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21158         Change "crset eq" to "crset 2".
21159         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21160         (*call_indirect_aix<mode>_nospec): Likewise.
21161         (*call_value_indirect_aix<mode>_nospec): Likewise.
21162         (*call_indirect_elfv2<mode>_nospec): Likewise.
21163         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21164         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21165         change assembly output from . to $.
21166         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21167         (indirect_jump<mode>_nospec): Change assembly output from . to $.
21168         (*tablejump<mode>_internal1_nospec): Likewise.
21170 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
21172         PR target/80870
21173         * config/sh/sh_optimize_sett_clrt.cc:
21174         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21176 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
21178         PR tree-optimization/83940
21179         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21180         offset_dt to vect_constant_def rather than vect_unknown_def_type.
21181         (vect_check_load_store_mask): Add a mask_dt_out parameter and
21182         use it to pass back the definition type.
21183         (vect_check_store_rhs): Likewise rhs_dt_out.
21184         (vect_build_gather_load_calls): Add a mask_dt argument and use
21185         it instead of a call to vect_is_simple_use.
21186         (vectorizable_store): Update calls to vect_check_load_store_mask
21187         and vect_check_store_rhs.  Use the dt returned by the latter instead
21188         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
21189         instead of calls to vect_is_simple_use.  Pass the scalar rather
21190         than the vector operand to vect_is_simple_use when handling
21191         second and subsequent copies of an rhs value.
21192         (vectorizable_load): Update calls to vect_check_load_store_mask
21193         and vect_build_gather_load_calls.  Use the cached mask_dt and
21194         gs_info.offset_dt instead of calls to vect_is_simple_use.
21196 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
21198         PR middle-end/83945
21199         * tree-emutls.c: Include gimplify.h.
21200         (lower_emutls_2): New function.
21201         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21202         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21203         it before further processing.
21205         PR target/83930
21206         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21207         UINTVAL (trueop1) instead of INTVAL (op1).
21209 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
21211         PR debug/81570
21212         PR debug/83728
21213         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21214         INCOMING_FRAME_SP_OFFSET if not defined.
21215         (scan_trace): Add ENTRY argument.  If true and
21216         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21217         emit a note to adjust the CFA offset.
21218         (create_cfi_notes): Adjust scan_trace callers.
21219         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21220         INCOMING_FRAME_SP_OFFSET in the CIE.
21221         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21222         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21223         Likewise.
21224         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21225         * doc/tm.texi: Regenerated.
21227 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21229         PR rtl-optimization/83147
21230         * lra-constraints.c (remove_inheritance_pseudos): Use
21231         lra_substitute_pseudo_within_insn.
21233 2018-01-19  Tom de Vries  <tom@codesourcery.com>
21234             Cesar Philippidis  <cesar@codesourcery.com>
21236         PR target/83920
21237         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21239 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
21241         PR target/83790
21242         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21243         spaces for function labels.
21245 2018-01-19  Martin Liska  <mliska@suse.cz>
21247         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21248         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21249         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21250         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21251         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21252         (PRED_CONST_RETURN): Change from 69 to 65.
21253         (PRED_NULL_RETURN): Change from 91 to 71.
21254         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21255         (PRED_LOOP_GUARD): Change from 66 to 73.
21257 2018-01-19  Martin Liska  <mliska@suse.cz>
21259         * predict.c (predict_insn_def): Add new assert.
21260         (struct branch_predictor): Change type to signed integer.
21261         (test_prediction_value_range): Amend test to cover
21262         PROB_UNINITIALIZED.
21263         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21264         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21265         (PRED_LOOP_ITERATIONS_MAX): Likewise.
21266         (PRED_LOOP_IV_COMPARE): Likewise.
21267         * predict.h (PROB_UNINITIALIZED): Define new constant.
21269 2018-01-19  Martin Liska  <mliska@suse.cz>
21271         * predict.c (dump_prediction): Add new format for
21272         analyze_brprob.py script which is enabled with -details
21273         suboption.
21274         * profile-count.h (precise_p): New function.
21276 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
21278         PR tree-optimization/83922
21279         * tree-vect-loop.c (vect_verify_full_masking): Return false if
21280         there are no statements that need masking.
21281         (vect_active_double_reduction_p): New function.
21282         (vect_analyze_loop_operations): Use it when handling phis that
21283         are not in the loop header.
21285 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
21287         PR tree-optimization/83914
21288         * tree-vect-loop.c (vectorizable_induction): Don't convert
21289         init_expr or apply the peeling adjustment for inductions
21290         that are nested within the vectorized loop.
21292 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21294         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21295         instead of NEG.
21297 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
21299         PR sanitizer/81715
21300         PR testsuite/83882
21301         * function.h (gimplify_parameters): Add gimple_seq * argument.
21302         * function.c: Include gimple.h and options.h.
21303         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21304         for the added local temporaries if needed.
21305         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21306         if there are any parameter cleanups, wrap whole body into a
21307         try/finally with the cleanups.
21309 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
21311         PR target/82964
21312         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21313         Use GET_MODE_CLASS for scalar floating point.
21315 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
21317         PR ipa/82256
21318         patch by PaX Team
21319         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21320         Fix call of call_cgraph_insertion_hooks.
21322 2018-01-18  Martin Sebor  <msebor@redhat.com>
21324         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21326 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
21328         PR ipa/83619
21329         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21330         frequencies.
21332 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
21334         PR other/70268
21335         * common.opt: (-ffile-prefix-map): New option.
21336         * opts.c (common_handle_option): Defer it.
21337         * opts-global.c (handle_common_deferred_options): Handle it.
21338         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21339         * file-prefix-map.h: New file.
21340         (remap_debug_filename, add_debug_prefix_map): ...here.
21341         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21342         * final.c (debug_prefix_map, add_debug_prefix_map
21343         remap_debug_filename): Move to...
21344         * file-prefix-map.c: New file.
21345         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21346         generalize, get rid of alloca(), use strrchr() instead of strchr().
21347         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21348         Implement in terms of add_prefix_map().
21349         (remap_macro_filename, remap_debug_filename): Implement in term of
21350         remap_filename().
21351         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21352         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21353         * dbxout.c: Include file-prefix-map.h.
21354         * varasm.c: Likewise.
21355         * vmsdbgout.c: Likewise.
21356         * xcoffout.c: Likewise.
21357         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21358         * doc/cppopts.texi (-fmacro-prefix-map): Document.
21359         * doc/invoke.texi (-ffile-prefix-map): Document.
21360         (-fdebug-prefix-map): Update description.
21362 2018-01-18  Martin Liska  <mliska@suse.cz>
21364         * config/i386/i386.c (indirect_thunk_name): Document that also
21365         lfence is emitted.
21366         (output_indirect_thunk): Document why both instructions
21367         (pause and lfence) are generated.
21369 2018-01-18  Richard Biener  <rguenther@suse.de>
21371         PR tree-optimization/83887
21372         * graphite-scop-detection.c
21373         (scop_detection::get_nearest_dom_with_single_entry): Remove.
21374         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21375         (scop_detection::merge_sese): Re-implement with a flood-fill
21376         algorithm that properly finds a SESE region if it exists.
21378 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
21380         PR c/61240
21381         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21382         pointer_diff optimizations use view_convert instead of convert.
21384 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21386         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21387         Generate different code for -mno-speculate-indirect-jumps.
21388         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21389         (*call_indirect_aix<mode>): Disable for
21390         -mno-speculate-indirect-jumps.
21391         (*call_indirect_aix<mode>_nospec): New define_insn.
21392         (*call_value_indirect_aix<mode>): Disable for
21393         -mno-speculate-indirect-jumps.
21394         (*call_value_indirect_aix<mode>_nospec): New define_insn.
21395         (*sibcall_nonlocal_sysv<mode>): Generate different code for
21396         -mno-speculate-indirect-jumps.
21397         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21399 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21401         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21402         long double type, set the flags for noting the default long double
21403         type, even if we don't pass or return a long double type.
21405 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
21407         PR ipa/83051
21408         * ipa-inline.c (flatten_function): Do not overwrite final inlining
21409         failure.
21411 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
21413         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21414         support for merge[hl].
21415         (fold_mergehl_helper): New helper function.
21416         (tree-vector-builder.h): New #include for tree_vector_builder usage.
21417         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21418         (altivec_vmrglw_direct): Add xxmrglw insn.
21420 2018-01-17  Andrew Waterman  <andrew@sifive.com>
21422         * config/riscv/riscv.c (riscv_conditional_register_usage): If
21423         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21425 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
21427         PR lto/83121
21428         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21429         call the lto_location_cache before reading the
21430         DECL_SOURCE_LOCATION of the types.
21432 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
21433             Richard Sandiford  <richard.sandiford@linaro.org>
21435         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21436         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21437         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21438         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21439         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21440         Add declaration.
21441         * config/aarch64/constraints.md (aarch64_movti_operand):
21442         Limit immediates.
21443         * config/aarch64/predicates.md (Uti): Add new constraint.
21445 2018-01-17  Carl Love  <cel@us.ibm.com>
21447         * config/rs6000/vsx.md (define_expand xl_len_r,
21448         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21449         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21450         lxvll.
21451         (define_expand, define_insn): Move the shift left from  the
21452         define_insn to the define_expand for lxvl and stxvl instructions.
21453         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21454         and XL_LEN_R definitions to PURE.
21456 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
21458         * config/i386/i386.c (indirect_thunk_name): Declare regno
21459         as unsigned int.  Compare regno with INVALID_REGNUM.
21460         (output_indirect_thunk): Ditto.
21461         (output_indirect_thunk_function): Ditto.
21462         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
21463         in the call to output_indirect_thunk_function.
21465 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
21467         PR middle-end/83884
21468         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21469         rather than the size of inner_type to determine the stack slot size
21470         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21472 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
21474         PR target/83546
21475         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21476         to PTA_SILVERMONT.
21478 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
21480         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21481         endian Linux systems to optionally enable multilibs for selecting
21482         the long double type if the user configured an explicit type.
21483         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21484         have no long double multilibs if not defined.
21485         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21486         warn if the user used -mabi={ieee,ibm}longdouble and we built
21487         multilibs for long double.
21488         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21489         appropriate multilib option.
21490         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21491         multilib options.
21492         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21493         for building long double multilibs.
21494         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21496 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
21498         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21499         copies.
21501         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21502         64 bits.
21503         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21504         128 bits.
21506         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21507         variables.
21509         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21510         return value.
21512 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
21514         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21515         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21517 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21519         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21520         different rtl trees depending on TARGET_64BIT.
21521         (rs6000_gen_lvx): Likewise.
21523 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
21525         * config/visium/visium.md (nop): Tweak comment.
21526         (hazard_nop): Likewise.
21528 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21530         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21531         -mspeculate-indirect-jumps.
21532         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21533         for -mno-speculate-indirect-jumps.
21534         (*call_indirect_elfv2<mode>_nospec): New define_insn.
21535         (*call_value_indirect_elfv2<mode>): Disable for
21536         -mno-speculate-indirect-jumps.
21537         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21538         (indirect_jump): Emit different RTL for
21539         -mno-speculate-indirect-jumps.
21540         (*indirect_jump<mode>): Disable for
21541         -mno-speculate-indirect-jumps.
21542         (*indirect_jump<mode>_nospec): New define_insn.
21543         (tablejump): Emit different RTL for
21544         -mno-speculate-indirect-jumps.
21545         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21546         (tablejumpsi_nospec): New define_expand.
21547         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21548         (tablejumpdi_nospec): New define_expand.
21549         (*tablejump<mode>_internal1): Disable for
21550         -mno-speculate-indirect-jumps.
21551         (*tablejump<mode>_internal1_nospec): New define_insn.
21552         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21553         option.
21555 2018-01-16  Artyom Skrobov tyomitch@gmail.com
21557         * caller-save.c (insert_save): Drop unnecessary parameter.  All
21558         callers updated.
21560 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21561             Richard Biener  <rguenth@suse.de>
21563         PR libgomp/83590
21564         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21565         return early, inline manually is_gimple_sizepos.  Make sure if we
21566         call gimplify_expr we don't end up with a gimple constant.
21567         * tree.c (variably_modified_type_p): Don't return true for
21568         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
21569         * gimplify.h (is_gimple_sizepos): Remove.
21571 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21573         PR tree-optimization/83857
21574         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21575         vectorizable_live_operation for pure SLP statements.
21576         (vectorizable_live_operation): Handle PHIs.
21578 2018-01-16  Richard Biener  <rguenther@suse.de>
21580         PR tree-optimization/83867
21581         * tree-vect-stmts.c (vect_transform_stmt): Precompute
21582         nested_in_vect_loop_p since the scalar stmt may get invalidated.
21584 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21586         PR c/83844
21587         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21588         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21589         If off is not INTEGER_CST, issue a may not be aligned warning
21590         rather than isn't aligned.  Use isn%'t rather than isn't.
21591         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21592         into MULT_EXPR.
21593         <case MULT_EXPR>: Improve the case when bottom and one of the
21594         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21595         operand, in that case check if the other operand is multiple of
21596         bottom divided by the INTEGER_CST operand.
21598 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21600         PR target/83858
21601         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21602         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21603         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21604         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21605         * config/pa/pa.c (pa_function_arg_advance): Likewise.
21606         (pa_function_arg, pa_arg_partial_bytes): Likewise.
21607         (pa_function_arg_size): New function.
21609 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21611         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21612         in a separate statement.
21614 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21616         PR tree-optimization/83847
21617         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21618         group gathers and scatters.
21620 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21622         PR rtl-optimization/86620
21623         * params.def (max-sched-ready-insns): Bump minimum value to 1.
21625         PR rtl-optimization/83213
21626         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21627         to last if both are JUMP_INSNs.
21629         PR tree-optimization/83843
21630         * gimple-ssa-store-merging.c
21631         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21632         store_immediate_info for bswap/nop orig_stores.
21634 2018-01-15  Andrew Waterman  <andrew@sifive.com>
21636         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21637         !TARGET_MUL.
21638         <UDIV>: Increase cost if !TARGET_DIV.
21640 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
21642         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21643         (define_attr "cr_logical_3op"): New.
21644         (cceq_ior_compare): Adjust.
21645         (cceq_ior_compare_complement): Adjust.
21646         (*cceq_rev_compare): Adjust.
21647         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21648         (is_cracked_insn): Adjust.
21649         (insn_must_be_first_in_group): Adjust.
21650         * config/rs6000/40x.md: Adjust.
21651         * config/rs6000/440.md: Adjust.
21652         * config/rs6000/476.md: Adjust.
21653         * config/rs6000/601.md: Adjust.
21654         * config/rs6000/603.md: Adjust.
21655         * config/rs6000/6xx.md: Adjust.
21656         * config/rs6000/7450.md: Adjust.
21657         * config/rs6000/7xx.md: Adjust.
21658         * config/rs6000/8540.md: Adjust.
21659         * config/rs6000/cell.md: Adjust.
21660         * config/rs6000/e300c2c3.md: Adjust.
21661         * config/rs6000/e500mc.md: Adjust.
21662         * config/rs6000/e500mc64.md: Adjust.
21663         * config/rs6000/e5500.md: Adjust.
21664         * config/rs6000/e6500.md: Adjust.
21665         * config/rs6000/mpc.md: Adjust.
21666         * config/rs6000/power4.md: Adjust.
21667         * config/rs6000/power5.md: Adjust.
21668         * config/rs6000/power6.md: Adjust.
21669         * config/rs6000/power7.md: Adjust.
21670         * config/rs6000/power8.md: Adjust.
21671         * config/rs6000/power9.md: Adjust.
21672         * config/rs6000/rs64.md: Adjust.
21673         * config/rs6000/titan.md: Adjust.
21675 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21677         * config/i386/predicates.md (indirect_branch_operand): Rewrite
21678         ix86_indirect_branch_register logic.
21680 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21682         * config/i386/constraints.md (Bs): Update
21683         ix86_indirect_branch_register check.  Don't check
21684         ix86_indirect_branch_register with GOT_memory_operand.
21685         (Bw): Likewise.
21686         * config/i386/predicates.md (GOT_memory_operand): Don't check
21687         ix86_indirect_branch_register here.
21688         (GOT32_symbol_operand): Likewise.
21690 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21692         * config/i386/predicates.md (constant_call_address_operand):
21693         Rewrite ix86_indirect_branch_register logic.
21694         (sibcall_insn_operand): Likewise.
21696 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21698         * config/i386/constraints.md (Bs): Replace
21699         ix86_indirect_branch_thunk_register with
21700         ix86_indirect_branch_register.
21701         (Bw): Likewise.
21702         * config/i386/i386.md (indirect_jump): Likewise.
21703         (tablejump): Likewise.
21704         (*sibcall_memory): Likewise.
21705         (*sibcall_value_memory): Likewise.
21706         Peepholes of indirect call and jump via memory: Likewise.
21707         * config/i386/i386.opt: Likewise.
21708         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21709         (GOT_memory_operand): Likewise.
21710         (call_insn_operand): Likewise.
21711         (sibcall_insn_operand): Likewise.
21712         (GOT32_symbol_operand): Likewise.
21714 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21716         PR middle-end/83837
21717         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21718         type rather than type addr's type points to.
21719         (expand_omp_atomic_mutex): Likewise.
21720         (expand_omp_atomic): Likewise.
21722 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21724         PR target/83839
21725         * config/i386/i386.c (output_indirect_thunk_function): Use
21726         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21727         for  __x86_return_thunk.
21729 2018-01-15  Richard Biener  <rguenther@suse.de>
21731         PR middle-end/83850
21732         * expmed.c (extract_bit_field_1): Fix typo.
21734 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21736         PR target/83687
21737         * config/arm/iterators.md (VF): New mode iterator.
21738         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21739         Remove integer-related logic from pattern.
21740         (neon_vabd<mode>_3): Likewise.
21742 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21744         PR middle-end/82694
21745         * common.opt (fstrict-overflow): No longer an alias.
21746         (fwrapv-pointer): New option.
21747         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21748         also for pointer types based on flag_wrapv_pointer.
21749         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21750         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21751         opts->x_flag_wrapv got set.
21752         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21753         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21754         POINTER_TYPE_OVERFLOW_UNDEFINED.
21755         * match.pd: Likewise in address comparison pattern.
21756         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21758 2018-01-15  Richard Biener  <rguenther@suse.de>
21760         PR lto/83804
21761         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21762         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
21763         Reset type names to their identifier if their TYPE_DECL doesn't
21764         have linkage (and thus is used for ODR and devirt).
21765         (save_debug_info_for_decl): Remove.
21766         (save_debug_info_for_type): Likewise.
21767         (add_tree_to_fld_list): Adjust.
21768         * tree-pretty-print.c (dump_generic_node): Make dumping of
21769         type names more robust.
21771 2018-01-15  Richard Biener  <rguenther@suse.de>
21773         * BASE-VER: Bump to 8.0.1.
21775 2018-01-14  Martin Sebor  <msebor@redhat.com>
21777         PR other/83508
21778         * builtins.c (check_access): Avoid warning when the no-warning bit
21779         is set.
21781 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
21783         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21784         * ira-color (allocno_hard_regs_compare): Likewise.
21786 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
21788         PR target/83013
21789         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21790         Use .pushsection/.popsection.
21792 2018-01-14  Martin Sebor  <msebor@redhat.com>
21794         PR c++/81327
21795         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21797 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
21799         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21800         entry from extra_headers.
21801         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21802         extra_headers, make the list bitwise identical to the i?86-*-* one.
21804 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21806         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21807         -mcmodel=large with -mindirect-branch=thunk,
21808         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21809         -mfunction-return=thunk-extern.
21810         * doc/invoke.texi: Document -mcmodel=large is incompatible with
21811         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21812         -mfunction-return=thunk and -mfunction-return=thunk-extern.
21814 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21816         * config/i386/i386.c (print_reg): Print the name of the full
21817         integer register without '%'.
21818         (ix86_print_operand): Handle 'V'.
21819         * doc/extend.texi: Document 'V' modifier.
21821 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21823         * config/i386/constraints.md (Bs): Disallow memory operand for
21824         -mindirect-branch-register.
21825         (Bw): Likewise.
21826         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21827         (GOT_memory_operand): Likewise.
21828         (call_insn_operand): Likewise.
21829         (sibcall_insn_operand): Likewise.
21830         (GOT32_symbol_operand): Likewise.
21831         * config/i386/i386.md (indirect_jump): Call convert_memory_address
21832         for -mindirect-branch-register.
21833         (tablejump): Likewise.
21834         (*sibcall_memory): Likewise.
21835         (*sibcall_value_memory): Likewise.
21836         Disallow peepholes of indirect call and jump via memory for
21837         -mindirect-branch-register.
21838         (*call_pop): Replace m with Bw.
21839         (*call_value_pop): Likewise.
21840         (*sibcall_pop_memory): Replace m with Bs.
21841         * config/i386/i386.opt (mindirect-branch-register): New option.
21842         * doc/invoke.texi: Document -mindirect-branch-register option.
21844 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21846         * config/i386/i386-protos.h (ix86_output_function_return): New.
21847         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21848         set function_return_type.
21849         (indirect_thunk_name): Add ret_p to indicate thunk for function
21850         return.
21851         (output_indirect_thunk_function): Pass false to
21852         indirect_thunk_name.
21853         (ix86_output_indirect_branch_via_reg): Likewise.
21854         (ix86_output_indirect_branch_via_push): Likewise.
21855         (output_indirect_thunk_function): Create alias for function
21856         return thunk if regno < 0.
21857         (ix86_output_function_return): New function.
21858         (ix86_handle_fndecl_attribute): Handle function_return.
21859         (ix86_attribute_table): Add function_return.
21860         * config/i386/i386.h (machine_function): Add
21861         function_return_type.
21862         * config/i386/i386.md (simple_return_internal): Use
21863         ix86_output_function_return.
21864         (simple_return_internal_long): Likewise.
21865         * config/i386/i386.opt (mfunction-return=): New option.
21866         (indirect_branch): Mention -mfunction-return=.
21867         * doc/extend.texi: Document function_return function attribute.
21868         * doc/invoke.texi: Document -mfunction-return= option.
21870 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21872         * config/i386/i386-opts.h (indirect_branch): New.
21873         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21874         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21875         with local indirect jump when converting indirect call and jump.
21876         (ix86_set_indirect_branch_type): New.
21877         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21878         (indirectlabelno): New.
21879         (indirect_thunk_needed): Likewise.
21880         (indirect_thunk_bnd_needed): Likewise.
21881         (indirect_thunks_used): Likewise.
21882         (indirect_thunks_bnd_used): Likewise.
21883         (INDIRECT_LABEL): Likewise.
21884         (indirect_thunk_name): Likewise.
21885         (output_indirect_thunk): Likewise.
21886         (output_indirect_thunk_function): Likewise.
21887         (ix86_output_indirect_branch_via_reg): Likewise.
21888         (ix86_output_indirect_branch_via_push): Likewise.
21889         (ix86_output_indirect_branch): Likewise.
21890         (ix86_output_indirect_jmp): Likewise.
21891         (ix86_code_end): Call output_indirect_thunk_function if needed.
21892         (ix86_output_call_insn): Call ix86_output_indirect_branch if
21893         needed.
21894         (ix86_handle_fndecl_attribute): Handle indirect_branch.
21895         (ix86_attribute_table): Add indirect_branch.
21896         * config/i386/i386.h (machine_function): Add indirect_branch_type
21897         and has_local_indirect_jump.
21898         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21899         to true.
21900         (tablejump): Likewise.
21901         (*indirect_jump): Use ix86_output_indirect_jmp.
21902         (*tablejump_1): Likewise.
21903         (simple_return_indirect_internal): Likewise.
21904         * config/i386/i386.opt (mindirect-branch=): New option.
21905         (indirect_branch): New.
21906         (keep): Likewise.
21907         (thunk): Likewise.
21908         (thunk-inline): Likewise.
21909         (thunk-extern): Likewise.
21910         * doc/extend.texi: Document indirect_branch function attribute.
21911         * doc/invoke.texi: Document -mindirect-branch= option.
21913 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
21915         PR ipa/83051
21916         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21918 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
21920         * ipa-inline.c (want_inline_small_function_p): Return false if
21921         inlining has already failed with CIF_FINAL_ERROR.
21922         (update_caller_keys): Call want_inline_small_function_p before
21923         can_inline_edge_p.
21924         (update_callee_keys): Likewise.
21926 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21928         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21929         New function.
21930         (rs6000_quadword_masked_address_p): Likewise.
21931         (quad_aligned_load_p): Likewise.
21932         (quad_aligned_store_p): Likewise.
21933         (const_load_sequence_p): Add comment to describe the outer-most loop.
21934         (mimic_memory_attributes_and_flags): New function.
21935         (rs6000_gen_stvx): Likewise.
21936         (replace_swapped_aligned_store): Likewise.
21937         (rs6000_gen_lvx): Likewise.
21938         (replace_swapped_aligned_load): Likewise.
21939         (replace_swapped_load_constant): Capitalize argument name in
21940         comment describing this function.
21941         (rs6000_analyze_swaps): Add a third pass to search for vector loads
21942         and stores that access quad-word aligned addresses and replace
21943         with stvx or lvx instructions when appropriate.
21944         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21945         New function prototype.
21946         (rs6000_quadword_masked_address_p): Likewise.
21947         (rs6000_gen_lvx): Likewise.
21948         (rs6000_gen_stvx): Likewise.
21949         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21950         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21951         when memory address is aligned.
21952         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21953         this split to select lvx instruction when memory address is aligned.
21954         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21955         instruction when memory address is aligned.
21956         (*vsx_le_perm_load_v16qi): Likewise.
21957         (four unnamed splitters): Modify to select the stvx instruction
21958         when memory is aligned.
21960 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
21962         * predict.c (determine_unlikely_bbs): Handle correctly BBs
21963         which appears in the queue multiple times.
21965 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21966             Alan Hayward  <alan.hayward@arm.com>
21967             David Sherwood  <david.sherwood@arm.com>
21969         * tree-vectorizer.h (vec_lower_bound): New structure.
21970         (_loop_vec_info): Add check_nonzero and lower_bounds.
21971         (LOOP_VINFO_CHECK_NONZERO): New macro.
21972         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21973         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21974         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21975         fields.  Make seg_len the distance travelled, not including the
21976         access size.
21977         (dr_direction_indicator): Declare.
21978         (dr_zero_step_indicator): Likewise.
21979         (dr_known_forward_stride_p): Likewise.
21980         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21981         tree-ssanames.h.
21982         (runtime_alias_check_p): Allow runtime alias checks with
21983         variable strides.
21984         (operator ==): Compare access_size and align.
21985         (prune_runtime_alias_test_list): Rework for new distinction between
21986         the access_size and seg_len.
21987         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
21988         segment lengths.
21989         (get_segment_min_max): New function.
21990         (create_intersect_range_checks): Use it.
21991         (dr_step_indicator): New function.
21992         (dr_direction_indicator): Likewise.
21993         (dr_zero_step_indicator): Likewise.
21994         (dr_known_forward_stride_p): Likewise.
21995         * tree-loop-distribution.c (data_ref_segment_size): Return
21996         DR_STEP * (niters - 1).
21997         (compute_alias_check_pairs): Update call to the dr_with_seg_len
21998         constructor.
21999         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
22000         (vect_preserves_scalar_order_p): New function, split out from...
22001         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
22002         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
22003         (vect_vfa_access_size): New function.
22004         (vect_vfa_align): Likewise.
22005         (vect_compile_time_alias): Take access_size_a and access_b arguments.
22006         (dump_lower_bound): New function.
22007         (vect_check_lower_bound): Likewise.
22008         (vect_small_gap_p): Likewise.
22009         (vectorizable_with_step_bound_p): Likewise.
22010         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
22011         depencies if the vectorization factor is 1.  Convert the checks
22012         for nonzero steps into checks on the bounds of DR_STEP.  Try using
22013         a bunds check for variable steps if the minimum required step is
22014         relatively small. Update calls to the dr_with_seg_len
22015         constructor and to vect_compile_time_alias.
22016         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
22017         function.
22018         (vect_loop_versioning): Call it.
22019         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
22020         when retrying.
22021         (vect_estimate_min_profitable_iters): Account for any bounds checks.
22023 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22024             Alan Hayward  <alan.hayward@arm.com>
22025             David Sherwood  <david.sherwood@arm.com>
22027         * doc/sourcebuild.texi (vect_scatter_store): Document.
22028         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
22029         optabs.
22030         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
22031         Document.
22032         * genopinit.c (main): Add supports_vec_scatter_store and
22033         supports_vec_scatter_store_cached to target_optabs.
22034         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
22035         IFN_MASK_SCATTER_STORE.
22036         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
22037         functions.
22038         * internal-fn.h (internal_store_fn_p): Declare.
22039         (internal_fn_stored_value_index): Likewise.
22040         * internal-fn.c (scatter_store_direct): New macro.
22041         (expand_scatter_store_optab_fn): New function.
22042         (direct_scatter_store_optab_supported_p): New macro.
22043         (internal_store_fn_p): New function.
22044         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
22045         IFN_MASK_SCATTER_STORE.
22046         (internal_fn_mask_index): Likewise.
22047         (internal_fn_stored_value_index): New function.
22048         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22049         for scatter stores.
22050         * optabs-query.h (supports_vec_scatter_store_p): Declare.
22051         * optabs-query.c (supports_vec_scatter_store_p): New function.
22052         * tree-vectorizer.h (vect_get_store_rhs): Declare.
22053         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22054         true for scatter stores.
22055         (vect_gather_scatter_fn_p): Handle scatter stores too.
22056         (vect_check_gather_scatter): Consider using scatter stores if
22057         supports_vec_scatter_store_p.
22058         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22059         scatter stores too.
22060         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22061         internal_fn_stored_value_index.
22062         (check_load_store_masking): Handle scatter stores too.
22063         (vect_get_store_rhs): Make public.
22064         (vectorizable_call): Use internal_store_fn_p.
22065         (vectorizable_store): Handle scatter store internal functions.
22066         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22067         when deciding whether the end of the group has been reached.
22068         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22069         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22070         (mask_scatter_store<mode>): New insns.
22072 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22073             Alan Hayward  <alan.hayward@arm.com>
22074             David Sherwood  <david.sherwood@arm.com>
22076         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22077         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22078         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22079         function.
22080         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22081         Use vect_truncate_gather_scatter_offset if we can't treat the
22082         operation as a normal gather load or scatter store.
22083         (get_group_load_store_type): Take the gather_scatter_info
22084         as argument.  Try using a gather load or scatter store for
22085         single-element groups.
22086         (get_load_store_type): Update calls to get_group_load_store_type
22087         and vect_use_strided_gather_scatters_p.
22089 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22090             Alan Hayward  <alan.hayward@arm.com>
22091             David Sherwood  <david.sherwood@arm.com>
22093         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22094         optional tree argument.
22095         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22096         null target hooks.
22097         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22098         but continue to use the current value as a fallback.
22099         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22100         to compare the updates.
22101         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22102         (get_load_store_type): Use it when handling a strided access.
22103         (vect_get_strided_load_store_ops): New function.
22104         (vect_get_data_ptr_increment): Likewise.
22105         (vectorizable_load): Handle strided gather loads.  Always pass
22106         a step to vect_create_data_ref_ptr and bump_vector_ptr.
22108 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22109             Alan Hayward  <alan.hayward@arm.com>
22110             David Sherwood  <david.sherwood@arm.com>
22112         * doc/md.texi (gather_load@var{m}): Document.
22113         (mask_gather_load@var{m}): Likewise.
22114         * genopinit.c (main): Add supports_vec_gather_load and
22115         supports_vec_gather_load_cached to target_optabs.
22116         * optabs-tree.c (init_tree_optimization_optabs): Use
22117         ggc_cleared_alloc to allocate target_optabs.
22118         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22119         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22120         functions.
22121         * internal-fn.h (internal_load_fn_p): Declare.
22122         (internal_gather_scatter_fn_p): Likewise.
22123         (internal_fn_mask_index): Likewise.
22124         (internal_gather_scatter_fn_supported_p): Likewise.
22125         * internal-fn.c (gather_load_direct): New macro.
22126         (expand_gather_load_optab_fn): New function.
22127         (direct_gather_load_optab_supported_p): New macro.
22128         (direct_internal_fn_optab): New function.
22129         (internal_load_fn_p): Likewise.
22130         (internal_gather_scatter_fn_p): Likewise.
22131         (internal_fn_mask_index): Likewise.
22132         (internal_gather_scatter_fn_supported_p): Likewise.
22133         * optabs-query.c (supports_at_least_one_mode_p): New function.
22134         (supports_vec_gather_load_p): Likewise.
22135         * optabs-query.h (supports_vec_gather_load_p): Declare.
22136         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22137         and memory_type field.
22138         (NUM_PATTERNS): Bump to 15.
22139         * tree-vect-data-refs.c: Include internal-fn.h.
22140         (vect_gather_scatter_fn_p): New function.
22141         (vect_describe_gather_scatter_call): Likewise.
22142         (vect_check_gather_scatter): Try using internal functions for
22143         gather loads.  Recognize existing calls to a gather load function.
22144         (vect_analyze_data_refs): Consider using gather loads if
22145         supports_vec_gather_load_p.
22146         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22147         (vect_get_gather_scatter_offset_type): Likewise.
22148         (vect_convert_mask_for_vectype): Likewise.
22149         (vect_add_conversion_to_patterm): Likewise.
22150         (vect_try_gather_scatter_pattern): Likewise.
22151         (vect_recog_gather_scatter_pattern): New pattern recognizer.
22152         (vect_vect_recog_func_ptrs): Add it.
22153         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22154         internal_fn_mask_index and internal_gather_scatter_fn_p.
22155         (check_load_store_masking): Take the gather_scatter_info as an
22156         argument and handle gather loads.
22157         (vect_get_gather_scatter_ops): New function.
22158         (vectorizable_call): Check internal_load_fn_p.
22159         (vectorizable_load): Likewise.  Handle gather load internal
22160         functions.
22161         (vectorizable_store): Update call to check_load_store_masking.
22162         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22163         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22164         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22165         (aarch64_gather_scale_operand_d): New predicates.
22166         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22167         (mask_gather_load<mode>): New insns.
22169 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22170             Alan Hayward  <alan.hayward@arm.com>
22171             David Sherwood  <david.sherwood@arm.com>
22173         * optabs.def (fold_left_plus_optab): New optab.
22174         * doc/md.texi (fold_left_plus_@var{m}): Document.
22175         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22176         * internal-fn.c (fold_left_direct): Define.
22177         (expand_fold_left_optab_fn): Likewise.
22178         (direct_fold_left_optab_supported_p): Likewise.
22179         * fold-const-call.c (fold_const_fold_left): New function.
22180         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22181         * tree-parloops.c (valid_reduction_p): New function.
22182         (gather_scalar_reductions): Use it.
22183         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22184         (vect_finish_replace_stmt): Declare.
22185         * tree-vect-loop.c (fold_left_reduction_fn): New function.
22186         (needs_fold_left_reduction_p): New function, split out from...
22187         (vect_is_simple_reduction): ...here.  Accept reductions that
22188         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22189         (vect_force_simple_reduction): Also store the reduction type in
22190         the assignment's STMT_VINFO_REDUC_TYPE.
22191         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22192         (merge_with_identity): New function.
22193         (vect_expand_fold_left): Likewise.
22194         (vectorize_fold_left_reduction): Likewise.
22195         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
22196         scalar phi in place for it.  Check for target support and reject
22197         cases that would reassociate the operation.  Defer the transform
22198         phase to vectorize_fold_left_reduction.
22199         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22200         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22201         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22203 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22205         * tree-if-conv.c (predicate_mem_writes): Remove redundant
22206         call to ifc_temp_var.
22208 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22209             Alan Hayward  <alan.hayward@arm.com>
22210             David Sherwood  <david.sherwood@arm.com>
22212         * target.def (legitimize_address_displacement): Take the original
22213         offset as a poly_int.
22214         * targhooks.h (default_legitimize_address_displacement): Update
22215         accordingly.
22216         * targhooks.c (default_legitimize_address_displacement): Likewise.
22217         * doc/tm.texi: Regenerate.
22218         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22219         as an argument, moving assert of ad->disp == ad->disp_term to...
22220         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
22221         Try calling targetm.legitimize_address_displacement before expanding
22222         the address rather than afterwards, and adjust for the new interface.
22223         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22224         Match the new hook interface.  Handle SVE addresses.
22225         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22226         new hook interface.
22228 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22230         * Makefile.in (OBJS): Add early-remat.o.
22231         * target.def (select_early_remat_modes): New hook.
22232         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22233         * doc/tm.texi: Regenerate.
22234         * targhooks.h (default_select_early_remat_modes): Declare.
22235         * targhooks.c (default_select_early_remat_modes): New function.
22236         * timevar.def (TV_EARLY_REMAT): New timevar.
22237         * passes.def (pass_early_remat): New pass.
22238         * tree-pass.h (make_pass_early_remat): Declare.
22239         * early-remat.c: New file.
22240         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22241         function.
22242         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22244 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22245             Alan Hayward  <alan.hayward@arm.com>
22246             David Sherwood  <david.sherwood@arm.com>
22248         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22249         vfm1 with a bound_epilog parameter.
22250         (vect_do_peeling): Update calls accordingly, and move the prologue
22251         call earlier in the function.  Treat the base bound_epilog as 0 for
22252         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
22253         this base when peeling for gaps.
22254         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22255         with fully-masked loops.
22256         (vect_estimate_min_profitable_iters): Handle the single peeled
22257         iteration in that case.
22259 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22260             Alan Hayward  <alan.hayward@arm.com>
22261             David Sherwood  <david.sherwood@arm.com>
22263         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22264         single-element interleaving even if the size is not a power of 2.
22265         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22266         accesses for single-element interleaving if the group size is
22267         not a power of 2.
22269 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22270             Alan Hayward  <alan.hayward@arm.com>
22271             David Sherwood  <david.sherwood@arm.com>
22273         * doc/md.texi (fold_extract_last_@var{m}): Document.
22274         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22275         * optabs.def (fold_extract_last_optab): New optab.
22276         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22277         * internal-fn.c (fold_extract_direct): New macro.
22278         (expand_fold_extract_optab_fn): Likewise.
22279         (direct_fold_extract_optab_supported_p): Likewise.
22280         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22281         * tree-vect-loop.c (vect_model_reduction_cost): Handle
22282         EXTRACT_LAST_REDUCTION.
22283         (get_initial_def_for_reduction): Do not create an initial vector
22284         for EXTRACT_LAST_REDUCTION reductions.
22285         (vectorizable_reduction): Leave the scalar phi in place for
22286         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
22287         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
22288         epilogue code for EXTRACT_LAST_REDUCTION and defer the
22289         transform phase to vectorizable_condition.
22290         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22291         split out from...
22292         (vect_finish_stmt_generation): ...here.
22293         (vect_finish_replace_stmt): New function.
22294         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22295         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22296         pattern.
22297         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22299 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22300             Alan Hayward  <alan.hayward@arm.com>
22301             David Sherwood  <david.sherwood@arm.com>
22303         * doc/md.texi (extract_last_@var{m}): Document.
22304         * optabs.def (extract_last_optab): New optab.
22305         * internal-fn.def (EXTRACT_LAST): New internal function.
22306         * internal-fn.c (cond_unary_direct): New macro.
22307         (expand_cond_unary_optab_fn): Likewise.
22308         (direct_cond_unary_optab_supported_p): Likewise.
22309         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22310         loops using EXTRACT_LAST.
22311         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22312         (extract_last_<mode>): ...this optab.
22313         (vec_extract<mode><Vel>): Update accordingly.
22315 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22316             Alan Hayward  <alan.hayward@arm.com>
22317             David Sherwood  <david.sherwood@arm.com>
22319         * target.def (empty_mask_is_expensive): New hook.
22320         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22321         * doc/tm.texi: Regenerate.
22322         * targhooks.h (default_empty_mask_is_expensive): Declare.
22323         * targhooks.c (default_empty_mask_is_expensive): New function.
22324         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22325         if the target says that empty masks are expensive.
22326         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22327         New function.
22328         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22330 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22331             Alan Hayward  <alan.hayward@arm.com>
22332             David Sherwood  <david.sherwood@arm.com>
22334         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22335         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22336         (vect_use_loop_mask_for_alignment_p): New function.
22337         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22338         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22339         niters_skip argument.  Make sure that the first niters_skip elements
22340         of the first iteration are inactive.
22341         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22342         Update call to vect_set_loop_masks_directly.
22343         (get_misalign_in_elems): New function, split out from...
22344         (vect_gen_prolog_loop_niters): ...here.
22345         (vect_update_init_of_dr): Take a code argument that specifies whether
22346         the adjustment should be added or subtracted.
22347         (vect_update_init_of_drs): Likewise.
22348         (vect_prepare_for_masked_peels): New function.
22349         (vect_do_peeling): Skip prologue peeling if we're using a mask
22350         instead.  Update call to vect_update_inits_of_drs.
22351         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22352         mask_skip_niters.
22353         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22354         alignment.  Do not include the number of peeled iterations in
22355         the minimum threshold in that case.
22356         (vectorizable_induction): Adjust the start value down by
22357         LOOP_VINFO_MASK_SKIP_NITERS iterations.
22358         (vect_transform_loop): Call vect_prepare_for_masked_peels.
22359         Take the number of skipped iterations into account when calculating
22360         the loop bounds.
22361         * tree-vect-stmts.c (vect_gen_while_not): New function.
22363 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22364             Alan Hayward  <alan.hayward@arm.com>
22365             David Sherwood  <david.sherwood@arm.com>
22367         * doc/sourcebuild.texi (vect_fully_masked): Document.
22368         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22369         default value to 0.
22370         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22371         split out from...
22372         (vect_analyze_loop_2): ...here. Don't check the vectorization
22373         factor against the number of loop iterations if the loop is
22374         fully-masked.
22376 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22377             Alan Hayward  <alan.hayward@arm.com>
22378             David Sherwood  <david.sherwood@arm.com>
22380         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22381         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22382         (dump_groups): Update accordingly.
22383         (iv_use::mem_type): New member variable.
22384         (address_p): New function.
22385         (record_use): Add a mem_type argument and initialize the new
22386         mem_type field.
22387         (record_group_use): Add a mem_type argument.  Use address_p.
22388         Remove obsolete null checks of base_object.  Update call to record_use.
22389         (find_interesting_uses_op): Update call to record_group_use.
22390         (find_interesting_uses_cond): Likewise.
22391         (find_interesting_uses_address): Likewise.
22392         (get_mem_type_for_internal_fn): New function.
22393         (find_address_like_use): Likewise.
22394         (find_interesting_uses_stmt): Try find_address_like_use before
22395         calling find_interesting_uses_op.
22396         (addr_offset_valid_p): Use the iv mem_type field as the type
22397         of the addressed memory.
22398         (add_autoinc_candidates): Likewise.
22399         (get_address_cost): Likewise.
22400         (split_small_address_groups_p): Use address_p.
22401         (split_address_groups): Likewise.
22402         (add_iv_candidate_for_use): Likewise.
22403         (autoinc_possible_for_pair): Likewise.
22404         (rewrite_groups): Likewise.
22405         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22406         (determine_group_iv_cost): Update after split of USE_ADDRESS.
22407         (get_alias_ptr_type_for_ptr_address): New function.
22408         (rewrite_use_address): Rewrite address uses in calls that were
22409         identified by find_address_like_use.
22411 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22412             Alan Hayward  <alan.hayward@arm.com>
22413             David Sherwood  <david.sherwood@arm.com>
22415         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22416         TARGET_MEM_REFs.
22417         * gimple-expr.h (is_gimple_addressable: Likewise.
22418         * gimple-expr.c (is_gimple_address): Likewise.
22419         * internal-fn.c (expand_call_mem_ref): New function.
22420         (expand_mask_load_optab_fn): Use it.
22421         (expand_mask_store_optab_fn): Likewise.
22423 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22424             Alan Hayward  <alan.hayward@arm.com>
22425             David Sherwood  <david.sherwood@arm.com>
22427         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22428         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22429         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22430         (cond_umax@var{mode}): Document.
22431         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22432         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22433         (cond_umin_optab, cond_umax_optab): New optabs.
22434         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22435         (COND_IOR, COND_XOR): New internal functions.
22436         * internal-fn.h (get_conditional_internal_fn): Declare.
22437         * internal-fn.c (cond_binary_direct): New macro.
22438         (expand_cond_binary_optab_fn): Likewise.
22439         (direct_cond_binary_optab_supported_p): Likewise.
22440         (get_conditional_internal_fn): New function.
22441         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22442         Cope with reduction statements that are vectorized as calls rather
22443         than assignments.
22444         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22445         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22446         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22447         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22448         (UNSPEC_COND_EOR): New unspecs.
22449         (optab): Add mappings for them.
22450         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22451         (sve_int_op, sve_fp_op): New int attributes.
22453 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22454             Alan Hayward  <alan.hayward@arm.com>
22455             David Sherwood  <david.sherwood@arm.com>
22457         * optabs.def (while_ult_optab): New optab.
22458         * doc/md.texi (while_ult@var{m}@var{n}): Document.
22459         * internal-fn.def (WHILE_ULT): New internal function.
22460         * internal-fn.h (direct_internal_fn_supported_p): New override
22461         that takes two types as argument.
22462         * internal-fn.c (while_direct): New macro.
22463         (expand_while_optab_fn): New function.
22464         (convert_optab_supported_p): Likewise.
22465         (direct_while_optab_supported_p): New macro.
22466         * wide-int.h (wi::udiv_ceil): New function.
22467         * tree-vectorizer.h (rgroup_masks): New structure.
22468         (vec_loop_masks): New typedef.
22469         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22470         and fully_masked_p.
22471         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22472         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22473         (vect_max_vf): New function.
22474         (slpeel_make_loop_iterate_ntimes): Delete.
22475         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22476         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22477         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22478         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22479         internal-fn.h, stor-layout.h and optabs-query.h.
22480         (vect_set_loop_mask): New function.
22481         (add_preheader_seq): Likewise.
22482         (add_header_seq): Likewise.
22483         (interleave_supported_p): Likewise.
22484         (vect_maybe_permute_loop_masks): Likewise.
22485         (vect_set_loop_masks_directly): Likewise.
22486         (vect_set_loop_condition_masked): Likewise.
22487         (vect_set_loop_condition_unmasked): New function, split out from
22488         slpeel_make_loop_iterate_ntimes.
22489         (slpeel_make_loop_iterate_ntimes): Rename to..
22490         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
22491         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22492         (vect_do_peeling): Update call accordingly.
22493         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22494         loops.
22495         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22496         mask_compare_type, can_fully_mask_p and fully_masked_p.
22497         (release_vec_loop_masks): New function.
22498         (_loop_vec_info): Use it to free the loop masks.
22499         (can_produce_all_loop_masks_p): New function.
22500         (vect_get_max_nscalars_per_iter): Likewise.
22501         (vect_verify_full_masking): Likewise.
22502         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22503         retries, and free the mask rgroups before retrying.  Check loop-wide
22504         reasons for disallowing fully-masked loops.  Make the final decision
22505         about whether use a fully-masked loop or not.
22506         (vect_estimate_min_profitable_iters): Do not assume that peeling
22507         for the number of iterations will be needed for fully-masked loops.
22508         (vectorizable_reduction): Disable fully-masked loops.
22509         (vectorizable_live_operation): Likewise.
22510         (vect_halve_mask_nunits): New function.
22511         (vect_double_mask_nunits): Likewise.
22512         (vect_record_loop_mask): Likewise.
22513         (vect_get_loop_mask): Likewise.
22514         (vect_transform_loop): Handle the case in which the final loop
22515         iteration might handle a partial vector.  Call vect_set_loop_condition
22516         instead of slpeel_make_loop_iterate_ntimes.
22517         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22518         (check_load_store_masking): New function.
22519         (prepare_load_store_mask): Likewise.
22520         (vectorizable_store): Handle fully-masked loops.
22521         (vectorizable_load): Likewise.
22522         (supportable_widening_operation): Use vect_halve_mask_nunits for
22523         booleans.
22524         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22525         (vect_gen_while): New function.
22526         * config/aarch64/aarch64.md (umax<mode>3): New expander.
22527         (aarch64_uqdec<mode>): New insn.
22529 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22530             Alan Hayward  <alan.hayward@arm.com>
22531             David Sherwood  <david.sherwood@arm.com>
22533         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22534         (reduc_xor_scal_optab): New optabs.
22535         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22536         (reduc_xor_scal_@var{m}): Document.
22537         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22538         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22539         internal functions.
22540         * fold-const-call.c (fold_const_call): Handle them.
22541         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22542         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22543         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22544         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22545         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22546         (UNSPEC_XORV): New unspecs.
22547         (optab): Add entries for them.
22548         (BITWISEV): New int iterator.
22549         (bit_reduc_op): New int attributes.
22551 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22552             Alan Hayward  <alan.hayward@arm.com>
22553             David Sherwood  <david.sherwood@arm.com>
22555         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22556         * internal-fn.def (VEC_SHL_INSERT): New internal function.
22557         * optabs.def (vec_shl_insert_optab): New optab.
22558         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22559         (duplicate_and_interleave): Likewise.
22560         * tree-vect-loop.c: Include internal-fn.h.
22561         (neutral_op_for_slp_reduction): New function, split out from
22562         get_initial_defs_for_reduction.
22563         (get_initial_def_for_reduction): Handle option 2 for variable-length
22564         vectors by loading the neutral value into a vector and then shifting
22565         the initial value into element 0.
22566         (get_initial_defs_for_reduction): Replace the code argument with
22567         the neutral value calculated by neutral_op_for_slp_reduction.
22568         Use gimple_build_vector for constant-length vectors.
22569         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22570         but the first group_size elements have a neutral value.
22571         Use duplicate_and_interleave otherwise.
22572         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22573         Update call to get_initial_defs_for_reduction.  Handle SLP
22574         reductions for variable-length vectors by creating one vector
22575         result for each scalar result, with the elements associated
22576         with other scalar results stubbed out with the neutral value.
22577         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22578         Require IFN_VEC_SHL_INSERT for double reductions on
22579         variable-length vectors, or SLP reductions that have
22580         a neutral value.  Require can_duplicate_and_interleave_p
22581         support for variable-length unchained SLP reductions if there
22582         is no neutral value, such as for MIN/MAX reductions.  Also require
22583         the number of vector elements to be a multiple of the number of
22584         SLP statements when doing variable-length unchained SLP reductions.
22585         Update call to vect_create_epilog_for_reduction.
22586         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22587         and remove initial values.
22588         (duplicate_and_interleave): Make public.
22589         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22590         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
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         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22597         (can_duplicate_and_interleave_p): New function.
22598         (vect_get_and_check_slp_defs): Take the vector of statements
22599         rather than just the current one.  Remove excess parentheses.
22600         Restriction rejectinon of vect_constant_def and vect_external_def
22601         for variable-length vectors to boolean types, or types for which
22602         can_duplicate_and_interleave_p is false.
22603         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22604         (duplicate_and_interleave): New function.
22605         (vect_get_constant_vectors): Use gimple_build_vector for
22606         constant-length vectors and suitable variable-length constant
22607         vectors.  Use duplicate_and_interleave for other variable-length
22608         vectors.  Don't defer the update when inserting new statements.
22610 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22611             Alan Hayward  <alan.hayward@arm.com>
22612             David Sherwood  <david.sherwood@arm.com>
22614         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22615         min_profitable_iters doesn't go negative.
22617 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22618             Alan Hayward  <alan.hayward@arm.com>
22619             David Sherwood  <david.sherwood@arm.com>
22621         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22622         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22623         * optabs.def (vec_mask_load_lanes_optab): New optab.
22624         (vec_mask_store_lanes_optab): Likewise.
22625         * internal-fn.def (MASK_LOAD_LANES): New internal function.
22626         (MASK_STORE_LANES): Likewise.
22627         * internal-fn.c (mask_load_lanes_direct): New macro.
22628         (mask_store_lanes_direct): Likewise.
22629         (expand_mask_load_optab_fn): Handle masked operations.
22630         (expand_mask_load_lanes_optab_fn): New macro.
22631         (expand_mask_store_optab_fn): Handle masked operations.
22632         (expand_mask_store_lanes_optab_fn): New macro.
22633         (direct_mask_load_lanes_optab_supported_p): Likewise.
22634         (direct_mask_store_lanes_optab_supported_p): Likewise.
22635         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22636         parameter.
22637         (vect_load_lanes_supported): Likewise.
22638         * tree-vect-data-refs.c (strip_conversion): New function.
22639         (can_group_stmts_p): Likewise.
22640         (vect_analyze_data_ref_accesses): Use it instead of checking
22641         for a pair of assignments.
22642         (vect_store_lanes_supported): Take a masked_p parameter.
22643         (vect_load_lanes_supported): Likewise.
22644         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22645         vect_store_lanes_supported and vect_load_lanes_supported.
22646         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22647         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22648         parameter.  Don't allow gaps for masked accesses.
22649         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
22650         and vect_load_lanes_supported.
22651         (get_load_store_type): Take a masked_p parameter and update
22652         call to get_group_load_store_type.
22653         (vectorizable_store): Update call to get_load_store_type.
22654         Handle IFN_MASK_STORE_LANES.
22655         (vectorizable_load): Update call to get_load_store_type.
22656         Handle IFN_MASK_LOAD_LANES.
22658 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22659             Alan Hayward  <alan.hayward@arm.com>
22660             David Sherwood  <david.sherwood@arm.com>
22662         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22663         modes for SVE.
22664         * config/aarch64/aarch64-protos.h
22665         (aarch64_sve_struct_memory_operand_p): Declare.
22666         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22667         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22668         (VPRED, vpred): Handle SVE structure modes.
22669         * config/aarch64/constraints.md (Utx): New constraint.
22670         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22671         (aarch64_sve_struct_nonimmediate_operand): New predicates.
22672         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22673         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22674         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22675         structure modes.  Split into pieces after RA.
22676         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22677         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22678         New patterns.
22679         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22680         SVE structure modes.
22681         (aarch64_classify_address): Likewise.
22682         (sizetochar): Move earlier in file.
22683         (aarch64_print_operand): Handle SVE register lists.
22684         (aarch64_array_mode): New function.
22685         (aarch64_sve_struct_memory_operand_p): Likewise.
22686         (TARGET_ARRAY_MODE): Redefine.
22688 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22689             Alan Hayward  <alan.hayward@arm.com>
22690             David Sherwood  <david.sherwood@arm.com>
22692         * target.def (array_mode): New target hook.
22693         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22694         * doc/tm.texi: Regenerate.
22695         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22696         * hooks.c (hook_optmode_mode_uhwi_none): New function.
22697         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22698         targetm.array_mode.
22699         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
22700         type sizes.
22702 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22703             Alan Hayward  <alan.hayward@arm.com>
22704             David Sherwood  <david.sherwood@arm.com>
22706         * fold-const.c (fold_binary_loc): Check the argument types
22707         rather than the result type when testing for a vector operation.
22709 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22711         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22712         * doc/tm.texi: Regenerate.
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         * doc/invoke.texi (-msve-vector-bits=): Document new option.
22719         (sve): Document new AArch64 extension.
22720         * doc/md.texi (w): Extend the description of the AArch64
22721         constraint to include SVE vectors.
22722         (Upl, Upa): Document new AArch64 predicate constraints.
22723         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22724         enum.
22725         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22726         (msve-vector-bits=): New option.
22727         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22728         SVE when these are disabled.
22729         (sve): New extension.
22730         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22731         modes.  Adjust their number of units based on aarch64_sve_vg.
22732         (MAX_BITSIZE_MODE_ANY_MODE): Define.
22733         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22734         aarch64_addr_query_type.
22735         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22736         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22737         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22738         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22739         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22740         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22741         (aarch64_simd_imm_zero_p): Delete.
22742         (aarch64_check_zero_based_sve_index_immediate): Declare.
22743         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22744         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22745         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22746         (aarch64_sve_float_mul_immediate_p): Likewise.
22747         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22748         rather than an rtx.
22749         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22750         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22751         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22752         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22753         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22754         (aarch64_regmode_natural_size): Likewise.
22755         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22756         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22757         left one place.
22758         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22759         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22760         for VG and the SVE predicate registers.
22761         (V_ALIASES): Add a "z"-prefixed alias.
22762         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22763         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22764         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22765         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22766         (REG_CLASS_NAMES): Add entries for them.
22767         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
22768         and the predicate registers.
22769         (aarch64_sve_vg): Declare.
22770         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22771         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22772         (REGMODE_NATURAL_SIZE): Define.
22773         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22774         SVE macros.
22775         * config/aarch64/aarch64.c: Include cfgrtl.h.
22776         (simd_immediate_info): Add a constructor for series vectors,
22777         and an associated step field.
22778         (aarch64_sve_vg): New variable.
22779         (aarch64_dbx_register_number): Handle VG and the predicate registers.
22780         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22781         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22782         (VEC_ANY_DATA, VEC_STRUCT): New constants.
22783         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22784         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22785         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22786         (aarch64_get_mask_mode): New functions.
22787         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22788         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22789         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
22790         predicate modes and predicate registers.  Explicitly restrict
22791         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
22792         to store a vector mode if it is recognized by
22793         aarch64_classify_vector_mode.
22794         (aarch64_regmode_natural_size): New function.
22795         (aarch64_hard_regno_caller_save_mode): Return the original mode
22796         for predicates.
22797         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22798         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22799         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22800         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22801         functions.
22802         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
22803         does not overlap dest if the function is frame-related.  Handle
22804         SVE constants.
22805         (aarch64_split_add_offset): New function.
22806         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22807         them aarch64_add_offset.
22808         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22809         and update call to aarch64_sub_sp.
22810         (aarch64_add_cfa_expression): New function.
22811         (aarch64_expand_prologue): Pass extra temporary registers to the
22812         functions above.  Handle the case in which we need to emit new
22813         DW_CFA_expressions for registers that were originally saved
22814         relative to the stack pointer, but now have to be expressed
22815         relative to the frame pointer.
22816         (aarch64_output_mi_thunk): Pass extra temporary registers to the
22817         functions above.
22818         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
22819         IP0 and IP1 values for SVE frames.
22820         (aarch64_expand_vec_series): New function.
22821         (aarch64_expand_sve_widened_duplicate): Likewise.
22822         (aarch64_expand_sve_const_vector): Likewise.
22823         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22824         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
22825         into the register, rather than emitting a SET directly.
22826         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22827         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22828         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22829         (offset_9bit_signed_scaled_p): New functions.
22830         (aarch64_replicate_bitmask_imm): New function.
22831         (aarch64_bitmask_imm): Use it.
22832         (aarch64_cannot_force_const_mem): Reject expressions involving
22833         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
22834         (aarch64_classify_index): Handle SVE indices, by requiring
22835         a plain register index with a scale that matches the element size.
22836         (aarch64_classify_address): Handle SVE addresses.  Assert that
22837         the mode of the address is VOIDmode or an integer mode.
22838         Update call to aarch64_classify_symbol.
22839         (aarch64_classify_symbolic_expression): Update call to
22840         aarch64_classify_symbol.
22841         (aarch64_const_vec_all_in_range_p): New function.
22842         (aarch64_print_vector_float_operand): Likewise.
22843         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
22844         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
22845         and the FP immediates 1.0 and 0.5.
22846         (aarch64_print_address_internal): Handle SVE addresses.
22847         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22848         (aarch64_regno_regclass): Handle predicate registers.
22849         (aarch64_secondary_reload): Handle big-endian reloads of SVE
22850         data modes.
22851         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22852         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22853         (aarch64_convert_sve_vector_bits): New function.
22854         (aarch64_override_options): Use it to handle -msve-vector-bits=.
22855         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22856         rather than an rtx.
22857         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22858         Handle SVE vector and predicate modes.  Accept VL-based constants
22859         that need only one temporary register, and VL offsets that require
22860         no temporary registers.
22861         (aarch64_conditional_register_usage): Mark the predicate registers
22862         as fixed if SVE isn't available.
22863         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22864         Return true for SVE vector and predicate modes.
22865         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22866         rather than an unsigned int.  Handle SVE modes.
22867         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
22868         SVE modes.
22869         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22870         if SVE is enabled.
22871         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22872         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22873         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22874         (aarch64_sve_float_mul_immediate_p): New functions.
22875         (aarch64_sve_valid_immediate): New function.
22876         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22877         Explicitly reject structure modes.  Check for INDEX constants.
22878         Handle PTRUE and PFALSE constants.
22879         (aarch64_check_zero_based_sve_index_immediate): New function.
22880         (aarch64_simd_imm_zero_p): Delete.
22881         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22882         vector modes.  Accept constants in the range of CNT[BHWD].
22883         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22884         ask for an Advanced SIMD mode.
22885         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22886         (aarch64_simd_vector_alignment): Handle SVE predicates.
22887         (aarch64_vectorize_preferred_vector_alignment): New function.
22888         (aarch64_simd_vector_alignment_reachable): Use it instead of
22889         the vector size.
22890         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22891         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22892         functions.
22893         (MAX_VECT_LEN): Delete.
22894         (expand_vec_perm_d): Add a vec_flags field.
22895         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22896         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22897         (aarch64_evpc_ext): Don't apply a big-endian lane correction
22898         for SVE modes.
22899         (aarch64_evpc_rev): Rename to...
22900         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
22901         (aarch64_evpc_rev_global): New function.
22902         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22903         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22904         MAX_VECT_LEN.
22905         (aarch64_evpc_sve_tbl): New function.
22906         (aarch64_expand_vec_perm_const_1): Update after rename of
22907         aarch64_evpc_rev.  Handle SVE permutes too, trying
22908         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22909         than aarch64_evpc_tbl.
22910         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22911         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22912         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22913         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22914         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22915         (aarch64_expand_sve_vcond): New functions.
22916         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22917         of aarch64_vector_mode_p.
22918         (aarch64_dwarf_poly_indeterminate_value): New function.
22919         (aarch64_compute_pressure_classes): Likewise.
22920         (aarch64_can_change_mode_class): Likewise.
22921         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22922         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22923         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22924         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22925         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22926         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22927         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22928         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22929         constraints.
22930         (Dn, Dl, Dr): Accept const as well as const_vector.
22931         (Dz): Likewise.  Compare against CONST0_RTX.
22932         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22933         of "vector" where appropriate.
22934         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22935         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22936         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22937         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22938         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22939         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22940         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22941         (v_int_equiv): Extend to SVE modes.
22942         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22943         mode attributes.
22944         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22945         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22946         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22947         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22948         (SVE_COND_FP_CMP): New int iterators.
22949         (perm_hilo): Handle the new unpack unspecs.
22950         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22951         attributes.
22952         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22953         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22954         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22955         (aarch64_equality_operator, aarch64_constant_vector_operand)
22956         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22957         (aarch64_sve_nonimmediate_operand): Likewise.
22958         (aarch64_sve_general_operand): Likewise.
22959         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22960         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22961         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22962         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22963         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22964         (aarch64_sve_float_arith_immediate): Likewise.
22965         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22966         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22967         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22968         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22969         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22970         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22971         (aarch64_sve_float_arith_operand): Likewise.
22972         (aarch64_sve_float_arith_with_sub_operand): Likewise.
22973         (aarch64_sve_float_mul_operand): Likewise.
22974         (aarch64_sve_vec_perm_operand): Likewise.
22975         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22976         (aarch64_mov_operand): Accept const_poly_int and const_vector.
22977         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22978         as well as const_vector.
22979         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22980         in file.  Use CONST0_RTX and CONSTM1_RTX.
22981         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
22982         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22983         Use aarch64_simd_imm_zero.
22984         * config/aarch64/aarch64-sve.md: New file.
22985         * config/aarch64/aarch64.md: Include it.
22986         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22987         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22988         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22989         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22990         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22991         (sve): New attribute.
22992         (enabled): Disable instructions with the sve attribute unless
22993         TARGET_SVE.
22994         (movqi, movhi): Pass CONST_POLY_INT operaneds through
22995         aarch64_expand_mov_immediate.
22996         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22997         CNT[BHSD] immediates.
22998         (movti): Split CONST_POLY_INT moves into two halves.
22999         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
23000         Split additions that need a temporary here if the destination
23001         is the stack pointer.
23002         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
23003         (*add<mode>3_poly_1): New instruction.
23004         (set_clobber_cc): New expander.
23006 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23008         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
23009         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
23010         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
23011         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
23012         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
23013         Change innermode from fixed_mode_size to machine_mode.
23014         (simplify_subreg): Update call accordingly.  Handle a constant-sized
23015         subreg of a variable-length CONST_VECTOR.
23017 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23018             Alan Hayward  <alan.hayward@arm.com>
23019             David Sherwood  <david.sherwood@arm.com>
23021         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
23022         (add_offset_to_base): New function, split out from...
23023         (create_mem_ref): ...here.  When handling a scale other than 1,
23024         check first whether the address is valid without the offset.
23025         Add it into the base if so, leaving the index and scale as-is.
23027 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
23029         PR c++/83778
23030         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
23031         fold_for_warn before checking if arg2 is INTEGER_CST.
23033 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
23035         * config/rs6000/predicates.md (load_multiple_operation): Delete.
23036         (store_multiple_operation): Delete.
23037         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
23038         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
23039         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
23040         guarded by TARGET_STRING.
23041         (rs6000_output_load_multiple): Delete.
23042         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23043         OPTION_MASK_STRING / TARGET_STRING handling.
23044         (print_operand) <'N', 'O'>: Add comment that these are unused now.
23045         (const rs6000_opt_masks) <"string">: Change mask to 0.
23046         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
23047         (MASK_STRING): Delete.
23048         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23049         parts.  Simplify.
23050         (load_multiple): Delete.
23051         (*ldmsi8): Delete.
23052         (*ldmsi7): Delete.
23053         (*ldmsi6): Delete.
23054         (*ldmsi5): Delete.
23055         (*ldmsi4): Delete.
23056         (*ldmsi3): Delete.
23057         (store_multiple): Delete.
23058         (*stmsi8): Delete.
23059         (*stmsi7): Delete.
23060         (*stmsi6): Delete.
23061         (*stmsi5): Delete.
23062         (*stmsi4): Delete.
23063         (*stmsi3): Delete.
23064         (movmemsi_8reg): Delete.
23065         (corresponding unnamed define_insn): Delete.
23066         (movmemsi_6reg): Delete.
23067         (corresponding unnamed define_insn): Delete.
23068         (movmemsi_4reg): Delete.
23069         (corresponding unnamed define_insn): Delete.
23070         (movmemsi_2reg): Delete.
23071         (corresponding unnamed define_insn): Delete.
23072         (movmemsi_1reg): Delete.
23073         (corresponding unnamed define_insn): Delete.
23074         * config/rs6000/rs6000.opt (mno-string): New.
23075         (mstring): Replace by deprecation warning stub.
23076         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23078 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
23080         * regrename.c (regrename_do_replace): If replacing the same
23081         reg multiple times, try to reuse last created gen_raw_REG.
23083         PR debug/81155
23084         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23085         main to workaround a bug in GDB.
23087 2018-01-12  Tom de Vries  <tom@codesourcery.com>
23089         PR target/83737
23090         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23092 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
23094         PR rtl-optimization/80481
23095         * ira-color.c (get_cap_member): New function.
23096         (allocnos_conflict_by_live_ranges_p): Use it.
23097         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23098         (setup_slot_coalesced_allocno_live_ranges): Ditto.
23100 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
23102         PR target/83628
23103         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23104         (*saddl_se_1): Ditto.
23105         (*ssubsi_1): Ditto.
23106         (*ssubl_se_1): Ditto.
23108 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
23110         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23111         rather than wi::to_widest for DR_INITs.
23112         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23113         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23114         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23115         INTEGER_CSTs.
23116         (vect_analyze_group_access_1): Note that here.
23118 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
23120         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23121         polynomial type sizes.
23123 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
23125         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23126         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23127         (gimple_add_tmp_var): Likewise.
23129 2018-01-12  Martin Liska  <mliska@suse.cz>
23131         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23132         (gimple_alloc_sizes): Likewise.
23133         (dump_gimple_statistics): Use PRIu64 in printf format.
23134         * gimple.h: Change uint64_t to int.
23136 2018-01-12  Martin Liska  <mliska@suse.cz>
23138         * tree-core.h: Use uint64_t instead of int.
23139         * tree.c (tree_node_counts): Likewise.
23140         (tree_node_sizes): Likewise.
23141         (dump_tree_statistics): Use PRIu64 in printf format.
23143 2018-01-12  Martin Liska  <mliska@suse.cz>
23145         * Makefile.in: As qsort_chk is implemented in vec.c, add
23146         vec.o to linkage of gencfn-macros.
23147         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23148         passing the info to record_node_allocation_statistics.
23149         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23150         and pass the info.
23151         * ggc-common.c (struct ggc_usage): Add operator== and use
23152         it in operator< and compare function.
23153         * mem-stats.h (struct mem_usage): Likewise.
23154         * vec.c (struct vec_usage): Remove operator< and compare
23155         function. Can be simply inherited.
23157 2018-01-12  Martin Jambor  <mjambor@suse.cz>
23159         PR target/81616
23160         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23161         * tree-ssa-math-opts.c: Include domwalk.h.
23162         (convert_mult_to_fma_1): New function.
23163         (fma_transformation_info): New type.
23164         (fma_deferring_state): Likewise.
23165         (cancel_fma_deferring): New function.
23166         (result_of_phi): Likewise.
23167         (last_fma_candidate_feeds_initial_phi): Likewise.
23168         (convert_mult_to_fma): Added deferring logic, split actual
23169         transformation to convert_mult_to_fma_1.
23170         (math_opts_dom_walker): New type.
23171         (math_opts_dom_walker::after_dom_children): New method, body moved
23172         here from pass_optimize_widening_mul::execute, added deferring logic
23173         bits.
23174         (pass_optimize_widening_mul::execute): Moved most of code to
23175         math_opts_dom_walker::after_dom_children.
23176         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23177         * config/i386/i386.c (ix86_option_override_internal): Added
23178         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23180 2018-01-12  Richard Biener  <rguenther@suse.de>
23182         PR debug/83157
23183         * dwarf2out.c (gen_variable_die): Do not reset old_die for
23184         inline instance vars.
23186 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
23188         PR target/81819
23189         * config/rx/rx.c (rx_is_restricted_memory_address):
23190         Handle SUBREG case.
23192 2018-01-12  Richard Biener  <rguenther@suse.de>
23194         PR tree-optimization/80846
23195         * target.def (split_reduction): New target hook.
23196         * targhooks.c (default_split_reduction): New function.
23197         * targhooks.h (default_split_reduction): Declare.
23198         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23199         target requests first reduce vectors by combining low and high
23200         parts.
23201         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23202         (get_vectype_for_scalar_type_and_size): Export.
23203         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23204         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23205         * doc/tm.texi: Regenerate.
23206         * config/i386/i386.c (ix86_split_reduction): Implement
23207         TARGET_VECTORIZE_SPLIT_REDUCTION.
23209 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23211         PR target/83368
23212         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23213         in PIC mode except for TARGET_VXWORKS_RTP.
23214         * config/sparc/sparc.c: Include cfgrtl.h.
23215         (TARGET_INIT_PIC_REG): Define.
23216         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23217         (sparc_pic_register_p): New predicate.
23218         (sparc_legitimate_address_p): Use it.
23219         (sparc_legitimize_pic_address): Likewise.
23220         (sparc_delegitimize_address): Likewise.
23221         (sparc_mode_dependent_address_p): Likewise.
23222         (gen_load_pcrel_sym): Remove 4th parameter.
23223         (load_got_register): Adjust call to above.  Remove obsolete stuff.
23224         (sparc_expand_prologue): Do not call load_got_register here.
23225         (sparc_flat_expand_prologue): Likewise.
23226         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23227         (sparc_use_pseudo_pic_reg): New function.
23228         (sparc_init_pic_reg): Likewise.
23229         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23230         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23232 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
23234         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23235         Add item for branch_cost.
23237 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23239         PR rtl-optimization/83565
23240         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23241         not extend the result to a larger mode for rotate operations.
23242         (num_sign_bit_copies1): Likewise.
23244 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23246         PR target/40411
23247         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23248         -symbolic.
23249         Use values-Xc.o for -pedantic.
23250         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23252 2018-01-12  Martin Liska  <mliska@suse.cz>
23254         PR ipa/83054
23255         * ipa-devirt.c (final_warning_record::grow_type_warnings):
23256         New function.
23257         (possible_polymorphic_call_targets): Use it.
23258         (ipa_devirt): Likewise.
23260 2018-01-12  Martin Liska  <mliska@suse.cz>
23262         * profile-count.h (enum profile_quality): Use 0 as invalid
23263         enum value of profile_quality.
23265 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
23267         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23268         -mext-string options.
23270 2018-01-12  Richard Biener  <rguenther@suse.de>
23272         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23273         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23274         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23275         Likewise.
23276         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23278 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
23280         * configure.ac (--with-long-double-format): Add support for the
23281         configuration option to change the default long double format on
23282         PowerPC systems.
23283         * config.gcc (powerpc*-linux*-*): Likewise.
23284         * configure: Regenerate.
23285         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23286         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23287         used without modification.
23289 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23291         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23292         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23293         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23294         MISC_BUILTIN_SPEC_BARRIER.
23295         (rs6000_init_builtins): Likewise.
23296         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23297         enum value.
23298         (speculation_barrier): New define_insn.
23299         * doc/extend.texi: Document __builtin_speculation_barrier.
23301 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
23303         PR target/83203
23304         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23305         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23306         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23307         iterators.
23308         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
23309         integral modes instead of "ss" and "sd".
23310         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23311         vectors with 32-bit and 64-bit elements.
23312         (vecdupssescalarmodesuffix): New mode attribute.
23313         (vec_dup<mode>): Use it.
23315 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
23317         PR target/83330
23318         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23319         frame if argument is passed on stack.
23321 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
23323         PR target/82682
23324         * ree.c (combine_reaching_defs): Optimize also
23325         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23326         reg2=any_extend(exp); reg1=reg2;, formatting fix.
23328 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
23330         PR middle-end/83189
23331         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23333 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
23335         PR middle-end/83718
23336         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23337         after they are computed.
23339 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
23341         PR tree-optimization/83695
23342         * gimple-loop-linterchange.cc
23343         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23344         reset cached scev information after interchange.
23345         (pass_linterchange::execute): Remove call to scev_reset_htab.
23347 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23349         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23350         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23351         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23352         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23353         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23354         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23355         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23356         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23357         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23358         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23359         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23360         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23361         (V_lane_reg): Likewise.
23362         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23363         New define_expand.
23364         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23365         (vfmal_lane_low<mode>_intrinsic,
23366         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23367         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23368         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23369         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23370         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23371         vfmsl_lane_high<mode>_intrinsic): New define_insns.
23373 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23375         * config/arm/arm-cpus.in (fp16fml): New feature.
23376         (ALL_SIMD): Add fp16fml.
23377         (armv8.2-a): Add fp16fml as an option.
23378         (armv8.3-a): Likewise.
23379         (armv8.4-a): Add fp16fml as part of fp16.
23380         * config/arm/arm.h (TARGET_FP16FML): Define.
23381         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23382         when appropriate.
23383         * config/arm/arm-modes.def (V2HF): Define.
23384         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23385         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23386         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23387         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23388         vfmsl_low, vfmsl_high): New set of builtins.
23389         * config/arm/iterators.md (PLUSMINUS): New code iterator.
23390         (vfml_op): New code attribute.
23391         (VFMLHALVES): New int iterator.
23392         (VFML, VFMLSEL): New mode attributes.
23393         (V_reg): Define mapping for V2HF.
23394         (V_hi, V_lo): New mode attributes.
23395         (VF_constraint): Likewise.
23396         (vfml_half, vfml_half_selector): New int attributes.
23397         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23398         define_expand.
23399         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23400         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23401         New define_insn.
23402         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23403         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23404         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23405         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
23406         documentation.
23407         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23408         Document new effective target and option set.
23410 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23412         * config/arm/arm-cpus.in (armv8_4): New feature.
23413         (ARMv8_4a): New fgroup.
23414         (armv8.4-a): New arch.
23415         * config/arm/arm-tables.opt: Regenerate.
23416         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23417         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23418         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23419         Add matching rules for -march=armv8.4-a and extensions.
23420         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23422 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
23424         PR target/81821
23425         * config/rx/rx.md (BW): New mode attribute.
23426         (sync_lock_test_and_setsi): Add mode suffix to insn output.
23428 2018-01-11  Richard Biener  <rguenther@suse.de>
23430         PR tree-optimization/83435
23431         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23432         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23433         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23435 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23436             Alan Hayward  <alan.hayward@arm.com>
23437             David Sherwood  <david.sherwood@arm.com>
23439         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23440         field.
23441         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
23442         (aarch64_print_address_internal): Use it to check for a zero offset.
23444 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23445             Alan Hayward  <alan.hayward@arm.com>
23446             David Sherwood  <david.sherwood@arm.com>
23448         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23449         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23450         Return a poly_int64 rather than a HOST_WIDE_INT.
23451         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23452         rather than a HOST_WIDE_INT.
23453         * config/aarch64/aarch64.h (aarch64_frame): Protect with
23454         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
23455         hard_fp_offset, frame_size, initial_adjust, callee_offset and
23456         final_offset from HOST_WIDE_INT to poly_int64.
23457         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23458         to_constant when getting the number of units in an Advanced SIMD
23459         mode.
23460         (aarch64_builtin_vectorized_function): Check for a constant number
23461         of units.
23462         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23463         GET_MODE_SIZE.
23464         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23465         attribute instead of GET_MODE_NUNITS.
23466         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23467         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23468         GET_MODE_SIZE for fixed-size registers.
23469         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23470         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23471         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23472         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23473         (aarch64_print_operand, aarch64_print_address_internal)
23474         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23475         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23476         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23477         Handle polynomial GET_MODE_SIZE.
23478         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
23479         wider than SImode without modification.
23480         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23481         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23482         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23483         passing and returning SVE modes.
23484         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23485         rather than GEN_INT.
23486         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23487         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23488         (aarch64_allocate_and_probe_stack_space): Likewise.
23489         (aarch64_layout_frame): Cope with polynomial offsets.
23490         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23491         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
23492         polynomial offsets.
23493         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23494         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23495         poly_int64 rather than a HOST_WIDE_INT.
23496         (aarch64_get_separate_components, aarch64_process_components)
23497         (aarch64_expand_prologue, aarch64_expand_epilogue)
23498         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23499         (aarch64_anchor_offset): New function, split out from...
23500         (aarch64_legitimize_address): ...here.
23501         (aarch64_builtin_vectorization_cost): Handle polynomial
23502         TYPE_VECTOR_SUBPARTS.
23503         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23504         GET_MODE_NUNITS.
23505         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23506         number of elements from the PARALLEL rather than the mode.
23507         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23508         rather than GET_MODE_BITSIZE.
23509         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23510         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23511         (aarch64_expand_vec_perm_const_1): Handle polynomial
23512         d->perm.length () and d->perm elements.
23513         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
23514         Apply to_constant to d->perm elements.
23515         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23516         polynomial CONST_VECTOR_NUNITS.
23517         (aarch64_move_pointer): Take amount as a poly_int64 rather
23518         than an int.
23519         (aarch64_progress_pointer): Avoid temporary variable.
23520         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23521         the mode attribute instead of GET_MODE.
23523 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23524             Alan Hayward  <alan.hayward@arm.com>
23525             David Sherwood  <david.sherwood@arm.com>
23527         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23528         x exists before using it.
23529         (aarch64_add_constant_internal): Rename to...
23530         (aarch64_add_offset_1): ...this.  Replace regnum with separate
23531         src and dest rtxes.  Handle the case in which they're different,
23532         including when the offset is zero.  Replace scratchreg with an rtx.
23533         Use 2 additions if there is no spare register into which we can
23534         move a 16-bit constant.
23535         (aarch64_add_constant): Delete.
23536         (aarch64_add_offset): Replace reg with separate src and dest
23537         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
23538         Use aarch64_add_offset_1.
23539         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23540         an rtx rather than an int.  Take the delta as a poly_int64
23541         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
23542         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23543         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23544         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23545         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23546         and aarch64_add_sp.
23547         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23548         aarch64_add_constant.
23550 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23552         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23553         Use scalar_float_mode.
23555 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23557         * config/aarch64/aarch64-simd.md
23558         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23559         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23560         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23561         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23562         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23563         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23564         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23565         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23566         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23567         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23569 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23571         PR target/83514
23572         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23573         targ_options->x_arm_arch_string is non NULL.
23575 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
23577         * config/aarch64/aarch64.h
23578         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
23580 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
23582         PR target/82096
23583         * expmed.c (emit_store_flag_force): Swap if const op0
23584         and change VOIDmode to mode of op0.
23586 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23588         PR rtl-optimization/83761
23589         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23590         than bytes to mode_for_size.
23592 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23594         PR middle-end/83189
23595         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23596         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23597         profile.
23599 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23601         PR middle-end/83575
23602         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23603         when in layout mode.
23604         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23605         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23606         partition fixup.
23608 2018-01-10  Michael Collison  <michael.collison@arm.com>
23610         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23611         * config/aarch64/aarch64-option-extension.def: Add
23612         AARCH64_OPT_EXTENSION of 'fp16fml'.
23613         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23614         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23615         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23616         * config/aarch64/constraints.md (Ui7): New constraint.
23617         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23618         (VFMLA_SEL_W): Ditto.
23619         (f16quad): Ditto.
23620         (f16mac1): Ditto.
23621         (VFMLA16_LOW): New int iterator.
23622         (VFMLA16_HIGH): Ditto.
23623         (UNSPEC_FMLAL): New unspec.
23624         (UNSPEC_FMLSL): Ditto.
23625         (UNSPEC_FMLAL2): Ditto.
23626         (UNSPEC_FMLSL2): Ditto.
23627         (f16mac): New code attribute.
23628         * config/aarch64/aarch64-simd-builtins.def
23629         (aarch64_fmlal_lowv2sf): Ditto.
23630         (aarch64_fmlsl_lowv2sf): Ditto.
23631         (aarch64_fmlalq_lowv4sf): Ditto.
23632         (aarch64_fmlslq_lowv4sf): Ditto.
23633         (aarch64_fmlal_highv2sf): Ditto.
23634         (aarch64_fmlsl_highv2sf): Ditto.
23635         (aarch64_fmlalq_highv4sf): Ditto.
23636         (aarch64_fmlslq_highv4sf): Ditto.
23637         (aarch64_fmlal_lane_lowv2sf): Ditto.
23638         (aarch64_fmlsl_lane_lowv2sf): Ditto.
23639         (aarch64_fmlal_laneq_lowv2sf): Ditto.
23640         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23641         (aarch64_fmlalq_lane_lowv4sf): Ditto.
23642         (aarch64_fmlsl_lane_lowv4sf): Ditto.
23643         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23644         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23645         (aarch64_fmlal_lane_highv2sf): Ditto.
23646         (aarch64_fmlsl_lane_highv2sf): Ditto.
23647         (aarch64_fmlal_laneq_highv2sf): Ditto.
23648         (aarch64_fmlsl_laneq_highv2sf): Ditto.
23649         (aarch64_fmlalq_lane_highv4sf): Ditto.
23650         (aarch64_fmlsl_lane_highv4sf): Ditto.
23651         (aarch64_fmlalq_laneq_highv4sf): Ditto.
23652         (aarch64_fmlsl_laneq_highv4sf): Ditto.
23653         * config/aarch64/aarch64-simd.md:
23654         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23655         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23656         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23657         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23658         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23659         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23660         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23661         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23662         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23663         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23664         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23665         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23666         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23667         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23668         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23669         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23670         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23671         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23672         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23673         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23674         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23675         (vfmlsl_low_u32): Ditto.
23676         (vfmlalq_low_u32): Ditto.
23677         (vfmlslq_low_u32): Ditto.
23678         (vfmlal_high_u32): Ditto.
23679         (vfmlsl_high_u32): Ditto.
23680         (vfmlalq_high_u32): Ditto.
23681         (vfmlslq_high_u32): Ditto.
23682         (vfmlal_lane_low_u32): Ditto.
23683         (vfmlsl_lane_low_u32): Ditto.
23684         (vfmlal_laneq_low_u32): Ditto.
23685         (vfmlsl_laneq_low_u32): Ditto.
23686         (vfmlalq_lane_low_u32): Ditto.
23687         (vfmlslq_lane_low_u32): Ditto.
23688         (vfmlalq_laneq_low_u32): Ditto.
23689         (vfmlslq_laneq_low_u32): Ditto.
23690         (vfmlal_lane_high_u32): Ditto.
23691         (vfmlsl_lane_high_u32): Ditto.
23692         (vfmlal_laneq_high_u32): Ditto.
23693         (vfmlsl_laneq_high_u32): Ditto.
23694         (vfmlalq_lane_high_u32): Ditto.
23695         (vfmlslq_lane_high_u32): Ditto.
23696         (vfmlalq_laneq_high_u32): Ditto.
23697         (vfmlslq_laneq_high_u32): Ditto.
23698         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23699         (AARCH64_FL_FOR_ARCH8_4): New.
23700         (AARCH64_ISA_F16FML): New ISA flag.
23701         (TARGET_F16FML): New feature flag for fp16fml.
23702         (doc/invoke.texi): Document new fp16fml option.
23704 2018-01-10  Michael Collison  <michael.collison@arm.com>
23706         * config/aarch64/aarch64-builtins.c:
23707         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23708         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23709         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23710         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23711         (AARCH64_ISA_SHA3): New ISA flag.
23712         (TARGET_SHA3): New feature flag for sha3.
23713         * config/aarch64/iterators.md (sha512_op): New int attribute.
23714         (CRYPTO_SHA512): New int iterator.
23715         (UNSPEC_SHA512H): New unspec.
23716         (UNSPEC_SHA512H2): Ditto.
23717         (UNSPEC_SHA512SU0): Ditto.
23718         (UNSPEC_SHA512SU1): Ditto.
23719         * config/aarch64/aarch64-simd-builtins.def
23720         (aarch64_crypto_sha512hqv2di): New builtin.
23721         (aarch64_crypto_sha512h2qv2di): Ditto.
23722         (aarch64_crypto_sha512su0qv2di): Ditto.
23723         (aarch64_crypto_sha512su1qv2di): Ditto.
23724         (aarch64_eor3qv8hi): Ditto.
23725         (aarch64_rax1qv2di): Ditto.
23726         (aarch64_xarqv2di): Ditto.
23727         (aarch64_bcaxqv8hi): Ditto.
23728         * config/aarch64/aarch64-simd.md:
23729         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23730         (aarch64_crypto_sha512su0qv2di): Ditto.
23731         (aarch64_crypto_sha512su1qv2di): Ditto.
23732         (aarch64_eor3qv8hi): Ditto.
23733         (aarch64_rax1qv2di): Ditto.
23734         (aarch64_xarqv2di): Ditto.
23735         (aarch64_bcaxqv8hi): Ditto.
23736         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23737         (vsha512h2q_u64): Ditto.
23738         (vsha512su0q_u64): Ditto.
23739         (vsha512su1q_u64): Ditto.
23740         (veor3q_u16): Ditto.
23741         (vrax1q_u64): Ditto.
23742         (vxarq_u64): Ditto.
23743         (vbcaxq_u16): Ditto.
23744         * config/arm/types.md (crypto_sha512): New type attribute.
23745         (crypto_sha3): Ditto.
23746         (doc/invoke.texi): Document new sha3 option.
23748 2018-01-10  Michael Collison  <michael.collison@arm.com>
23750         * config/aarch64/aarch64-builtins.c:
23751         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23752         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23753         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23754         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23755         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23756         (AARCH64_ISA_SM4): New ISA flag.
23757         (TARGET_SM4): New feature flag for sm4.
23758         * config/aarch64/aarch64-simd-builtins.def
23759         (aarch64_sm3ss1qv4si): Ditto.
23760         (aarch64_sm3tt1aq4si): Ditto.
23761         (aarch64_sm3tt1bq4si): Ditto.
23762         (aarch64_sm3tt2aq4si): Ditto.
23763         (aarch64_sm3tt2bq4si): Ditto.
23764         (aarch64_sm3partw1qv4si): Ditto.
23765         (aarch64_sm3partw2qv4si): Ditto.
23766         (aarch64_sm4eqv4si): Ditto.
23767         (aarch64_sm4ekeyqv4si): Ditto.
23768         * config/aarch64/aarch64-simd.md:
23769         (aarch64_sm3ss1qv4si): Ditto.
23770         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23771         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23772         (aarch64_sm4eqv4si): Ditto.
23773         (aarch64_sm4ekeyqv4si): Ditto.
23774         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23775         (sm3part_op): Ditto.
23776         (CRYPTO_SM3TT): Ditto.
23777         (CRYPTO_SM3PART): Ditto.
23778         (UNSPEC_SM3SS1): New unspec.
23779         (UNSPEC_SM3TT1A): Ditto.
23780         (UNSPEC_SM3TT1B): Ditto.
23781         (UNSPEC_SM3TT2A): Ditto.
23782         (UNSPEC_SM3TT2B): Ditto.
23783         (UNSPEC_SM3PARTW1): Ditto.
23784         (UNSPEC_SM3PARTW2): Ditto.
23785         (UNSPEC_SM4E): Ditto.
23786         (UNSPEC_SM4EKEY): Ditto.
23787         * config/aarch64/constraints.md (Ui2): New constraint.
23788         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23789         * config/arm/types.md (crypto_sm3): New type attribute.
23790         (crypto_sm4): Ditto.
23791         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23792         (vsm3tt1aq_u32): Ditto.
23793         (vsm3tt1bq_u32): Ditto.
23794         (vsm3tt2aq_u32): Ditto.
23795         (vsm3tt2bq_u32): Ditto.
23796         (vsm3partw1q_u32): Ditto.
23797         (vsm3partw2q_u32): Ditto.
23798         (vsm4eq_u32): Ditto.
23799         (vsm4ekeyq_u32): Ditto.
23800         (doc/invoke.texi): Document new sm4 option.
23802 2018-01-10  Michael Collison  <michael.collison@arm.com>
23804         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23805         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23806         (AARCH64_FL_FOR_ARCH8_4): New.
23807         (AARCH64_FL_V8_4): New flag.
23808         (doc/invoke.texi): Document new armv8.4-a option.
23810 2018-01-10  Michael Collison  <michael.collison@arm.com>
23812         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23813         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23814         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23815         * config/aarch64/aarch64-option-extension.def: Add
23816         AARCH64_OPT_EXTENSION of 'sha2'.
23817         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23818         (crypto): Disable sha2 and aes if crypto disabled.
23819         (crypto): Enable aes and sha2 if enabled.
23820         (simd): Disable sha2 and aes if simd disabled.
23821         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23822         New flags.
23823         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23824         (TARGET_SHA2): New feature flag for sha2.
23825         (TARGET_AES): New feature flag for aes.
23826         * config/aarch64/aarch64-simd.md:
23827         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23828         conditional on TARGET_AES.
23829         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23830         (aarch64_crypto_sha1hsi): Make pattern conditional
23831         on TARGET_SHA2.
23832         (aarch64_crypto_sha1hv4si): Ditto.
23833         (aarch64_be_crypto_sha1hv4si): Ditto.
23834         (aarch64_crypto_sha1su1v4si): Ditto.
23835         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23836         (aarch64_crypto_sha1su0v4si): Ditto.
23837         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23838         (aarch64_crypto_sha256su0v4si): Ditto.
23839         (aarch64_crypto_sha256su1v4si): Ditto.
23840         (doc/invoke.texi): Document new aes and sha2 options.
23842 2018-01-10  Martin Sebor  <msebor@redhat.com>
23844         PR tree-optimization/83781
23845         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23846         as string arrays.
23848 2018-01-11  Martin Sebor  <msebor@gmail.com>
23849             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23851         PR tree-optimization/83501
23852         PR tree-optimization/81703
23854         * tree-ssa-strlen.c (get_string_cst): Rename...
23855         (get_string_len): ...to this.  Handle global constants.
23856         (handle_char_store): Adjust.
23858 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
23859             Jim Wilson  <jimw@sifive.com>
23861         * config/riscv/riscv-protos.h (riscv_output_return): New.
23862         * config/riscv/riscv.c (struct machine_function): New naked_p field.
23863         (riscv_attribute_table, riscv_output_return),
23864         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23865         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23866         (riscv_compute_frame_info): Only compute frame->mask if not a naked
23867         function.
23868         (riscv_expand_prologue): Add early return for naked function.
23869         (riscv_expand_epilogue): Likewise.
23870         (riscv_function_ok_for_sibcall): Return false for naked function.
23871         (riscv_set_current_function): New.
23872         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23873         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23874         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23875         * doc/extend.texi (RISC-V Function Attributes): New.
23877 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
23879         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23880         check for 128-bit long double before checking TCmode.
23881         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23882         128-bit long doubles before checking TFmode or TCmode.
23883         (FLOAT128_IBM_P): Likewise.
23885 2018-01-10  Martin Sebor  <msebor@redhat.com>
23887         PR tree-optimization/83671
23888         * builtins.c (c_strlen): Unconditionally return zero for the empty
23889         string.
23890         Use -Warray-bounds for warnings.
23891         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23892         for non-constant array indices with COMPONENT_REF, arrays of
23893         arrays, and pointers to arrays.
23894         (gimple_fold_builtin_strlen): Determine and set length range for
23895         non-constant character arrays.
23897 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
23899         PR middle-end/81897
23900         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23901         empty blocks.
23903 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
23905         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23907 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23909         PR target/83399
23910         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23911         VECTOR_MEM_ALTIVEC_OR_VSX_P.
23912         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23913         indexed_or_indirect_operand predicate.
23914         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23915         (*vsx_le_perm_load_v8hi): Likewise.
23916         (*vsx_le_perm_load_v16qi): Likewise.
23917         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23918         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23919         (*vsx_le_perm_store_v8hi): Likewise.
23920         (*vsx_le_perm_store_v16qi): Likewise.
23921         (eight unnamed splitters): Likewise.
23923 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23925         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23926         * config/rs6000/emmintrin.h: Likewise.
23927         * config/rs6000/mmintrin.h: Likewise.
23928         * config/rs6000/xmmintrin.h: Likewise.
23930 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
23932         PR c++/43486
23933         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23934         "public_flag".
23935         * tree.c (tree_nop_conversion): Return true for location wrapper
23936         nodes.
23937         (maybe_wrap_with_location): New function.
23938         (selftest::check_strip_nops): New function.
23939         (selftest::test_location_wrappers): New function.
23940         (selftest::tree_c_tests): Call it.
23941         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23942         (maybe_wrap_with_location): New decl.
23943         (EXPR_LOCATION_WRAPPER_P): New macro.
23944         (location_wrapper_p): New inline function.
23945         (tree_strip_any_location_wrapper): New inline function.
23947 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
23949         PR target/83735
23950         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23951         stack_realign_offset for the largest alignment of stack slot
23952         actually used.
23953         (ix86_find_max_used_stack_alignment): New function.
23954         (ix86_finalize_stack_frame_flags): Use it.  Set
23955         max_used_stack_alignment if we don't realign stack.
23956         * config/i386/i386.h (machine_function): Add
23957         max_used_stack_alignment.
23959 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
23961         * config/arm/arm.opt (-mbranch-cost): New option.
23962         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23963         account.
23965 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
23967         PR target/83629
23968         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23969         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23971 2018-01-10  Richard Biener  <rguenther@suse.de>
23973         PR debug/83765
23974         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23975         early out so it also covers the case where we have a non-NULL
23976         origin.
23978 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23980         PR tree-optimization/83753
23981         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23982         for non-strided grouped accesses if the number of elements is 1.
23984 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23986         PR target/81616
23987         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23988         * i386.h (TARGET_USE_GATHER): Define.
23989         * x86-tune.def (X86_TUNE_USE_GATHER): New.
23991 2018-01-10  Martin Liska  <mliska@suse.cz>
23993         PR bootstrap/82831
23994         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23995         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23996         partitioning.
23997         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23998         CLEANUP_NO_PARTITIONING is not set.
24000 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
24002         * doc/rtl.texi: Remove documentation of (const ...) wrappers
24003         for vectors, as a partial revert of r254296.
24004         * rtl.h (const_vec_p): Delete.
24005         (const_vec_duplicate_p): Don't test for vector CONSTs.
24006         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
24007         * expmed.c (make_tree): Likewise.
24009         Revert:
24010         * common.md (E, F): Use CONSTANT_P instead of checking for
24011         CONST_VECTOR.
24012         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
24013         checking for CONST_VECTOR.
24015 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
24017         PR middle-end/83575
24018         * predict.c (force_edge_cold): Handle in more sane way edges
24019         with no prediction.
24021 2018-01-09  Carl Love  <cel@us.ibm.com>
24023         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
24024         V4SI, V4SF types.
24025         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
24026         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
24027         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
24028         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
24029         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
24030         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
24031         * config/rs6000/rs6000-protos.h: Add extern defition for
24032         rs6000_generate_float2_double_code.
24033         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
24034         function.
24035         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
24036         (float2_v2df): Add define_expand.
24038 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
24040         PR target/83628
24041         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
24042         op_mode in the force_to_mode call.
24044 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
24046         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
24047         instead of checking each element individually.
24048         (aarch64_evpc_uzp): Likewise.
24049         (aarch64_evpc_zip): Likewise.
24050         (aarch64_evpc_ext): Likewise.
24051         (aarch64_evpc_rev): Likewise.
24052         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24053         instead of checking each element individually.  Return true without
24054         generating rtl if
24055         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24056         whether all selected elements come from the same input, instead of
24057         checking each element individually.  Remove calls to gen_rtx_REG,
24058         start_sequence and end_sequence and instead assert that no rtl is
24059         generated.
24061 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
24063         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24064         order of HIGH and CONST checks.
24066 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
24068         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24069         if the destination isn't an SSA_NAME.
24071 2018-01-09  Richard Biener  <rguenther@suse.de>
24073         PR tree-optimization/83668
24074         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24075         move prologue...
24076         (canonicalize_loop_form): ... here, renamed from ...
24077         (canonicalize_loop_closed_ssa_form): ... this and amended to
24078         swap successor edges for loop exit blocks to make us use
24079         the RPO order we need for initial schedule generation.
24081 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
24083         PR tree-optimization/64811
24084         * match.pd: When optimizing comparisons with Inf, avoid
24085         introducing or losing exceptions from comparisons with NaN.
24087 2018-01-09  Martin Liska  <mliska@suse.cz>
24089         PR sanitizer/82517
24090         * asan.c (shadow_mem_size): Add gcc_assert.
24092 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
24094         Don't save registers in main().
24096         PR target/83738
24097         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24098         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24099         * config/avr/avr.c (avr_set_current_function): Don't error if
24100         naked, OS_task or OS_main are specified at the same time.
24101         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24102         OS_main.
24103         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24104         attribute.
24105         * common/config/avr/avr-common.c (avr_option_optimization_table):
24106         Switch on -mmain-is-OS_task for optimizing compilations.
24108 2018-01-09  Richard Biener  <rguenther@suse.de>
24110         PR tree-optimization/83572
24111         * graphite.c: Include cfganal.h.
24112         (graphite_transform_loops): Connect infinite loops to exit
24113         and remove fake edges at the end.
24115 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
24117         * ipa-inline.c (edge_badness): Revert accidental checkin.
24119 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
24121         PR ipa/80763
24122         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24123         symbols; not inline clones.
24125 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
24127         PR target/83507
24128         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24129         hard registers.  Formatting fixes.
24131         PR preprocessor/83722
24132         * gcc.c (try_generate_repro): Pass
24133         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24134         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24135         do_report_bug.
24137 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
24138             Kito Cheng  <kito.cheng@gmail.com>
24140         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24141         (riscv_leaf_function_p): Delete.
24142         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24144 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24146         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24147         function.
24148         (do_ifelse): New function.
24149         (do_isel): New function.
24150         (do_sub3): New function.
24151         (do_add3): New function.
24152         (do_load_mask_compare): New function.
24153         (do_overlap_load_compare): New function.
24154         (expand_compare_loop): New function.
24155         (expand_block_compare): Call expand_compare_loop() when appropriate.
24156         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24157         option description.
24158         (-mblock-compare-inline-loop-limit): New option.
24160 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24162         PR target/83677
24163         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24164         Reverse order of second and third operands in first alternative.
24165         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24166         of first and second elements in UNSPEC_VPERMR vector.
24167         (altivec_expand_vec_perm_le): Likewise.
24169 2018-01-08  Jeff Law  <law@redhat.com>
24171         PR rtl-optimizatin/81308
24172         * tree-switch-conversion.c (cfg_altered): New file scoped static.
24173         (process_switch): If group_case_labels makes a change, then set
24174         cfg_altered.
24175         (pass_convert_switch::execute): If a switch is converted, then
24176         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
24178         PR rtl-optimization/81308
24179         * recog.c (split_all_insns): Conditionally cleanup the CFG after
24180         splitting insns.
24182 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
24184         PR target/83663 - Revert r255946
24185         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24186         generation for cases where splatting a value is not useful.
24187         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24188         across a vec_duplicate and a paradoxical subreg forming a vector
24189         mode to a vec_concat.
24191 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24193         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24194         -march=armv8.3-a variants.
24195         * config/arm/t-multilib: Likewise.
24196         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
24198 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24200         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24201         to generate rtl.
24202         (cceq_ior_compare_complement): Give it a name so I can use it, and
24203         change boolean_or_operator predicate to boolean_operator so it can
24204         be used to generate a crand.
24205         (eqne): New code iterator.
24206         (bd/bd_neg): New code_attrs.
24207         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24208         a single define_insn.
24209         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24210         decrement (bdnzt/bdnzf/bdzt/bdzf).
24211         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24212         with the new names of the branch decrement patterns, and added the
24213         names of the branch decrement conditional patterns.
24215 2018-01-08  Richard Biener  <rguenther@suse.de>
24217         PR tree-optimization/83563
24218         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24219         cache.
24221 2018-01-08  Richard Biener  <rguenther@suse.de>
24223         PR middle-end/83713
24224         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24226 2018-01-08  Richard Biener  <rguenther@suse.de>
24228         PR tree-optimization/83685
24229         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24230         references to abnormals.
24232 2018-01-08  Richard Biener  <rguenther@suse.de>
24234         PR lto/83719
24235         * dwarf2out.c (output_indirect_strings): Handle empty
24236         skeleton_debug_str_hash.
24237         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24239 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
24241         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24242         (emit_store_direct): Likewise.
24243         (arc_trampoline_adjust_address): Likewise.
24244         (arc_asm_trampoline_template): New function.
24245         (arc_initialize_trampoline): Use asm_trampoline_template.
24246         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24247         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24248         * config/arc/arc.md (flush_icache): Delete pattern.
24250 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
24252         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24253         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24254         munaligned-access.
24256 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24258         PR target/83681
24259         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24260         by not USED_FOR_TARGET.
24261         (make_pass_resolve_sw_modes): Likewise.
24263 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24265         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24266         USED_FOR_TARGET.
24268 2018-01-08  Richard Biener  <rguenther@suse.de>
24270         PR middle-end/83580
24271         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24273 2018-01-08  Richard Biener  <rguenther@suse.de>
24275         PR middle-end/83517
24276         * match.pd ((t * 2) / 2) -> t): Add missing :c.
24278 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
24280         PR middle-end/81897
24281         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24282         basic blocks with a small number of successors.
24283         (convert_control_dep_chain_into_preds): Improve handling of
24284         forwarder blocks.
24285         (dump_predicates): Split apart into...
24286         (dump_pred_chain): ...here...
24287         (dump_pred_info): ...and here.
24288         (can_one_predicate_be_invalidated_p): Add debugging printfs.
24289         (can_chain_union_be_invalidated_p): Improve check for invalidation
24290         of paths.
24291         (uninit_uses_cannot_happen): Avoid unnecessary if
24292         convert_control_dep_chain_into_preds yielded nothing.
24294 2018-01-06  Martin Sebor  <msebor@redhat.com>
24296         PR tree-optimization/83640
24297         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24298         subtracting negative offset from size.
24299         (builtin_access::overlap): Adjust offset bounds of the access to fall
24300         within the size of the object if possible.
24302 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
24304         PR rtl-optimization/83699
24305         * expmed.c (extract_bit_field_1): Restrict the vector usage of
24306         extract_bit_field_as_subreg to cases in which the extracted
24307         value is also a vector.
24309         * lra-constraints.c (process_alt_operands): Test for the equivalence
24310         substitutions when detecting a possible reload cycle.
24312 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
24314         PR debug/83480
24315         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24316         by default if flag_selective_schedling{,2}.  Formatting fixes.
24318         PR rtl-optimization/83682
24319         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24320         if it has non-VECTOR_MODE element mode.
24321         (vec_duplicate_p): Likewise.
24323         PR middle-end/83694
24324         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24325         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24327 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
24329         PR target/83604
24330         * config/i386/i386-builtin.def
24331         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24332         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24333         Require also OPTION_MASK_ISA_AVX512F in addition to
24334         OPTION_MASK_ISA_GFNI.
24335         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24336         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24337         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24338         to OPTION_MASK_ISA_GFNI.
24339         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24340         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24341         OPTION_MASK_ISA_AVX512BW.
24342         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24343         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24344         addition to OPTION_MASK_ISA_GFNI.
24345         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24346         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24347         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24348         to OPTION_MASK_ISA_GFNI.
24349         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24350         a requirement for all ISAs rather than any of them with a few
24351         exceptions.
24352         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24353         processing.
24354         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24355         bitmasks to be enabled with 3 exceptions, instead of requiring any
24356         enabled ISA with lots of exceptions.
24357         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24358         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24359         Change avx512bw in isa attribute to avx512f.
24360         * config/i386/sgxintrin.h: Add license boilerplate.
24361         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
24362         to __AVX512F__ and __AVX512VL to __AVX512VL__.
24363         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24364         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24365         defined.
24366         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24367         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24368         temporarily sse2 rather than sse if not enabled already.
24370         PR target/83604
24371         * config/i386/sse.md (VI248_VLBW): Rename to ...
24372         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
24373         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24374         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24375         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24376         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24377         mode iterator instead of VI248_VLBW.
24379 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
24381         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24382         (record_modified): Skip clobbers; add debug output.
24383         (param_change_prob): Use sreal frequencies.
24385 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
24387         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24388         punt for user-aligned variables.
24390 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
24392         * tree-chrec.c (chrec_contains_symbols): Return true for
24393         POLY_INT_CST.
24395 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
24397         PR target/82439
24398         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24399         of (x|y) == x for BICS pattern.
24401 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
24403         PR tree-optimization/83605
24404         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24405         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24406         can throw.
24408 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24410         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24411         * config/epiphany/rtems.h: New file.
24413 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24414             Uros Bizjak  <ubizjak@gmail.com>
24416         PR target/83554
24417         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24418         QIreg_operand instead of register_operand predicate.
24419         * config/i386/i386.c (ix86_rop_should_change_byte_p,
24420         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24421         comments instead of -fmitigate[-_]rop.
24423 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24425         PR bootstrap/81926
24426         * cgraphunit.c (symbol_table::compile): Switch to text_section
24427         before calling assembly_start debug hook.
24428         * run-rtl-passes.c (run_rtl_passes): Likewise.
24429         Include output.h.
24431 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24433         * tree-vrp.c (extract_range_from_binary_expr_1): Check
24434         range_int_cst_p rather than !symbolic_range_p before calling
24435         extract_range_from_multiplicative_op_1.
24437 2018-01-04  Jeff Law  <law@redhat.com>
24439         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24440         redundant test in assertion.
24442 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24444         * doc/rtl.texi: Document machine_mode wrapper classes.
24446 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24448         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24449         using tree_to_uhwi.
24451 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24453         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24454         the VEC_PERM_EXPR fold to fail.
24456 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24458         PR debug/83585
24459         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24460         to switched_sections.
24462 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24464         PR target/83680
24465         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24466         test for d.testing.
24468 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
24470         PR target/83387
24471         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24472         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24474 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24476         PR debug/83666
24477         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24478         is BLKmode and bitpos not zero or mode change is needed.
24480 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24482         PR target/83675
24483         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24484         TARGET_VIS2.
24486 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
24488         PR target/83628
24489         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24490         instead of MULT rtx.  Update all corresponding splitters.
24491         (*saddl_se): Ditto.
24492         (*ssub<modesuffix>): Ditto.
24493         (*ssubl_se): Ditto.
24494         (*cmp_sadd_di): Update split patterns.
24495         (*cmp_sadd_si): Ditto.
24496         (*cmp_sadd_sidi): Ditto.
24497         (*cmp_ssub_di): Ditto.
24498         (*cmp_ssub_si): Ditto.
24499         (*cmp_ssub_sidi): Ditto.
24500         * config/alpha/predicates.md (const23_operand): New predicate.
24501         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24502         Look for ASHIFT, not MULT inner operand.
24503         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24505 2018-01-04  Martin Liska  <mliska@suse.cz>
24507         PR gcov-profile/83669
24508         * gcov.c (output_intermediate_file): Add version to intermediate
24509         gcov file.
24510         * doc/gcov.texi: Document new field 'version' in intermediate
24511         file format. Fix location of '-k' option of gcov command.
24513 2018-01-04  Martin Liska  <mliska@suse.cz>
24515         PR ipa/82352
24516         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24518 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24520         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24522 2018-01-03  Martin Sebor  <msebor@redhat.com>
24524         PR tree-optimization/83655
24525         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24526         checking calls with invalid arguments.
24528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24530         * tree-vect-stmts.c (vect_get_store_rhs): New function.
24531         (vectorizable_mask_load_store): Delete.
24532         (vectorizable_call): Return false for masked loads and stores.
24533         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
24534         instead of gimple_assign_rhs1.
24535         (vectorizable_load): Handle IFN_MASK_LOAD.
24536         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24538 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24540         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24541         split out from..,
24542         (vectorizable_mask_load_store): ...here.
24543         (vectorizable_load): ...and here.
24545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24547         * tree-vect-stmts.c (vect_build_all_ones_mask)
24548         (vect_build_zero_merge_argument): New functions, split out from...
24549         (vectorizable_load): ...here.
24551 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24553         * tree-vect-stmts.c (vect_check_store_rhs): New function,
24554         split out from...
24555         (vectorizable_mask_load_store): ...here.
24556         (vectorizable_store): ...and here.
24558 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24560         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24561         split out from...
24562         (vectorizable_mask_load_store): ...here.
24564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24566         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24567         (vect_model_store_cost): Take a vec_load_store_type instead of a
24568         vect_def_type.
24569         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24570         (vect_model_store_cost): Take a vec_load_store_type instead of a
24571         vect_def_type.
24572         (vectorizable_mask_load_store): Update accordingly.
24573         (vectorizable_store): Likewise.
24574         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24578         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24579         IFN_MASK_LOAD calls here rather than...
24580         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24583             Alan Hayward  <alan.hayward@arm.com>
24584             David Sherwood  <david.sherwood@arm.com>
24586         * expmed.c (extract_bit_field_1): For vector extracts,
24587         fall back to extract_bit_field_as_subreg if vec_extract
24588         isn't available.
24590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24591             Alan Hayward  <alan.hayward@arm.com>
24592             David Sherwood  <david.sherwood@arm.com>
24594         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24595         they are variable or constant sized.
24596         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24597         slots for constant-sized data.
24599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24600             Alan Hayward  <alan.hayward@arm.com>
24601             David Sherwood  <david.sherwood@arm.com>
24603         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24604         handling COND_EXPRs with boolean comparisons, try to find a better
24605         basis for the mask type than the boolean itself.
24607 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24609         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24610         is calculated and how it can be overridden.
24611         * genmodes.c (max_bitsize_mode_any_mode): New variable.
24612         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24613         if defined.
24614         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24615         if nonzero.
24617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24618             Alan Hayward  <alan.hayward@arm.com>
24619             David Sherwood  <david.sherwood@arm.com>
24621         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24622         Remove the mode argument.
24623         (aarch64_simd_valid_immediate): Remove the mode and inverse
24624         arguments.
24625         * config/aarch64/iterators.md (bitsize): New iterator.
24626         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24627         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24628         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24629         aarch64_simd_valid_immediate.
24630         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24631         (aarch64_reg_or_bic_imm): Likewise.
24632         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24633         with an insn_type enum and msl with a modifier_type enum.
24634         Replace element_width with a scalar_mode.  Change the shift
24635         to unsigned int.  Add constructors for scalar_float_mode and
24636         scalar_int_mode elements.
24637         (aarch64_vect_float_const_representable_p): Delete.
24638         (aarch64_can_const_movi_rtx_p)
24639         (aarch64_simd_scalar_immediate_valid_for_move)
24640         (aarch64_simd_make_constant): Update call to
24641         aarch64_simd_valid_immediate.
24642         (aarch64_advsimd_valid_immediate_hs): New function.
24643         (aarch64_advsimd_valid_immediate): Likewise.
24644         (aarch64_simd_valid_immediate): Remove mode and inverse
24645         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
24646         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24647         and aarch64_float_const_representable_p on the result.
24648         (aarch64_output_simd_mov_immediate): Remove mode argument.
24649         Update call to aarch64_simd_valid_immediate and use of
24650         simd_immediate_info.
24651         (aarch64_output_scalar_simd_mov_immediate): Update call
24652         accordingly.
24654 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24655             Alan Hayward  <alan.hayward@arm.com>
24656             David Sherwood  <david.sherwood@arm.com>
24658         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24659         (mode_nunits): Likewise CONST_MODE_NUNITS.
24660         * machmode.def (ADJUST_NUNITS): Document.
24661         * genmodes.c (mode_data::need_nunits_adj): New field.
24662         (blank_mode): Update accordingly.
24663         (adj_nunits): New variable.
24664         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24665         parameter.
24666         (emit_mode_size_inline): Set need_bytesize_adj for all modes
24667         listed in adj_nunits.
24668         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24669         listed in adj_nunits.  Don't emit case statements for such modes.
24670         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24671         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
24672         nothing if adj_nunits is nonnull.
24673         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24674         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24675         (emit_mode_fbit): Update use of print_maybe_const_decl.
24676         (emit_move_size): Likewise.  Treat the array as non-const
24677         if adj_nunits.
24678         (emit_mode_adjustments): Handle adj_nunits.
24680 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24682         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24683         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24684         (VECTOR_MODES): Use it.
24685         (make_vector_modes): Take the prefix as an argument.
24687 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24688             Alan Hayward  <alan.hayward@arm.com>
24689             David Sherwood  <david.sherwood@arm.com>
24691         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24692         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24693         for MODE_VECTOR_BOOL.
24694         * machmode.def (VECTOR_BOOL_MODE): Document.
24695         * genmodes.c (VECTOR_BOOL_MODE): New macro.
24696         (make_vector_bool_mode): New function.
24697         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24698         MODE_VECTOR_BOOL.
24699         * lto-streamer-in.c (lto_input_mode_table): Likewise.
24700         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24701         Likewise.
24702         * stor-layout.c (int_mode_for_mode): Likewise.
24703         * tree.c (build_vector_type_for_mode): Likewise.
24704         * varasm.c (output_constant_pool_2): Likewise.
24705         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24706         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
24707         for MODE_VECTOR_BOOL.
24708         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24709         of mode class checks.
24710         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24711         instead of a list of mode class checks.
24712         (expand_vector_scalar_condition): Likewise.
24713         (type_for_widest_vector_mode): Handle BImode as an inner mode.
24715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24716             Alan Hayward  <alan.hayward@arm.com>
24717             David Sherwood  <david.sherwood@arm.com>
24719         * machmode.h (mode_size): Change from unsigned short to
24720         poly_uint16_pod.
24721         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24722         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24723         or if measurement_type is not polynomial.
24724         (fixed_size_mode::includes_p): Check for constant-sized modes.
24725         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24726         return a poly_uint16 rather than an unsigned short.
24727         (emit_mode_size): Change the type of mode_size from unsigned short
24728         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
24729         (emit_mode_adjustments): Cope with polynomial vector sizes.
24730         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24731         for GET_MODE_SIZE.
24732         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24733         for GET_MODE_SIZE.
24734         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24735         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24736         * caller-save.c (setup_save_areas): Likewise.
24737         (replace_reg_with_saved_mem): Likewise.
24738         * calls.c (emit_library_call_value_1): Likewise.
24739         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24740         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24741         (gen_lowpart_for_combine): Likewise.
24742         * convert.c (convert_to_integer_1): Likewise.
24743         * cse.c (equiv_constant, cse_insn): Likewise.
24744         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24745         (cselib_subst_to_values): Likewise.
24746         * dce.c (word_dce_process_block): Likewise.
24747         * df-problems.c (df_word_lr_mark_ref): Likewise.
24748         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24749         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24750         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24751         (rtl_for_decl_location): Likewise.
24752         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24753         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24754         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24755         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24756         (expand_expr_real_1): Likewise.
24757         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24758         (pad_below): Likewise.
24759         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24760         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24761         * ira.c (get_subreg_tracking_sizes): Likewise.
24762         * ira-build.c (ira_create_allocno_objects): Likewise.
24763         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24764         (ira_sort_regnos_for_alter_reg): Likewise.
24765         * ira-costs.c (record_operand_costs): Likewise.
24766         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24767         (resolve_simple_move): Likewise.
24768         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24769         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24770         (lra_constraints): Likewise.
24771         (CONST_POOL_OK_P): Reject variable-sized modes.
24772         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24773         (add_pseudo_to_slot, lra_spill): Likewise.
24774         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24775         * optabs-query.c (get_best_extraction_insn): Likewise.
24776         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24777         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24778         (expand_mult_highpart, valid_multiword_target_p): Likewise.
24779         * recog.c (offsettable_address_addr_space_p): Likewise.
24780         * regcprop.c (maybe_mode_change): Likewise.
24781         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24782         * regrename.c (build_def_use): Likewise.
24783         * regstat.c (dump_reg_info): Likewise.
24784         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24785         (find_reloads, find_reloads_subreg_address): Likewise.
24786         * reload1.c (eliminate_regs_1): Likewise.
24787         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24788         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24789         (simplify_binary_operation_1, simplify_subreg): Likewise.
24790         * targhooks.c (default_function_arg_padding): Likewise.
24791         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24792         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24793         (verify_gimple_assign_ternary): Likewise.
24794         * tree-inline.c (estimate_move_cost): Likewise.
24795         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24796         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24797         (get_address_cost_ainc): Likewise.
24798         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24799         (vect_supportable_dr_alignment): Likewise.
24800         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24801         (vectorizable_reduction): Likewise.
24802         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24803         (vectorizable_operation, vectorizable_load): Likewise.
24804         * tree.c (build_same_sized_truth_vector_type): Likewise.
24805         * valtrack.c (cleanup_auto_inc_dec): Likewise.
24806         * var-tracking.c (emit_note_insn_var_location): Likewise.
24807         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24808         (ADDR_VEC_ALIGN): Likewise.
24810 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24811             Alan Hayward  <alan.hayward@arm.com>
24812             David Sherwood  <david.sherwood@arm.com>
24814         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24815         unsigned short.
24816         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24817         or if measurement_type is polynomial.
24818         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24819         * combine.c (make_extraction): Likewise.
24820         * dse.c (find_shift_sequence): Likewise.
24821         * dwarf2out.c (mem_loc_descriptor): Likewise.
24822         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24823         (extract_bit_field, extract_low_bits): Likewise.
24824         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24825         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24826         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24827         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24828         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24829         * reload.c (find_reloads): Likewise.
24830         * reload1.c (alter_reg): Likewise.
24831         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24832         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24833         * tree-if-conv.c (predicate_mem_writes): Likewise.
24834         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24835         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24836         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24837         * valtrack.c (dead_debug_insert_temp): Likewise.
24838         * varasm.c (mergeable_constant_section): Likewise.
24839         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24842             Alan Hayward  <alan.hayward@arm.com>
24843             David Sherwood  <david.sherwood@arm.com>
24845         * expr.c (expand_assignment): Cope with polynomial mode sizes
24846         when assigning to a CONCAT.
24848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24849             Alan Hayward  <alan.hayward@arm.com>
24850             David Sherwood  <david.sherwood@arm.com>
24852         * machmode.h (mode_precision): Change from unsigned short to
24853         poly_uint16_pod.
24854         (mode_to_precision): Return a poly_uint16 rather than an unsigned
24855         short.
24856         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24857         or if measurement_type is not polynomial.
24858         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
24859         in which the mode is already known to be a scalar_int_mode.
24860         * genmodes.c (emit_mode_precision): Change the type of mode_precision
24861         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
24862         initializer.
24863         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24864         for GET_MODE_PRECISION.
24865         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24866         for GET_MODE_PRECISION.
24867         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24868         as polynomial.
24869         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24870         (expand_field_assignment, make_extraction): Likewise.
24871         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24872         (get_last_value): Likewise.
24873         * convert.c (convert_to_integer_1): Likewise.
24874         * cse.c (cse_insn): Likewise.
24875         * expr.c (expand_expr_real_1): Likewise.
24876         * lra-constraints.c (simplify_operand_subreg): Likewise.
24877         * optabs-query.c (can_atomic_load_p): Likewise.
24878         * optabs.c (expand_atomic_load): Likewise.
24879         (expand_atomic_store): Likewise.
24880         * ree.c (combine_reaching_defs): Likewise.
24881         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24882         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24883         * tree.h (type_has_mode_precision_p): Likewise.
24884         * ubsan.c (instrument_si_overflow): Likewise.
24886 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24887             Alan Hayward  <alan.hayward@arm.com>
24888             David Sherwood  <david.sherwood@arm.com>
24890         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24891         polynomial numbers of units.
24892         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24893         (valid_vector_subparts_p): New function.
24894         (build_vector_type): Remove temporary shim and take the number
24895         of units as a poly_uint64 rather than an int.
24896         (build_opaque_vector_type): Take the number of units as a
24897         poly_uint64 rather than an int.
24898         * tree.c (build_vector_from_ctor): Handle polynomial
24899         TYPE_VECTOR_SUBPARTS.
24900         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24901         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24902         (build_vector_from_val): If the number of units is variable,
24903         use build_vec_duplicate_cst for constant operands and
24904         VEC_DUPLICATE_EXPR otherwise.
24905         (make_vector_type): Remove temporary is_constant ().
24906         (build_vector_type, build_opaque_vector_type): Take the number of
24907         units as a poly_uint64 rather than an int.
24908         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24909         VECTOR_CST_NELTS.
24910         * cfgexpand.c (expand_debug_expr): Likewise.
24911         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24912         (store_constructor, expand_expr_real_1): Likewise.
24913         (const_scalar_mask_from_tree): Likewise.
24914         * fold-const-call.c (fold_const_reduction): Likewise.
24915         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24916         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24917         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24918         (fold_relational_const): Likewise.
24919         (native_interpret_vector): Likewise.  Change the size from an
24920         int to an unsigned int.
24921         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24922         TYPE_VECTOR_SUBPARTS.
24923         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24924         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24925         duplicating a non-constant operand into a variable-length vector.
24926         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24927         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24928         * ipa-icf.c (sem_variable::equals): Likewise.
24929         * match.pd: Likewise.
24930         * omp-simd-clone.c (simd_clone_subparts): Likewise.
24931         * print-tree.c (print_node): Likewise.
24932         * stor-layout.c (layout_type): Likewise.
24933         * targhooks.c (default_builtin_vectorization_cost): Likewise.
24934         * tree-cfg.c (verify_gimple_comparison): Likewise.
24935         (verify_gimple_assign_binary): Likewise.
24936         (verify_gimple_assign_ternary): Likewise.
24937         (verify_gimple_assign_single): Likewise.
24938         * tree-pretty-print.c (dump_generic_node): Likewise.
24939         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24940         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24941         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24942         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24943         (vect_shift_permute_load_chain): Likewise.
24944         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24945         (expand_vector_condition, optimize_vector_constructor): Likewise.
24946         (lower_vec_perm, get_compute_type): Likewise.
24947         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24948         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24949         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24950         (vect_recog_mask_conversion_pattern): Likewise.
24951         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24952         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24953         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24954         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24955         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24956         (vectorizable_shift, vectorizable_operation, vectorizable_store)
24957         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24958         (supportable_widening_operation): Likewise.
24959         (supportable_narrowing_operation): Likewise.
24960         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24961         Likewise.
24962         * varasm.c (output_constant): Likewise.
24964 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24965             Alan Hayward  <alan.hayward@arm.com>
24966             David Sherwood  <david.sherwood@arm.com>
24968         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24969         so that both the length == 3 and length != 3 cases set up their
24970         own permute vectors.  Add comments explaining why we know the
24971         number of elements is constant.
24972         (vect_permute_load_chain): Likewise.
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         * machmode.h (mode_nunits): Change from unsigned char to
24979         poly_uint16_pod.
24980         (ONLY_FIXED_SIZE_MODES): New macro.
24981         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24982         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24983         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24984         New typedefs.
24985         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24986         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24987         or if measurement_type is not polynomial.
24988         * genmodes.c (ZERO_COEFFS): New macro.
24989         (emit_mode_nunits_inline): Make mode_nunits_inline return a
24990         poly_uint16.
24991         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24992         Use ZERO_COEFFS when emitting initializers.
24993         * data-streamer.h (bp_pack_poly_value): New function.
24994         (bp_unpack_poly_value): Likewise.
24995         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24996         for GET_MODE_NUNITS.
24997         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24998         for GET_MODE_NUNITS.
24999         * tree.c (make_vector_type): Remove temporary shim and make
25000         the real function take the number of units as a poly_uint64
25001         rather than an int.
25002         (build_vector_type_for_mode): Handle polynomial nunits.
25003         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
25004         * emit-rtl.c (const_vec_series_p_1): Likewise.
25005         (gen_rtx_CONST_VECTOR): Likewise.
25006         * fold-const.c (test_vec_duplicate_folding): Likewise.
25007         * genrecog.c (validate_pattern): Likewise.
25008         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
25009         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25010         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
25011         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
25012         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
25013         * rtlanal.c (subreg_get_info): Likewise.
25014         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25015         (vect_grouped_load_supported): Likewise.
25016         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
25017         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
25018         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
25019         (simplify_const_unary_operation, simplify_binary_operation_1)
25020         (simplify_const_binary_operation, simplify_ternary_operation)
25021         (test_vector_ops_duplicate, test_vector_ops): Likewise.
25022         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
25023         instead of CONST_VECTOR_NUNITS.
25024         * varasm.c (output_constant_pool_2): Likewise.
25025         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
25026         explicit-encoded elements in the XVEC for variable-length vectors.
25028 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25030         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
25032 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25033             Alan Hayward  <alan.hayward@arm.com>
25034             David Sherwood  <david.sherwood@arm.com>
25036         * coretypes.h (fixed_size_mode): Declare.
25037         (fixed_size_mode_pod): New typedef.
25038         * builtins.h (target_builtins::x_apply_args_mode)
25039         (target_builtins::x_apply_result_mode): Change type to
25040         fixed_size_mode_pod.
25041         * builtins.c (apply_args_size, apply_result_size, result_vector)
25042         (expand_builtin_apply_args_1, expand_builtin_apply)
25043         (expand_builtin_return): Update accordingly.
25045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25047         * cse.c (hash_rtx_cb): Hash only the encoded elements.
25048         * cselib.c (cselib_hash_rtx): Likewise.
25049         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25050         CONST_VECTOR encoding.
25052 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25053             Jeff Law  <law@redhat.com>
25055         PR target/83641
25056         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25057         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25058         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25059         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25061         PR target/83641
25062         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25063         explicitly probe *sp in a noreturn function if there were any callee
25064         register saves or frame pointer is needed.
25066 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25068         PR debug/83621
25069         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25070         BLKmode for ternary, binary or unary expressions.
25072         PR debug/83645
25073         * var-tracking.c (delete_vta_debug_insn): New inline function.
25074         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25075         insns from get_insns () to NULL instead of each bb separately.
25076         Use delete_vta_debug_insn.  No longer static.
25077         (vt_debug_insns_local, variable_tracking_main_1): Adjust
25078         delete_vta_debug_insns callers.
25079         * rtl.h (delete_vta_debug_insns): Declare.
25080         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25081         instead of variable_tracking_main.
25083 2018-01-03  Martin Sebor  <msebor@redhat.com>
25085         PR tree-optimization/83603
25086         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25087         arguments past the endof the argument list in functions declared
25088         without a prototype.
25089         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25090         Avoid checking when arguments are null.
25092 2018-01-03  Martin Sebor  <msebor@redhat.com>
25094         PR c/83559
25095         * doc/extend.texi (attribute const): Fix a typo.
25096         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25097         issuing -Wsuggest-attribute for void functions.
25099 2018-01-03  Martin Sebor  <msebor@redhat.com>
25101         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25102         offset_int::from instead of wide_int::to_shwi.
25103         (maybe_diag_overlap): Remove assertion.
25104         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25105         * gimple-ssa-sprintf.c (format_directive): Same.
25106         (parse_directive): Same.
25107         (sprintf_dom_walker::compute_format_length): Same.
25108         (try_substitute_return_value): Same.
25110 2018-01-03  Jeff Law  <law@redhat.com>
25112         PR middle-end/83654
25113         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25114         non-constant residual for zero at runtime and avoid probing in
25115         that case.  Reorganize code for trailing problem to mirror handling
25116         of the residual.
25118 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25120         PR tree-optimization/83501
25121         * tree-ssa-strlen.c (get_string_cst): New.
25122         (handle_char_store): Call get_string_cst.
25124 2018-01-03  Martin Liska  <mliska@suse.cz>
25126         PR tree-optimization/83593
25127         * tree-ssa-strlen.c: Include tree-cfg.h.
25128         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25129         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25130         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25131         to false.
25132         (strlen_dom_walker::before_dom_children): Call
25133         gimple_purge_dead_eh_edges. Dump tranformation with details
25134         dump flags.
25135         (strlen_dom_walker::before_dom_children): Update call by adding
25136         new argument cleanup_eh.
25137         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25139 2018-01-03  Martin Liska  <mliska@suse.cz>
25141         PR ipa/83549
25142         * cif-code.def (VARIADIC_THUNK): New enum value.
25143         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25144         thunks.
25146 2018-01-03  Jan Beulich  <jbeulich@suse.com>
25148         * sse.md (mov<mode>_internal): Tighten condition for when to use
25149         vmovdqu<ssescalarsize> for TI and OI modes.
25151 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25153         Update copyright years.
25155 2018-01-03  Martin Liska  <mliska@suse.cz>
25157         PR ipa/83594
25158         * ipa-visibility.c (function_and_variable_visibility): Skip
25159         functions with noipa attribure.
25161 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
25163         * gcc.c (process_command): Update copyright notice dates.
25164         * gcov-dump.c (print_version): Ditto.
25165         * gcov.c (print_version): Ditto.
25166         * gcov-tool.c (print_version): Ditto.
25167         * gengtype.c (create_file): Ditto.
25168         * doc/cpp.texi: Bump @copying's copyright year.
25169         * doc/cppinternals.texi: Ditto.
25170         * doc/gcc.texi: Ditto.
25171         * doc/gccint.texi: Ditto.
25172         * doc/gcov.texi: Ditto.
25173         * doc/install.texi: Ditto.
25174         * doc/invoke.texi: Ditto.
25176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25178         * vector-builder.h (vector_builder::m_full_nelts): Change from
25179         unsigned int to poly_uint64.
25180         (vector_builder::full_nelts): Update prototype accordingly.
25181         (vector_builder::new_vector): Likewise.
25182         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25183         (vector_builder::operator ==): Likewise.
25184         (vector_builder::finalize): Likewise.
25185         * int-vector-builder.h (int_vector_builder::int_vector_builder):
25186         Take the number of elements as a poly_uint64 rather than an
25187         unsigned int.
25188         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25189         from unsigned int to poly_uint64.
25190         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25191         (vec_perm_indices::new_vector): Likewise.
25192         (vec_perm_indices::length): Likewise.
25193         (vec_perm_indices::nelts_per_input): Likewise.
25194         (vec_perm_indices::input_nelts): Likewise.
25195         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25196         number of elements per input as a poly_uint64 rather than an
25197         unsigned int.  Use the original encoding for variable-length
25198         vectors, rather than clamping each individual element.
25199         For the second and subsequent elements in each pattern,
25200         clamp the step and base before clamping their sum.
25201         (vec_perm_indices::series_p): Handle polynomial element counts.
25202         (vec_perm_indices::all_in_range_p): Likewise.
25203         (vec_perm_indices_to_tree): Likewise.
25204         (vec_perm_indices_to_rtx): Likewise.
25205         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25206         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25207         (tree_vector_builder::new_binary_operation): Handle polynomial
25208         element counts.  Return false if we need to know the number
25209         of elements at compile time.
25210         * fold-const.c (fold_vec_perm): Punt if the number of elements
25211         isn't known at compile time.
25213 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25215         * vec-perm-indices.h (vec_perm_builder): Change element type
25216         from HOST_WIDE_INT to poly_int64.
25217         (vec_perm_indices::element_type): Update accordingly.
25218         (vec_perm_indices::clamp): Handle polynomial element_types.
25219         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25220         (vec_perm_indices::all_in_range_p): Likewise.
25221         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25222         than shwi trees.
25223         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25224         polynomial vec_perm_indices element types.
25225         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25226         * fold-const.c (fold_vec_perm): Likewise.
25227         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25228         * tree-vect-generic.c (lower_vec_perm): Likewise.
25229         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25230         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25231         element type to HOST_WIDE_INT.
25233 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25234             Alan Hayward  <alan.hayward@arm.com>
25235             David Sherwood  <david.sherwood@arm.com>
25237         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25238         rather than an int.  Use plus_constant.
25239         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25240         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25242 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25243             Alan Hayward  <alan.hayward@arm.com>
25244             David Sherwood  <david.sherwood@arm.com>
25246         * calls.c (emit_call_1, expand_call): Change struct_value_size from
25247         a HOST_WIDE_INT to a poly_int64.
25249 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25250             Alan Hayward  <alan.hayward@arm.com>
25251             David Sherwood  <david.sherwood@arm.com>
25253         * calls.c (load_register_parameters): Cope with polynomial
25254         mode sizes.  Require a constant size for BLKmode parameters
25255         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
25256         forces a parameter to be padded at the lsb end in order to
25257         fill a complete number of words, require the parameter size
25258         to be ordered wrt UNITS_PER_WORD.
25260 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25261             Alan Hayward  <alan.hayward@arm.com>
25262             David Sherwood  <david.sherwood@arm.com>
25264         * reload1.c (spill_stack_slot_width): Change element type
25265         from unsigned int to poly_uint64_pod.
25266         (alter_reg): Treat mode sizes as polynomial.
25268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25269             Alan Hayward  <alan.hayward@arm.com>
25270             David Sherwood  <david.sherwood@arm.com>
25272         * reload.c (complex_word_subreg_p): New function.
25273         (reload_inner_reg_of_subreg, push_reload): Use it.
25275 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25276             Alan Hayward  <alan.hayward@arm.com>
25277             David Sherwood  <david.sherwood@arm.com>
25279         * lra-constraints.c (process_alt_operands): Reject matched
25280         operands whose sizes aren't ordered.
25281         (match_reload): Refer to this check here.
25283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25284             Alan Hayward  <alan.hayward@arm.com>
25285             David Sherwood  <david.sherwood@arm.com>
25287         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25288         that the mode size is in the set {1, 2, 4, 8, 16}.
25290 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25291             Alan Hayward  <alan.hayward@arm.com>
25292             David Sherwood  <david.sherwood@arm.com>
25294         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25295         Use plus_constant instead of gen_rtx_PLUS.
25297 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25298             Alan Hayward  <alan.hayward@arm.com>
25299             David Sherwood  <david.sherwood@arm.com>
25301         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25302         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25303         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25304         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25305         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25306         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25307         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25308         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25309         * config/i386/i386.c (ix86_push_rounding): ...this new function.
25310         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25311         a poly_int64.
25312         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25313         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25314         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25315         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25316         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25317         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25318         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25319         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25320         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25321         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25322         function.
25323         * expr.c (emit_move_resolve_push): Treat the input and result
25324         of PUSH_ROUNDING as a poly_int64.
25325         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25326         (emit_push_insn): Likewise.
25327         * lra-eliminations.c (mark_not_eliminable): Likewise.
25328         * recog.c (push_operand): Likewise.
25329         * reload1.c (elimination_effects): Likewise.
25330         * rtlanal.c (nonzero_bits1): Likewise.
25331         * calls.c (store_one_arg): Likewise.  Require the padding to be
25332         known at compile time.
25334 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25335             Alan Hayward  <alan.hayward@arm.com>
25336             David Sherwood  <david.sherwood@arm.com>
25338         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25339         Use plus_constant instead of gen_rtx_PLUS.
25341 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25342             Alan Hayward  <alan.hayward@arm.com>
25343             David Sherwood  <david.sherwood@arm.com>
25345         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25346         rather than an int.
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         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25353         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25354         via stack temporaries.  Treat the mode size as polynomial too.
25356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25357             Alan Hayward  <alan.hayward@arm.com>
25358             David Sherwood  <david.sherwood@arm.com>
25360         * expr.c (expand_expr_real_2): When handling conversions involving
25361         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25362         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
25363         as a poly_uint64 too.
25365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25366             Alan Hayward  <alan.hayward@arm.com>
25367             David Sherwood  <david.sherwood@arm.com>
25369         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25372             Alan Hayward  <alan.hayward@arm.com>
25373             David Sherwood  <david.sherwood@arm.com>
25375         * combine.c (can_change_dest_mode): Handle polynomial
25376         REGMODE_NATURAL_SIZE.
25377         * expmed.c (store_bit_field_1): Likewise.
25378         * expr.c (store_constructor): Likewise.
25379         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25380         and polynomial REGMODE_NATURAL_SIZE.
25381         (gen_lowpart_common): Likewise.
25382         * reginfo.c (record_subregs_of_mode): Likewise.
25383         * rtlanal.c (read_modify_subreg_p): Likewise.
25385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25386             Alan Hayward  <alan.hayward@arm.com>
25387             David Sherwood  <david.sherwood@arm.com>
25389         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25390         numbers of elements.
25392 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25393             Alan Hayward  <alan.hayward@arm.com>
25394             David Sherwood  <david.sherwood@arm.com>
25396         * match.pd: Cope with polynomial numbers of vector elements.
25398 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25399             Alan Hayward  <alan.hayward@arm.com>
25400             David Sherwood  <david.sherwood@arm.com>
25402         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25403         in a POINTER_PLUS_EXPR.
25405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25406             Alan Hayward  <alan.hayward@arm.com>
25407             David Sherwood  <david.sherwood@arm.com>
25409         * omp-simd-clone.c (simd_clone_subparts): New function.
25410         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25411         (ipa_simd_modify_function_body): Likewise.
25413 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25414             Alan Hayward  <alan.hayward@arm.com>
25415             David Sherwood  <david.sherwood@arm.com>
25417         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25418         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25419         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25420         (expand_vector_condition, vector_element): Likewise.
25421         (subparts_gt): New function.
25422         (get_compute_type): Use subparts_gt.
25423         (count_type_subparts): Delete.
25424         (expand_vector_operations_1): Use subparts_gt instead of
25425         count_type_subparts.
25427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25428             Alan Hayward  <alan.hayward@arm.com>
25429             David Sherwood  <david.sherwood@arm.com>
25431         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25432         (vect_compile_time_alias): ...this new function.  Do the calculation
25433         on poly_ints rather than trees.
25434         (vect_prune_runtime_alias_test_list): Update call accordingly.
25436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25437             Alan Hayward  <alan.hayward@arm.com>
25438             David Sherwood  <david.sherwood@arm.com>
25440         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25441         numbers of units.
25442         (vect_schedule_slp_instance): Likewise.
25444 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25445             Alan Hayward  <alan.hayward@arm.com>
25446             David Sherwood  <david.sherwood@arm.com>
25448         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25449         constant and extern definitions for variable-length vectors.
25450         (vect_get_constant_vectors): Note that the number of units
25451         is known to be constant.
25453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25454             Alan Hayward  <alan.hayward@arm.com>
25455             David Sherwood  <david.sherwood@arm.com>
25457         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25458         of units as polynomial.  Choose between WIDE and NARROW based
25459         on multiple_p.
25461 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25462             Alan Hayward  <alan.hayward@arm.com>
25463             David Sherwood  <david.sherwood@arm.com>
25465         * tree-vect-stmts.c (simd_clone_subparts): New function.
25466         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25469             Alan Hayward  <alan.hayward@arm.com>
25470             David Sherwood  <david.sherwood@arm.com>
25472         * tree-vect-stmts.c (vectorizable_call): Treat the number of
25473         vectors as polynomial.  Use build_index_vector for
25474         IFN_GOMP_SIMD_LANE.
25476 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25477             Alan Hayward  <alan.hayward@arm.com>
25478             David Sherwood  <david.sherwood@arm.com>
25480         * tree-vect-stmts.c (get_load_store_type): Treat the number of
25481         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25482         for variable-length vectors.
25483         (vectorizable_mask_load_store): Treat the number of units as
25484         polynomial, asserting that it is constant if the condition has
25485         already been enforced.
25486         (vectorizable_store, vectorizable_load): Likewise.
25488 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25489             Alan Hayward  <alan.hayward@arm.com>
25490             David Sherwood  <david.sherwood@arm.com>
25492         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25493         of units as polynomial.  Punt if we can't tell at compile time
25494         which vector contains the final result.
25496 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25497             Alan Hayward  <alan.hayward@arm.com>
25498             David Sherwood  <david.sherwood@arm.com>
25500         * tree-vect-loop.c (vectorizable_induction): Treat the number
25501         of units as polynomial.  Punt on SLP inductions.  Use an integer
25502         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
25503         cast of such a series for variable-length floating-point
25504         reductions.
25506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25507             Alan Hayward  <alan.hayward@arm.com>
25508             David Sherwood  <david.sherwood@arm.com>
25510         * tree.h (build_index_vector): Declare.
25511         * tree.c (build_index_vector): New function.
25512         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25513         of units as polynomial, forcibly converting it to a constant if
25514         vectorizable_reduction has already enforced the condition.
25515         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
25516         to create a {1,2,3,...} vector.
25517         (vectorizable_reduction): Treat the number of units as polynomial.
25518         Choose vectype_in based on the largest scalar element size rather
25519         than the smallest number of units.  Enforce the restrictions
25520         relied on above.
25522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25523             Alan Hayward  <alan.hayward@arm.com>
25524             David Sherwood  <david.sherwood@arm.com>
25526         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25527         number of units as polynomial.
25529 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25530             Alan Hayward  <alan.hayward@arm.com>
25531             David Sherwood  <david.sherwood@arm.com>
25533         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25534         * target.def (autovectorize_vector_sizes): Return the vector sizes
25535         by pointer, using vector_sizes rather than a bitmask.
25536         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25537         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25538         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25539         Likewise.
25540         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25541         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25542         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25543         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25544         * omp-general.c (omp_max_vf): Likewise.
25545         * omp-low.c (omp_clause_aligned_alignment): Likewise.
25546         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25547         * tree-vect-loop.c (vect_analyze_loop): Likewise.
25548         * tree-vect-slp.c (vect_slp_bb): Likewise.
25549         * doc/tm.texi: Regenerate.
25550         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25551         to a poly_uint64.
25552         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25553         the vector size as a poly_uint64 rather than an unsigned int.
25554         (current_vector_size): Change from an unsigned int to a poly_uint64.
25555         (get_vectype_for_scalar_type): Update accordingly.
25556         * tree.h (build_truth_vector_type): Take the size and number of
25557         units as a poly_uint64 rather than an unsigned int.
25558         (build_vector_type): Add a temporary overload that takes
25559         the number of units as a poly_uint64 rather than an unsigned int.
25560         * tree.c (make_vector_type): Likewise.
25561         (build_truth_vector_type): Take the number of units as a poly_uint64
25562         rather than an unsigned int.
25564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25565             Alan Hayward  <alan.hayward@arm.com>
25566             David Sherwood  <david.sherwood@arm.com>
25568         * target.def (get_mask_mode): Take the number of units and length
25569         as poly_uint64s rather than unsigned ints.
25570         * targhooks.h (default_get_mask_mode): Update accordingly.
25571         * targhooks.c (default_get_mask_mode): Likewise.
25572         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25573         * doc/tm.texi: Regenerate.
25575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25576             Alan Hayward  <alan.hayward@arm.com>
25577             David Sherwood  <david.sherwood@arm.com>
25579         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25580         * omp-general.c (omp_max_vf): Likewise.
25581         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25582         (expand_omp_simd): Handle polynomial safelen.
25583         * omp-low.c (omplow_simd_context): Add a default constructor.
25584         (omplow_simd_context::max_vf): Change from int to poly_uint64.
25585         (lower_rec_simd_input_clauses): Update accordingly.
25586         (lower_rec_input_clauses): Likewise.
25588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25589             Alan Hayward  <alan.hayward@arm.com>
25590             David Sherwood  <david.sherwood@arm.com>
25592         * tree-vectorizer.h (vect_nunits_for_cost): New function.
25593         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25594         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25595         (vect_analyze_slp_cost): Likewise.
25596         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25597         (vect_model_load_cost): Likewise.
25599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25600             Alan Hayward  <alan.hayward@arm.com>
25601             David Sherwood  <david.sherwood@arm.com>
25603         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25604         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25605         from an unsigned int * to a poly_uint64_pod *.
25606         (calculate_unrolling_factor): New function.
25607         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
25609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25610             Alan Hayward  <alan.hayward@arm.com>
25611             David Sherwood  <david.sherwood@arm.com>
25613         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25614         from an unsigned int to a poly_uint64.
25615         (_loop_vec_info::slp_unrolling_factor): Likewise.
25616         (_loop_vec_info::vectorization_factor): Change from an int
25617         to a poly_uint64.
25618         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25619         (vect_get_num_vectors): New function.
25620         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25621         (vect_get_num_copies): Use vect_get_num_vectors.
25622         (vect_analyze_data_ref_dependences): Change max_vf from an int *
25623         to an unsigned int *.
25624         (vect_analyze_data_refs): Change min_vf from an int * to a
25625         poly_uint64 *.
25626         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25627         than an unsigned HOST_WIDE_INT.
25628         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25629         (vect_analyze_data_ref_dependence): Change max_vf from an int *
25630         to an unsigned int *.
25631         (vect_analyze_data_ref_dependences): Likewise.
25632         (vect_compute_data_ref_alignment): Handle polynomial vf.
25633         (vect_enhance_data_refs_alignment): Likewise.
25634         (vect_prune_runtime_alias_test_list): Likewise.
25635         (vect_shift_permute_load_chain): Likewise.
25636         (vect_supportable_dr_alignment): Likewise.
25637         (dependence_distance_ge_vf): Take the vectorization factor as a
25638         poly_uint64 rather than an unsigned HOST_WIDE_INT.
25639         (vect_analyze_data_refs): Change min_vf from an int * to a
25640         poly_uint64 *.
25641         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25642         vfm1 as a poly_uint64 rather than an int.  Make the same change
25643         for the returned bound_scalar.
25644         (vect_gen_vector_loop_niters): Handle polynomial vf.
25645         (vect_do_peeling): Likewise.  Update call to
25646         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25647         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25648         be constant.
25649         * tree-vect-loop.c (vect_determine_vectorization_factor)
25650         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25651         (vect_get_known_peeling_cost): Likewise.
25652         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25653         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25654         (vect_transform_loop): Likewise.  Use the lowest possible VF when
25655         updating the upper bounds of the loop.
25656         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
25657         rather than an int.
25658         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25659         polynomial unroll factors.
25660         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25661         (vect_make_slp_decision): Likewise.
25662         (vect_supported_load_permutation_p): Likewise, and polynomial
25663         vf too.
25664         (vect_analyze_slp_cost): Handle polynomial vf.
25665         (vect_slp_analyze_node_operations): Likewise.
25666         (vect_slp_analyze_bb_1): Likewise.
25667         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25668         than an unsigned HOST_WIDE_INT.
25669         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25670         (vectorizable_load): Handle polynomial vf.
25671         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25672         a poly_uint64.
25673         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25676             Alan Hayward  <alan.hayward@arm.com>
25677             David Sherwood  <david.sherwood@arm.com>
25679         * match.pd: Handle bit operations involving three constants
25680         and try to fold one pair.
25682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25684         * tree-vect-loop-manip.c: Include gimple-fold.h.
25685         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25686         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
25687         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25688         Add a path that uses a step of VF instead of 1, but disable it
25689         for now.
25690         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25691         and niters_no_overflow parameters.  Update calls to
25692         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25693         Create a new SSA name if the latter choses to use a ste other
25694         than zero, and return it via niters_vector_mult_vf_var.
25695         * tree-vect-loop.c (vect_transform_loop): Update calls to
25696         vect_do_peeling, vect_gen_vector_loop_niters and
25697         slpeel_make_loop_iterate_ntimes.
25698         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25699         (vect_gen_vector_loop_niters): Update declarations after above changes.
25701 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
25703         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25704         128-bit round to integer instructions.
25705         (ceil<mode>2): Likewise.
25706         (btrunc<mode>2): Likewise.
25707         (round<mode>2): Likewise.
25709 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25711         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25712         unaligned VSX load/store on P8/P9.
25713         (expand_block_clear): Allow the use of unaligned VSX
25714         load/store on P8/P9.
25716 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25718         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25719         New function.
25720         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25721         swap associated with both a load and a store.
25723 2018-01-02  Andrew Waterman  <andrew@sifive.com>
25725         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25726         * config/riscv/riscv.md (clear_cache): Use it.
25728 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
25730         * web.c: Remove out-of-date comment.
25732 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25734         * expr.c (fixup_args_size_notes): Check that any existing
25735         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25736         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25737         (emit_single_push_insn): ...here.
25739 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25741         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25742         (const_vector_encoded_nelts): New function.
25743         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25744         (const_vector_int_elt, const_vector_elt): Declare.
25745         * emit-rtl.c (const_vector_int_elt_1): New function.
25746         (const_vector_elt): Likewise.
25747         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25748         of CONST_VECTOR_ELT.
25750 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25752         * expr.c: Include rtx-vector-builder.h.
25753         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25754         directly on the tree encoding.
25755         (const_vector_from_tree): Likewise.
25756         * optabs.c: Include rtx-vector-builder.h.
25757         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25758         sequence of "u" values.
25759         * vec-perm-indices.c: Include rtx-vector-builder.h.
25760         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25761         directly on the vec_perm_indices encoding.
25763 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25765         * doc/rtl.texi (const_vector): Describe new encoding scheme.
25766         * Makefile.in (OBJS): Add rtx-vector-builder.o.
25767         * rtx-vector-builder.h: New file.
25768         * rtx-vector-builder.c: Likewise.
25769         * rtl.h (rtx_def::u2): Add a const_vector field.
25770         (CONST_VECTOR_NPATTERNS): New macro.
25771         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25772         (CONST_VECTOR_DUPLICATE_P): Likewise.
25773         (CONST_VECTOR_STEPPED_P): Likewise.
25774         (CONST_VECTOR_ENCODED_ELT): Likewise.
25775         (const_vec_duplicate_p): Check for a duplicated vector encoding.
25776         (unwrap_const_vec_duplicate): Likewise.
25777         (const_vec_series_p): Check for a non-duplicated vector encoding.
25778         Say that the function only returns true for integer vectors.
25779         * emit-rtl.c: Include rtx-vector-builder.h.
25780         (gen_const_vec_duplicate_1): Delete.
25781         (gen_const_vector): Call gen_const_vec_duplicate instead of
25782         gen_const_vec_duplicate_1.
25783         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25784         (gen_const_vec_duplicate): Use rtx_vector_builder.
25785         (gen_const_vec_series): Likewise.
25786         (gen_rtx_CONST_VECTOR): Likewise.
25787         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25788         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25789         Build a new vector rather than modifying a CONST_VECTOR in-place.
25790         (handle_special_swappables): Update call accordingly.
25791         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25792         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25793         Build a new vector rather than modifying a CONST_VECTOR in-place.
25794         (handle_special_swappables): Update call accordingly.
25796 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25798         * simplify-rtx.c (simplify_const_binary_operation): Use
25799         CONST_VECTOR_ELT instead of XVECEXP.
25801 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25803         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25804         the selector elements to be different from the data elements
25805         if the selector is a VECTOR_CST.
25806         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25807         ssizetype for the selector.
25809 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25811         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25812         before testing each element individually.
25813         * tree-vect-generic.c (lower_vec_perm): Likewise.
25815 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25817         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25818         * selftest-run-tests.c (selftest::run_tests): Call it.
25819         * vector-builder.h (vector_builder::operator ==): New function.
25820         (vector_builder::operator !=): Likewise.
25821         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25822         (vec_perm_indices::all_from_input_p): New function.
25823         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25824         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25825         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25826         instead of reading the VECTOR_CST directly.  Detect whether both
25827         vector inputs are the same before constructing the vec_perm_indices,
25828         and update the number of inputs argument accordingly.  Use the
25829         utility functions added above.  Only construct sel2 if we need to.
25831 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25833         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25834         the broadcast of the low byte.
25835         (expand_mult_highpart): Use an explicit encoding for the permutes.
25836         * optabs-query.c (can_mult_highpart_p): Likewise.
25837         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25838         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25839         (vectorizable_bswap): Likewise.
25840         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25841         explicit encoding for the power-of-2 permutes.
25842         (vect_permute_store_chain): Likewise.
25843         (vect_grouped_load_supported): Likewise.
25844         (vect_permute_load_chain): Likewise.
25846 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25848         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25849         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25850         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25851         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25852         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25853         (vect_gen_perm_mask_any): Likewise.
25855 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25857         * int-vector-builder.h: New file.
25858         * vec-perm-indices.h: Include int-vector-builder.h.
25859         (vec_perm_indices): Redefine as an int_vector_builder.
25860         (auto_vec_perm_indices): Delete.
25861         (vec_perm_builder): Redefine as a stand-alone class.
25862         (vec_perm_indices::vec_perm_indices): New function.
25863         (vec_perm_indices::clamp): Likewise.
25864         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25865         (vec_perm_indices::new_vector): New function.
25866         (vec_perm_indices::new_expanded_vector): Update for new
25867         vec_perm_indices class.
25868         (vec_perm_indices::rotate_inputs): New function.
25869         (vec_perm_indices::all_in_range_p): Operate directly on the
25870         encoded form, without computing elided elements.
25871         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25872         encoding.  Update for new vec_perm_indices class.
25873         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25874         the given vec_perm_builder.
25875         (expand_vec_perm_var): Update vec_perm_builder constructor.
25876         (expand_mult_highpart): Use vec_perm_builder instead of
25877         auto_vec_perm_indices.
25878         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25879         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
25880         or double series encoding as appropriate.
25881         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25882         vec_perm_indices instead of auto_vec_perm_indices.
25883         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25884         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25885         (vect_permute_store_chain): Likewise.
25886         (vect_grouped_load_supported): Likewise.
25887         (vect_permute_load_chain): Likewise.
25888         (vect_shift_permute_load_chain): Likewise.
25889         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25890         (vect_transform_slp_perm_load): Likewise.
25891         (vect_schedule_slp_instance): Likewise.
25892         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25893         (vectorizable_mask_load_store): Likewise.
25894         (vectorizable_bswap): Likewise.
25895         (vectorizable_store): Likewise.
25896         (vectorizable_load): Likewise.
25897         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25898         vec_perm_indices instead of auto_vec_perm_indices.  Use
25899         tree_to_vec_perm_builder to read the vector from a tree.
25900         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25901         vec_perm_builder instead of a vec_perm_indices.
25902         (have_whole_vector_shift): Use vec_perm_builder and
25903         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
25904         truncation to calc_vec_perm_mask_for_shift.
25905         (vect_create_epilog_for_reduction): Likewise.
25906         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25907         from auto_vec_perm_indices to vec_perm_indices.
25908         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25909         instead of changing individual elements.
25910         (aarch64_vectorize_vec_perm_const): Use new_vector to install
25911         the vector in d.perm.
25912         * config/arm/arm.c (expand_vec_perm_d::perm): Change
25913         from auto_vec_perm_indices to vec_perm_indices.
25914         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25915         instead of changing individual elements.
25916         (arm_vectorize_vec_perm_const): Use new_vector to install
25917         the vector in d.perm.
25918         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25919         Update vec_perm_builder constructor.
25920         (rs6000_expand_interleave): Likewise.
25921         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25922         (rs6000_expand_interleave): Likewise.
25924 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25926         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25927         to qimode could truncate the indices.
25928         * optabs.c (expand_vec_perm_var): Likewise.
25930 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25932         * Makefile.in (OBJS): Add vec-perm-indices.o.
25933         * vec-perm-indices.h: New file.
25934         * vec-perm-indices.c: Likewise.
25935         * target.h (vec_perm_indices): Replace with a forward class
25936         declaration.
25937         (auto_vec_perm_indices): Move to vec-perm-indices.h.
25938         * optabs.h: Include vec-perm-indices.h.
25939         (expand_vec_perm): Delete.
25940         (selector_fits_mode_p, expand_vec_perm_var): Declare.
25941         (expand_vec_perm_const): Declare.
25942         * target.def (vec_perm_const_ok): Replace with...
25943         (vec_perm_const): ...this new hook.
25944         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25945         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25946         * doc/tm.texi: Regenerate.
25947         * optabs.def (vec_perm_const): Delete.
25948         * doc/md.texi (vec_perm_const): Likewise.
25949         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25950         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25951         expand_vec_perm for constant permutation vectors.  Assert that
25952         the mode of variable permutation vectors is the integer equivalent
25953         of the mode that is being permuted.
25954         * optabs-query.h (selector_fits_mode_p): Declare.
25955         * optabs-query.c: Include vec-perm-indices.h.
25956         (selector_fits_mode_p): New function.
25957         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25958         is defined, instead of checking whether the vec_perm_const_optab
25959         exists.  Use targetm.vectorize.vec_perm_const instead of
25960         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
25961         fit in the vector mode before using a variable permute.
25962         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25963         vec_perm_indices instead of an rtx.
25964         (expand_vec_perm): Replace with...
25965         (expand_vec_perm_const): ...this new function.  Take the selector
25966         as a vec_perm_indices rather than an rtx.  Also take the mode of
25967         the selector.  Update call to shift_amt_for_vec_perm_mask.
25968         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25969         Use vec_perm_indices::new_expanded_vector to expand the original
25970         selector into bytes.  Check whether the indices fit in the vector
25971         mode before using a variable permute.
25972         (expand_vec_perm_var): Make global.
25973         (expand_mult_highpart): Use expand_vec_perm_const.
25974         * fold-const.c: Includes vec-perm-indices.h.
25975         * tree-ssa-forwprop.c: Likewise.
25976         * tree-vect-data-refs.c: Likewise.
25977         * tree-vect-generic.c: Likewise.
25978         * tree-vect-loop.c: Likewise.
25979         * tree-vect-slp.c: Likewise.
25980         * tree-vect-stmts.c: Likewise.
25981         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25982         Delete.
25983         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25984         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25985         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25986         (aarch64_vectorize_vec_perm_const): ...this new function.
25987         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25988         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25989         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25990         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25991         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25992         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25993         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25994         into...
25995         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
25996         check for NEON modes.
25997         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25998         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25999         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
26000         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
26001         into...
26002         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
26003         the old VEC_PERM_CONST conditions.
26004         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
26005         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
26006         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
26007         (ia64_vectorize_vec_perm_const_ok): Merge into...
26008         (ia64_vectorize_vec_perm_const): ...this new function.
26009         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
26010         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
26011         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
26012         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
26013         * config/mips/mips.c (mips_expand_vec_perm_const)
26014         (mips_vectorize_vec_perm_const_ok): Merge into...
26015         (mips_vectorize_vec_perm_const): ...this new function.
26016         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
26017         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
26018         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
26019         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
26020         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
26021         (rs6000_expand_vec_perm_const): Delete.
26022         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
26023         Delete.
26024         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26025         (altivec_expand_vec_perm_const_le): Take each operand individually.
26026         Operate on constant selectors rather than rtxes.
26027         (altivec_expand_vec_perm_const): Likewise.  Update call to
26028         altivec_expand_vec_perm_const_le.
26029         (rs6000_expand_vec_perm_const): Delete.
26030         (rs6000_vectorize_vec_perm_const_ok): Delete.
26031         (rs6000_vectorize_vec_perm_const): New function.
26032         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26033         an element count and rtx array.
26034         (rs6000_expand_extract_even): Update call accordingly.
26035         (rs6000_expand_interleave): Likewise.
26036         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
26037         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
26038         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
26039         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
26040         (rs6000_expand_vec_perm_const): Delete.
26041         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26042         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26043         (altivec_expand_vec_perm_const_le): Take each operand individually.
26044         Operate on constant selectors rather than rtxes.
26045         (altivec_expand_vec_perm_const): Likewise.  Update call to
26046         altivec_expand_vec_perm_const_le.
26047         (rs6000_expand_vec_perm_const): Delete.
26048         (rs6000_vectorize_vec_perm_const_ok): Delete.
26049         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
26050         reference to the SPE evmerge intructions.
26051         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26052         an element count and rtx array.
26053         (rs6000_expand_extract_even): Update call accordingly.
26054         (rs6000_expand_interleave): Likewise.
26055         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26056         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26057         new function.
26058         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26060 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26062         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26063         vector mode and that that mode matches the mode of the data
26064         being permuted.
26065         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26066         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
26067         directly using expand_vec_perm_1 when forcing selectors into
26068         registers.
26069         (expand_vec_perm_var): New function, split out from expand_vec_perm.
26071 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26073         * optabs-query.h (can_vec_perm_p): Delete.
26074         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26075         * optabs-query.c (can_vec_perm_p): Split into...
26076         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26077         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26078         particular selector is valid.
26079         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26080         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26081         (vect_grouped_load_supported): Likewise.
26082         (vect_shift_permute_load_chain): Likewise.
26083         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26084         (vect_transform_slp_perm_load): Likewise.
26085         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26086         (vectorizable_bswap): Likewise.
26087         (vect_gen_perm_mask_checked): Likewise.
26088         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
26089         implementations of variable permutation vectors into account
26090         when deciding which selector to use.
26091         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26092         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26093         with a false third argument.
26094         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26095         to test whether the constant selector is valid and can_vec_perm_var_p
26096         to test whether a variable selector is valid.
26098 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26100         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26101         * optabs-query.c (can_vec_perm_p): Likewise.
26102         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26103         instead of vec_perm_indices.
26104         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26105         (vect_gen_perm_mask_checked): Likewise,
26106         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26107         (vect_gen_perm_mask_checked): Likewise,
26109 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26111         * optabs-query.h (qimode_for_vec_perm): Declare.
26112         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26113         (qimode_for_vec_perm): ...this new function.
26114         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26116 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26118         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26119         does not have a conditional at the top.
26121 2018-01-02  Richard Biener  <rguenther@suse.de>
26123         * ipa-inline.c (big_speedup_p): Fix expression.
26125 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
26127         PR target/81616
26128         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26129         for generic 4->6.
26131 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
26133         PR target/81616
26134         Generic tuning.
26135         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26136         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26137         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26138         cond_taken_branch_cost 3->4.
26140 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
26142         PR tree-optimization/83581
26143         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26144         TODO_cleanup_cfg if any changes have been made.
26146         PR middle-end/83608
26147         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26148         convert_modes if target mode has the right side, but different mode
26149         class.
26151         PR middle-end/83609
26152         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26153         last argument when extracting from CONCAT.  If either from_real or
26154         from_imag is NULL, use expansion through memory.  If result is not
26155         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26156         the parts directly to inner mode, if even that fails, use expansion
26157         through memory.
26159         PR middle-end/83623
26160         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26161         check for bswap in mode rather than HImode and use that in expand_unop
26162         too.
26164 Copyright (C) 2018 Free Software Foundation, Inc.
26166 Copying and distribution of this file, with or without modification,
26167 are permitted in any medium without royalty provided the copyright
26168 notice and this notice are preserved.