PR middle-end/86631 - missing -Walloc-size-larger-than on ILP32 hosts
[official-gcc.git] / gcc / ChangeLog
blobb4b56da6c0d8cd868d9ddab05d27b9db8d077f36
1 2018-08-28  Martin Sebor  <msebor@redhat.com>
3         PR middle-end/86631
4         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
6         (pass_walloca::gate): Use it.
7         (alloca_call_type): Same.
8         (pass_walloca::execute): Same.
9         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
11 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
13         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
14         GCC_VERSION for usage of "__gcc_dump_printf__" format from
15         >= 3005 to >= 9000.
17 2018-08-28  Richard Biener  <rguenther@suse.de>
19         PR tree-optimization/87124
20         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
21         constants before looking up avail.
23 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
25         PR middle-end/87099
26         * calls.c (maybe_warn_nonstring_arg): Punt early if
27         warn_stringop_overflow is zero.  Don't call get_range_strlen
28         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
29         Swap comparison operands to have constants on rhs.  Only use
30         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
31         increment lenrng[0].
33 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
35         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
36         use of tree_to_shwi.  Remove duplicated test for the size being
37         a whole number of bytes.
39 2018-08-28  Richard Biener  <rguenther@suse.de>
41         PR tree-optimization/87117
42         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
43         Handle removed stmt without LHS (GIMPLE_NOP).
45 2018-08-28  Richard Biener  <rguenther@suse.de>
47         PR tree-optimization/87117
48         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
49         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
51 2018-08-28  Richard Biener  <rguenther@suse.de>
53         PR tree-optimization/87117
54         * tree-ssa-pre.c (compute_avail): Do not make expressions
55         with predicated values available.
56         (get_expr_value_id): Assert we do not run into predicated value
57         expressions.
59 2018-08-28  Richard Biener  <rguenther@suse.de>
61         PR tree-optimization/87117
62         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
63         get virtual operands.
64         (get_expr_operands): Handle STRING_CST like other decls.
66 2018-08-28  Martin Liska  <mliska@suse.cz>
68         * tree.h: Update documentation of fndecl_built_in_p
69         functions.
71 2018-08-27  Jeff Law  <law@redhat.com>
73         PR tree-optimization/87110
74         * tree-ssa-dse.c (compute_trims): Handle non-constant
75         TYPE_SIZE_UNIT.
77 2018-08-27  Martin Sebor  <msebor@redhat.com>
79         PR tree-optimization/86914
80         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
82 2018-08-27  Martin Sebor  <msebor@redhat.com>
84         PR tree-optimization/87112
85         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
86         the type of the bound argument.
88 2018-08-27  Jeff Law  <law@redhat.com>
90         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
91         type does not have a TYPE_SIZE_UNIT.
93 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
95         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
96         with include of backend.h.
98 2018-08-27  Richard Biener  <rguenther@suse.de>
100         PR tree-optimization/86927
101         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
102         use const cond reduction code.
104 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
106         PR tree-optimization/85758
107         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
109 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
111         PR c++/87091
112         * diagnostic-show-locus.c (class layout_range): Update for
113         conversion of show_caret_p to a tri-state.
114         (layout_range::layout_range): Likewise.
115         (make_range): Likewise.
116         (layout::maybe_add_location_range): Likewise.
117         (layout::should_print_annotation_line_p): Don't show annotation
118         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
119         (layout::get_state_at_point): Update for conversion of
120         show_caret_p to a tri-state.  Bail out early for
121         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
122         underlining or source colorization.
123         (gcc_rich_location::add_location_if_nearby): Update for conversion
124         of show_caret_p to a tri-state.
125         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
126         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
127         Likewise.
128         (selftest::test_one_liner_labels): Likewise.
129         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
130         conversion of show_caret_p to a tri-state.
131         * pretty-print.c (text_info::set_location): Likewise.
132         * pretty-print.h (text_info::set_location): Likewise.
133         * substring-locations.c (format_warning_n_va): Likewise.
134         * tree-diagnostic.c (default_tree_printer): Likewise.
135         * tree-pretty-print.c (newline_and_indent): Likewise.
137 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
139         PR c++/87091
140         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
141         line above for line-insertion fix-it hints.
142         (selftest::test_fixit_insert_containing_newline): Update the
143         expected results, and add a test with line-numbering enabled.
145 2018-08-27  Martin Liska  <mliska@suse.cz>
147         PR sanitizer/86962
148         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
149         params with DECL_HAS_VALUE_EXPR_P.
151 2018-08-27  Martin Liska  <mliska@suse.cz>
153         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
154         selected expansion strategy.
156 2018-08-27  Martin Liska  <mliska@suse.cz>
158         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
159         * builtins.c (is_builtin_fn): Likewise.
160         * attribs.c (diag_attr_exclusions): Use new function
161         fndecl_built_in_p and remove check for FUNCTION_DECL if
162         possible.
163         (builtin_mathfn_code): Likewise.
164         (fold_builtin_expect): Likewise.
165         (fold_call_expr): Likewise.
166         (fold_builtin_call_array): Likewise.
167         (fold_call_stmt): Likewise.
168         (set_builtin_user_assembler_name): Likewise.
169         (is_simple_builtin): Likewise.
170         * calls.c (gimple_alloca_call_p): Likewise.
171         (maybe_warn_nonstring_arg): Likewise.
172         * cfgexpand.c (expand_call_stmt): Likewise.
173         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
174         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
175         (cgraph_node::verify_node): Likewise.
176         * cgraphclones.c (build_function_decl_skip_args): Likewise.
177         (cgraph_node::create_clone): Likewise.
178         * config/arm/arm.c (arm_insert_attributes): Likewise.
179         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
180         * dse.c (scan_insn): Likewise.
181         * expr.c (expand_expr_real_1): Likewise.
182         * fold-const.c (operand_equal_p): Likewise.
183         (fold_binary_loc): Likewise.
184         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
185         * gimple-low.c (lower_stmt): Likewise.
186         * gimple-pretty-print.c (dump_gimple_call): Likewise.
187         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
188         * gimple.c (gimple_build_call_from_tree): Likewise.
189         (gimple_call_builtin_p): Likewise.
190         (gimple_call_combined_fn): Likewise.
191         * gimplify.c (gimplify_call_expr): Likewise.
192         (gimple_boolify): Likewise.
193         (gimplify_modify_expr): Likewise.
194         (gimplify_addr_expr): Likewise.
195         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
196         * ipa-cp.c (determine_versionability): Likewise.
197         * ipa-fnsummary.c (compute_fn_summary): Likewise.
198         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
199         * ipa-split.c (visit_bb): Likewise.
200         (split_function): Likewise.
201         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
202         * lto-cgraph.c (input_node): Likewise.
203         * lto-streamer-out.c (write_symbol): Likewise.
204         * omp-low.c (setjmp_or_longjmp_p): Likewise.
205         (lower_omp_1): Likewise.
206         * predict.c (strip_predict_hints): Likewise.
207         * print-tree.c (print_node): Likewise.
208         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
209         * trans-mem.c (is_tm_irrevocable): Likewise.
210         (is_tm_load): Likewise.
211         (is_tm_simple_load): Likewise.
212         (is_tm_store): Likewise.
213         (is_tm_simple_store): Likewise.
214         (is_tm_abort): Likewise.
215         (tm_region_init_1): Likewise.
216         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
217         * tree-cfg.c (verify_gimple_call): Likewise.
218         (move_stmt_r): Likewise.
219         (stmt_can_terminate_bb_p): Likewise.
220         * tree-eh.c (lower_eh_constructs_2): Likewise.
221         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
222         * tree-inline.c (remap_gimple_stmt): Likewise.
223         (copy_bb): Likewise.
224         (estimate_num_insns): Likewise.
225         (fold_marked_statements): Likewise.
226         * tree-sra.c (scan_function): Likewise.
227         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
228         (optimize_stack_restore): Likewise.
229         (pass_fold_builtins::execute): Likewise.
230         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
231         (mark_all_reaching_defs_necessary_1): Likewise.
232         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
233         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
234         (pass_forwprop::execute): Likewise.
235         * tree-ssa-loop-im.c (stmt_cost): Likewise.
236         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
237         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
238         * tree-ssa-strlen.c (get_string_length): Likewise.
239         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
240         (find_func_aliases_for_call): Likewise.
241         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
242         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
243         * tree-tailcall.c (find_tail_calls): Likewise.
244         * tree.c (need_assembler_name_p): Likewise.
245         (free_lang_data_in_decl): Likewise.
246         (get_call_combined_fn): Likewise.
247         * ubsan.c (is_ubsan_builtin_p): Likewise.
248         * varasm.c (incorporeal_function_p): Likewise.
249         * tree.h (DECL_BUILT_IN): Remove and replace with
250         fndecl_built_in_p.
251         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
252         (fndecl_built_in_p): New.
254 2018-08-27  Martin Liska  <mliska@suse.cz>
256         PR tree-optimization/86847
257         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
258         Dump also subtree probability.
259         (switch_decision_tree::do_jump_if_equal): New function.
260         (switch_decision_tree::emit_case_nodes): Handle special
261         situations in balanced tree that can be emitted much simpler.
262         Fix calculation of probabilities that happen in tree expansion.
263         * tree-switch-conversion.h (struct cluster): Add
264         is_single_value_p.
265         (struct simple_cluster): Likewise.
266         (struct case_tree_node): Add new function has_child.
267         (do_jump_if_equal): New.
269 2018-08-27  Martin Liska  <mliska@suse.cz>
271         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
272         Add new argument to bit_test_cluster constructor.
273         (bit_test_cluster::emit): Set bits really number of values
274         handlel by a test.
275         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
276         probability argument.
277         * tree-switch-conversion.h (struct bit_test_cluster):
278         Add m_handles_entire_switch.
280 2018-08-27  Martin Liska  <mliska@suse.cz>
282         PR tree-optimization/86702
283         * tree-switch-conversion.c (jump_table_cluster::emit):
284         Make probabilities even for values in jump table
285         according to number of cases handled.
286         (switch_decision_tree::compute_cases_per_edge): Pass
287         argument to reset_out_edges_aux function.
288         (switch_decision_tree::analyze_switch_statement): Likewise.
289         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
290         Make it static.
292 2018-08-27  Martin Liska  <mliska@suse.cz>
294         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
295         cfun argument explicitly.
296         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
297         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
298         function gimple_switch_default_bb.
299         (convert_switch_statements):
300         (expand_builtins):
301         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
302         * stmt.c (label_to_block_fn): Use label_to_block and pass
303         cfun argument explicitly and use gimple_switch_label_bb.
304         (expand_case): Likewise.
305         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
306         cfun argument explicitly. Likewise.
307         (make_edges_bb): Likewise.
308         (make_cond_expr_edges): Likewise.
309         (get_cases_for_edge): Likewise.
310         (make_gimple_switch_edges): Likewise.
311         (label_to_block_fn): Likewise.
312         (label_to_block): Likewise.
313         (make_goto_expr_edges): Likewise.
314         (make_gimple_asm_edges): Likewise.
315         (main_block_label): Likewise.
316         (group_case_labels_stmt): Likewise.
317         (find_taken_edge_computed_goto): Likewise.
318         (find_taken_edge_switch_expr): Likewise.
319         (gimple_verify_flow_info): Likewise.
320         (gimple_redirect_edge_and_branch): Likewise.
321         (gimple_switch_label_bb): New function.
322         (gimple_switch_default_bb): Likewise.
323         (gimple_switch_edge): Likewise.
324         (gimple_switch_default_edge): Likewise.
325         * tree-cfg.h (label_to_block_fn): Remove and replace ...
326         (label_to_block): ... with this.
327         (gimple_switch_label_bb): New.
328         (gimple_switch_default_bb): Likewise.
329         (gimple_switch_edge): Likewise.
330         (gimple_switch_default_edge): Likewise.
331         * tree-cfgcleanup.c (convert_single_case_switch): Use
332         new gimple functions and pass new argument to label_to_block.
333         (cleanup_control_flow_bb):
334         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
335         cfun argument explicitly.
336         (make_eh_edges): Likewise.
337         (redirect_eh_dispatch_edge): Likewise.
338         (lower_resx): Likewise.
339         (lower_eh_dispatch): Likewise.
340         (maybe_remove_unreachable_handlers): Likewise.
341         (unsplit_eh): Likewise.
342         (cleanup_empty_eh): Likewise.
343         (verify_eh_edges): Likewise.
344         (verify_eh_dispatch_edge): Likewise.
345         * tree-ssa-dom.c (record_edge_info): Likewise.
346         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
347         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
348         (thread_through_normal_block): Likewise.
349         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
350         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
351         * tree-switch-conversion.c (switch_conversion::collect): Use new
352         gimple functions.
353         (switch_conversion::check_final_bb): Likewise.
354         (switch_conversion::gather_default_values): Pass new argument
355         to label_to_block.
356         (switch_conversion::build_constructors): Likewise.
357         (switch_decision_tree::compute_cases_per_edge): Use new
358         gimple_switch_edge function.
359         (switch_decision_tree::analyze_switch_statement): Pass new argument
360         to label_to_block.
361         (switch_decision_tree::try_switch_expansion): Use
362         gimple_switch_default_edge.
363         * tree-vrp.c (find_switch_asserts): Pass new argument
364         to label_to_block.
365         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
366         (vr_values::simplify_switch_using_ranges): Likewise.
368 2018-08-27  Richard Biener  <rguenther@suse.de>
370         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
371         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
373         * tree-ssa-sccvn.h (struct vn_pval): New structure.
374         (struct vn_nary_op_s): Add unwind_to member.  Add
375         predicated_values flag and put result into a union together
376         with a linked list of vn_pval.
377         (struct vn_ssa_aux): Add name member to make maintaining
378         a map of SSA name to vn_ssa_aux possible.  Remove no longer
379         needed info, dfsnum, low, visited, on_sccstack, use_processed
380         and range_info_anti_range_p members.
381         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
382         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
383         New functions.
384         (vn_valueize): New global.
385         (vn_context_bb): Likewise.
386         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
387         VN_INFO_PTR_INFO): Remove.
388         * tree-ssa-sccvn.c: ... (rewrite)
389         (pass_fre::execute): For -O2+ initialize loops and run
390         RPO VN in optimistic mode (iterating).  For -O1 and -Og
391         run RPO VN in non-optimistic mode.
392         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
393         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
394         * doc/invoke.texi (sccvn-max-scc-size): Remove.
395         (rpo-vn-max-loop-depth): Document.
396         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
397         when valuezing the VUSE signals we walked out of the region.
398         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
399         (phi_translate): Set VN context block to use for availability
400         lookup.
401         (compute_avail): Likewise.
402         (pre_valueize): New function.
403         (pass_pre::execute): Adjust to the RPO VN API.
405         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
406         (propagate_constants_for_unrolling): Remove.
407         (tree_unroll_loops_completely): Perform value-numbering
408         on the unrolled bodies loop parent.
410 2018-08-27  Richard Biener  <rguenther@suse.de>
412         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
413         for partial antic compute.
415 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
417         PR rtl-optimization/87065
418         * combine.c (simplify_if_then_else): Formatting fix.
419         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
420         check.
421         (known_cond): Don't return const_true_rtx for vector modes.  Use
422         CONST0_RTX instead of const0_rtx.  Formatting fixes.
424 2018-08-27  Martin Liska  <mliska@suse.cz>
426         PR gcov-profile/87069
427         * gcov.c (process_file): Record files already processed
428         and warn about a file being processed multiple times.
430 2018-08-27  Martin Liska  <mliska@suse.cz>
432         PR driver/83193
433         * config/aarch64/aarch64.c (aarch64_override_options_internal):
434         Set default values for x_aarch64_*_string strings.
435         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
436         prefix.  For -mabi do not print '=ABI' in help and use
437         <option_value> format for -msve-vector-bits and -moverride
438         options.
440 2018-08-26  Jeff Law  <law@redhat.com>
442         * config/mips/frame-header-opt.c: Include "backend.h" rather than
443         "cfg.h"
445 2018-08-26  Marek Polacek  <polacek@redhat.com>
447         PR c++/87029, Implement -Wredundant-move.
448         * doc/invoke.texi: Document -Wredundant-move.
450 2018-08-25  Martin Sebor  <msebor@redhat.com>
452         PR tree-optimization/87059
453         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
454         to the same type as the other.
455         * fold-const.c (fold_binary_loc): Assert expectation.
457 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
459         * config/darwin.c (machopic_legitimize_pic_address): Clean up
460         extraneous parentheses, dead code section and formatting.
462 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
464         PR c++/87091
465         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
466         wide enough for jumps in the line-numbering to be visible.
467         (layout::print_gap_in_line_numbering): New member function.
468         (layout::calculate_line_spans): When using line numbering, merge
469         line spans that are only 1 line apart.
470         (diagnostic_show_locus): When printing line numbers, show gaps in
471         line numbering directly, rather than printing headers.
472         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
473         line-numbering with multiple line spans.
474         (selftest::test_fixit_insert_containing_newline_2): Add test of
475         line-numbering, in which the spans are close enough to be merged.
477 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
479         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
480         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
481         * tree-vrp.c (range_is_nonnull): Remove.
482         (range_includes_zero_p): Accept value_range instead of min/max.
483         (extract_range_from_binary_expr_1): Do not early bail on
484         POINTER_PLUS_EXPR.
485         Use range_includes_zero_p instead of range_is_nonnull.
486         (extract_range_from_unary_expr): Use range_includes_zero_p instead
487         of range_is_nonnull.
488         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
489         special case VR_ANTI_RANGE.
490         (vrp_finalize): Same.
491         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
492         instead of min/max.
493         (range_is_nonnull): Remove.
494         * vr-values.c (vrp_stmt_computes_nonzero): Use
495         range_includes_zero_p instead of range_is_nonnull.
496         (extract_range_basic): Pass value_range to range_includes_zero_p
497         instead of range_is_nonnull.
499 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
501         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
502         * emit-rtl.h (rtl_data): Remove return_bnd.
503         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
504         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
505         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
506         (POINTER_BOUNDS_MODE): Remove definition.
507         (make_pointer_bounds_mode): Remove.
508         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
509         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
510         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
511         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
512         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
513         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
514         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
516         * config/i386/i386-modes.def (BND32, BND64): Remove.
517         * config/i386/i386.c (dbx_register_map): Remove bound registers.
518         (dbx64_register_map): Ditto.
519         (svr4_dbx_register_map): Ditto.
520         (indirect_thunk_bnd_needed): Remove.
521         (indirect_thunks_bnd_used): Ditto.
522         (indirect_return_bnd_needed): Ditto.
523         (indirect_return_via_cx_bnd): Ditto.
524         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
525         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
526         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
527         (output_indirect_thunk_function): Remove handling of
528         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
529         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
530         (ix86_save_reg): Remove handling of crtl->return_bnd.
531         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
532         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
533         and UNSPEC_BNDLX_ADDR.
534         (ix86_output_indirect_branch_via_reg): Remove handling of
535         indirect_thunk_prefix_bnd.
536         (ix86_output_indirect_branch_via_push): Ditto.
537         (ix86_output_function_return): Ditto.
538         (ix86_output_indirect_function_return): Ditto.
539         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
540         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
541         (CALL_USED_REGISTERS): Ditto.
542         (REG_ALLOC_ORDER): Update for removal of bound registers.
543         (HI_REGISTER_NAMES): Ditto.
544         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
545         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
546         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
547         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
548         (FIRST_PSEUDO_REG): Update.
549         (BND): Remove mode iterator.
550         * config/i386/predicates.md (bnd_mem_operator): Remove.
552 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
554         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
555         vectors.
557 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
559         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
560         the case in which the permute needs only a single element and
561         repeats for every vector of the result.  Extend that case to
562         handle variable-length vectors.
563         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
565 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
567         PR debug/79342
568         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
569         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
571 2018-08-24  Richard Biener  <rguenther@suse.de>
573         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
574         bb_flags_allocated members.
575         (auto_flag): New RAII class for allocating flags.
576         (auto_edge_flag): New RAII class for allocating edge flags.
577         (auto_bb_flag): New RAII class for allocating bb flags.
578         * cfgloop.c (verify_loop_structure): Allocate temporary edge
579         flag dynamically.
580         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
581         in favor of temporarily allocated BB flag.
582         * hsa-brig.c: Re-order includes.
583         * hsa-dump.c: Likewise.
584         * hsa-regalloc.c: Likewise.
585         * print-rtl.c: Likewise.
586         * profile-count.c: Likewise.
588 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
590         PR target/86989
591         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
592         the TOC register.
594 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
596         PR 87073/bootstrap
597         * wide-int-range.cc (wide_int_range_div): Do not ignore result
598         from wide_int_range_multiplicative_op.
600 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
602         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
603         "permutaion".
605 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
607         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
608         to 'expanded'.
610 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
612         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
613         full GENERIC expression used for replacement.
615 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
617         * tree-vrp.c (abs_extent_range): Remove.
618         (extract_range_into_wide_ints): Pass wide ints by reference.
619         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
620         Pass wide ints by reference in all calls to
621         extract_range_into_wide_ints.
622         * wide-int-range.cc (wide_int_range_div): New.
623         * wide-int-range.h (wide_int_range_div): New.
624         (wide_int_range_includes_zero_p): New.
625         (wide_int_range_zero_p): New.
627 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
629         * config/aarch64/aarch64.md (arches): New enum.
630         (arch): New enum attr.
631         (arch_enabled): New attr.
632         (enabled): Now uses arch_enabled only.
633         (simd, sve, fp16): Removed attribute.
634         (fp): Attr now defined in terms of 'arch'.
635         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
636         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
637         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
638         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
639         attributes into 'arch'.
640         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
641         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
642         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
643         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
644         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
645         'simd' attribute into 'arch'.
646         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
647         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
648         Convert use of 'fp' attribute to 'arch'.
649         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
650         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
651         into 'arch'.
652         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
653         (different modes) Merge 'fp' and 'simd' into 'arch'.
654         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
655         'simd' into 'arch'.
657 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
659         PR rtl-optimization/87026
660         * expmed.c (canonicalize_comparison): If we can no longer create
661         pseudoregisters, don't.
663 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
665         PR target/86951
666         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
667         prototype.
668         * config/arm/arm.c (speculation_barrier_libfunc): New static
669         variable.
670         (arm_init_libfuncs): Initialize it.
671         (arm_emit_speculation_barrier): New function.
672         * config/arm/arm.md (speculation_barrier): Call
673         arm_emit_speculation_barrier for architectures that do not have
674         DSB or ISB.
675         (speculation_barrier_insn): Only match on Armv7 or later.
677 2018-08-23  Richard Biener  <rguenther@suse.de>
679         PR middle-end/87024
680         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
681         calls.
683 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
685         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
686         of single-vector TBLs.
687         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
688         one input is given.
690 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
692         PR target/85910
693         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
694         aarch64_evpc_tbl guard.
696 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
698         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
699         behaviour.
701 2018-08-22  Martin Sebor  <msebor@redhat.com>
703         PR middle-end/87052
704         * tree-pretty-print.c (pretty_print_string): Add argument.
705         (dump_generic_node): Call to pretty_print_string with string size.
707 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
709         PR rtl-optimization/86771
710         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
711         of two SETs into those two SETs, one to be placed at i2, if that SETs
712         destination is modified between i2 and i3.
714 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
716         PR tree-optimization/86725
717         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
718         function.
719         (vect_analyze_scalar_cycles_1): Check it.
721 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
723         PR tree-optimization/86725
724         * tree-vect-loop.c (vect_is_simple_reduction): When treating
725         an outer loop phi as a double reduction, make sure that the
726         single user of the phi result is an inner loop phi.
728 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
730         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
731         grouped stores with gaps to a strided group.
733 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
735         * tree-vect-stmts.c (get_group_load_store_type)
736         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
737         first statement in a group.
739 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
741         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
742         the sequence used in gcc/gcc.c.
744 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
746         PR other/704
747         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
748         building it.
750 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
752         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
753         Darwin10-specific unwinder-shim.
754         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
755         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
756         New to cater for Darwin10 Rosetta.
758 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
760         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
761         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
763 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
765         PR bootstrap/81033
766         PR target/81733
767         PR target/52795
768         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
769         (dwarf2out_switch_text_section): Generate a local label for the
770         second function sub-section and apply it as the second FDE start
771         label.
772         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
773         second sub-section start.
775 2018-08-22  Richard Biener  <rguenther@suse.de>
777         PR tree-optimization/86988
778         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
780 2018-08-22  Richard Biener  <rguenther@suse.de>
782         PR tree-optimization/86945
783         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
785 2018-08-22  Alexandre Oliva <oliva@adacore.com>
787         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
788         a comment about how uses of r2 for .sdata2 come about.
790 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
792         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
794 2018-08-21  Marek Polacek  <polacek@redhat.com>
796         PR c++/86981, Implement -Wpessimizing-move.
797         * doc/invoke.texi: Document -Wpessimizing-move.
799 2018-08-21  Jan Hubicka  <jh@suse.cz>
801         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
802         * tree.h (is_redundant_typedef): Remove.
803         * dwarf2out.c (is_redundant_typedef): Turn into static function.
805 2018-08-21  Jan Hubicka  <jh@suse.cz>
807         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
808         when possible.
810 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
812         * expmed.c (extract_low_bits): Reject invalid subregs early.
814 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
816         PR middle-end/86121
817         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
818         behaviour.
820 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
822         * config/vxworks.h: Guard vxworks_asm_out_constructor and
823         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
824         * config/vxworks.c: Likewise.
826 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
828         * config/vxworks.c: Set targetm.have_ctors_dtors
829         if HAVE_INITFINI_ARRAY_SUPPORT.
830         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
831         if HAVE_INITFINI_ARRAY_SUPPORT.
833 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
835         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
836         default search path for VxWorks < 7.
838 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
840         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
841         (get_format_string): Refer to c_getstr.
843 2018-08-21  Tom de Vries  <tdevries@suse.de>
845         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
846         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
847         (debuginfo_early_stop): Declare.
848         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
849         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
850         (debuginfo_early_stop): New function.
851         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
852         and debuginfo_early_stop.
853         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
854         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
855         (general_init): Call debuginfo_early_init.
856         (finalize): Call debuginfo_fini.
857         (do_compile): Call debuginfo_init.
858         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
859         -fdump-early-debug.
860         (@item -fdump-debug, @item -fdump-earlydebug): Add.
862 2018-08-21  Tom de Vries  <tdevries@suse.de>
864         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
865         flag_dump_noaddr and flag_dump_unnumbered.
867 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
869         * wide-int-range.cc (wide_int_range_abs): New.
870         (wide_int_range_order_set): Rename from wide_int_range_min_max.
871         * wide-int-range.h (wide_int_range_abs): New.
872         (wide_int_range_min_max): New.
873         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
874         case to call wide_int_range_abs.
875         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
876         (extract_range_from_abs_expr): Delete.
878 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
880         PR target/87033
881         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
882         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
883         for indexed loads.
885 2018-08-20  Nathan Sidwell  <nathan@acm.org>
886             Jeff Law <law@redhat.com>
888         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
889         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
891 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
893         PR other/84889
894         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
895         (decl_attributes): Likewise.
896         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
897         instance.
898         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
899         * diagnostic-core.h (class auto_diagnostic_group): New class.
900         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
901         (diagnostic_report_diagnostic): Handle the first diagnostics within
902         a group.
903         (emit_diagnostic): Add auto_diagnostic_group instance.
904         (inform): Likewise.
905         (inform_n): Likewise.
906         (warning): Likewise.
907         (warning_at): Likewise.
908         (warning_n): Likewise.
909         (pedwarn): Likewise.
910         (permerror): Likewise.
911         (error): Likewise.
912         (error_n): Likewise.
913         (error_at): Likewise.
914         (sorry): Likewise.
915         (fatal_error): Likewise.
916         (internal_error): Likewise.
917         (internal_error_no_backtrace): Likewise.
918         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
919         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
920         * diagnostic.h (struct diagnostic_context): Add fields
921         "diagnostic_group_nesting_depth",
922         "diagnostic_group_emission_count", "begin_group_cb",
923         "end_group_cb".
924         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
925         Add auto_diagnostic_group instance(s).
926         (find_explicit_erroneous_behavior): Likewise.
927         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
928         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
929         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
930         (gimplify_va_arg_expr): Likewise.
931         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
932         (HSA_SORRY_AT): Likewise.
933         * ipa-devirt.c (compare_virtual_tables): Likewise.
934         (warn_odr): Likewise.
935         * multiple_target.c (expand_target_clones): Likewise.
936         * opts-common.c (cmdline_handle_error): Likewise.
937         * reginfo.c (globalize_reg): Likewise.
938         * substring-locations.c (format_warning_n_va): Likewise.
939         * tree-inline.c (expand_call_inline): Likewise.
940         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
941         * tree-ssa-loop-niter.c
942         (do_warn_aggressive_loop_optimizations): Likewise.
943         * tree-ssa-uninit.c (warn_uninit): Likewise.
944         * tree.c (warn_deprecated_use): Likewise.
946 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
948         PR target/87014
949         * config/i386/i386.md (eh_return): Always update EH return
950         address in word_mode.
952 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
954         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
955         TARGET_SPLIT_COMPLEX_ARG is defined.
957 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
959         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
961 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
963         PR target/86984
964         * expr.c (expand_assignment): Assert that bitpos is positive.
965         (store_field): Likewise
966         (expand_expr_real_1): Make sure that bitpos is positive.
967         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
968         integer overflow.
970 2018-08-20  Nathan Sidwell  <nathan@acm.org>
972         * Makefile.in (CPP_ID_DATA_H): Delete.
973         (CPP_INTERNAL_H): Don't add it.
974         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
975         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
977 2018-08-20  Richard Biener  <rguenther@suse.de>
979         PR tree-optimization/78655
980         * tree-vrp.c (extract_range_from_binary_expr_1): Make
981         pointer + offset nonnull if either operand is nonnull work.
983 2018-08-20  Tom de Vries  <tdevries@suse.de>
985         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
986         unless the referenced die describes the added property using
987         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
988         Otherwise, add a DW_AT_location to the referenced die.
990 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
992         PR target/86994
993         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
994         register_operand when calling ix86_set_reg_reg_cost.
995         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
996         Set *total to 0 for operands that satisfy x86_64_immediate_operand
997         predicate and to 1 otherwise.
999 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
1001         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1002         emit a diagnostic that it is not supported and reset the option.
1003         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1004         supported and consume the option.  (ASM_FINAL_SPEC): New.
1006 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1008         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1009         a sentence.
1011 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
1013         C-SKY port: Documentation
1015         * doc/extend.texi (C-SKY Function Attributes): New section.
1016         * doc/invoke.texi (Option Summary): Add C-SKY options.
1017         (C-SKY Options): New section.
1018         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1020 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1021             Huibin Wang  <huibin_wang@c-sky.com>
1022             Sandra Loosemore  <sandra@codesourcery.com>
1023             Chung-Lin Tang  <cltang@codesourcery.com>
1025         C-SKY port: Backend implementation
1027         * config/csky/*: New.
1028         * common/config/csky/*: New.
1030 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1031             Huibin Wang  <huibin_wang@c-sky.com>
1032             Sandra Loosemore  <sandra@codesourcery.com>
1033             Chung-Lin Tang  <cltang@codesourcery.com>
1034             Andrew Jenner  <andrew@codesourcery.com>
1036         C-SKY port: Configury
1038         * config.gcc (csky-*-*): New.
1039         * configure.ac: Add csky to targets for dwarf2 debug_line support.
1040         * configure: Regenerated.
1042 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
1044         * dump-context.h: Include "dumpfile.h".
1045         (dump_context::dump_printf_va): Convert final param from va_list
1046         to va_list *.  Convert from ATTRIBUTE_PRINTF to
1047         ATTRIBUTE_GCC_DUMP_PRINTF.
1048         (dump_context::dump_printf_loc_va): Likewise.
1049         * dumpfile.c: Include "stringpool.h".
1050         (make_item_for_dump_printf_va): Delete.
1051         (make_item_for_dump_printf): Delete.
1052         (class dump_pretty_printer): New class.
1053         (dump_pretty_printer::dump_pretty_printer): New ctor.
1054         (dump_pretty_printer::emit_items): New member function.
1055         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1056         function.
1057         (dump_pretty_printer::emit_item): New member function.
1058         (dump_pretty_printer::stash_item): New member function.
1059         (dump_pretty_printer::format_decoder_cb): New member function.
1060         (dump_pretty_printer::decode_format): New member function.
1061         (dump_context::dump_printf_va): Reimplement in terms of
1062         dump_pretty_printer.
1063         (dump_context::dump_printf_loc_va): Convert final param from va_list
1064         to va_list *.
1065         (dump_context::begin_scope): Reimplement call to
1066         make_item_for_dump_printf.
1067         (dump_printf): Update for change to dump_printf_va.
1068         (dump_printf_loc): Likewise.
1069         (selftest::test_capture_of_dump_calls): Convert "stmt" from
1070         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
1071         with %T, %E, and %G.
1072         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1073         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1074         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1075         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1076         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1077         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1078         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1079         within a dump_printf_loc call to "%wu".
1080         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1081         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
1082         missing space after "=".
1083         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1084         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1085         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1086         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1087         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
1088         duplicate "vectorized" from message.
1090 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1092         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1093         polyNxK_t element's TYPE_STRING_FLAG.
1095 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1097         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1098         (they were unnamed before).  Fix comments.
1100 2018-08-17  Nathan Sidwell  <nathan@acm.org>
1102         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1104 2018-08-17  Richard Biener  <rguenther@suse.de>
1106         PR tree-optimization/86841
1107         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1109 2018-08-17  Martin Liska  <mliska@suse.cz>
1111         * common.opt: Remove Warn, Init and Report for options with
1112         Ignore/Deprecated flag. Warning is done automatically for
1113         Deprecated flags.
1114         * config/i386/i386.opt: Likewise.
1115         * config/ia64/ia64.opt: Likewise.
1116         * config/rs6000/rs6000.opt: Likewise.
1117         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1118         Remove usage of flag_check_pointer_bounds.
1119         * lto-wrapper.c (merge_and_complain): Do not handle
1120         OPT_fcheck_pointer_bounds.
1121         (append_compiler_options): Likewise.
1122         * opt-functions.awk: Do not handle Deprecated.
1123         * optc-gen.awk: Check that Var, Report and Init are not
1124         used for an option with Ignore/Deprecated flag.
1125         * opts-common.c (decode_cmdline_option): Do not report
1126         CL_ERR_DEPRECATED.
1127         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1128         options.
1129         * opts.h (struct cl_option): Remove cl_deprecated flag.
1130         (CL_ERR_DEPRECATED): Remove error enum value.
1132 2018-08-17  Richard Biener  <rguenther@suse.de>
1134         PR middle-end/86505
1135         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1136         across a va-arg-pack using call adjust its return value accordingly.
1138 2018-08-16  Martin Sebor  <msebor@redhat.com>
1140         PR tree-optimization/86853
1141         * gimple-ssa-sprintf.c (struct format_result): Rename member.
1142         (struct fmtresult): Add member and initialize it in ctors.
1143         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
1144         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
1145         (format_directive): Set POSUNDER4K when MAYFAIL is set.
1146         (parse_directive): Handle %C same as %c.
1147         (sprintf_dom_walker::compute_format_length): Adjust.
1148         (is_call_safe): Adjust.
1150 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1152         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
1153         for determining how to count the elements.
1154         * builtins.h (c_strlen): Adjust prototype.
1155         * expr.c (string_constant): Add new parameter mem_size.
1156         Set *mem_size appropriately.
1157         * expr.h (string_constant): Adjust protoype.
1158         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1159         * gimple-fold.h (get_range_strlen): Adjust prototype.
1160         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1161         (format_string): Call get_string_length with eltsize.
1163 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1165         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1166         to emit the span, rather than setting it as the prefix.
1168 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1170         * diagnostic-show-locus.c (layout::start_annotation_line): Add
1171         "margin_char" parameter, defaulting to space.  Use it in place
1172         of pp_space for the initial part of the margin.
1173         (layout::print_leading_fixits): Use '+' when filling the margin
1174         of line-insertion fix-it hints.
1176 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1178         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1179         Delete.
1181 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1183         * config/rs6000/altivec.md: Don't set length attribute to the default
1184         value.
1185         * config/rs6000/darwin.md: Ditto.
1186         * config/rs6000/dfp.md: Ditto.
1187         * config/rs6000/htm.md: Ditto.
1188         * config/rs6000/rs6000.md: Ditto.
1189         * config/rs6000/sync.md: Ditto.
1190         * config/rs6000/vsx.md: Ditto.
1192 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1194         * config/rs6000/altivec.md: Don't set length attribute to the default
1195         value, for branch instructions.
1196         * config/rs6000/darwin.md: Ditto.
1197         * config/rs6000/rs6000.md: Ditto.
1199 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1201         * config/rs6000/rs6000.md (length): Always define as const_int 4.
1202         (unnamed conditional branch define_insn): Set length to 4 or 8
1203         depending on offset.
1204         (<bd>_<mode>): Similar, for alternative 0.
1205         (<bd>tf_<mode>): Ditto.
1207 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1209         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1211 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
1213         * doc/rtl.texi: Replace old RTX class names with new names.
1216 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
1218         * expmed.h (canonicalize_comparison): New declaration.
1219         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1220         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1221         * optabs.c (prepare_cmp_insn): Likewise.
1222         * rtl.h (unsigned_condition_p): New function which checks if a
1223         comparison operator is unsigned.
1225 2018-08-16  Nathan Sidwell  <nathan@acm.org>
1227         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1228         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1230 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1232         PR target/84711
1233         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1234         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1235         (mov<mov>): ..this and enable unconditionally.
1237 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1239         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1241 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
1243         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1244         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1245         "Common" with "Target".
1247 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1249         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1250         * doc/invoke.texi (mmitigate-rop): Remove.
1251         * config/i386/i386.c: Do not include "regrename.h".
1252         (ix86_rop_should_change_byte_p, reg_encoded_number)
1253         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1254         Remove.
1255         (ix86_reorg): Remove call to ix86_mitigate_rop.
1256         * config/i386/i386.md (attr "modrm_class"): Remove.
1257         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1258         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1259         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1261 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
1263         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1264         allow folding of mergeh() and mergel() for the float and double types.
1265         (fold_mergehl_helper): Rework to handle building a permute tree
1266         for float vectors.
1268 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1270         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1271         for TARGET_SSE.
1273 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
1275         * common.opt (fdiagnostics-show-labels): New option.
1276         * diagnostic-show-locus.c (class layout_range): Add field
1277         "m_label".
1278         (class layout): Add field "m_show_labels_p".
1279         (layout_range::layout_range): Add param "label" and use it to
1280         initialize m_label.
1281         (make_range): Pass in NULL for new "label" param of layout_range's
1282         ctor.
1283         (layout::layout): Initialize m_show_labels_p.
1284         (layout::maybe_add_location_range): Pass in loc_range->m_label
1285         when constructing layout_range instances.
1286         (struct line_label): New struct.
1287         (layout::print_any_labels): New member function.
1288         (layout::print_line): Call it if label-printing is enabled.
1289         (selftest::test_one_liner_labels): New test.
1290         (selftest::test_diagnostic_show_locus_one_liner): Call it.
1291         * diagnostic.c (diagnostic_initialize): Initialize
1292         context->show_labels_p.
1293         * diagnostic.h (struct diagnostic_context): Add field
1294         "show_labels_p".
1295         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1296         -fno-diagnostics-show-labels.
1297         * dwarf2out.c (gen_producer_string): Add
1298         OPT_fdiagnostics_show_labels to the ignored options.
1299         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1300         param.
1301         (gcc_rich_location::maybe_add_expr): Likewise.
1302         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1303         label" param, defaulting to NULL.
1304         (gcc_rich_location::add_expr): Add "label" param.
1305         (gcc_rich_location::maybe_add_expr): Likewise.
1306         (class text_range_label): New class.
1307         (class range_label_for_type_mismatch): New class.
1308         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1309         of format_warning_va.
1310         (fmtwarn_n): Likewise for new params of format_warning_n_va.
1311         * lto-wrapper.c (merge_and_complain): Add
1312         OPT_fdiagnostics_show_labels to the "pick one setting" options.
1313         (append_compiler_options): Likewise to the dropped options.
1314         (append_diag_options): Likewise to the passed-on options.
1315         * opts.c (common_handle_option): Handle the new option.
1316         * selftest-diagnostic.c
1317         (test_diagnostic_context::test_diagnostic_context): Enable
1318         show_labels_p.
1319         * substring-locations.c: Include "gcc-rich-location.h".
1320         (format_warning_n_va): Add "fmt_label" and "param_label" params
1321         and use them as appropriate.
1322         (format_warning_va): Add "fmt_label" and "param_label" params,
1323         passing them on to format_warning_n_va.
1324         (format_warning_at_substring): Likewise.
1325         (format_warning_at_substring_n): Likewise.
1326         * substring-locations.h (format_warning_va): Add "fmt_label" and
1327         "param_label" params.
1328         (format_warning_n_va): Likewise.
1329         (format_warning_at_substring): Likewise.
1330         (format_warning_at_substring_n): Likewise.
1331         * toplev.c (general_init): Initialize global_dc->show_labels_p.
1333 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
1335         PR testsuite/86519
1336         * builtins.c (expand_builtin_memcmp): Do not expand the call
1337         when overflow is detected.
1339 2018-08-15  Martin Sebor  <msebor@redhat.com>
1341         PR tree-optimization/71625
1342         * config/aarch64/aarch64-builtins.c
1343         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1345 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
1347         * config/s390/s390.c (s390_reorg): Remove loop.
1349 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1351         * config/darwin.c
1352          (darwin_function_switched_text_sections): Delete.
1353         * gcc/config/darwin.h
1354          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1356 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1358         PR target/81685
1359         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1360         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
1361         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1363 2018-08-15  Martin Liska  <mliska@suse.cz>
1365         PR tree-optimization/86925
1366         * predict.c (expr_expected_value_1): When taking
1367         later predictor, assign also probability.
1368         Use fold_build2_initializer_loc in order to fold
1369         the expression in -frounding-math.
1371 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
1373         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1374         patterns.
1375         (expand_vec_perm_1): Try the new method.
1377 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1379         PR target/86547
1380         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1381         Check whether lra_live_max_point is 0 before dividing.
1383 2018-08-14  Martin Sebor  <msebor@redhat.com>
1385         PR tree-optimization/86650
1386         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1387         (vrp_prop::check_mem_ref): Same.
1389 2018-08-13  Liu Hao <lh_mouse@126.com>
1391         * pretty-print.c (eat_esc_sequence): Swap the foreground and
1392         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1393         and clear it thereafter, as it only works for DBCS.
1395 2018-08-13  Liu Hao <lh_mouse@126.com>
1397         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1398         handle returned by _get_osf_handle().
1400 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1402         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1403         for folding vec_perm.
1405 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1407         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1408         Add support for gimple-folding of vec_pack() and vec_unpack()
1409         intrinsics.
1411 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
1413         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1414         vec_xst variants to the list.
1415         (rs6000_gimple_fold_builtin): Add support for folding unaligned
1416         vector loads and stores.
1418 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
1420         * config.gcc (rs6000-ibm-aix4.x): Delete.
1421         (rs6000-ibm-aix5.1): Delete.
1422         (rs6000-ibm-aix5.2): Delete.
1423         (rs6000-ibm-aix5.3): Delete.
1424         * config/rs6000/aix43.h: Delete.
1425         * config/rs6000/aix51.h: Delete.
1426         * config/rs6000/aix52.h: Delete.
1427         * config/rs6000/t-aix43: Delete.
1429 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
1431         * config/s390/s390.c (s390_decompose_constant_pool_ref):
1432         New function.
1433         (s390_decompose_address): Factor out constant pool ref
1434         decomposition.
1436 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1438         * config/nds32/nds32-predicates.c
1439         (nds32_can_use_bclr_p): Change return type as bool.
1440         (nds32_can_use_bset_p): Ditto.
1441         (nds32_can_use_btgl_p): Ditto.
1442         (nds32_can_use_bitci_p): Ditto.
1443         * config/nds32/nds32-protos.h
1444         (nds32_can_use_bclr_p): Change declaration.
1445         (nds32_can_use_bset_p): Ditto.
1446         (nds32_can_use_btgl_p): Ditto.
1447         (nds32_can_use_bitci_p): Ditto.
1449 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1451         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1452         Support -msched-prolog-epilog option.
1453         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1455 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1457         * common/config/nds32/nds32-common.c
1458         (nds32_option_optimization_table): Enalbe -malways-align.
1460 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1462         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1463         extra_headers.
1464         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1465         OPT_misr_secure_ case.
1466         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1467         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1468         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1469         secure attribute.
1470         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1471         (nds32_isr_info): New field security_level.
1472         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1473         * config/nds32/nds32.md (return_internal): Consider critical attribute.
1474         * config/nds32/nds32.opt (misr-secure): New option.
1475         * config/nds32/nds32_init.inc: New file.
1476         * config/nds32/nds32_isr.h: New file.
1478 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
1480         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1481         Update comment for atomic instructions.
1482         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1483         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1484         Remove.
1485         (atomic_loaddi): Revise fence expansion to only emit fence prior to
1486         load for __ATOMIC_SEQ_CST model.
1487         (atomic_loaddi_1): Remove float register target.
1488         (atomic_storedi): Handle CONST_INT values.
1489         (atomic_storedi_1): Remove float register source.  Add special case
1490         for zero value.
1491         (memory_barrier): New expander and insn.
1493 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
1495         PR tree-optimization/86835
1496         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1497         new_stmt after def_gsi, make sure to insert new_square_stmt after
1498         that stmt, not 2 stmts before it.
1500 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
1502         PR target/82418
1503         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1504         instead of SWI48.
1506 2018-08-10  Martin Liska  <mliska@suse.cz>
1508         PR target/83610
1509         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1510         function type.
1511         * builtins.c (expand_builtin_expect_with_probability):
1512         New function.
1513         (expand_builtin_expect_with_probability): New function.
1514         (build_builtin_expect_predicate): Add new argumnet probability
1515         for BUILT_IN_EXPECT_WITH_PROBABILITY.
1516         (fold_builtin_expect):
1517         (fold_builtin_2):
1518         (fold_builtin_3):
1519         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1520         * builtins.h (fold_builtin_expect): Set new argument.
1521         * doc/extend.texi: Document __builtin_expect_with_probability.
1522         * doc/invoke.texi: Likewise.
1523         * gimple-fold.c (gimple_fold_call): Pass new argument.
1524         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1525         also BUILT_IN_EXPECT_WITH_PROBABILITY.
1526         * predict.c (get_predictor_value): New function.
1527         (expr_expected_value): Add new argument probability. Assume
1528         that predictor and probability are always non-null.
1529         (expr_expected_value_1): Likewise.  For __builtin_expect and
1530         __builtin_expect_with_probability set probability.  Handle
1531         combination in binary expressions.
1532         (tree_predict_by_opcode): Simplify code by simply calling
1533         get_predictor_value.
1534         (pass_strip_predict_hints::execute): Add handling of
1535         BUILT_IN_EXPECT_WITH_PROBABILITY.
1536         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1537         new predictor.
1538         * tree.h (DECL_BUILT_IN_P): New function.
1540 2018-08-10  Martin Liska  <mliska@suse.cz>
1542         PR tree-optimization/85799
1543         * passes.def: Add argument for pass_strip_predict_hints.
1544         * predict.c (class pass_strip_predict_hints): Add new argument
1545         early_p.
1546         (strip_predictor_early): New function.
1547         (pass_strip_predict_hints::execute): Call the function to
1548         strip predictors.
1549         (strip_predict_hints): New function.
1550         * predict.def: Fix comment.
1552 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1554         * Makefile.in: Clarify which tm.texi to copy over to assert the
1555         right to grant a GFDL license for all.
1557 2018-08-09  Jeff Law  <law@redhat.com>
1559         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1560         unused variable.
1562 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
1564         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1565         prototype.
1567 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1569         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1570         reductions for variable-length vectors.
1572 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
1574         PR other/84889
1575         * common.opt (fdiagnostics-show-line-numbers): New option.
1576         * diagnostic-show-locus.c (class layout): Add fields
1577         "m_show_line_numbers_p" and "m_linenum_width";
1578         (num_digits): New function.
1579         (test_num_digits): New function.
1580         (layout::layout): Initialize new fields.  Update m_x_offset
1581         logic to handle any left margin.
1582         (layout::print_source_line): Print line number when requested.
1583         (layout::start_annotation_line): New member function.
1584         (layout::print_annotation_line): Call it.
1585         (layout::print_leading_fixits): Likewise.
1586         (layout::print_trailing_fixits): Likewise.  Update calls to
1587         move_to_column for new parameter.
1588         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1589         it to potentially call start_annotation_line.
1590         (layout::show_ruler): Call start_annotation_line.
1591         (selftest::test_line_numbers_multiline_range): New selftest.
1592         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1593         and selftest::test_line_numbers_multiline_range.
1594         * diagnostic.c (diagnostic_initialize): Initialize
1595         show_line_numbers_p.
1596         * diagnostic.h (struct diagnostic_context): Add field
1597         "show_line_numbers_p".
1598         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1599         -fno-diagnostics-show-line-numbers.
1600         * dwarf2out.c (gen_producer_string): Add
1601         OPT_fdiagnostics_show_line_numbers to the ignored options.
1602         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1603         one setting" options.
1604         (append_compiler_options): Likewise to the dropped options.
1605         (append_diag_options): Likewise to the passed-on options.
1606         * opts.c (common_handle_option): Handle the new option.
1607         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1609 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1611         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1612         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
1613         third argument of type "const signed char" to descriptions of
1614         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1615         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1616         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1617         __builtin_bcdsub_ov functions.
1619 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1621         PR tree-optimization/86858
1622         * tree-vect-loop.c (vect_is_simple_reduction): Restore
1623         flow_bb_inside_loop_p calls.
1625 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
1627         PR tree-optimization/86871
1628         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1629         instead of gimple_assign_lhs.
1631 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
1633         PR target/86887
1634         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1635         register constraint to operand 0.
1636         (add<mode>3_carryinC): Likewise.
1637         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1639 2018-08-09  Martin Liska  <mliska@suse.cz>
1641         PR c/86895
1642         * common.opt: Remove extra line.
1644 2018-08-09  Martin Liska  <mliska@suse.cz>
1646         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1647         at the end of a line, make first letter capital and end up
1648         a sentence with a dot.
1649         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1650         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1651         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1652         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1653         (PARAM_MAX_ISL_OPERATIONS): Likewise.
1654         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1655         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1656         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1657         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1658         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1659         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1660         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1661         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1662         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1663         (PARAM_TREE_REASSOC_WIDTH): Likewise.
1664         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1665         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1666         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1668 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
1670         PR target/84332
1671         * config/s390/s390.c (s390_option_override_internal): Reduce the
1672         stack-clash-protection-probe-interval param if it would be too big
1673         for z900.
1675 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
1677         PR target/46179
1678         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1679         * config/m68k/m68k.c (handle_move_double): Don't call
1680         m68k_final_prescan_insn.
1681         (m68k_adjust_decorated_operand): Renamed from
1682         m68k_final_prescan_insn, remove first and third operand and
1683         simplify.
1684         (print_operand): Call it.
1685         (print_operand_address): Call it.
1687 2018-08-08  Nathan Sidwell  <nathan@acm.org>
1689         * diagnostic.c (diagnostic_report_current_module): Use
1690         linemap_included_from & linemap_included_from_linemap.
1692 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
1694         * config/aarch64/aarch64-cores.def: Add phecda core.
1695         * config/aarch64/aarch64-tune.md: Regenerate.
1696         * doc/invoke.texi: Add phecda core.
1698 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1700         PR target/85295
1701         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1702         definitions.
1703         * config/s390/s390.md ("movti"): Add more alternatives for
1704         constant to GPR copies.
1706 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1708         * config/s390/s390.c: Fix whitespace damage throughout the file.
1709         * config/s390/s390.h: Likewise.
1710         * config/s390/tpf.h: Likewise.
1712 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1714         * config/s390/s390.c (s390_loadrelative_operand_p):
1715         Remove TARGET_CPU_ZARCH usages.
1716         (s390_rtx_costs): Likewise.
1717         (s390_legitimate_constant_p): Likewise.
1718         (s390_cannot_force_const_mem): Likewise.
1719         (legitimate_reload_constant_p): Likewise.
1720         (s390_preferred_reload_class): Likewise.
1721         (legitimize_pic_address): Likewise.
1722         (legitimize_tls_address): Likewise.
1723         (s390_split_branches): Removed.
1724         (s390_add_execute): Removed.
1725         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1726         (s390_mainpool_start): Likewise.
1727         (s390_mainpool_finish): Likewise.
1728         (s390_mainpool_cancel): Removed.
1729         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1730         (s390_chunkify_cancel): Likewise.
1731         (s390_return_addr_rtx): Likewise.
1732         (s390_register_info): Remove split_branches_pending_p uages.
1733         (s390_optimize_register_info): Likewise.
1734         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1735         split_branches_pending_p usages.
1736         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1737         (s390_load_got): Likewise.
1738         (s390_expand_split_stack_prologue): Likewise.
1739         (output_asm_nops): Likewise.
1740         (s390_function_profiler): Likewise.
1741         (s390_emit_call): Likewise.
1742         (s390_conditional_register_usage): Likewise.
1743         (s390_optimize_prologue): Likewise.
1744         (s390_reorg): Remove TARGET_CPU_ZARCH and
1745         split_branches_pending_p usages.
1746         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1747         usages.
1748         (s390_output_indirect_thunk_function): Likewise.
1749         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1750         (TARGET_CPU_ZARCH_P): Removed.
1751         (struct machine_function): Remove split_branches_pending_p.
1752         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1754 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1756         * common/config/s390/s390-common.c (processor_flags_table):
1757         Remove flags.
1758         * config.gcc: Remove with_arch/with_tune support.
1759         * config/s390/2064.md: Remove cpu attribute comparisons.
1760         * config/s390/driver-native.c (s390_host_detect_local_cpu):
1761         Remove MTN.
1762         * config/s390/linux.h (ASM_SPEC):
1763         Remove -march support.
1764         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1765         Use a table to get an arch level.
1766         * config/s390/s390-opts.h (enum processor_type):
1767         Remove enum values.
1768         * config/s390/s390.c
1769         (processor_table): Remove entries, add arch_level values.
1770         (s390_issue_rate): Remove cases.
1771         (s390_option_override): Adjust
1772         s390_option_override_internal() call.
1773         (s390_option_override_internal): Remove deprecation warning.
1774         (s390_valid_target_attribute_tree): Adjust
1775         s390_option_override_internal() call.
1776         * config/s390/s390.h (struct s390_processor):
1777         Share with s390-c.c, add arch_level field.
1778         * config/s390/s390.md:
1779         Remove occurrences in cpu attribute.
1780         * config/s390/s390.opt: Remove -march/-mtune support.
1781         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1782         * doc/invoke.texi: Remove deprecation warning.
1784 2018-08-08  Luis Machado  <luis.machado@linaro.org>
1786         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1787         global.
1788         (qdf24xx_tunings): Set vector cost structure to
1789         qdf24xx_vector_cost.
1791         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1792         <register_sextend>: Set to 3.
1794 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
1796         PR target/86838
1797         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1798         * config/aarch64/aarch64-simd.md
1799         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1800         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1801         (aarch64_frecpx<mode>): ...this new pattern.
1802         * config/aarch64/aarch64-simd-builtins.def: Remove comment
1803         about aarch64_frecp<FRECP:frecp_suffix><mode>.
1805 2018-08-07  Martin Liska  <mliska@suse.cz>
1807         PR middle-end/83023
1808         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1809         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1810         * predict.def (PRED_MALLOC_NONNULL): New predictor.
1811         * doc/extend.texi: Document that malloc attribute adds
1812         hit to compiler.
1814 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
1816         PR target/86785
1817         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1818         Define to speculation_safe_value_not_needed.
1820 2018-08-06  Jeff Law  <law@redhat.com>
1822         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1823         the vr_values instance to cprop_into_stmt.
1824         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1825         (cprop_operand): Also query EVRP to determine if OP is a constant.
1827 2018-08-06  Nathan Sidwell  <nathan@acm.org>
1829         * diagnostic.c (diagnostic_report_current_module): Reroll
1830         included-at loop.  Translate text.
1832 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
1834         * function-tests.c (selftest::test_expansion_to_rtl): Call
1835         free_after_compilation.
1837 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1839         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1841 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1843         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1844         loops with memory block operations from getting unrolled.
1846 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1848         PR target/86807
1849         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1850         Define to speculation_safe_value_not_needed.
1852 2018-08-06  Jeff Law  <law@redhat.com>
1854         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1855         assert.
1857 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1859         PR target/86662
1860         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1861         with all enabled __intN types.
1863         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1865 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1867         * alias.c (record_set): Check for clobber high.
1868         * cfgexpand.c (expand_gimple_stmt): Likewise.
1869         * combine-stack-adj.c (single_set_for_csa): Likewise.
1870         * combine.c (find_single_use_1): Likewise.
1871         (set_nonzero_bits_and_sign_copies): Likewise.
1872         (get_combine_src_dest): Likewise.
1873         (is_parallel_of_n_reg_sets): Likewise.
1874         (try_combine): Likewise.
1875         (record_dead_and_set_regs_1): Likewise.
1876         (reg_dead_at_p_1): Likewise.
1877         (reg_dead_at_p): Likewise.
1878         * dce.c (deletable_insn_p): Likewise.
1879         (mark_nonreg_stores_1): Likewise.
1880         (mark_nonreg_stores_2): Likewise.
1881         * df-scan.c (df_find_hard_reg_defs): Likewise.
1882         (df_uses_record): Likewise.
1883         (df_get_call_refs): Likewise.
1884         * dwarf2out.c (mem_loc_descriptor): Likewise.
1885         * haifa-sched.c (haifa_classify_rtx): Likewise.
1886         * ira-build.c (create_insn_allocnos): Likewise.
1887         * ira-costs.c (scan_one_insn): Likewise.
1888         * ira.c (equiv_init_movable_p): Likewise.
1889         (rtx_moveable_p): Likewise.
1890         (interesting_dest_for_shprep): Likewise.
1891         * jump.c (mark_jump_label_1): Likewise.
1892         * postreload-gcse.c (record_opr_changes): Likewise.
1893         * postreload.c (reload_cse_simplify): Likewise.
1894         (struct reg_use): Add source expr.
1895         (reload_combine): Check for clobber high.
1896         (reload_combine_note_use): Likewise.
1897         (reload_cse_move2add): Likewise.
1898         (move2add_note_store): Likewise.
1899         * print-rtl.c (print_pattern): Likewise.
1900         * recog.c (decode_asm_operands): Likewise.
1901         (store_data_bypass_p): Likewise.
1902         (if_test_bypass_p): Likewise.
1903         * regcprop.c (kill_clobbered_value): Likewise.
1904         (kill_set_value): Likewise.
1905         * reginfo.c (reg_scan_mark_refs): Likewise.
1906         * reload1.c (maybe_fix_stack_asms): Likewise.
1907         (eliminate_regs_1): Likewise.
1908         (elimination_effects): Likewise.
1909         (mark_not_eliminable): Likewise.
1910         (scan_paradoxical_subregs): Likewise.
1911         (forget_old_reloads_1): Likewise.
1912         * reorg.c (find_end_label): Likewise.
1913         (try_merge_delay_insns): Likewise.
1914         (redundant_insn): Likewise.
1915         (own_thread_p): Likewise.
1916         (fill_simple_delay_slots): Likewise.
1917         (fill_slots_from_thread): Likewise.
1918         (dbr_schedule): Likewise.
1919         * resource.c (update_live_status): Likewise.
1920         (mark_referenced_resources): Likewise.
1921         (mark_set_resources): Likewise.
1922         * rtl.c (copy_rtx): Likewise.
1923         * rtlanal.c (reg_referenced_p): Likewise.
1924         (single_set_2): Likewise.
1925         (noop_move_p): Likewise.
1926         (note_stores): Likewise.
1927         * sched-deps.c (sched_analyze_reg): Likewise.
1928         (sched_analyze_insn): Likewise.
1930 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1932         * cse.c (invalidate_reg): New function extracted from...
1933         (invalidate): ...here.
1934         (canonicalize_insn): Check for clobber high.
1935         (invalidate_from_clobbers): invalidate clobber highs.
1936         (invalidate_from_sets_and_clobbers): Likewise.
1937         (count_reg_usage): Check for clobber high.
1938         (insn_live_p): Likewise.
1939         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1940         (cselib_invalidate_regno): Check for clobber in setter.
1941         (cselib_invalidate_rtx): Pass through setter.
1942         (cselib_invalidate_rtx_note_stores):
1943         (cselib_process_insn): Check for clobber high.
1944         * cselib.h (cselib_invalidate_rtx): Add operand.
1946 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1948         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1949         (mark_not_eliminable): Likewise.
1950         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1951         * lra-lives.c (process_bb_lives): Check for clobber high.
1952         * lra.c (new_insn_reg): Remember clobber highs.
1953         (collect_non_operand_hard_regs): Check for clobber high.
1954         (lra_set_insn_recog_data): Likewise.
1955         (add_regs_to_insn_regno_info): Likewise.
1956         (lra_update_insn_regno_info): Likewise.
1958 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1960         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1961         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1963 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1965         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1966         (copy_insn_1): Likewise.
1967         (gen_hard_reg_clobber_high): New gen function.
1968         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1969         * genemit.c (gen_exp): Likewise.
1970         (gen_emit_seq): Pass through info.
1971         (gen_insn): Check for CLOBBER_HIGH.
1972         (gen_expand): Pass through info.
1973         (gen_split): Likewise.
1974         (output_add_clobbers): Likewise.
1975         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1976         (remove_clobbers): Likewise.
1977         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1979 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1981         * doc/rtl.texi (clobber_high): Add.
1982         (parallel): Add in clobber high
1983         * rtl.c (rtl_check_failed_code3): Add function.
1984         * rtl.def (CLOBBER_HIGH): Add expression.
1985         * rtl.h (RTL_CHECKC3): Add macro.
1986         (rtl_check_failed_code3): Add declaration.
1987         (XC3EXP): Add macro.
1989 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1991         PR target/86386
1992         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1993         cfun->machine->max_used_stack_alignment if needed.
1995 2018-08-04  Martin Sebor  <msebor@redhat.com>
1997         PR tree-optimization/86571
1998         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1999         NaN output to 4.
2001 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2003         PR target/86799
2004         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2005         Define.
2007 2018-08-03  Jeff Law  <law@redhat.com>
2009         PR target/86795
2010         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2011         Define to speculation_safe_value_not_needed.
2013 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
2015         * doc/gcov.texi (-x): Remove duplicate "to".
2016         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2017         (-Wif-not-aligned): Remove duplicate "is".
2018         (-flto): Remove duplicate "the".
2019         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2020         duplicate "v5.00.b".
2021         (MSP430 Options): Remove duplicate "and" from the description
2022         of "-mgprel-sec=regexp".
2023         (x86 Options): Remove duplicate copies of "vmldLog102" and
2024         vmlsLog104 from description of "-mveclibabi=type".
2026 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
2028         * internal-fn.h (first_commutative_argument): Declare.
2029         * internal-fn.c (first_commutative_argument): New function.
2030         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2031         restrictions for pattern statements.  Use first_commutative_argument
2032         to look for commutative operands in calls to internal functions.
2034 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
2036         * Makefile.in (wide-int-range.o): New.
2037         * tree-vrp.c: Move all the wide_int_* functions to...
2038         * wide-int-range.cc: ...here.
2039         * tree-vrp.h: Move all the wide_int_* prototypes to...
2040         * wide-int-range.h: ...here.
2042 2018-08-03  Tom de Vries  <tdevries@suse.de>
2044         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2045         UI_NONE.
2046         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2047         * except.c (output_function_exception_table): Do early exit if
2048         targetm_common.except_unwind_info (&global_options) == UI_NONE.
2050 2018-08-03  Martin Liska  <mliska@suse.cz>
2052         * predict.c (dump_prediction): Change to 2 digits
2053         in fraction part.
2055 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2057         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2058         neon_dup_q to...
2059         (falkor_am_1_gtov_gtov): ... a new insn reservation.
2061 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
2063         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2064         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2065         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2066         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2067         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2069 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2071         * diagnostic-show-locus.c (diagnostic_show_locus): Use
2072         pp_take_prefix when saving the existing prefix.
2073         * diagnostic.c (diagnostic_append_note): Likewise.
2074         * langhooks.c (lhd_print_error_function): Likewise.
2075         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2076         param's type.  Free the existing prefix.
2077         (pp_take_prefix): New function.
2078         (pretty_printer::pretty_printer): Drop the prefix parameter.
2079         Rename the length parameter to match the comment.
2080         (pretty_printer::~pretty_printer): Free the prefix.
2081         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2082         parameter.
2083         (struct pretty_printer): Drop the "const" from "prefix" field's
2084         type and clarify memory management.
2085         (pp_set_prefix): Drop the "const" from the 2nd param.
2086         (pp_take_prefix): New decl.
2088 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2090         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2091         for word_mode_ok here instead of passing as argument.
2092         (expand_block_compare): Change select_block_compare_mode() call.
2093         (expand_strncmp_gpr_sequence): New function.
2094         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2096 2018-08-02  Jeff Law  <law@redhat.com>
2098         PR target/86790
2099         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2100         Define to speculation_safe_value_not_needed.
2102         PR target/86784
2103         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2104         Define to speculation_safe_value_not_needed.
2106 2018-08-02  Tom de Vries  <tdevries@suse.de>
2108         PR target/86660
2109         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2110         function.  Return UI_TARGET unconditionally.
2111         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2112         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2114 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2116         * genemit.c (print_overload_test): Fix typo.
2118 2018-08-02  Richard Biener  <rguenther@suse.de>
2120         PR tree-optimization/86816
2121         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2122         which checks for value availability before querying it.
2123         (gvn_uses_equal): Use it.
2124         (same_succ_hash): Likewise.
2125         (gimple_equal_p): Likewise.
2127 2018-08-02  Nick Clifton  <nickc@redhat.com>
2129         PR target/86813
2130         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2131         Define to speculation_safe_value_not_needed.
2133         PR target/86810
2134         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2135         Define to speculation_safe_value_not_needed.
2137         PR target/86810
2138         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2139         Define to speculation_safe_value_not_needed.
2141         PR target/86803
2142         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2143         Define to speculation_safe_value_not_needed.
2145         PR target/86797
2146         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2147         Define to speculation_safe_value_not_needed.
2149         PR target/86791
2150         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2151         Define to speculation_safe_value_not_needed.
2153         PR target/86789
2154         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2155         Define to speculation_safe_value_not_needed.
2157         PR target/86787
2158         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2159         Define to speculation_safe_value_not_needed.
2161         PR target/86782
2162         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2163         speculation_safe_value_not_needed.
2165         PR target/86781
2166         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2167         to speculation_safe_value_not_needed.
2169 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2171         * doc/md.texi: Expand the documentation of instruction names
2172         to mention port-local uses.  Document '@' in pattern names.
2173         * read-md.h (overloaded_instance, overloaded_name): New structs.
2174         (mapping): Declare.
2175         (md_reader::handle_overloaded_name): New member function.
2176         (md_reader::get_overloads): Likewise.
2177         (md_reader::m_first_overload): New member variable.
2178         (md_reader::m_next_overload_ptr): Likewise.
2179         (md_reader::m_overloads_htab): Likewise.
2180         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2181         m_next_overload_ptr and m_overloads_htab.
2182         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2183         (get_mode_token, get_code_token, get_int_token): New functions.
2184         (map_attr_string): Add an optional argument that passes back
2185         the associated iterator.
2186         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2187         (md_reader::handle_overloaded_name, add_overload_instance): New
2188         functions.
2189         (apply_iterators): Handle '@' names.  Report an error if '@'
2190         is used without iterators.
2191         (initialize_iterators): Initialize the new iterator_group fields.
2192         * genopinit.c (handle_overloaded_code_for)
2193         (handle_overloaded_gen): New functions.
2194         (main): Use them to print declarations of maybe_code_for_* and
2195         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2196         * genemit.c (print_overload_arguments, print_overload_test)
2197         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2198         (main): Use it to print definitions of maybe_code_for_* and
2199         maybe_gen_* functions.
2200         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2201         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2202         instead of explicit mode checks.
2203         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2204         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2205         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2206         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2207         (aarch64_expand_compare_and_swap): Likewise
2208         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2209         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2210         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2211         (aarch64_constant_pool_reload_icode): Delete.
2212         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2213         instead of aarch64_constant_pool_reload_icode.  Use
2214         code_for_aarch64_reload_mov instead of explicit mode checks.
2215         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2216         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2217         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2218         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2219         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2220         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2221         (aarch64_atomic_load_op_code): Delete.
2222         (aarch64_emit_atomic_load_op): Likewise.
2223         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2224         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
2225         instead of aarch64_emit_atomic_load_op.
2226         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2227         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2228         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2229         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2230         character before the pattern name.
2231         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2232         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2233         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2234         (aarch64_frecps<mode>): Likewise.
2235         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2236         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2237         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2238         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2239         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2241 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2243         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2244         Allow HFmode constants if TARGET_FP_F16INST.
2246 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
2248         PR target/86014
2249         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2250         No longer check last store for clobber of address register.
2252 2018-08-02  Martin Liska  <mliska@suse.cz>
2254         PR gcov-profile/86817
2255         * gcov.c (process_all_functions): New function.
2256         (main): Call it.
2257         (process_file): Move functions processing to
2258         process_all_functions.
2260 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2262         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2263         "const" to the "gimple *" and "rtx_insn *" parameters.
2264         * dumpfile.h (dump_user_location_t::dump_user_location_t):
2265         Likewise.
2266         (dump_location_t::dump_location_t): Likewise.
2268 2018-08-01  Martin Sebor  <msebor@redhat.com>
2270         PR tree-optimization/86650
2271         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2272         rather than a "gcall *".  Directly pass the data of interest
2273         to percent_K_format, rather than building a temporary CALL_EXPR
2274         to hold it.
2275         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2276         (gimple_fold_builtin_strncat): Adjust.
2277         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2278         gcall* argument with gimple*.
2279         * gimple-ssa-warn-restrict.c (check_call): Same.
2280         (wrestrict_dom_walker::before_dom_children): Same.
2281         (builtin_access::builtin_access): Same.
2282         (check_bounds_or_overlap): Same
2283         (maybe_diag_overlap): Same.
2284         (maybe_diag_offset_bounds): Same.
2285         * tree-diagnostic.c (default_tree_printer): Move usage of
2286         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2287         to this callsite.
2288         * tree-pretty-print.c (percent_K_format): Add argument.
2289         * tree-pretty-print.h: Add argument.
2290         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2291         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2292         (maybe_diag_stxncpy_trunc): Same.
2293         (handle_builtin_stxncpy): Same.
2294         (handle_builtin_strcat): Same.
2296 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2298         * match.pd: Optimise pointer range checks.
2300 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2302         PR tree-optimization/86758
2303         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2304         to remove pattern statements.
2306 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2308         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2309         result of dfs_enumerate_from when constructing stmt_vec_infos,
2310         instead of additionally calling get_loop_body.
2312 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2314         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2315         parameter.
2316         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2317         When creating an iv, assert that the step is not known to be zero.
2318         (vect_setup_realignment): Update call accordingly.
2319         * tree-vect-stmts.c (vectorizable_store): Likewise.
2320         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
2322 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2324         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2325         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2326         (vectorizable_reduction): Likewise.
2327         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2328         (vect_detect_hybrid_slp_stmts): Likewise.
2329         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2331 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
2333         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2334         (wide_int_set_zero_nonzero_bits): ...this.
2335         (zero_nonzero_bits_from_vr): Rename to...
2336         (vrp_set_zero_nonzero_bits): ...this.
2337         (extract_range_from_multiplicative_op_1): Abstract wide int
2338         code...
2339         (wide_int_range_multiplicative_op): ...here.
2340         (extract_range_from_binary_expr_1): Extract wide int binary
2341         operations into their own functions.
2342         (wide_int_range_lshift): New.
2343         (wide_int_range_can_optimize_bit_op): New.
2344         (wide_int_range_shift_undefined_p): New.
2345         (wide_int_range_bit_xor): New.
2346         (wide_int_range_bit_ior): New.
2347         (wide_int_range_bit_and): New.
2348         (wide_int_range_trunc_mod): New.
2349         (extract_range_into_wide_ints): New.
2350         (vrp_shift_undefined_p): New.
2351         (extract_range_from_multiplicative_op): New.
2352         (vrp_can_optimize_bit_op): New.
2353         * tree-vrp.h (value_range::dump): New.
2354         (wide_int_range_multiplicative_op): New.
2355         (wide_int_range_lshift):New.
2356         (wide_int_range_shift_undefined_p): New.
2357         (wide_int_range_bit_xor): New.
2358         (wide_int_range_bit_ior): New.
2359         (wide_int_range_bit_and): New.
2360         (wide_int_range_trunc_mod): New.
2361         (zero_nonzero_bits_from_bounds): Rename to...
2362         (wide_int_set_zero_nonzero_bits): ...this.
2363         (zero_nonzero_bits_from_vr): Rename to...
2364         (vrp_set_zero_nonzero_bits): ...this.
2365         (range_easy_mask_min_max): Rename to...
2366         (wide_int_range_can_optimize_bit_op): this.
2367         * vr-values.c (simplify_bit_ops_using_ranges): Rename
2368         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2370 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2372         * tree-vectorizer.h (vect_orig_stmt): New function.
2373         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2374         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2375         (vect_create_epilog_for_reduction): Likewise.
2376         (vectorizable_live_operation): Likewise.
2377         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2378         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2379         * tree-vect-stmts.c (vectorizable_call): Likewise.
2380         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2382 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2384         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2385         argument.
2386         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2387         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2388         (vect_transform_loop): Likewise.
2389         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2391 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2393         * tree-vectorizer.h (vect_schedule_slp): Return void.
2394         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2395         (vect_schedule_slp): Likewise.
2397 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2399         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2400         argument.
2401         (vect_transform_loop): Update calls accordingly.  Schedule SLP
2402         instances before the main loop, if any exist.
2404 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2406         PR tree-optimization/86749
2407         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2408         If the lhs is used in a COND_EXPR, check that it is being used
2409         as the "then" or "else" value.
2411 2018-08-01  Tom de Vries  <tdevries@suse.de>
2413         PR target/86800
2414         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2415         speculation_safe_value_not_needed.
2417 2018-08-01  Richard Biener  <rguenther@suse.de>
2419         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2420         as base and offset.
2422 2018-08-01  Martin Liska  <mliska@suse.cz>
2424         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2425         format how successful transformation is dumped.
2426         (gimple_mod_pow2_value_transform): Likewise.
2427         (gimple_mod_subtract_transform): Likewise.
2428         (gimple_stringops_transform): Likewise.
2430 2018-08-01  Martin Liska  <mliska@suse.cz>
2432         PR value-prof/35543
2433         * value-prof.c (interesting_stringop_to_profile_p):
2434         Simplify the code and add BUILT_IN_MEMMOVE.
2435         (gimple_stringops_transform): Likewise.
2437 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
2439         * config/aarch64/aarch64-simd.md
2440         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2441         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2442         use GPI iterator instead of SI mode.
2444 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2446         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2447         rs6000_speculation_barrier.
2448         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2449         new barrier pattern name.
2451 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2453         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2454         (speculation_barrier): New insn.
2456 2018-08-01  Richard Biener  <rguenther@suse.de>
2458         PR bootstrap/86724
2459         * graphite.h: Include isl/id.h and isl/space.h to allow build
2460         with ISL 0.20.
2462 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
2464         PR target/86651
2465         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2466         mode for COFF targets.
2467         * defaults.h (TARGET_COFF): Define.
2468         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2469         TARGET_COFF): Define.
2470         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2471         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2472         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2474 2018-07-31  Alexandre Oliva <oliva@adacore.com>
2476         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2477         * gimple-streamer-out.c (output_bb): Save it.
2478         * lto-streamer-in.c (input_struct_function_base): Restore
2479         instance discriminator if available.  Create map on demand.
2480         * lto-streamer-out.c (output_struct_function_base): Save it if
2481         available.
2482         * final.c (decl_to_instance_map): Document LTO strategy.
2484 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
2485             Olivier Hainque  <hainque@adacore.com>
2487         * debug.h (decl_to_instance_map_t): New type.
2488         (decl_to_instance_map): Declare.
2489         (maybe_create_decl_to_instance_map): New inline function.
2490         * final.c (bb_discriminator, last_bb_discriminator): New statics,
2491         to track basic block discriminators.
2492         (final_start_function_1): Initialize them.
2493         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2494         bb_discriminator.
2495         (decl_to_instance_map): New variable.
2496         (map_decl_to_instance, maybe_set_discriminator): New functions.
2497         (notice_source_line): Set discriminator.
2499 2018-07-31  Ian Lance Taylor  <iant@golang.org>
2501         * targhooks.c (default_have_speculation_safe_value): Add
2502         ATTRIBUTE_UNUSED.
2504 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2506         * dump-context.h: Include "pretty-print.h".
2507         (dump_context::refresh_dumps_are_enabled): New decl.
2508         (dump_context::emit_item): New decl.
2509         (class dump_context): Add fields "m_test_pp" and
2510         "m_test_pp_flags".
2511         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2512         (temp_dump_context::get_dumped_text): New decl.
2513         (class temp_dump_context): Add field "m_pp".
2514         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2515         (dump_context::refresh_dumps_are_enabled): ...and add a test for
2516         m_test_pp.
2517         (set_dump_file): Update for above change.
2518         (set_alt_dump_file): Likewise.
2519         (dump_loc): New overload, taking a pretty_printer *.
2520         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
2521         to any test pretty-printer.
2522         (make_item_for_dump_gimple_stmt): New function, adapted from
2523         optinfo::add_gimple_stmt.
2524         (dump_context::dump_gimple_stmt): Call it, and use the result,
2525         eliminating the direct usage of dump_file and alt_dump_file in
2526         favor of indirectly using them via emit_item.
2527         (make_item_for_dump_gimple_expr): New function, adapted from
2528         optinfo::add_gimple_expr.
2529         (dump_context::dump_gimple_expr): Call it, and use the result,
2530         eliminating the direct usage of dump_file and alt_dump_file in
2531         favor of indirectly using them via emit_item.
2532         (make_item_for_dump_generic_expr): New function, adapted from
2533         optinfo::add_tree.
2534         (dump_context::dump_generic_expr): Call it, and use the result,
2535         eliminating the direct usage of dump_file and alt_dump_file in
2536         favor of indirectly using them via emit_item.
2537         (make_item_for_dump_printf_va): New function, adapted from
2538         optinfo::add_printf_va.
2539         (make_item_for_dump_printf): New function.
2540         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2541         and use the result, eliminating the direct usage of dump_file and
2542         alt_dump_file in favor of indirectly using them via emit_item.
2543         (make_item_for_dump_dec): New function.
2544         (dump_context::dump_dec): Call it, and use the result,
2545         eliminating the direct usage of dump_file and alt_dump_file in
2546         favor of indirectly using them via emit_item.
2547         (make_item_for_dump_symtab_node): New function, adapted from
2548         optinfo::add_symtab_node.
2549         (dump_context::dump_symtab_node): Call it, and use the result,
2550         eliminating the direct usage of dump_file and alt_dump_file in
2551         favor of indirectly using them via emit_item.
2552         (dump_context::begin_scope): Reimplement, avoiding direct usage
2553         of dump_file and alt_dump_file in favor of indirectly using them
2554         via emit_item.
2555         (dump_context::emit_item): New member function.
2556         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2557         Set up test pretty-printer on the underlying context.  Call
2558         refresh_dumps_are_enabled.
2559         (temp_dump_context::~temp_dump_context): Call
2560         refresh_dumps_are_enabled.
2561         (temp_dump_context::get_dumped_text): New member function.
2562         (selftest::verify_dumped_text): New function.
2563         (ASSERT_DUMPED_TEXT_EQ): New macro.
2564         (selftest::test_capture_of_dump_calls): Run all tests twice, with
2565         and then without optinfo enabled.  Add uses of
2566         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
2567         * dumpfile.h: Update comment for the dump_* API.
2568         * optinfo-emit-json.cc
2569         (selftest::test_building_json_from_dump_calls): Update for new
2570         param for temp_dump_context ctor.
2571         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2572         and "m_owned" field.
2573         (optinfo_item::~optinfo_item): Likewise.
2574         (optinfo::add_item): New member function.
2575         (optinfo::emit): Update comment.
2576         (optinfo::add_string): Delete.
2577         (optinfo::add_printf): Delete.
2578         (optinfo::add_printf_va): Delete.
2579         (optinfo::add_gimple_stmt): Delete.
2580         (optinfo::add_gimple_expr): Delete.
2581         (optinfo::add_tree): Delete.
2582         (optinfo::add_symtab_node): Delete.
2583         (optinfo::add_dec): Delete.
2584         * optinfo.h (class dump_context): New forward decl.
2585         (optinfo::add_item): New decl.
2586         (optinfo::add_string): Delete.
2587         (optinfo::add_printf): Delete.
2588         (optinfo::add_printf_va): Delete.
2589         (optinfo::add_gimple_stmt): Delete.
2590         (optinfo::add_gimple_expr): Delete.
2591         (optinfo::add_tree): Delete.
2592         (optinfo::add_symtab_node): Delete.
2593         (optinfo::add_dec): Delete.
2594         (optinfo::add_poly_int): Delete.
2595         (optinfo_item::optinfo_item): Remove "owned" param.
2596         (class optinfo_item): Remove field "m_owned".
2598 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2600         PR middle-end/86705
2601         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2602         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2603         requested variable alignment.
2604         (expand_one_ssa_partition): Likewise.
2605         (expand_one_var): Likewise.
2607 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2609         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2610         to speculation_safe_value_not_needed.
2612 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2614         * targhooks.h (speculation_safe_value_not_needed): New prototype.
2615         * targhooks.c (speculation_safe_value_not_needed): New function.
2616         * target.def (have_speculation_safe_value): Update documentation.
2617         * doc/tm.texi: Regenerated.
2619 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2621         * config/aarch64/iterators.md (ALLI_TI): New iterator.
2622         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2623         expand.
2624         (despeculate_copy<ALLI:mode>_insn): New insn.
2625         (despeculate_copyti_insn): New insn.
2626         (despeculate_simple<ALLI:mode>): New insn
2627         (despeculate_simpleti): New insn.
2628         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2629         function.
2630         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2631         aarch64_speculation_safe_value.
2632         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2634 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2636         * config/aarch64/aarch64-speculation.cc: New file.
2637         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2638         before pass_reorder_blocks.
2639         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2640         prototype.
2641         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2642         X14 and X15 when tracking speculation.
2643         * config/aarch64/aarch64.md (register name constants): Add
2644         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2645         (unspec): Add UNSPEC_SPECULATION_TRACKER.
2646         (speculation_barrier): New insn attribute.
2647         (cmp<mode>): Allow SP in comparisons.
2648         (speculation_tracker): New insn.
2649         (speculation_barrier): Add speculation_barrier attribute.
2650         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2651         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2652         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2654 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2656         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2657         aarch64_track_speculation is true.
2658         (tb<optab><mode>1): Likewise.
2659         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2660         generate CB[N]Z when tracking speculation.
2661         (aarch64_split_compare_and_swap): Likewise.
2662         (aarch64_split_atomic_op): Likewise.
2664 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2666         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2668 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2670         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2671         (speculation_barrier): New insn.
2673 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2675         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2676         * config/arm/arm.md (speculation_barrier): New expand.
2677         (speculation_barrier_insn): New pattern.
2679 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2681         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2682         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2683         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2684         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2685         list.
2686         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2687         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2688         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2689         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2690         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2691         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2692         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2693         * builtins.c (expand_speculation_safe_value): New function.
2694         (expand_builtin): Call it.
2695         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2696         * doc/extend.texi: Document __builtin_speculation_safe_value.
2697         * doc/md.texi: Document "speculation_barrier" pattern.
2698         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2699         TARGET_HAVE_SPECULATION_SAFE_VALUE.
2700         * doc/tm.texi: Regenerated.
2701         * target.def (have_speculation_safe_value, speculation_safe_value): New
2702         hooks.
2703         * targhooks.c (default_have_speculation_safe_value): New function.
2704         (default_speculation_safe_value): New function.
2705         * targhooks.h (default_have_speculation_safe_value): Add prototype.
2706         (default_speculation_safe_value): Add prototype.
2708 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2710         * dump-context.h (dump_context::dump_loc): New decl.
2711         * dumpfile.c (dump_context::dump_loc): New member function.
2712         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2713         and dump_gimple_stmt.
2714         (dump_context::dump_gimple_expr_loc): Likewise, using
2715         dump_gimple_expr.
2716         (dump_context::dump_generic_expr_loc): Likewise, using
2717         dump_generic_expr.
2718         (dump_context::dump_printf_loc_va): Likewise, using
2719         dump_printf_va.
2720         (dump_context::begin_scope): Explicitly using the global function
2721         "dump_loc", rather than the member function.
2723 2018-07-31  Martin Sebor  <msebor@redhat.com>
2725         PR tree-optimization/86741
2726         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2728 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
2730         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2731         depend on whether prefetch instructions will be emitted or not.
2732         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2733         will be emitted or not.
2734         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2735         (TARGET_SETMEM_PFD): New macros.
2737 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2739         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2740         (NULL_STMT_VEC_INFO): Delete.
2741         (stmt_vec_info::operator*): Likewise.
2742         (stmt_vec_info::operator gimple *): Likewise.
2743         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2744         of NULL_STMT_VEC_INFO.
2745         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2746         (vect_reassociating_reduction_p): Likewise.
2747         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2748         (vectorizable_store): Likewise.
2749         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2750         (vec_info::free_stmt_vec_infos): Likewise.
2752 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2754         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2755         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2757 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2759         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2760         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2761         (vec_info::free_stmt_vec_info): New private member functions.
2762         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2763         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2764         * tree-parloops.c (gather_scalar_reductions): Remove calls to
2765         set_stmt_vec_info_vec and free_stmt_vec_infos.
2766         * tree-vect-loop.c (_loop_vec_info): Remove call to
2767         set_stmt_vec_info_vec.
2768         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2769         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2770         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2771         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2772         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
2773         assignments in {vec_info::,}new_stmt_vec_info that are redundant
2774         with the clearing in the xcalloc.
2775         (stmt_vec_info_vec): Delete.
2776         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2777         (vectorize_loops): Likewise.
2778         (vec_info::~vec_info): Remove argument from call to
2779         free_stmt_vec_infos.
2780         (vec_info::add_stmt): Remove vinfo argument from call to
2781         new_stmt_vec_info.
2783 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2785         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2786         rather than a gimple stmt.
2787         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
2788         information for pattern statements when passed the original
2789         statement; instead wait to be passed the pattern statement itself.
2790         Don't call set_vinfo_for_stmt here.
2791         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2792         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2793         stmt_vec_infos here.
2794         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2795         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2796         stmt_vec_infos entry.
2798 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2800         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2801         * tree-vectorizer.c (vec_info::replace_stmt): New function.
2802         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2803         * tree-vect-stmts.c (vectorizable_call): Likewise.
2804         (vectorizable_simd_clone_call): Likewise.
2806 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2808         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2809         * tree-vectorizer.c (vec_info::remove_stmt): New function.
2810         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2811         * tree-vect-loop.c (vect_transform_loop): Likewise.
2812         * tree-vect-slp.c (vect_schedule_slp): Likewise.
2813         * tree-vect-stmts.c (vect_remove_stores): Likewise.
2815 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2817         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2818         (vect_dr_stmt): Delete.
2819         * tree-vectorizer.c (vec_info::lookup_dr): New function.
2820         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2821         of DR_VECT_AUX.
2822         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2823         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2824         (vect_verify_datarefs_alignment, vect_peeling_supportable)
2825         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2826         (vect_analyze_data_refs): Likewise.
2827         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
2828         argument.
2829         (vect_find_same_alignment_drs): Likewise.
2830         (vect_slp_analyze_node_dependences): Update calls accordingly.
2831         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2832         instead of DR_VECT_AUX.
2833         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2834         of a vector data references.  Use vec_info::lookup_dr instead of
2835         DR_VECT_AUX.
2836         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2837         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2838         instead of DR_VECT_AUX.
2840 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2842         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2843         dr_vec_info.
2844         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2845         accordingly.
2846         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2847         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2848         (vect_gen_prolog_loop_niters): Likewise.
2850 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2852         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2853         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2854         (vect_known_alignment_in_bytes, vect_dr_behavior)
2855         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2856         instead of data_references.  Update calls to other routines for
2857         which the same change has been made.
2858         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2859         dr_vec_infos instead of stmt_vec_infos.
2860         (vect_analyze_data_ref_dependence): Update call accordingly.
2861         (vect_slp_analyze_data_ref_dependence)
2862         (vect_record_base_alignments): Use DR_VECT_AUX.
2863         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2864         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2865         (vector_alignment_reachable_p, vect_get_data_access_cost)
2866         (vect_peeling_supportable, vect_analyze_group_access_1)
2867         (vect_analyze_group_access, vect_analyze_data_ref_access)
2868         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2869         (vect_compile_time_alias, vect_small_gap_p)
2870         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2871         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2872         instead of data_references.  Update calls to other routines for
2873         which the same change has been made.
2874         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2875         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2876         (vect_slp_analyze_and_verify_node_alignment)
2877         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2878         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2879         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2880         above changes.
2881         (_vect_peel_info::dr): Replace with...
2882         (_vect_peel_info::dr_info): ...this new field.
2883         (vect_peeling_hash_get_most_frequent)
2884         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2885         (vect_peeling_hash_get_lowest_cost):
2886         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2887         routines for which the same change has been made.
2888         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2889         data_reference.
2890         * tree-vect-loop-manip.c (get_misalign_in_elems)
2891         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2892         above changes.
2893         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2894         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2895         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2896         (get_group_load_store_type, get_negative_load_store_type)
2897         (vect_get_data_ptr_increment, vectorizable_store)
2898         (vectorizable_load): Likewise.
2899         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2900         Update calls to other routines for which the same change has been made.
2902 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2904         * tree-vectorizer.h (vec_info::move_dr): New member function.
2905         (dataref_aux): Rename to...
2906         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2907         (_stmt_vec_info::dr_aux): Update accordingly.
2908         (_stmt_vec_info::data_ref_info): Delete.
2909         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2910         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2911         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2912         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2913         of data_ref.
2914         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2915         (STMT_VINFO_DR_INFO): New macro.
2916         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2917         (set_dr_misalignment): Update after rename of dataref_aux.
2918         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2919         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2920         initialization of STMT_VINFO_DATA_REF.
2921         * tree-vectorizer.c (vec_info::move_dr): New function.
2922         * tree-vect-patterns.c (vect_recog_bool_pattern)
2923         (vect_recog_mask_conversion_pattern)
2924         (vect_recog_gather_scatter_pattern): Use it.
2925         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2926         the "dr" and "stmt" fields of dr_vec_info instead of
2927         STMT_VINFO_DATA_REF.
2929 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2931         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2932         (is_pattern_stmt_p): Use it.
2933         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2934         on pattern statements.
2936 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2938         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2939         original stmt as a stmt_vec_info rather than a gimple stmt.
2940         (vect_pattern_recog_1): Take the statement directly as a
2941         stmt_vec_info, rather than via a gimple_stmt_iterator.
2942         Update call to vect_mark_pattern_stmts.
2943         (vect_pattern_recog): Update calls accordingly.
2945 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2947         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2948         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2949         a vect_def_type for the first argument.
2950         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2951         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2952         operand if it isn't defined by a vectorized statement.
2953         (vect_build_gather_load_calls): Remove the mask_dt argument and
2954         update calls to vect_get_vec_def_for_stmt_copy.
2955         (vectorizable_bswap): Likewise the dt argument.
2956         (vectorizable_call): Update calls to vectorizable_bswap and
2957         vect_get_vec_def_for_stmt_copy.
2958         (vectorizable_simd_clone_call, vectorizable_assignment)
2959         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2960         (vectorizable_comparison): Update calls to
2961         vect_get_vec_def_for_stmt_copy.
2962         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2963         vect_is_simple_use.
2964         (vect_get_loop_based_defs): Remove dt argument and update call
2965         to vect_get_vec_def_for_stmt_copy.
2966         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2967         and vect_get_vec_def_for_stmt_copy.
2968         (vectorizable_load): Update calls to vect_build_gather_load_calls
2969         and vect_get_vec_def_for_stmt_copy.
2970         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2971         (vectorizable_reduction, vectorizable_live_operation): Update calls
2972         to vect_get_vec_def_for_stmt_copy.
2974 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2976         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2977         and gimple stmt arguments with a stmt_vec_info.
2978         (vect_record_base_alignments): Update calls accordingly.
2979         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2980         and gimple stmt arguments with a stmt_vec_info.
2981         (vect_build_slp_tree_1): Remove vinfo argument and update call
2982         to vect_record_max_nunits.
2983         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2984         and vect_record_max_nunits.
2986 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2988         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2989         file and take a stmt_vec_info instead of a gimple stmt.
2990         (supportable_widening_operation, vect_finish_replace_stmt)
2991         (vect_finish_stmt_generation, vect_get_store_rhs)
2992         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2993         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2994         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2995         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2996         (vect_create_data_ref_ptr, bump_vector_ptr)
2997         (vect_permute_store_chain, vect_setup_realignment)
2998         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2999         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3000         (vectorizable_reduction, vectorizable_induction)
3001         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3002         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3003         than gimple stmts as arguments.
3004         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3005         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3006         (can_group_stmts_p, vect_check_gather_scatter)
3007         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3008         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3009         (vect_permute_load_chain, vect_shift_permute_load_chain)
3010         (vect_transform_grouped_load)
3011         (vect_record_grouped_load_vectors): Likewise.
3012         * tree-vect-loop.c (vect_fixup_reduc_chain)
3013         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3014         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3015         (vectorizable_reduction, vectorizable_induction)
3016         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3017         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3018         (vect_get_load_store_mask): Likewise.
3019         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3020         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3021         * tree-vect-stmts.c (vect_mark_relevant)
3022         (is_simple_and_all_uses_invariant)
3023         (exist_non_indexing_operands_for_use_p, process_use)
3024         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3025         (vect_get_vec_def_for_operand, vect_get_vec_defs)
3026         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3027         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3028         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3029         (get_negative_load_store_type, get_load_store_type)
3030         (vect_check_load_store_mask, vect_check_store_rhs)
3031         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3032         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3033         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3034         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3035         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3036         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3037         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3038         (supportable_widening_operation): Likewise.
3040 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3042         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3043         a stmt_vec_info instead of a gcall.
3044         (vect_check_gather_scatter): Update call accordingly.
3045         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3046         of a gphi.
3047         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3048         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3049         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3050         instead of a gimple stmt.
3051         (vect_transform_loop): Update calls accordingly.
3052         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3053         stmt_vec_infos instead of gimple stmts.
3054         (vect_analyze_slp_instance): Update use accordingly.
3055         * tree-vect-stmts.c (read_vector_array, write_vector_array)
3056         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3057         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3058         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3059         (vect_gen_widened_results_half, vect_get_loop_based_defs)
3060         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3061         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3062         down to subroutines.
3064 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3066         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3067         of the worklist from a vector of gimple stmts to a vector of
3068         stmt_vec_infos.
3069         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3070         (vect_mark_stmts_to_be_vectorized): Likewise
3072 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3074         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3075         statement before passing it to vect_analyze_stmt.
3076         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3077         the chain of phi vector definitions.  Track the exit phi via its
3078         stmt_vec_info.
3079         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3080         STMT_VINFO_REDUC_DEF.
3081         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3082         stmt_vec_infos to handle the statement chains.
3083         (vect_get_slp_defs): Record the first statement in the node
3084         using a stmt_vec_info.
3085         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3086         statements here and pass their stmt_vec_info down to subroutines.
3087         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3088         down to vect_finish_stmt_generation.
3089         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3090         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3091         stmt_vec_infos to subroutines.
3092         (vect_remove_stores): Use stmt_vec_infos to handle the statement
3093         chains.
3095 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3097         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3098         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3099         (vect_permute_store_chain, vect_setup_realignment)
3100         (vect_permute_load_chain, vect_shift_permute_load_chain)
3101         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3102         stmts internally, and when passing values to other vectorizer routines.
3103         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3104         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3105         (vect_analyze_loop_operations, get_initial_def_for_reduction)
3106         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3107         (vectorizable_reduction, vectorizable_induction)
3108         (vectorizable_live_operation, vect_transform_loop_stmt)
3109         (vect_transform_loop): Likewise.
3110         * tree-vect-patterns.c (vect_reassociating_reduction_p)
3111         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3112         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3113         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3114         (vect_slp_analyze_node_operations_1): Likewise.
3115         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3116         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3117         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3118         (vect_finish_stmt_generation_1, get_group_load_store_type)
3119         (get_load_store_type, vect_build_gather_load_calls)
3120         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3121         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3122         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3123         (vectorizable_store, vectorizable_load, vectorizable_condition)
3124         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3125         (supportable_widening_operation): Likewise.
3126         (vect_get_vector_types_for_stmt): Likewise.
3127         * tree-vectorizer.h (vect_dr_behavior): Likewise.
3129 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3131         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3132         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3133         (vect_permute_store_chain, vect_permute_load_chain)
3134         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3135         repeated stmt_vec_info lookups.
3136         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3137         (vect_update_ivs_after_vectorizer): Likewise.
3138         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3139         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3140         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3141         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3142         (vect_bb_slp_scalar_cost): Likewise.
3143         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3145 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3147         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3148         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3149         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3150         to get gassigns and gcalls, rather than operating on generc gimple
3151         stmts.
3152         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3153         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3154         (vectorizable_load, vect_analyze_stmt): Likewise.
3155         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3157 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3159         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3160         return stmt_vec_infos rather than gimple stmts.  Do not accept
3161         null arguments.
3162         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3163         of a gimple stmt.
3164         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3165         Update use of get_later_stmt.
3166         (vect_get_constant_vectors): Update call accordingly.
3167         (vect_schedule_slp_instance): Likewise
3168         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3169         (vect_slp_analyze_instance_dependence): Likewise.
3170         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3172 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3174         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3175         (stmt_info_for_cost::stmt_info): ...this new field.
3176         (add_stmt_costs): Update accordingly.
3177         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3178         (vect_get_known_peeling_cost): Likewise.
3179         (vect_estimate_min_profitable_iters): Likewise.
3180         * tree-vect-stmts.c (record_stmt_cost): Likewise.
3182 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3184         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3185         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3186         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3187         accordingly.
3188         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3190 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3192         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3193         a gimple stmt to a stmt_vec_info.
3194         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3196 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3198         * tree-vectorizer.h (vec_info::grouped_stores): Change from
3199         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3200         (_loop_vec_info::reduction_chains): Likewise.
3201         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3202         accordingly.
3203         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3205 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3207         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3208         a gimple stmt to a stmt_vec_info.
3209         (_stmt_vec_info::next_element): Likewise.
3210         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3211         (vect_slp_analyze_and_verify_node_alignment)
3212         (vect_analyze_group_access_1, vect_analyze_group_access)
3213         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3214         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3215         (vect_supportable_dr_alignment): Update accordingly.
3216         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3217         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3218         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3219         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3220         * tree-vect-slp.c (vect_build_slp_tree_1)
3221         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3222         (vect_split_slp_store_group, vect_analyze_slp_instance)
3223         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3224         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3225         (get_group_load_store_type, get_load_store_type)
3226         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3227         (vect_transform_stmt, vect_remove_stores): Likewise.
3229 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3231         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3232         than a gimple stmt.
3233         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3234         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3235         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3236         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3237         (vector_alignment_reachable_p, vect_get_data_access_cost)
3238         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3239         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3240         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3241         (vect_analyze_group_access_1, vect_analyze_group_access)
3242         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3243         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3244         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3245         result of vect_dr_stmt and use the stmt_vec_info instead of
3246         the associated gimple stmt.
3247         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3248         (vect_gen_prolog_loop_niters): Likewise.
3249         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3251 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3253         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3254         to a vec<stmt_vec_info>.
3255         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3256         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3257         vec<stmt_vec_info>.
3258         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3259         to a vec<stmt_vec_info>.
3260         (bst_traits::value_type, bst_traits::value_type): Likewise.
3261         (bst_traits::hash): Update accordingly.
3262         (vect_get_and_check_slp_defs): Change the stmts parameter from
3263         a vec<gimple *> to a vec<stmt_vec_info>.
3264         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3265         (vect_build_slp_tree): Likewise.
3266         (vect_build_slp_tree_2): Likewise.  Update uses of
3267         SLP_TREE_SCALAR_STMTS.
3268         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3269         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3270         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3271         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3272         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3273         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3274         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3275         (vect_get_constant_vectors, vect_get_slp_defs)
3276         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3277         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3278         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3279         instead of gimple stmts.
3280         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3281         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3282         (vect_slp_analyze_instance_dependence): Update uses of
3283         SLP_TREE_SCALAR_STMTS.
3284         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3285         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3286         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3287         (get_initial_defs_for_reduction): Likewise.
3288         (vect_create_epilog_for_reduction): Likewise.
3289         (vectorize_fold_left_reduction): Likewise.
3290         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3291         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3292         (can_vectorize_live_stmts): Likewise.
3294 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3296         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3297         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3298         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3299         than gimple stmts.
3300         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3301         of a gimple stmt.
3302         (gather_scalar_reductions): Update after above interface changes.
3303         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3304         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3305         than gimple stmts.
3306         (vect_force_simple_reduction): Likewise.
3307         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3308         LOOP_VINFO_REDUCTIONS.
3309         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3311 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3313         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3314         a gimple stmt to a stmt_vec_info.
3315         * tree-vect-loop.c (vect_active_double_reduction_p)
3316         (vect_force_simple_reduction, vectorizable_reduction): Update
3317         accordingly.
3319 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3321         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3322         vec<gimple *> to a vec<stmt_vec_info>.
3323         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3324         the reduction_phis argument from a vec<gimple *> to a
3325         vec<stmt_vec_info>.
3326         (vectorizable_reduction): Likewise the phis local variable that
3327         is passed to vect_create_epilog_for_reduction.  Update for new type
3328         of SLP_TREE_VEC_STMTS.
3329         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3330         (vectorizable_live_operation): Likewise.
3331         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3332         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3334 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3336         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3337         a gimple stmt to a stmt_vec_info.
3338         (vectorizable_condition, vectorizable_live_operation)
3339         (vectorizable_reduction, vectorizable_induction): Pass back the
3340         vectorized statement as a stmt_vec_info.
3341         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3342         use of STMT_VINFO_VEC_STMT.
3343         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3344         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3345         as stmt_vec_infos rather than gimple stmts.
3346         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3347         to a stmt_vec_info.
3348         (vectorizable_live_operation): Likewise.
3349         (vectorizable_reduction, vectorizable_induction): Likewise,
3350         updating use of STMT_VINFO_VEC_STMT.
3351         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3352         of STMT_VINFO_VEC_STMT.
3353         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3354         (vectorizable_simd_clone_call, vectorizable_conversion)
3355         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3356         (vectorizable_store, vectorizable_load, vectorizable_condition)
3357         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3358         from a gimple stmt to a stmt_vec_info.
3359         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
3360         pointer to a stmt_vec_info to the vectorizable_* routines.
3362 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3364         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3365         a gimple stmt to a stmt_vec_info.
3366         (is_pattern_stmt_p): Update accordingly.
3367         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3368         (vect_record_grouped_load_vectors): Likewise.
3369         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3370         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3371         (vect_model_reduction_cost): Likewise.
3372         (vect_create_epilog_for_reduction): Likewise.
3373         (vectorizable_reduction, vectorizable_induction): Likewise.
3374         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3375         Return the stmt_vec_info for the pattern statement.
3376         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3377         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3378         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3379         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3380         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3381         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3382         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3383         (free_stmt_vec_info, vect_is_simple_use): Likewise.
3385 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3387         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3388         (vect_finish_stmt_generation): Likewise.
3389         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3390         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3391         (vect_build_gather_load_calls): Use the return value of the above
3392         functions instead of a separate call to vinfo_for_stmt.  Use narrow
3393         scopes for the input gimple stmt and wider scopes for the associated
3394         stmt_vec_info.  Use vec_info::lookup_def when setting these
3395         stmt_vec_infos from an SSA_NAME definition.
3396         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3397         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3398         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3399         (vectorizable_store, vectorizable_load, vectorizable_condition)
3400         (vectorizable_comparison): Likewise.
3401         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3402         (vectorizable_reduction): Likewise.
3404 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3406         * tree-vectorizer.h (vect_is_simple_use): Add an optional
3407         stmt_vec_info * parameter before the optional gimple **.
3408         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3409         (process_use, vect_get_vec_def_for_operand_1): Update callers.
3410         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3411         * tree-vect-loop.c (vectorizable_reduction): Likewise.
3412         (vectorizable_live_operation): Likewise.
3413         * tree-vect-patterns.c (type_conversion_p): Likewise.
3414         (vect_look_through_possible_promotion): Likewise.
3415         (vect_recog_rotate_pattern): Likewise.
3416         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3420         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3421         a typedef to a wrapper class.
3422         (NULL_STMT_VEC_INFO): New macro.
3423         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3424         (stmt_vec_info::operator*): New function.
3425         (stmt_vec_info::operator gimple *): Likewise.
3426         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3427         (add_stmt_costs): Likewise.
3428         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3429         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3430         (vect_get_known_peeling_cost): Likewise.
3431         (vect_estimate_min_profitable_iters): Likewise.
3432         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3433         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3434         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3435         (vectorizable_store, free_stmt_vec_infos): Likewise.
3436         (new_stmt_vec_info): Change return type of xcalloc to
3437         _stmt_vec_info *.
3439 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3441         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3442         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3443         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3444         a single_imm_use-based sequence.
3445         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3447 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3449         * tree-vectorizer.h (vec_info::lookup_def): Declare.
3450         * tree-vectorizer.c (vec_info::lookup_def): New function.
3451         * tree-vect-patterns.c (vect_get_internal_def): Use it.
3452         (vect_widened_op_tree): Likewise.
3453         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3454         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3455         (vectorizable_reduction): Likewise.
3456         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3457         of a gimple *.
3458         (vect_is_slp_reduction): Update calls accordingly.  Use
3459         vec_info::lookup_def.
3460         (vect_is_simple_reduction): Likewise
3461         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3463 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3465         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3466         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3467         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3468         of vinfo_for_stmt.
3469         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3470         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3471         (vect_update_vf_for_slp, vect_analyze_loop_operations)
3472         (vect_is_slp_reduction, vectorizable_induction)
3473         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3474         * tree-vect-patterns.c (vect_init_pattern_stmt):
3475         (vect_determine_min_output_precision_1, vect_determine_precisions)
3476         (vect_pattern_recog): Likewise.
3477         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3478         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3479         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3480         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3481         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3482         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
3483         info field from a loop to a loop_vec_info.
3485 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3487         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3488         (vec_info::add_stmt): Declare.
3489         * tree-vectorizer.c (vec_info::add_stmt): New function.
3490         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3491         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3492         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3493         (vectorizable_induction): Likewise.
3494         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3495         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3496         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3497         (vectorizable_load): Likewise.
3498         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3499         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3500         (vect_recog_gather_scatter_pattern): Likewise.
3501         (append_pattern_def_seq): Likewise.  Remove a check that is
3502         performed by add_stmt itself.
3504 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3506         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3507         which make_ssa_name was called with new_stmt before new_stmt
3508         had been created.
3510 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3512         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3513         split out from...
3514         (vect_is_slp_reduction): ...here...
3515         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
3516         that are already known to be false.
3518 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3520         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3521         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
3522         STMT_VINFO_NUM_SLP_USES when it's true.
3523         (vect_free_slp_instance): Add a final_p parameter and pass it to
3524         vect_free_slp_tree.
3525         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3526         (vect_analyze_slp_instance): Likewise.
3527         (vect_slp_analyze_operations): Likewise.
3528         (vect_slp_analyze_bb_1): Likewise.
3529         * tree-vectorizer.c (vec_info): Likewise.
3530         * tree-vect-loop.c (vect_transform_loop): Likewise.
3532 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3534         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3535         function is not called for second and subsequent members of
3536         a reduction group.
3538 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3540         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3541         cases for nested loops from here to ...
3542         (vect_create_epilog_for_reduction): ...here.  Only call
3543         vect_is_simple_use for inner-loop reductions.
3545 2018-07-31  Martin Liska  <mliska@suse.cz>
3547         PR gcov-profile/85338
3548         PR gcov-profile/85350
3549         PR gcov-profile/85372
3550         * profile.c (struct location_triplet): New.
3551         (struct location_triplet_hash): Likewise.
3552         (output_location): Do not output a BB that
3553         is already recorded for a line.
3554         (branch_prob): Use streamed_locations.
3556 2018-07-31  Martin Liska  <mliska@suse.cz>
3558         PR gcov-profile/85370
3559         * coverage.c (coverage_begin_function): Do not mark target
3560         clones as artificial functions.
3562 2018-07-31  Martin Liska  <mliska@suse.cz>
3564         PR gcov-profile/83813
3565         PR gcov-profile/84758
3566         PR gcov-profile/85217
3567         PR gcov-profile/85332
3568         * profile.c (branch_prob): Do not record GOTO expressions
3569         for GIMPLE statements which locations are already streamed.
3571 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3573         * gcc.c (handle_spec_function): Accept a soft_matched_part
3574         argument, as do_spec_1.  Pass it down to ...
3575         (eval_spec_function): Accept a soft_matched_part argument,
3576         and pass it down to ...
3577         (do_spec_2): Accept a soft_matched_part argument, and pass
3578         it down to do_spec_1.
3579         (do_spec_1): Pass soft_matched_part to handle_spec_function.
3580         (handle_braces): Update call to handle_spec_function.
3581         (driver::set_up_specs): Update calls to do_spec_2.
3582         (compare_debug_dump_opt_spec_function): Likewise.
3583         (compare_debug_self_opt_spec_function): Likewise.
3585 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3587         * common.opt (nolibc): New option.
3588         * doc/invoke.texi (Link Options): Document it.
3589         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3590         * config/alpha/linux.h: Likewise.
3591         * config/arc/elf.h: Likewise.
3592         * config/arm/uclinux-elf.h: Likewise.
3593         * config/arm/unknown-elf.h: Likewise.
3594         * config/avr/avrlibc.h: Likewise.
3595         * config/bfin/bfin.h: Likewise.
3596         * config/bfin/linux.h: Likewise.
3597         * config/bfin/uclinux.h: Likewise.
3598         * config/darwin.h: Likewise.
3599         * config/darwin10.h: Likewise.
3600         * config/darwin12.h: Likewise.
3601         * config/gnu-user.h: Likewise.
3602         * config/lm32/uclinux-elf.h: Likewise.
3603         * config/pa/pa-hpux11.h: Likewise.
3604         * config/pa/pa64-hpux.h: Likewise.
3605         * config/sparc/sparc.h: Likewise.
3607 2018-07-31  Olivier Hainque  <hainque@adacore.com>
3609         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3610         undefined variables.
3612 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
3614         PR target/86640
3615         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3616         instead of GEN_INT.
3618 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3620         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3621         terminated string literal.
3623 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
3625         PR rtl-optimization/85160
3626         * combine.c (is_just_move): New function.
3627         (try_combine): Allow combining two instructions into two if neither of
3628         the original instructions was a move.
3630 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
3632         PR target/86673
3633         * doc/extend.texi (Global Register Variables): Discourage use of type
3634         qualifiers.
3635         (Local Register Variables): Likewise.
3637 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
3639         PR tree-optimization/86506
3640         * hwint.h (ceil_log2): Resync with hwint.c implementation.
3642 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
3644         PR target/86547
3645         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3646         hard_regno, make sure no insn between `from` and `to` clobbers it.
3648 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
3649             Tom de Vries  <tdevries@suse.de>
3651         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3652         (PTX_DEFAULT_RUNTIME_DIM): ... this.
3653         (nvptx_goacc_validate_dims): Set default worker and gang dims to
3654         PTX_DEFAULT_RUNTIME_DIM.
3655         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3657 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
3659         * config/pa/pa.c (pa_output_addr_vec): Align address table.
3660         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3661         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3663 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
3665         * config/rs6000/constraints.md (wG constraint): Delete, no longer
3666         used.
3667         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3668         predicate to reflect toc fusion has been deleted.
3669         (toc_fusion_mem_raw): Delete, no longer used.
3670         (toc_fusion_mem_wrapped): Likewise.
3671         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3672         fusion mask bit.
3673         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3674         Delete, no longer used.
3675         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3676         meant to be used for toc fusion.
3677         (rs6000_debug_print_mode): Delete toc fusion debugging.
3678         (rs6000_debug_reg_global): Likewise.
3679         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3680         fusion and secondary reload support that were never used.
3681         (rs6000_option_override_internal): Delete TOC fusion, that was only
3682         partially defined, and it did not work unless you also used the
3683         -mcmodel= switch.
3684         (rs6000_legitimate_address_p): Delete TOC fusion support.
3685         (rs6000_opt_masks): Likewise.
3686         (fusion_wrap_memory_address): Delete function, no longer used.
3687         (fusion_split_address); Delete TOC fusion support.
3688         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3689         longer used with toc fusion being deleted.
3690         (TARGET_TOC_FUSION_FP): Likewise.
3691         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3692         UNSPEC.
3693         (toc fusion spliter): Delete TOC fusion support.
3694         (toc_fusionload_<mode>): Likewise.
3695         (toc_fusionload_di): Likewise.
3696         (fusion_gpr_load_<mode>): Delete generator function, this insn no
3697         longer needs to be named.  Rename predicate to delete TOC fusion.
3698         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3699         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3700         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3701         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3702         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3704 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3706         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3707         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
3708         __int128 in built-in function prototypes.
3709         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3710         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3712 2018-07-27  Martin Sebor  <msebor@redhat.com>
3714         PR tree-optimization/86696
3715         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3716         types, including enums.
3717         (handle_char_store): Be prepared for the above function to fail.
3719 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
3721         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3722         when optimization level is lower than 2 or optimize for size.
3724 2018-07-26  Martin Sebor  <msebor@redhat.com>
3726         PR tree-optimization/86043
3727         PR tree-optimization/86042
3728         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3729         (get_string_cst_length): Rename...
3730         (get_min_string_length): ...to this.  Add argument.
3731         (handle_char_store): Extend to handle multi-character stores by
3732         MEM_REF.
3733         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
3734         * tree.h (initializer_zerop): Add argument.
3736 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
3738         PR middle-end/86660
3739         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3740         declare target to variables if they have always,{to,from,tofrom} map
3741         kinds.
3743 2018-07-26  Martin Liska  <mliska@suse.cz>
3745         PR lto/86548
3746         * lto-wrapper.c: Add linker_output as prefix
3747         for ltrans_output_file.
3749 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
3751         PR rtl-optimization/85805
3752         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3753         value for hard registers if that was written in the same mode.
3755 2018-07-26  Martin Liska  <mliska@suse.cz>
3757         PR gcov-profile/86536
3758         * gcov.c (format_gcov): Use printf format %.*f directly
3759         and do not handle special values.
3761 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3763         * common/config/arc/arc-common.c (arc_option_optimization_table):
3764         Update default optimizations for size.
3766 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3768         * config/arc/arc.md (movsf_insn): Add short instruction selection.
3769         * config/arc/constraints.md (CfZ): New constraint.
3770         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3771         (subsf3_fpu): Likewise.
3772         (cmpsf_fpu): Likewise.
3773         (cmpsf_fpu_uneq): Likewise.
3775 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3777         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3778         accesses as well.
3779         (arc_is_uncached_mem_p): uncached applies to both the variable and
3780         the pointer.
3782 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3784         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3785         register names.
3787 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
3789         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3790         field "m_scopes" from vec to auto_vec.
3792 2018-07-25  Martin Liska  <mliska@suse.cz>
3794         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3795         return type.
3797 2018-07-25  Richard Biener  <rguenther@suse.de>
3799         PR debug/86654
3800         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3801         special wrt context_die late.
3802         (gen_subprogram_die): Re-use DIEs in local scope.
3804 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
3806         PR tree-optimization/86644
3807         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
3809 2018-07-25  Martin Liska  <mliska@suse.cz>
3811         PR middle-end/86645
3812         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3813         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3815 2018-07-25  Martin Liska  <mliska@suse.cz>
3817         PR sanitizer/79635
3818         * params.def: Explain ASan abbreviation and provide
3819         a documentation link.
3821 2018-07-24  Martin Sebor  <msebor@redhat.com>
3823         PR tree-optimization/86622
3824         PR tree-optimization/86532
3825         * builtins.h (string_length): Declare.
3826         * builtins.c (c_strlen): Correct handling of non-constant offsets.
3827         (check_access): Be prepared for non-constant length ranges.
3828         (string_length): Make extern.
3829         * expr.c (string_constant): Only handle the minor non-constant
3830         array index.  Use string_constant to compute the length of
3831         a generic string constant.
3833 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
3835         PR tree-optimization/86618
3836         * tree-vect-stmts.c (vectorizable_call): Don't take the address
3837         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3839 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
3841         PR tree-optimization/86636
3842         * json.cc (json::object::set): Fix comment.  Add assertions.
3843         (json::array::append): Move here from json.h.  Add comment and an
3844         assertion.
3845         (json::string::string): Likewise.
3846         * json.h (json::array::append): Move to json.cc.
3847         (json::string::string): Likewise.
3848         * optinfo-emit-json.cc
3849         (optrecord_json_writer::impl_location_to_json): Assert that we
3850         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3851         wrapper around it.  Expand the location once, rather than three
3852         times.
3853         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3854         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3855         wrappers.
3856         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3857         places.  Fix some overlong lines.
3859 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3861         * config/aarch64/aarch64-simd.md
3862         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3863         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3864         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3865         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3866         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3867         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3868         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3869         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3870         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3872 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3874         PR middle-end/86627
3875         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3876         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3877         and abs_d == d, do the power of two handling if profitable.
3879 2018-07-24  Richard Biener  <rguenther@suse.de>
3881         * match.pd: Add BIT_FIELD_REF canonicalizations.
3883 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3885         PR c/86617
3886         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3888 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3890         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3891         terminated STRING_CST object.
3893 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3895         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3897 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3899         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3900         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3901         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3902         the elements into a register.
3903         (rs6000_split_v4si_init_di_reg): Delete.
3904         (rs6000_split_v4si_init): Delete.
3905         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3906         (vsx_init_v4si): Rewrite as a define_expand.
3908 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3910         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3911         zero_extend argument from memory): New.
3913 2018-07-22  Martin Sebor  <msebor@redhat.com>
3915         PR bootstrap/86621
3916         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3917         diagnosing calls with unknown arguments unless -Walloca-larger-than
3918         is restricted to less than PTRDIFF_MAX bytes.
3920 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3922         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3924 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3926         * pretty-print.c (text_info::set_location): Remove redundant
3927         "line_table" parameter from call to rich_location::set_range.
3929 2018-07-20  Martin Sebor  <msebor@redhat.com>
3931         PR middle-end/82063
3932         * builtins.c (expand_builtin_alloca): Adjust.
3933         * calls.c (alloc_max_size): Simplify.
3934         * cgraphunit.c (cgraph_node::expand): Adjust.
3935         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3936         variables.
3937         (frame_larger_than_size): Same.
3938         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3939         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3940         Initialize.
3941         * doc/invoke.texi (GCC Command Options): Document option arguments.
3942         Explain byte-size arguments and suffixes.
3943         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3944         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3945         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3946         * doc/options.texi (UInteger): Expand.
3947         (Host_Wide_Int, ByteSize): Document new properties.
3948         * final.c (final_start_function_1): Include sizes in an error message.
3949         * function.c (frame_offset_overflow): Same.
3950         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3951         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3952         Diagnose unbounded alloca calls only for limits of less than
3953         PTRDIFF_MAX.
3954         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3955         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3956         for alloca(0).
3957         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3958         only for limits of less than PTRDIFF_MAX.
3959         * langhooks-def.h (lhd_handle_option): Change function argument
3960         to HOST_WIDE_INT.
3961         * langhooks.c (lhd_handle_option): Same.
3962         * langhooks.h (handle_option): Same.
3963         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3964         ByteSize flags.
3965         (var_type, var_type_struct): Same.
3966         (var_set): Handle ByteSize flag.
3967         * optc-gen.awk: Add comments to output to ease debugging.  Make
3968         use of HOST_WIDE_INT where appropriate.
3969         * opts-gen-save.awk:  Use %lx to format unsigned long.
3970         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3971         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3972         arguments.  Parse bytes-size suffixes.
3973         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3974         (enum_value_to_arg): Same.
3975         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3976         (handle_option): Adjust.
3977         (generate_option): Change function argument to HOST_WIDE_INT.
3978         (cmdline_handle_error): Adjust.
3979         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3980         (set_option): Change function argument to HOST_WIDE_INT.
3981         (option_enabled): Handle cl_host_wide_int.
3982         (get_option_state): Handle CLVC_SIZE.
3983         (control_warning_option): Same.
3984         * opts.c (common_handle_option): Change function argument to
3985         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3986         OPT_Wvla_larger_than_.
3987         * opts.h (enum cl_var_type): Add an enumerator.
3988         * stor-layout.c (layout_decl): Print a more meaningful warning.
3989         * toplev.c (output_stack_usage): Adjust.
3991 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3993         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3994         call to inline_expand_builtin_string_cmp.
3995         (expand_builtin_strcmp): Likewise.
3996         (expand_builtin_strncmp): Likewise.
3997         (inline_string_cmp): Delete the last parameter, change char_type_node
3998         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3999         two operands.
4000         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4001         the inlining expansion on target where the type of the call has same or
4002         narrower precision than unsigned char.
4004 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4006         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4007         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4008         * common.opt (fsave-optimization-record): New option.
4009         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4010         * doc/invoke.texi (-fsave-optimization-record): New option.
4011         * dumpfile.c: Include "optinfo-emit-json.h".
4012         (struct kv_pair): Move to coretypes.h.
4013         (optgroup_options): Make non-static.
4014         (dump_context::end_scope): Call
4015         optimization_records_maybe_pop_dump_scope.
4016         * dumpfile.h (optgroup_options): New decl.
4017         * json.cc: New file.
4018         * json.h: New file.
4019         * optinfo-emit-json.cc: New file.
4020         * optinfo-emit-json.h: New file.
4021         * optinfo.cc: Include "optinfo-emit-json.h".
4022         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4023         (optinfo_enabled_p): Check optimization_records_enabled_p.
4024         (optinfo_wants_inlining_info_p): Likewise.
4025         * optinfo.h: Update comment.
4026         * profile-count.c (profile_quality_as_string): New function.
4027         * profile-count.h (profile_quality_as_string): New decl.
4028         (profile_count::quality): New accessor.
4029         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4030         and optinfo_emit_json_cc_tests.
4031         * selftest.h (selftest::json_cc_tests): New decl.
4032         (selftest::optinfo_emit_json_cc_tests): New decl.
4033         * toplev.c: Include "optinfo-emit-json.h".
4034         (compile_file): Call optimization_records_finish.
4035         (do_compile): Call optimization_records_start.
4036         * tree-ssa-live.c: Include optinfo.h.
4037         (remove_unused_scope_block_p): Retain inlining information if
4038         optinfo_wants_inlining_info_p returns true.
4040 2018-07-20  Richard Biener  <rguenther@suse.de>
4042         PR debug/86585
4043         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4044         to cover -flto-partition=none.
4046 2018-07-20  Martin Liska  <mliska@suse.cz>
4048         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4049         (get_decl_source_range): Remove unused function.
4051 2018-07-20  Richard Biener  <rguenther@suse.de>
4053         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4054         (struct vn_phi_s): Likewise.
4055         (struct vn_reference_s): Likewise.
4056         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4057         for searching the slot of an entry known to be in the hash itself.
4058         (vn_phi_hasher::equal): Likewise.
4059         (vn_reference_hasher::equal): Likewise.
4060         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4061         globals.
4062         (optimistic_info, current_info): Remove, keeping only valid_info.
4063         (vn_reference_lookup_1): Remove fallback lookup.
4064         (vn_reference_lookup_2): Likewise.
4065         (vn_nary_op_lookup_1): Likewise.
4066         (vn_phi_lookup): Likewise.
4067         (vn_nary_build_or_lookup_1): Make sure to not chain the built
4068         hash element.
4069         (vn_reference_insert): Adjust, chain the inserted hash element
4070         at last_inserted_ref.
4071         (vn_reference_insert_pieces): Likewise.
4072         (visit_reference_op_call): Likewise.
4073         (vn_nary_op_insert_into): Chain the inserted hash element at
4074         last_inserted_nary.
4075         (vn_nary_op_insert_pieces): Adjust.
4076         (vn_nary_op_insert): Likewise.
4077         (vn_nary_op_insert_stmt): Likewise.
4078         (vn_phi_insert): Adjust, chain the inserted hash element at
4079         last_inserted_phi.
4080         (process_scc): Remove clearing and copying the optimistic
4081         table.  Instead remove elements inserted during an optimistic
4082         iteration from the single table we maintain.
4083         (init_scc_vn): Adjust.
4084         (free_scc_vn): Likewise.
4085         (sccvn_dom_walker::record_cond): Likewise.
4086         (sccvn_dom_walker::after_dom_children): Likewise.
4088 2018-07-19  Martin Sebor  <msebor@redhat.com>
4090         PR tree-optimization/84047
4091         PR tree-optimization/83776
4092         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4093         (check_array_bounds): Call it.
4095 2018-07-19  Martin Sebor  <msebor@redhat.com>
4097         * align.h (align_flags): Use member initialization.
4099 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
4101         * Makefile.in (OBJS): Add optinfo.o.
4102         * coretypes.h (class symtab_node): New forward decl.
4103         (struct cgraph_node): New forward decl.
4104         (class varpool_node): New forward decl.
4105         * dump-context.h: New file.
4106         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4107         "tree-pass.h".
4108         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4109         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4110         (set_alt_dump_file): Likewise.
4111         (dump_context::~dump_context): New dtor.
4112         (dump_gimple_stmt): Move implementation to...
4113         (dump_context::dump_gimple_stmt): ...this new member function.
4114         Add the stmt to any pending optinfo, creating one if need be.
4115         (dump_gimple_stmt_loc): Move implementation to...
4116         (dump_context::dump_gimple_stmt_loc): ...this new member function.
4117         Start a new optinfo and add the stmt to it.
4118         (dump_gimple_expr): Move implementation to...
4119         (dump_context::dump_gimple_expr): ...this new member function.
4120         Add the stmt to any pending optinfo, creating one if need be.
4121         (dump_gimple_expr_loc): Move implementation to...
4122         (dump_context::dump_gimple_expr_loc): ...this new member function.
4123         Start a new optinfo and add the stmt to it.
4124         (dump_generic_expr): Move implementation to...
4125         (dump_context::dump_generic_expr): ...this new member function.
4126         Add the tree to any pending optinfo, creating one if need be.
4127         (dump_generic_expr_loc): Move implementation to...
4128         (dump_context::dump_generic_expr_loc): ...this new member
4129         function.  Add the tree to any pending optinfo, creating one if
4130         need be.
4131         (dump_printf): Move implementation to...
4132         (dump_context::dump_printf_va): ...this new member function.  Add
4133         the text to any pending optinfo, creating one if need be.
4134         (dump_printf_loc): Move implementation to...
4135         (dump_context::dump_printf_loc_va): ...this new member function.
4136         Start a new optinfo and add the stmt to it.
4137         (dump_dec): Move implementation to...
4138         (dump_context::dump_dec): ...this new member function.  Add the
4139         value to any pending optinfo, creating one if need be.
4140         (dump_context::dump_symtab_node): New member function.
4141         (dump_context::get_scope_depth): New member function.
4142         (dump_context::begin_scope): New member function.
4143         (dump_context::end_scope): New member function.
4144         (dump_context::ensure_pending_optinfo): New member function.
4145         (dump_context::begin_next_optinfo): New member function.
4146         (dump_context::end_any_optinfo): New member function.
4147         (dump_context::s_current): New global.
4148         (dump_context::s_default): New global.
4149         (dump_scope_depth): Delete global.
4150         (dumpfile_ensure_any_optinfo_are_flushed): New function.
4151         (dump_symtab_node): New function.
4152         (get_dump_scope_depth): Reimplement in terms of dump_context.
4153         (dump_begin_scope): Likewise.
4154         (dump_end_scope): Likewise.
4155         (selftest::temp_dump_context::temp_dump_context): New ctor.
4156         (selftest::temp_dump_context::~temp_dump_context): New dtor.
4157         (selftest::verify_item): New function.
4158         (ASSERT_IS_TEXT): New macro.
4159         (ASSERT_IS_TREE): New macro.
4160         (ASSERT_IS_GIMPLE): New macro.
4161         (selftest::test_capture_of_dump_calls): New test.
4162         (selftest::dumpfile_c_tests): Call it.
4163         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4164         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4165         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4166         descriptive comment.
4167         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4168         (dump_node, dump_bb): Move these unrelated decls.
4169         (class dump_manager): Add leading comment.
4170         * optinfo.cc: New file.
4171         * optinfo.h: New file.
4173 2018-07-19  Michael Collison  <michael.collison@arm.com>
4174             Richard Henderson <rth@redhat.com>
4176         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4177         (subti): Handle op1 zero.
4178         (subvti4, usub4ti4): New.
4179         (*sub<GPI>3_compare1_imm): New.
4180         (sub<GPI>3_carryinCV): New.
4181         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4182         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4184 2018-07-19  Michael Collison  <michael.collison@arm.com>
4185             Richard Henderson <rth@redhat.com>
4187         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4188         (addti3): Create simpler code if low part is already known to be 0.
4189         (addvti4, uaddvti4): New.
4190         (*add<GPI>3_compareC_cconly_imm): New.
4191         (*add<GPI>3_compareC_cconly): New.
4192         (*add<GPI>3_compareC_imm): New.
4193         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4194         handle constants within this pattern..
4195         (*add<GPI>3_compareV_cconly_imm): New.
4196         (*add<GPI>3_compareV_cconly): New.
4197         (*add<GPI>3_compareV_imm): New.
4198         (add<GPI>3_compareV): New.
4199         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4200         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4201         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4202         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4203         with 'comparison' operator.
4204         (*add<GPI>3_compareV_cconly_imm): Ditto.
4205         (*add<GPI>3_compareV_cconly): Ditto.
4206         (*add<GPI>3_compareV_imm): Ditto.
4207         (add<GPI>3_compareV): Ditto.
4208         (add<mode>3_carryinC): Ditto.
4209         (*add<mode>3_carryinC_zero): Ditto.
4210         (*add<mode>3_carryinC): Ditto.
4211         (add<mode>3_carryinV): Ditto.
4212         (*add<mode>3_carryinV_zero): Ditto.
4213         (*add<mode>3_carryinV): Ditto.
4215 2018-07-19  Michael Collison  <michael.collison@arm.com>
4216             Richard Henderson <rth@redhat.com>
4218         * config/aarch64/aarch64-modes.def (CC_V): New.
4219         * config/aarch64/aarch64-protos.h
4220         (aarch64_addti_scratch_regs): Declare
4221         (aarch64_subvti_scratch_regs): Declare.
4222         (aarch64_expand_subvti): Declare.
4223         (aarch64_gen_unlikely_cbranch): Declare
4224         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4225         for signed overflow using CC_Vmode.
4226         (aarch64_get_condition_code_1): Handle CC_Vmode.
4227         (aarch64_gen_unlikely_cbranch): New function.
4228         (aarch64_addti_scratch_regs): New function.
4229         (aarch64_subvti_scratch_regs): New function.
4230         (aarch64_expand_subvti): New function.
4232 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4234         * config/aarch64/aarch64-option-extensions.def: New entry for profile
4235         extension.
4236         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4237         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4238         extension.
4240 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4242         PR target/83009
4243         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4244         address check not strict.
4246 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4248         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4249         Umq with Umn.
4250         (store_pair_lanes<mode>): Likewise.
4251         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4252         enum value 'ADDR_QUERY_LDP_STP_N'.
4253         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4254         (aarch64_print_address_internal): Add declaration.
4255         (aarch64_print_ldpstp_address): Remove.
4256         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4257         (aarch64_print_operand): Change printing of 'y'.
4258         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4259         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4260         'true' rather than '1'.
4261         * config/aarch64/constraints.md (Uml): Likewise.
4262         (Uml): Rename to Umn.
4263         (Umq): Remove.
4265 2018-07-19  Richard Biener  <rguenther@suse.de>
4267         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4268         a trailing array.
4269         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4270         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4271         (vn_reference_hasher): Likewise.
4272         (struct vn_tables_s): Remove obstack and alloc-pool members.
4273         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4274         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4275         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4276         (vn_reference_insert_pieces): Likewise.
4277         (alloc_vn_nary_op_noinit): Adjust.
4278         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4279         (vn_phi_eq): Adjust.
4280         (shared_lookup_phiargs): Remove.
4281         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4282         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4283         (visit_reference_op_call): Likewise.
4284         (copy_nary, copy_phi, copy_reference): Remove.
4285         (process_scc): Rewind the obstack when iterating.  Do not
4286         copy the elements to valid_info but just move them from one
4287         hashtable to the other.
4288         (allocate_vn_table): Adjust.
4289         (free_vn_table): Likewise.
4290         (init_scc_vn): Likewise.
4291         (free_scc_vn): Likewise.
4293 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
4295         PR target/86560
4296         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4297         indirect_return as function type attribute.
4298         (ix86_attribute_table): Change indirect_return to function
4299         type attribute.
4300         * doc/extend.texi: Update indirect_return attribute.
4302 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
4304         * wide-int.h (widest2_int): New.
4305         * gimple-fold.c (arith_overflowed_p): Use it.
4306         * tree.h (widest2_int_cst): New.
4307         * tree-vrp.c (wide_int_binop_overflow): Rename from
4308         vrp_int_const_binop.
4309         Rewrite to work on trees.
4310         (extract_range_from_multiplicative_op_1): Abstract code to...
4311         (wide_int_range_min_max): ...here.
4312         (wide_int_range_cross_product): ...and here.
4313         (extract_range_from_binary_expr_1): Abstract overflow code to...
4314         (wide_int_range_mult_wrapping): ...here.
4315         * tree-vrp.h (wide_int_range_cross_product): New.
4316         (wide_int_range_mult_wrapping): New.
4318 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
4319             Julia Koval  <julia.koval@intel.com>
4321         * config/i386/x86-tune-costs.h (skylake_memcpy,
4322         skylake_memset): Replace rep_prefix with unrolling for size 512.
4324 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
4326         PR middle-end/86544
4327         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4328         comparision with EQ_EXPR in last stmt.
4330 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4332         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4333         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4334         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4335         previously known as "PowerPC AltiVec Built-in Functions".  Move
4336         some material to new subsubsections "PowerPC AltiVec Built-in
4337         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4338         ISA 2.07".
4339         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4340         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4341         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4342         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4344 2018-07-18  Richard Biener  <rguenther@suse.de>
4346         PR tree-optimization/86557
4347         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4348         EXACT_DIV_EXPR.
4350 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
4352         * config/s390/s390.c (s390_function_profiler): Generate CFI.
4354 2018-07-17  Jeff Law  <law@redhat.com>
4356         * config/arm/arm.c (get_label_padding): Update for recent
4357         changes to label_to_alignment.
4359         PR tree-optimization/86010
4360         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4362         * config/mips/mips.c (vr4130_align_insns): Update for recent
4363         changes to label_to_alignment.
4365         * config/frv/frv.c (frv_label_align): Update for recent changes
4366         to label_to_alignment.
4368         * config/nios2/nios2.c (nios2_label_align): Update for recent
4369         changes which dropped ALIGN_LABELS_LOG.
4371 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
4373         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4374         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4376 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
4378         * config/arc/arc.c (arc_label_align): Use align_labels instead of
4379         deprecated align_labels_log.
4381 2018-07-17  Richard Biener  <rguenther@suse.de>
4383         PR lto/86456
4384         * dwarf2out.c (init_sections_and_labels): Always generate
4385         a debug_line_str_section for early LTO debug.
4386         (dwarf2out_finish): Reset debug_line_str_hash output early.
4387         Bump counter for extra dwarf5 .debug_loc labels to not conflict
4388         with fat LTO part.
4389         (dwarf2out_early_finish): Output debug_line_str.
4391 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4393         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4394         index register on z196 or later.
4396 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4398         * config/s390/s390.c (s390_default_align): Set default function
4399         alignment to 16.
4400         (s390_override_options_after_change): Call s390_default align.
4401         (s390_option_override_internal): Call s390_default_align.
4402         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4404 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4406         PR middle-end/86542
4407         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4408         to _looptemp_ clauses, other than the first two.
4410 2018-07-17  Martin Liska  <mliska@suse.cz>
4412         * opts.c: Do not enable OPT_falign_* for -Os.
4414 2018-07-17  Martin Liska  <mliska@suse.cz>
4416         * align.h (MAX_CODE_ALIGN): New.
4417         (MAX_CODE_ALIGN_VALUE): New.
4418         * common/config/i386/i386-common.c (ix86_handle_option):
4419         (MAX_CODE_ALIGN): Moved to align.h.
4420         * final.c (MAX_CODE_ALIGN): Likewise.
4421         * opts.c (parse_and_check_align_values):
4422         (MAX_CODE_ALIGN): Likewise.
4423         (MAX_CODE_ALIGN_VALUE): Likewise.
4425 2018-07-17  Martin Liska  <mliska@suse.cz>
4427         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4428         in order to fulfil coding style.
4429         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4430         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4431         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4432         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4433         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4434         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4435         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4436         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4437         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4439 2018-07-17  Martin Liska  <mliska@suse.cz>
4441         * align.h: New file.
4442         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4443         directly.
4444         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4445         align_flags of label_to_alignment.
4446         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4447         align_flags class.
4448         * config/m68k/m68k.c: Do not use removed align_labels_value and
4449         align_loops_value.
4450         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4451         (LOOP_ALIGN): Likewise.
4452         (LABEL_ALIGN): Likewise.
4453         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4454         Remove not used macro.
4455         (rs6000_loop_align): Change return type to align_flags.
4456         (rs6000_loop_align_max_skip): Remove.
4457         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4458         Change return type to align_flags.
4459         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4460         Remove not used macro.
4461         (rs6000_loop_align):  Change return type to align_flags.
4462         (rs6000_loop_align_max_skip): Remove.
4463         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4464         * config/rx/rx-protos.h (rx_align_for_label): Make it
4465         static function.
4466         * config/rx/rx.c (rx_align_for_label): Change return type
4467         to align_flags.
4468         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4469         macro definitions.
4470         into align_flags class.
4471         (LABEL_ALIGN): Likewise.
4472         (LOOP_ALIGN): Likewise.
4473         * config/s390/s390.c (s390_label_align): Use align_flags
4474         class member.
4475         (s390_asm_output_function_label): Likewise.
4476         * config/sh/sh.c (sh_override_options_after_change):
4477         Use align_flags class directly without macros.
4478         (find_barrier): Likewise.
4479         (barrier_align): Likewise.
4480         (sh_loop_align): Likewise.
4481         * config/spu/spu.c (spu_option_override):
4482         Use align_flags_tuple::get_value instead of removed macros.
4483         (spu_sched_init): Likewise.
4484         * config/spu/spu.h (GTY): Likewise.
4485         * config/visium/visium.c (visium_option_override):
4486         Set "8" as default secondary alignment.
4487         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4488         in order to guarantee secondary alignment of 8.
4489         * coretypes.h: Include align.h header file.
4490         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4491         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4492         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4493         * doc/tm.texi.in: Likewise.
4494         * final.c (struct label_alignment): Remove not used structure.
4495         (LABEL_ALIGN): Change type to align_flags.
4496         (LOOP_ALIGN): Likewise.
4497         (JUMP_ALIGN): Likewise.
4498         (default_loop_align_max_skip): Remove.
4499         (default_label_align_max_skip): Likewise.
4500         (default_jump_align_max_skip): Likewise.
4501         (default_label_align_after_barrier_max_skip):
4502         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4503         (LABEL_TO_MAX_SKIP): Remove.
4504         (label_to_alignment): Return align_flags type instead of integer.
4505         (label_to_max_skip): Remove.
4506         (align_fuzz): Use align_flags type.
4507         (compute_alignments): Use align_flags type and use align_flags::max
4508         to combine multiple alignments.
4509         (grow_label_align): Grow vec instead of C array.
4510         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4511         (shorten_branches):  Use align_flags type and use align_flags::max
4512         to combine multiple alignments.
4513         (final_scan_insn_1): Remove usage of secondary alignment that comes
4514         from label alignment, but instead use proper secondary alignment
4515         which is computed in grow_label_align.
4516         * flags.h (struct align_flags_tuple): Move to align.h.
4517         (struct align_flags): Likewise.
4518         (state_align_loops): Rename to align_loops.
4519         (state_align_jumps): Rename to align_jumps.
4520         (state_align_labels): Rename to align_labels.
4521         (state_align_functions): Rename to align_functions.
4522         (align_loops_log): Remove.
4523         (align_jumps_log): Remove.
4524         (align_labels_log): Remove.
4525         (align_functions_log): Remove.
4526         (align_loops_max_skip): Remove.
4527         (align_jumps_max_skip): Remove.
4528         (align_labels_max_skip): Remove.
4529         (align_functions_max_skip): Remove.
4530         (align_loops_value): Remove.
4531         (align_jumps_value): Remove.
4532         (align_labels_value): Remove.
4533         (align_functions_value): Remove.
4534         * output.h (label_to_alignment): Change return type to align_flags.
4535         (label_to_max_skip): Remove.
4536         * target.def: Remove loop_align_max_skip, label_align_max_skip,
4537         jump_align_max_skip macros.
4538         * targhooks.h (default_loop_align_max_skip): Remove.
4539         (default_label_align_max_skip): Likewise.
4540         (default_jump_align_max_skip): Likewise.
4541         (default_label_align_after_barrier_max_skip): Remove.
4542         * toplev.c (read_log_maxskip): Use ::normalize function.
4543         (parse_N_M): Remove not used argument and also call ::normalize.
4544         (parse_alignment_opts): Do not pass unused arguments.
4545         * varasm.c (assemble_start_function): Use directly align_functions
4546         instead of removed macros.
4547         * system.h: Do not poison removed macros.
4549 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4551         PR middle-end/86539
4552         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4553         and cond temporaries don't have reference type if iterator has
4554         pointer type.  For init use &for_pre_body instead of pre_p if
4555         for_pre_body is non-empty.
4557 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4559         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4560         double-double modes to SFmode directly directly.
4561         (trunc<mode>sf2_fprs): Delete.
4563 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4565         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4566         for conversions between IFmode and the decimal floating point modes.
4567         (init_float128_ieee): Use the correct names for conversions between
4568         KFmode and the decimal floating point modes.
4570 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
4572         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4573         for the conversions between TDmode and IFmode.
4574         (init_float128_ieee): Use more correct names for the conversions
4575         between TDmode and KFmode.
4577 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
4579         PR tree-optimization/86526
4580         * builtins.c (expand_builtin_memcmp): Formatting fixes.
4581         (inline_expand_builtin_string_cmp): Likewise.
4582         (inline_string_cmp): Likewise.  Use c_readstr instead of
4583         builtin_memcpy_read_str.  Add unit_mode temporary.
4585 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4587         PR middle-end/86528
4588         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4589         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4591 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4593         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4594         Alphabetize prototypes of built-in functions, separating out
4595         built-in functions that are listed in this section but should be
4596         described elsewhere.
4598 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
4600         PR target/86511
4601         * expmed.c (emit_store_flag): Do not emit setcc followed by a
4602         conditional move when trapping comparison was split to a
4603         non-trapping one (and vice versa).
4605 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4607         * config/s390/s390.c (s390_function_profiler): Generate nops
4608         instead of profiler call sequences.
4609         * config/s390/s390.opt: Add the new option.
4611 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4613         * config/s390/s390.c (s390_function_profiler): Generate
4614         __mcount_loc section.
4615         * config/s390/s390.opt: Add the new option.
4617 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
4619         * common.opt: Add the new warning.
4620         * config/s390/s390.c (s390_function_profiler): Emit "brasl
4621         %r0,__fentry__" when -mfentry is specified.
4622         (s390_option_override_internal): Disallow -mfentry for 31-bit
4623         CPUs.
4624         * config/s390/s390.opt: Add the new option.
4626 2018-07-16  Richard Biener  <rguenther@suse.de>
4628         PR lto/86523
4629         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4630         for function-local FUNCTION_DECL and RESULT_DECL immediately.
4632 2018-07-16  Martin Liska  <mliska@suse.cz>
4634         PR ipa/86529
4635         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4636         to ::get_create.
4638 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
4640         * config/arc/arcHS.md: Update ARCHS scheduling rules.
4642 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
4644         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4645         for ARCHS4x.
4646         * config/arc/arc-cpus.def (hs4x): New cpu.
4647         (hs4xd): Likewise.
4648         * config/arc/arc-tables.opt: Regenerate.
4649         * config/arc/arc.c (arc_sched_issue_rate): New function.
4650         (TARGET_SCHED_ISSUE_RATE): Define.
4651         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4652         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4653         fpu_cvt.
4654         (attr tune): Add ARCHS4x tune values.
4655         (attr tune_dspmpy): Define.
4656         (*tst): Correct instruction type.
4657         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4658         * config/arc/arcHS4x.md: New file.
4659         * config/arc/fpu.md: Update instruction type attributes.
4660         * config/arc/t-multilib: Regenerate.
4662 2018-07-16  Tom de Vries  <tdevries@suse.de>
4664         PR debug/86455
4665         * var-tracking.c (vt_initialize): Fix pre_dec handling.
4667 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4669         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4670         early clobber.
4672 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
4674         PR tree-optimization/86514
4675         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4676         conversion to a boolean type from a type with greater precision.
4678 2018-07-16  Tom de Vries  <tdevries@suse.de>
4680         * var-tracking.c (vt_initialize): Print adjusted insn slim if
4681         dump_flags request TDF_SLIM.
4683 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
4685         * fold-const.c (int_const_binop_1): Abstract...
4686         (wide_int_binop): ...wide int code here.
4687         (poly_int_binop): ...poly int code here.
4688         Abstract the rest of int_const_binop_1 into int_const_binop.
4689         * fold-const.h (wide_int_binop): New.
4690         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4691         Remove useless PLUS/MINUS_EXPR case.
4692         (zero_nonzero_bits_from_vr): Move wide int code...
4693         (zero_nonzero_bits_from_bounds): ...here.
4694         (extract_range_from_binary_expr_1): Move mask optimization code...
4695         (range_easy_mask_min_max): ...here.
4696         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4697         (range_easy_mask_min_max): New.
4699 2018-07-15  Jeff Law  <law@redhat.com>
4701         PR target/85993
4702         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4703         block.
4705 2018-07-14  Jim Wilson  <jimw@sifive.com>
4707         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4709 2018-07-14  Paul Koning  <ni1d@arrl.net>
4711         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4713 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
4715         * lto-streamer-out.c (copy_function_or_variable): Dump info about
4716         copying section.
4718 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
4719             Steve Munroe  <munroesj52@gmail.com>
4721         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4722         (_mm_andnot_si128): Likewise.
4723         (_mm_or_si128): Likewise.
4724         (_mm_xor_si128): Likewise.
4726 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
4728         PR middle-end/78809
4729         * builtins.c (expand_builtin_memcmp): Inline the calls first
4730         when result_eq is false.
4731         (expand_builtin_strcmp): Inline the calls first.
4732         (expand_builtin_strncmp): Likewise.
4733         (inline_string_cmp): New routine. Expand a string compare
4734         call by using a sequence of char comparison.
4735         (inline_expand_builtin_string_cmp): New routine. Inline expansion
4736         a call to str(n)cmp/memcmp.
4737         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4738         New option.
4739         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4741 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
4743         * config/arm/driver-arm.c: Include arm-native.h.
4744         (host_detect_local_cpu): Use auto-generated data tables.
4745         (vendors, arm_cpu_table): Delete.  Move part information to ...
4746         * config/arm/arm-cpus.in: ... here.
4747         * config/arm/parsecpu.awk (gen_native): New function.
4748         (vendor, part): New CPU fields.
4749         (END): Add support for building the native CPU detection tables.
4750         * config/arm/t-arm (arm-native.h): Add build rule.
4751         (driver-arm.o): Add dependency on arm-native.h.
4753 2018-07-13  Richard Biener  <rguenther@suse.de>
4755         PR middle-end/85974
4756         * match.pd (addr1 - addr2): Allow either of the operand to
4757         have a conversion.
4759 2018-07-13  Tom de Vries  <tdevries@suse.de>
4761         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4762         in remap_ssa_name.
4764 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4766         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4767         arrays instead of numbered variables.
4769 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
4771         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4772         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4774 2018-07-13  Richard Biener  <rguenther@suse.de>
4776         PR debug/86452
4777         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4778         instead of get_context_die.
4780 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4781             Richard Biener  <rguenther@suse.de>
4783         PR middle-end/86489
4784         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4785         that the loop latch destination where phi is defined.
4787 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
4789         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4790         (riscv_expand_epilogue): Add assertion to check interrupt mode.
4791         (riscv_set_current_function): Extract getting interrupt type to new
4792         function.
4793         (riscv_get_interrupt_type): New function.
4794         (riscv_merge_decl_attributes): New function, checking interrupt type is
4795         same.
4796         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4798 2018-07-12  Paul Koning  <ni1d@arrl.net>
4800         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4801         directive.
4803 2018-07-12  Paul Koning  <ni1d@arrl.net>
4805         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4806         zero reference, add doloop_end instead.
4807         * doc/md.texi (decrement_and_branch_until_zero): Remove.
4808         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
4809         detail for doloop_end.
4811 2018-07-12  Martin Sebor  <msebor@redhat.com>
4813         PR c/86453
4814         * attribs.c (decl_attributes): Reject conflicting attributes before
4815         calling attribute handlers.
4817 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4819         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4820          parameter.
4821         (gcc::dump_manager::get_dump_file_name): likewise.
4822         (dump_begin): Likewise.
4823         * dumpfile.h (dump_begin): Update prototype.
4824         (gcc::dump_manager::get_dump_file_name,
4825         gcc::dump_manager::get_dump_file_name): Update prototype.
4827 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4829         * internal-fn.h (vectorizable_internal_fn_p): New function.
4830         * tree-vect-slp.c (compatible_calls_p): Likewise.
4831         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
4832         to internal functions.
4833         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4835 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4837         * fold-const.h (inverse_conditions_p): Declare.
4838         * fold-const.c (inverse_conditions_p): New function.
4839         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
4840         that test the inverse condition of a conditional internal function.
4841         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4842         * internal-fn.c (internal_fn_mask_index): Handle conditional
4843         internal functions.
4844         (vectorized_internal_fn_supported_p): New function.
4845         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4846         (any_pred_load_store): Replace with...
4847         (need_to_predicate): ...this new variable.
4848         (redundant_ssa_names): New variable.
4849         (ifcvt_can_use_mask_load_store): Move initial checks to...
4850         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4851         for which a conditional internal function exists.
4852         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4853         instead of ifcvt_can_use_mask_load_store.  Update after variable
4854         name change.
4855         (predicate_load_or_store): New function, split out from
4856         predicate_mem_writes.
4857         (check_redundant_cond_expr): New function.
4858         (value_available_p): Likewise.
4859         (predicate_rhs_code): Likewise.
4860         (predicate_mem_writes): Rename to...
4861         (predicate_statements): ...this.  Use predicate_load_or_store
4862         and predicate_rhs_code.
4863         (combine_blocks, tree_if_conversion): Update after above name changes.
4864         (ifcvt_local_dce): Handle redundant_ssa_names.
4865         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4866         general conditional functions.
4867         * tree-vect-stmts.c (vectorizable_call): Likewise.
4869 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4870             Alan Hayward  <alan.hayward@arm.com>
4871             David Sherwood  <david.sherwood@arm.com>
4873         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4874         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4875         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4876         plus and minus and convert them into IFN_COND_FMA-based sequences.
4877         (convert_mult_to_fma): Handle conditional plus and minus.
4879 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4881         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4882         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4883         (cond_fnms_optab): New optabs.
4884         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4885         internal functions.
4886         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4887         * internal-fn.h (get_conditional_internal_fn): Declare.
4888         (get_unconditional_internal_fn): Likewise.
4889         * internal-fn.c (cond_ternary_direct): New macro.
4890         (expand_cond_ternary_optab_fn): Likewise.
4891         (direct_cond_ternary_optab_supported_p): Likewise.
4892         (FOR_EACH_COND_FN_PAIR): Likewise.
4893         (get_conditional_internal_fn): New function.
4894         (get_unconditional_internal_fn): Likewise.
4895         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4896         (gimple_match_op::gimple_match_op): Add a new overload for 5
4897         operands.
4898         (gimple_match_op::set_op): Likewise.
4899         (gimple_resimplify5): Declare.
4900         * genmatch.c (decision_tree::gen): Generate simplifications for
4901         5 operands.
4902         * gimple-match-head.c (gimple_simplify): Define an overload for
4903         5 operands.  Handle calls with 5 arguments in the top-level overload.
4904         (convert_conditional_op): Handle conversions from unconditional
4905         internal functions to conditional ones.
4906         (gimple_resimplify5): New function.
4907         (build_call_internal): Pass a fifth operand.
4908         (maybe_push_res_to_seq): Likewise.
4909         (try_conditional_simplification): Try converting conditional
4910         internal functions to unconditional internal functions.
4911         Handle 3-operand unconditional forms.
4912         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4913         Define ternary equivalents of the current rules for binary conditional
4914         internal functions.
4915         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4916         ternary operations.
4917         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4918         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4919         (optab): Handle them.
4920         (SVE_COND_FP_TERNARY): New int iterator.
4921         (sve_fmla_op, sve_fmad_op): New int attributes.
4922         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4923         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4924         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4926 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4928         * target.def (preferred_else_value): New target hook.
4929         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4930         * doc/tm.texi: Regenerate.
4931         * targhooks.h (default_preferred_else_value): Declare.
4932         * targhooks.c (default_preferred_else_value): New function.
4933         * internal-fn.h (conditional_internal_fn_code): Declare.
4934         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4935         (get_conditional_internal_fn): Use it.
4936         (conditional_internal_fn_code): New function.
4937         * gimple-match.h (gimple_match_cond): New struct.
4938         (gimple_match_op): Add a cond member function.
4939         (gimple_match_op::gimple_match_op): Update all forms to take a
4940         gimple_match_cond.
4941         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4942         for the suboperation, but don't specify a particular else_value.
4943         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4944         (visit_nary_op, visit_reference_op_load): Pass
4945         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4946         * gimple-match-head.c: Include tree-eh.h
4947         (convert_conditional_op): New function.
4948         (maybe_resimplify_conditional_op): Likewise.
4949         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4950         (gimple_resimplify2): Likewise.
4951         (gimple_resimplify3): Likewise.
4952         (gimple_resimplify4): Likewise.
4953         (maybe_push_res_to_seq): Return null for conditional operations.
4954         (try_conditional_simplification): New function.
4955         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4956         constructor.
4957         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4958         IFN_COND_* call.
4959         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4960         function.
4961         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4963 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4965         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4966         DECL_FCONTEXT
4967         (hash_tree): Do not hash DECL_FCONTEXT
4968         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4969         Do not stream DECL_FCONTEXT.
4970         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4971         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4973 2018-07-12  Richard Biener  <rguenther@suse.de>
4975         PR debug/86462
4976         * dwarf2out.c (gen_block_die): Only output blocks when they have
4977         at least one !DECL_IGNORED_P variable.
4979 2018-07-12  Richard Biener  <rguenther@suse.de>
4981         PR target/84829
4982         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4983         Remove -mieee-fp handling.
4985 2018-07-12  Richard Biener  <rguenther@suse.de>
4987         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4988         left-over from last patch.
4990 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4992         PR tree-optimization/86492
4993         * gimple-ssa-store-merging.c
4994         (imm_store_chain_info::coalesce_immediate_stores): Call
4995         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4997 2018-07-12  Richard Biener  <rguenther@suse.de>
4999         PR middle-end/86479
5000         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5001         move possibly trapping operations into the conditional.
5003 2018-07-12  Richard Biener  <rguenther@suse.de>
5005         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5006         (vn_lookup_simplify_result): Remove recursion limit applied
5007         here.
5008         (vn_nary_build_or_lookup_1): Adjust.
5009         (try_to_simplify): Likewise.
5010         * gimple-match-head.c (gimple_resimplify1): Instead apply one
5011         here.
5012         (gimple_resimplify2): Likewise.
5013         (gimple_resimplify3): Likewise.
5014         (gimple_resimplify4): Likewise.
5016 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
5018         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5019         Use __mmask64 type instead of __mmask8 for __M argument.
5020         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5021         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5022         __U argument.
5023         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5024         __mmask16 for __M argument.
5025         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5026         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5027         to __mmask16 instead of __mmask8.
5028         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5029         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5030         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5031         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5032         instead of __mmask16 for __U argument.
5033         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5034         __mmask16 instead of __mmask8 for __U argument.
5035         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5036         __U argument.
5037         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5038         __mmask16.
5039         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5040         argument.
5041         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5042         __U argument.
5043         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5044         __mmask16.
5045         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5046         of __mmask16.
5047         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5048         __U argument.
5049         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5050         __U argument.
5051         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5052         __U argument.
5053         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5054         __U argument.
5055         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5056         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5057         return type as well as __M argument type and all casts from __mmask8
5058         to __mmask32.
5059         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5060         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5061         return type as well as __M argument type and all casts from __mmask8
5062         to __mmask16.
5063         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5064         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5065         return type as well as __M argument type and all casts from __mmask8
5066         to __mmask32.
5067         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5068         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5069         return type as well as __M argument type and all casts from __mmask8
5070         to __mmask16.
5071         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5072         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5073         __mmask16.
5075 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
5077         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5078         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5079         for __U argument.
5081 2018-07-11  Paul Koning  <ni1d@arrl.net>
5083         * doc/md.texi (define_subst): Document how multiple occurrences of
5084         the same argument in the replacement pattern are handled.
5086 2018-07-11  Paul Koning  <ni1d@arrl.net>
5088         * doc/extend.texi (Common Variable Attributes): Move "mode" into
5089         alphabetical order.
5090         (Common Type Attributes): Add "mode" attribute.
5092 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
5094         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5095         stream DECL_ORIGINAL_TYPE.
5096         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5097         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5098         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5099         Do not walk original type.
5100         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5101         external decls.
5102         (write_ts_decl_non_common_tree_pointers): Do not stream
5103         DECL_ORIGINAL_TYPE
5104         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5105         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5107 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5109         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5110         thread twice from the same starting edge.
5112 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5114         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5115         * gimple.c (gimple_call_nonnull_result_p): ...here...
5116         (gimple_call_nonnull_arg): ...and here.
5117         * gimple.h (gimple_call_nonnull_result_p): New.
5118         (gimple_call_nonnull_arg): New.
5120 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
5122         * config/arm/arm-cpus.in: Move information from fpu field of each
5123         cpu definition to the isa field.
5124         * config/arm/parsecpu.awk (fpu): Delete match rule.
5125         (gen_comm_data): Don't add bits from the CPU's FPU entry.
5127 2018-07-11  Richard Biener  <rguenther@suse.de>
5129         PR debug/86457
5130         * dwarf2out.c (init_sections_and_labels): Use
5131         output_asm_line_debug_info consistently.
5132         (dwarf2out_early_finish): Likewise.
5133         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5134         type units.
5136 2018-07-11  Richard Biener  <rguenther@suse.de>
5138         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5139         Rework father_bb setting in a way to avoid propagating constants
5140         multiple times on a loop body.
5142 2018-07-10  Mark Wielaard  <mark@klomp.org>
5144         PR debug/86459
5145         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5147 2018-07-10  Richard Biener  <rguenther@suse.de>
5149         * hash-map.h (hash_map::iterator::operator*): Return
5150         references to key and value.
5152 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5154         PR c++/86443
5155         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5156         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5157         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5158         (gimplify_omp_for): For composite loops, move outer
5159         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5160         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
5161         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
5162         TREE_LIST for both the original class iterator and the "last" helper
5163         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
5164         loop, remember has_decl_expr from outer composite loops for the
5165         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5167 2018-07-09  Martin Sebor  <msebor@redhat.com>
5169         PR middle-end/77357
5170         PR middle-end/86428
5171         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5172         accessing implicitly initialized array elements.
5173         * expr.c (string_constant): Handle string initializers of
5174         character arrays within aggregates.
5175         * gimple-fold.c (fold_array_ctor_reference): Add argument.
5176         Store element offset.  As a special case, handle zero size.
5177         (fold_nonarray_ctor_reference): Same.
5178         (fold_ctor_reference): Add argument.  Store subobject offset.
5179         * gimple-fold.h (fold_ctor_reference): Add argument.
5181 2018-07-09  Paul Koning  <ni1d@arrl.net>
5183         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5184         (pdp11_insn_cost): New function.
5185         (pdp11_md_asm_adjust): New function.
5186         (TARGET_INVALID_WITHIN_DOLOOP): Define.
5187         (pdp11_rtx_costs): Update to match machine better.
5188         (output_addr_const_pdp11): Correct format mismatch warnings.
5189         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5190         * config/pdp11/pdp11.md: General change to add base_cost and/or
5191         length attributes for use by new pdp11_insn_cost function.
5192         (MIN_BRANCH): Correct definition.
5193         (MIN_SOB): Ditto.
5194         (doloop_end): Use standard pattern name for looping pattern.
5195         (doloop_end_nocc): New.
5196         (movsf): Add another constraint alternative.
5197         (zero_extendqihi2): Add constraint alternatives for not in place
5198         extend.
5199         (zero_extendhisi2): Remove.
5200         (shift patterns): Add CC handling variants.
5201         (bswaphi2): New.
5202         (bswapsi2): New.
5203         (rothi3): New.
5204         (define_peephole2): New peephole to recognize mov that sets CC for
5205         subsequent test.
5207 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5209         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5210         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5211         wi::add.
5213 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
5215         PR c/86420
5216         * real.c (real_nextafter): Return true if result is denormal.
5218 2018-07-09  Martin Liska  <mliska@suse.cz>
5220         * common.opt: Add back wrongly removed attribute.
5222 2018-07-09  Richard Biener  <rguenther@suse.de>
5224         PR debug/86413
5225         * dwarf2out.c (gen_block_die): For an early generated DIE
5226         always output high/low PC attributes.
5228 2018-07-09  Tom de Vries  <tdevries@suse.de>
5230         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5231         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5232         onto VAR_DECL with abstract origin.
5234 2018-07-07  Jim Wilson  <jimw@sifive.com>
5236         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5238 2018-07-07  Tom de Vries  <tdevries@suse.de>
5240         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5242 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
5244         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5245         overflow_type.
5246         (combine_bound): Use wide-int overflow calculation instead of
5247         rolling our own.
5248         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5249         overflow_type.
5250         * fold-const.c (int_const_binop_2): Same.
5251         (extract_muldiv_1): Same.
5252         (fold_div_compare): Same.
5253         (fold_abs_const): Same.
5254         * match.pd: Same.
5255         * poly-int.h (add): Same.
5256         (sub): Same.
5257         (neg): Same.
5258         (mul): Same.
5259         * predict.c (predict_iv_comparison): Same.
5260         * profile-count.c (slow_safe_scale_64bit): Same.
5261         * simplify-rtx.c (simplify_const_binary_operation): Same.
5262         * tree-chrec.c (tree_fold_binomial): Same.
5263         * tree-data-ref.c (split_constant_offset_1): Same.
5264         * tree-if-conv.c (idx_within_array_bound): Same.
5265         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5266         * tree-ssa-phiopt.c (minmax_replacement): Same.
5267         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5268         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5269         * vr-values.c (vr_values::adjust_range_with_scev): Same.
5270         * wide-int.cc (wi::add_large): Same.
5271         (wi::mul_internal): Same.
5272         (wi::sub_large): Same.
5273         (wi::divmod_internal): Same.
5274         * wide-int.h: Change overflow type to overflow_type for neg, add,
5275         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5276         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5277         mul_internal, divmod_internal.
5278         (overflow_type): New enum.
5279         (accumulate_overflow): New.
5281 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5283         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5284         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5286 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5288         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5289         argument is checked for zero before entering loop, avoid checking again.
5291 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5293         * gimplify.h (generic_expr_could_trap_p): Set as global function.
5294         * gimplify.h (generic_expr_could_trap_p): Likwise.
5295         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5297 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
5299         PR tree-optimization/86401
5300         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5301         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5302         (fold_bit_and_mask): ... here.  New helper function for match.pd.
5303         * fold-const.h (fold_bit_and_mask): Declare.
5304         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5306 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
5308         PR target/86324
5309         * target.def (translate_mode_attribute): New hook.
5310         * targhooks.h (default_translate_mode_attribute): Declare.
5311         * targhooks.c (default_translate_mode_attribute): New function.
5312         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5313         * doc/tm.texi: Regenerate.
5314         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5315         (rs6000_translate_mode_attribute): New function.
5317 2018-07-06  Paul Koning  <ni1d@arrl.net>
5319         * doc/md.texi (define_split): Document DONE and FAIL.
5320         (define_peephole2): Ditto.
5322 2018-07-05  Jeff Law  <law@redhat.com>
5324         PR tree-optimization/86010
5325         * tree-ssa-dse.c (compute_trims): More aggressively trim at
5326         both the head and tail of mem* and str* calls.
5328 2018-07-05  Jim Wilson  <jimw@sifive.com>
5330         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5332 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
5334         * config/aarch64/aarch64-simd.md: correct flags text for
5335         MIN_EXPR replacement.
5337 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
5339         * configure: Regenerated.
5341 2018-07-05  Carl Love  <cel@us.ibm.com>
5343         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5344         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5345         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5346         VSX_BUILTIN_DOUBLEL_V4SF.
5348 2018-07-05  Martin Sebor  <msebor@redhat.com>
5350         PR c++/86400
5351         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5352         than its domain to compute its the upper bound of a char array.
5354 2018-07-05  Nathan Sidwell  <nathan@acm.org>
5356         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5357         * doc/cpp.texi: Update comment.
5358         * doc/tm.texi: Rebuilt.
5359         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5360         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5361         * doc/extend.texi (Backwards Compatibility): Clarify it is system
5362         headers affected by extern "C".
5363         * system.h: Poison NO_IMPLICIT_EXTERN_C.
5364         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5365         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5366         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5367         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5368         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5369         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5370         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5371         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5372         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5373         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5374         config/sparc/sp64-elf.h, config/spu/spu.h,
5375         config/stormy16/stormy16.h, config/v850/v850.h,
5376         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5377         define NO_IMPLICIT_EXTERN_C.
5378         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5380 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5382         PR target/84711
5383         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5384         instead of GET_MODE_SIZE when comparing Units.
5386 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5388         PR target/84711
5389         * rtlanal.c (set_noop_p): Constrain on mode change,
5390         include hard-reg-set.h
5392 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5394         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5396 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
5398         Revert
5399         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5401         PR sanitizer/84250
5402         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5403         libasan.
5404         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5406 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5408         PR sanitizer/84250
5409         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5410         libasan.
5411         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5413 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
5415         PR middle-end/86380
5416         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5418 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
5420         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5421         neg_*_op* variables.
5423 2018-07-04  Martin Liska  <mliska@suse.cz>
5425         * tree-switch-conversion.c: Define
5426         max_ratio_for_speed and max_ratio_for_size constants.
5428 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5429             Martin Liska  <mliska@suse.cz>
5431         PR middle-end/66240
5432         PR target/45996
5433         PR c/84100
5434         * common.opt: Rename align options with 'str_' prefix.
5435         * common/config/i386/i386-common.c (set_malign_value): New
5436         function.
5437         (ix86_handle_option): Use it to set -falign-* options/
5438         * config/aarch64/aarch64-protos.h (struct tune_params): Change
5439         type from int to string.
5440         * config/aarch64/aarch64.c: Update default values from int
5441         to string.
5442         * config/alpha/alpha.c (alpha_override_options_after_change):
5443         Likewise.
5444         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5445         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5446         max skip conditionally.
5447         * config/i386/freebsd.h (SUBALIGN_LOG): New.
5448         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5449         max skip conditionally.
5450         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5451         max skip conditionally.
5452         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5453         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5454         max skip conditionally.
5455         * config/i386/i386.c (struct ptt): Change type from int to
5456         string.
5457         (ix86_default_align): Set default values.
5458         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5459         max skip conditionally.
5460         * config/i386/iamcu.h (SUBALIGN_LOG): New.
5461         (ASM_OUTPUT_MAX_SKIP_ALIGN):
5462         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5463         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5464         max skip conditionally.
5465         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5466         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5467         * config/i386/x86-64.h (SUBALIGN_LOG): New.
5468         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5469         max skip conditionally.
5470         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5471         * config/ia64/ia64.c (ia64_option_override): Set default values
5472         for alignment options.
5473         * config/m68k/m68k.c: Handle new str_align_* options.
5474         * config/mips/mips.c (mips_set_compression_mode): Change
5475         type of constants.
5476         (mips_option_override): Set default values for options.
5477         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5478         Likewise.
5479         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5480         Likewise.
5481         * config/rx/rx.c (rx_option_override): Likewise.
5482         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5483         (LABEL_ALIGN): Use align_labels_log.
5484         (LOOP_ALIGN): Use align_loops_align.
5485         * config/s390/s390.c (s390_asm_output_function_label): Use new
5486         macros.
5487         * config/sh/sh.c (sh_override_options_after_change):
5488         Change type of constants.
5489         * config/spu/spu.c (spu_sched_init): Likewise.
5490         * config/sparc/sparc.c (sparc_option_override): Set default
5491         values for options.
5492         * config/visium/visium.c (visium_option_override): Likewise.
5493         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5494         emit p2align format with last argument if it's not needed.
5495         * doc/invoke.texi: Document extended format of -falign-*.
5496         * final.c: Use align_labels alignment.
5497         * flags.h (struct target_flag_state): Change type to use
5498         align_flags.
5499         (struct align_flags_tuple): New.
5500         (struct align_flags): Likewise.
5501         (align_loops_log): Redefine macro to use new types.
5502         (align_loops_max_skip): Redefine macro to use new types.
5503         (align_jumps_log): Redefine macro to use new types.
5504         (align_jumps_max_skip): Redefine macro to use new types.
5505         (align_labels_log): Redefine macro to use new types.
5506         (align_labels_max_skip): Redefine macro to use new types.
5507         (align_functions_log): Redefine macro to use new types.
5508         (align_loops): Redefine macro to use new types.
5509         (align_jumps): Redefine macro to use new types.
5510         (align_labels): Redefine macro to use new types.
5511         (align_functions): Redefine macro to use new types.
5512         (align_functions_max_skip): Redefine macro to use new types.
5513         (align_loops_value): New macro.
5514         (align_jumps_value): New macro.
5515         (align_labels_value): New macro.
5516         (align_functions_value): New macro.
5517         * function.c (invoke_set_current_function_hook): Propagate
5518         alignment values from flags to global variables default in
5519         topleev.h.
5520         * ipa-icf.c (sem_function::equals_wpa): Use
5521         cl_optimization_option_eq instead of memcmp.
5522         * lto-streamer.h (cl_optimization_stream_out): Support streaming
5523         of string types.
5524         (cl_optimization_stream_in): Likewise.
5525         * optc-save-gen.awk: Support strings in cl_optimization.
5526         * opth-gen.awk: Likewise.
5527         * opts.c (finish_options): Remove error checking of invalid
5528         value ranges.
5529         (MAX_CODE_ALIGN): Remove.
5530         (MAX_CODE_ALIGN_VALUE): Likewise.
5531         (parse_and_check_align_values): New function.
5532         (check_alignment_argument): Likewise.
5533         (common_handle_option): Use check_alignment_argument.
5534         * opts.h (parse_and_check_align_values): Declare.
5535         * toplev.c (init_alignments): Remove.
5536         (read_log_maxskip): New.
5537         (parse_N_M): Likewise.
5538         (parse_alignment_opts): Likewise.
5539         (backend_init_target): Remove usage of init_alignments.
5540         * toplev.h (parse_alignment_opts): Declare.
5541         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5542         argument.
5543         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5544         * tree.c (cl_option_hasher::equal): New.
5545         * varasm.c: Use new global macros.
5547 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5549         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5550         Use a simpler align directive also if MAXSKIP = ALIGN-1.
5551         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5552         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5553         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5554         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5555         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5556         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5557         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5558         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5559         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5560         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5561         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5563 2018-07-04  Martin Liska  <mliska@suse.cz>
5564             Jonathan Wakely  <jwakely@redhat.com>
5566         * coverage.c: Use correct type.
5567         * doc/invoke.texi: Language correction.
5569 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
5571         PR target/85620
5572         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5573         ENDBRANCH for non-tail call which may return via indirect branch.
5574         * doc/extend.texi: Document indirect_return attribute.
5576 2018-07-03  Martin Sebor  <msebor@redhat.com>
5578         PR tree-optimization/86274
5579         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5580         precondition.
5581         (format_floating): Correct handling of infinities and NaNs.
5583 2018-07-03  Martin Sebor  <msebor@redhat.com>
5585         * print-tree.c (print_real_cst): New function.
5586         (print_node_brief): Call it.
5587         (print_node): Ditto.
5589 2018-07-03  Jeff Law  <law@redhat.com>
5591         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5592         into a single pattern.
5594         * config/h8300/h8300.md (ors code_iterator): New.
5595         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5596         a single pattern and single splitter.
5597         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5598         (iorqi3_1, xorqi3_1): Likewise.
5599         (iorqi3, xorqi3 expanders): Similarly.
5601         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5602         (movmd_internal) into a single pattern using the P mode iterator.
5603         (movmd splitters): Similarly.
5604         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5605         (movsd splitters): Similarly.
5607         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5608         ADDB, ADDW and ADDL into a single ADD attribute which selects the
5609         right table based on the size of the operand.
5610         * config/h8300/h8300.md (length_table): Corresponding changes. All
5611         references to "addb", "addw" and "addl" changed to "add".
5612         (btst patterns): Merge two variants into a single pattern.
5613         (tstqi, tsthi): Likewise.
5614         (addhi3_incdec, addsi3_incdec): Likewise.
5615         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5616         (mulhi3, mulsi3): Likewise.
5617         (udivhi3, udivsi3): Likewise.
5618         (divhi3, divsi3): Likewise.
5619         (andorqi3, andorhi3, andorsi3): Likewise.
5621 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
5623         PR target/85694
5624         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5625         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5627 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5629         PR tree-optimization/85694
5630         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5631         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5632         UNSPEC_URHADD.
5633         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5634         (<u>avg<mode>3_ceil): New patterns.
5636 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
5638         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5639         scan-tree-dump directive.
5640         * gcc.dg/vect/slp-perm-2.c: Likewise.
5641         * gcc.dg/vect/slp-perm-3.c: Likewise.
5642         * gcc.dg/vect/slp-perm-5.c: Likewise.
5643         * gcc.dg/vect/slp-perm-6.c: Likewise.
5644         * gcc.dg/vect/slp-perm-7.c: Likewise.
5645         * gcc.dg/vect/slp-perm-8.c: Likewise.
5647 2018-07-03  Marek Polacek  <polacek@redhat.com>
5649         PR middle-end/86202
5650         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5652 2018-07-03  Richard Biener  <rguenther@suse.de>
5654         PR ipa/86389
5655         * tree-ssa-structalias.c (find_func_clobbers): Properly
5656         handle indirect calls.
5658 2018-07-03  Jeff Law  <law@redhat.com>
5660         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5661         (shifts): New code iterator.
5662         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5663         expander.  Fix HImode handling on H8/SX.
5664         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5665         (subqi3, subhi3, subsi3 expanders): Likewise.
5666         (andqi3, andhi3, andsi3 expanders): Likewise.
5667         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5668         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5669         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5670         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5671         (zero_extendqihi2, zero_extendqisi2): Likewise.
5672         (extendqihi2, extendqisi2): Likewise.
5673         (rotlqi3, rotlhi3, rotlsi3): Likewise.
5674         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5675         (rotlqi3_1, rotlhi3_1): Likewise.
5676         (logicalhi3_sn, logicalsi3_sn): Likewise.
5677         (logicalhi3, logicalsi3): Likewise.
5679 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5681         * tree-vect-patterns.c (vect_recog_rotate_pattern)
5682         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5683         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5684         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5685         type to append_pattern_def_seq instead of creating a stmt_vec_info
5686         directly.
5687         (build_mask_conversion): Likewise.  Remove vinfo argument.
5688         (vect_add_conversion_to_patterm): Likewise, renaming to...
5689         (vect_add_conversion_to_pattern): ...this.
5690         (vect_recog_mask_conversion_pattern): Update call to
5691         build_mask_conversion.  Pass the vector type to
5692         append_pattern_def_seq here too.
5693         (vect_recog_gather_scatter_pattern): Update call to
5694         vect_add_conversion_to_pattern.
5696 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5698         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5699         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5700         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5701         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5702         STMT_VINFO_PATTERN_DEF_SEQ to null here.
5703         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5704         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5705         append_pattern_def_seq instead of new_pattern_def_seq.
5706         (vect_recog_divmod_pattern): Do both of the above.
5707         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5708         is null.
5710 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5712         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5713         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5714         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5715         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5716         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5717         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5718         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5719         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5720         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5721         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5722         parameter with a single stmt_vec_info.
5723         (vect_recog_func_ptr): Likewise.
5724         (vect_recog_gather_scatter_pattern): Likewise, folding in...
5725         (vect_try_gather_scatter_pattern): ...this.
5726         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5727         the stmt_vec_info of the statement to be matched.  Don't clear
5728         STMT_VINFO_RELATED_STMT.
5729         (vect_pattern_recog): Update call accordingly.
5731 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5733         PR tree-optimization/85694
5734         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5735         (uavgM3_ceil): Document new optabs.
5736         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5737         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5738         functions.
5739         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5740         (savg_ceil_optab): New optabs.
5741         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5742         (vect_vect_recog_func_ptrs): Add it.
5743         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5744         constant directly from the associated lhs.
5746 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5748         * tree-vect-patterns.c (vect_split_statement): New function.
5749         (vect_convert_input): Use it to try to split an existing cast.
5751 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5753         * poly-int.h (print_hex): New function.
5754         * dumpfile.h (dump_dec, dump_hex): Declare.
5755         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5756         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5757         min_input_precision, operation_precision and operation_sign.
5758         * tree-vect-patterns.c (vect_get_range_info): New function.
5759         (vect_same_loop_or_bb_p, vect_single_imm_use)
5760         (vect_operation_fits_smaller_type): Delete.
5761         (vect_look_through_possible_promotion): Add an optional
5762         single_use_p parameter.
5763         (vect_recog_over_widening_pattern): Rewrite to use new
5764         stmt_vec_info infomration.  Handle one operation at a time.
5765         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5766         (vect_truncatable_operation_p, vect_set_operation_type)
5767         (vect_set_min_input_precision): New functions.
5768         (vect_determine_min_output_precision_1): Likewise.
5769         (vect_determine_min_output_precision): Likewise.
5770         (vect_determine_precisions_from_range): Likewise.
5771         (vect_determine_precisions_from_users): Likewise.
5772         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5773         (vect_vect_recog_func_ptrs): Put over_widening first.
5774         Add cast_forwprop.
5775         (vect_pattern_recog): Call vect_determine_precisions.
5777 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5779         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5780         statements that have been replaced by further pattern statements.
5781         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5783 2018-07-03  Richard Biener  <rguenther@suse.de>
5785         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5786         always set *dt.  Dump vectype in vectype overload.
5787         * dumpfile.h (dump_gimple_expr): New function.
5788         (dump_gimple_expr_loc): Likewise.
5789         * dumpfile.c (dump_gimple_expr): New function.
5790         (dump_gimple_expr_loc): Likewise.
5792 2018-07-02  Jeff Law  <law@redhat.com>
5794         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5795         the H8/300, H8/300H and H8/S variants into a single pattern.
5796         (movhi_h8300, movqi_h8300hs): Similarly.
5797         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5798         (QHI mode iterator): New.
5800         * config/h8300/h8300.md: Remove trailing whitespace.
5802 2018-07-02  Jim Wilson  <jimw@sifive.com>
5804         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5805         instead of emit_insn for interrupt returns.
5806         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5807         (riscv_sret, riscv_uret): Likewise.
5809 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5811         * pretty-print.c (selftest::test_pp_format): Move save and restore
5812         of quotes to class auto_fix_quotes, and add an instance.
5813         * selftest.c: Include "intl.h".
5814         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5815         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5816         * selftest.h (selftest::auto_fix_quotes): New class.
5818 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
5820         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5821         (aarch64_sve_prepare_conditional_op): Remove.
5822         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5823         Allow aarch64_simd_reg_or_zero as select operand; remove
5824         the aarch64_sve_prepare_conditional_op call.
5825         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5826         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5827         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5828         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5829         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5830         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5831         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5832         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5833         and a splitters to match all of the *_any patterns.
5834         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5836         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5837         (SVE_COND_FP_BINARY_REV): Remove.
5838         (sve_int_op_rev, sve_fp_op_rev): New.
5839         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5840         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5841         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5842         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5843         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5844         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5845         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5846         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5847         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5849         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5850         Remove match_dup 1 from the inner unspec.
5851         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5853         * config/aarch64/aarch64.md (movprfx): New attr.
5854         (length): Default movprfx to 8.
5855         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5856         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5857         (*<su>mul<SVE_I>3_highpart): Likewise.
5858         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5859         (*v<ASHIFT><SVE_I>3): Likewise.
5860         (*<su><MAXMIN><SVE_I>3): Likewise.
5861         (*<su><MAXMIN><SVE_F>3): Likewise.
5862         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5863         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5864         (*div<SVE_F>4): Likewise.
5866 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5868         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5869         in dump string.
5871 2018-07-02  Richard Biener  <rguenther@suse.de>
5873         PR tree-optimization/86363
5874         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5875         memset argument refers to a non-variable address.
5877 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5879         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5880         {PLUS,MINUS}_EXPR code to...
5881         (adjust_symbolic_bound): ...here,
5882         (combine_bound): ...here,
5883         (set_value_range_with_overflow): ...and here.
5885 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5887         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5888         code...
5889         (extract_range_from_abs_expr): ...here.
5891 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5893         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5894         -fno-omit-frame-pointer when not optimizing.
5896 2018-07-02  Martin Liska  <mliska@suse.cz>
5898         PR ipa/86279
5899         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5900         (propagate_nothrow): Likewise.
5902 2018-07-02  Martin Liska  <mliska@suse.cz>
5904         PR ipa/86323
5905         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5907 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5909         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5910         function in r262149, changing "loc" param from source_location to
5911         const dump_location_t &.
5912         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5913         declaration, as above.
5915 2018-07-01  Paul Koning  <ni1d@arrl.net>
5917         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5918         -munit-asm, -mgnu-asm, -mdec-asm.
5919         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5920         (pdp11_output_labelref): New.
5921         (pdp11_output_def): New.
5922         (pdp11_output_addr_vec_elt): New.
5923         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5924         %# and %@ format codes.
5925         (pdp11_option_override): New.
5926         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5927         (pdp11_output_ident): New.
5928         (pdp11_asm_named_section): New.
5929         (pdp11_asm_init_sections): New.
5930         (pdp11_file_start): New.
5931         (pdp11_file_end): New.
5932         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5933         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5934         %o, like %c but octal.
5935         (pdp11_option_override): New.
5936         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5937         -mdec-asm.
5938         (DATA_SECTION_ASM_OP): Ditto.
5939         (READONLY_DATA_SECTION_ASM_OP): New.
5940         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5941         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5942         (ASM_OUTPUT_LABELREF): Ditto.
5943         (ASM_OUTPUT_DEF): Ditto.
5944         (ASM_OUTPUT_EXTERNAL): New.
5945         (ASM_OUTPUT_SOURCE_FILENAME): New.
5946         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5947         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5948         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5949         %# and %@ format codes.
5950         * config/pdp11/pdp11.opt (mgnu-asm): New.
5951         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5952         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5953         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5955 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5957         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5958         dereferencing path[] beyond its length.
5959         (debug_path): New.
5960         (debug_all_paths): New.
5961         (rewire_first_differing_edge): New.
5962         (adjust_paths_after_duplication): New.
5963         (duplicate_thread_path): Call adjust_paths_after_duplication.
5964         Add new argument.
5965         (thread_through_all_blocks): Add new argument to
5966         duplicate_thread_path.
5968 2018-06-30  Jim Wilson  <jimw@sifive.com>
5970         * config/riscv/predicates.md (p2m1_shift_operand): New.
5971         (high_mask_shift_operand): New.
5972         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5973         pattern using p2m1_shift_operand.
5974         (lshsi3_zero_extend_3+2): New combiner pattern using
5975         high_mask_shift_operand.
5977 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5979         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5980         split out from...
5981         (vect_recog_rotate_pattern): ...here.
5982         (vect_convert_input): Try to insert casts of invariants in the
5983         preheader.
5984         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5985         preheader to be empty.
5987 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5989         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5990         vector type.  If given, install it in the new statement's
5991         STMT_VINFO_VECTYPE.
5992         (vect_element_precision): New function.
5993         (vect_unpromoted_value): New struct.
5994         (vect_unpromoted_value::vect_unpromoted_value): New function.
5995         (vect_unpromoted_value::set_op): Likewise.
5996         (vect_look_through_possible_promotion): Likewise.
5997         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5998         (vect_widened_op_tree, vect_convert_input): Likewise.
5999         (vect_convert_inputs, vect_convert_output): Likewise.
6000         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6001         to handle the optional cast of the multiplication result and
6002         vect_widened_op_tree to detect the widened multiplication itself.
6003         Do not require the input and output of promotion casts to have
6004         the same sign, but base the signedness of the operation on the
6005         input rather than the result.  If the pattern includes two
6006         promotions, check that those promotions have the same sign.
6007         Do not restrict the MULT_EXPR handling to a double-width result;
6008         handle quadruple-width results and wider.  Use vect_convert_inputs
6009         to convert the inputs to the common type.
6010         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
6011         to handle the optional cast of the ABS result.  Also allow a sign
6012         change or a sign extension between the ABS and MINUS.
6013         Use vect_widened_op_tree to detect the widened subtraction and use
6014         vect_convert_inputs to convert the inputs to the common type.
6015         (vect_handle_widen_op_by_const): Delete.
6016         (vect_recog_widen_op_pattern): New function.
6017         (vect_recog_widen_mult_pattern): Use it.
6018         (vect_recog_widen_shift_pattern): Likewise.
6019         (vect_recog_widen_sum_pattern): Use
6020         vect_look_through_possible_promotion to handle the promoted
6021         PLUS_EXPR operand.
6023 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6025         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6026         the containing gimple_seq *.
6027         * gimple-iterator.h (gsi_for_stmt): Declare it.
6028         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6029         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6030         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6031         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6032         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6033         checks.
6034         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6035         split out from...
6036         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
6037         statement being replaced is part of an existing pattern
6038         definition sequence, inserting the new pattern statements before
6039         the original one.
6040         (vect_pattern_recog_1): Don't return a bool.  If the statement
6041         is already part of a pattern, instead apply pattern matching
6042         to the pattern definition statements.  Don't clear the
6043         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6044         (vect_pattern_recog): Don't break after the first match;
6045         continue processing the pattern definition statements instead.
6046         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6048 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6050         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6051         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6052         (vect_recog_widen_sum_pattern): Use it.
6054 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6056         * tree-vect-loop.c (vectorizable_reduction): Assert that the
6057         phi is not a pattern statement and has not been replaced by
6058         a pattern statement.
6059         * tree-vect-patterns.c (type_conversion_p): Don't check
6060         STMT_VINFO_IN_PATTERN_P.
6061         (vect_recog_vector_vector_shift_pattern): Likewise.
6062         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6063         the pattern statement rather than the original statement; check
6064         directly for a WIDEN_MULT_EXPR here.
6065         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6066         vect_is_simple_use to return the pattern statement rather
6067         than the original statement; use is_pattern_stmt_p to check
6068         for such a pattern statement.
6069         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6070         to return the pattern statement rather than the original statement;
6071         don't do the same transformation here.
6072         (vect_is_simple_use): If the defining statement has been replaced
6073         by a pattern statement, return the pattern statement instead.
6074         Remove the corresponding (local) transformation from the vectype
6075         overload.
6077 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6079         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6080         end and default to null.
6081         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6082         (vectorizable_reduction): Update calls accordingly, dropping the
6083         gimple ** argument if the passed-back statement isn't needed.
6084         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6085         (vect_recog_rotate_pattern): Likewise.
6086         (vect_recog_mask_conversion_pattern): Likewise.
6087         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6088         (vect_mask_constant_operand_p): Likewise.
6089         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6090         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6091         (get_group_load_store_type, get_load_store_type): Likewise.
6092         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6093         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6094         (vectorizable_conversion, vectorizable_assignment): Likewise.
6095         (vectorizable_shift, vectorizable_operation): Likewise.
6096         (vectorizable_store, vect_is_simple_cond): Likewise.
6097         (vectorizable_condition, vectorizable_comparison): Likewise.
6098         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6099         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6100         and move it to the end.  Cope with null def_stmt_outs.
6102 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6104         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6106 2018-06-29  Jeff Law  <law@redhat.com>
6108         * config/v850/v850.c (v850_legitimate_address_p): Handle large
6109         displacements for TARGET_V850E2V3 and newer.
6110         (TARGET_LRA_P): Remove.  Defaults to LRA now.
6111         * config/v850/v850.md (sign23byte_load): Remove.
6112         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6113         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6115 2018-06-29  Martin Liska  <mliska@suse.cz>
6117         PR lto/85759
6118         * coverage.c (coverage_init): Mangle full path name.
6119         * doc/invoke.texi: Document the change.
6120         * gcov-io.c (mangle_path): New.
6121         * gcov-io.h (mangle_path): Likewise.
6122         * gcov.c (mangle_name): Use mangle_path for path mangling.
6124 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6126         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6127         if starting source register is not even.
6129 2018-06-29  Martin Liska  <mliska@suse.cz>
6131         PR tree-optimization/86263
6132         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6133         Make edge redirection.
6135 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
6137         * dumpfile.c (dump_loc): Add indentation based on scope depth.
6138         (dump_scope_depth): New variable.
6139         (get_dump_scope_depth): New function.
6140         (dump_begin_scope): New function.
6141         (dump_end_scope): New function.
6142         * dumpfile.h (get_dump_scope_depth): New declaration.
6143         (dump_begin_scope): New declaration.
6144         (dump_end_scope): New declaration.
6145         (class auto_dump_scope): New class.
6146         (AUTO_DUMP_SCOPE): New macro.
6147         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6148         AUTO_DUMP_SCOPE.
6150 2018-06-29  Richard Biener  <rguenther@suse.de>
6152         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6153         compute_all_dependences succeeds.
6154         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6155         exceed --param loop-max-datarefs-for-datadeps.
6157 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
6159         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6161 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
6163         PR target/86348
6164         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6165         alternative 0 in preferred_for_speed attribute.
6167 2018-06-28  Paul Koning  <ni1d@arrl.net>
6169         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6170         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6171         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6172         * config/pdp11/pdp11.md: Correct "length" attribute calculation
6173         for shift insn patterns.
6175 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
6177         * cgraph.c (cgraph_node::get_body): Replace assignments to
6178         "dump_file" with calls to set_dump_file.
6179         * dumpfile.c (alt_dump_file): Make static, and group with...
6180         (alt_flags): ...this definition.
6181         (dumps_are_enabled): New variable.
6182         (refresh_dumps_are_enabled): New function.
6183         (set_dump_file): New function.
6184         (set_alt_dump_file): New function.
6185         (gcc::dump_manager::dump_start): Replace assignments to
6186         "dump_file" and "alt_dump_file" with calls to set_dump_file and
6187         set_alt_dump_file.
6188         (gcc::dump_manager::dump_finish): Likewise.
6189         * dumpfile.h (alt_dump_file): Delete decl.
6190         (dumps_are_enabled): New variable decl.
6191         (set_dump_file): New function decl.
6192         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6193         global.
6194         * tree-nested.c (lower_nested_functions): Replace assignments to
6195         "dump_file" with calls to set_dump_file.
6197 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6199         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6200         goto_locus of each outgoing edge of each basic block.
6202 2018-06-28  Richard Biener  <rguenther@suse.de>
6204         * dwarf2out.c (decl_scope_table): Remove.
6205         (push_decl_scope): Likewise.
6206         (pop_decl_scope): Likewise.
6207         (gen_type_die_for_member): Do not call push/pop_decl_scope.
6208         (gen_struct_or_union_type_die): Likewise.
6209         (gen_tagged_type_die): Likewise.
6210         (dwarf2out_init): Do not initialize decl_scope_table.
6211         (dwarf2out_c_finalize): Do not free it.
6213 2018-06-28  Richard Biener  <rguenther@suse.de>
6215         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6216         deciding whether to not re-use a DIE.
6218 2018-06-28  Richard Biener  <rguenther@suse.de>
6220         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6221         DW_AT_abstract_origin attribute.
6223 2018-06-28  Martin Liska  <mliska@suse.cz>
6225         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6226         Use newly introduced constants.
6227         * tree-switch-conversion.h (struct jump_table_cluster):
6228         Define max_ratio_for_size and max_ratio_for_speed.
6230 2018-06-28  Martin Liska  <mliska@suse.cz>
6232         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6233         Add new checking assert to catch invalid state.
6234         (jump_table_cluster::can_be_handled): Handle single case
6235         clusters.
6236         (jump_table_cluster::is_beneficial): Bail out for such case.
6237         (bit_test_cluster::find_bit_tests):
6238         Add new checking assert to catch invalid state.
6239         (bit_test_cluster::can_be_handled): Handle single case
6240         clusters.
6241         (bit_test_cluster::is_beneficial): Bail out for such case.
6242         (switch_decision_tree::analyze_switch_statement):
6243         Fix comment.
6245 2018-06-28  Martin Liska  <mliska@suse.cz>
6247         * common.opt: Introduce -completion option.
6248         * gcc.c (driver_handle_option): Handle it.
6249         (driver::main): Print completions if completion
6250         is set.
6251         * opt-suggestions.c (option_proposer::get_completions):
6252         New function.
6253         (option_proposer::suggest_completion): Likewise.
6254         (option_proposer::find_param_completions): Likewise.
6255         (verify_autocompletions): Likewise.
6256         (test_completion_valid_options): Likewise.
6257         (test_completion_valid_params): Likewise.
6258         (in_completion_p): Likewise.
6259         (empty_completion_p): Likewise.
6260         (test_completion_partial_match): Likewise.
6261         (test_completion_garbage): Likewise.
6262         (opt_proposer_c_tests): Likewise.
6263         * opt-suggestions.h: Declare new functions.
6264         * opts.c (common_handle_option): Handle OPT__completion_.
6265         * selftest-run-tests.c (selftest::run_tests): Add
6266         opt_proposer_c_tests.
6267         * selftest.c (assert_str_startswith): New.
6268         * selftest.h (assert_str_startswith): Likewise.
6269         (opt_proposer_c_tests): New.
6270         (ASSERT_STR_STARTSWITH): Likewise.
6272 2018-06-28  Martin Liska  <mliska@suse.cz>
6274         * Makefile.in: Add opt-suggestions.o.
6275         * gcc-main.c: Include opt-suggestions.h.
6276         * gcc.c (driver::driver): Likewise.
6277         (driver::~driver): Remove m_option_suggestions.
6278         (driver::build_option_suggestions): Moved to option_proposer.
6279         (driver::suggest_option): Likewise.
6280         (driver::handle_unrecognized_options): Use option_proposer.
6281         * gcc.h (class driver): Add new memver m_option_proposer.
6282         * opt-suggestions.c: New file.
6283         * opt-suggestions.h: New file.
6285 2018-06-28  Martin Liska  <mliska@suse.cz>
6287         * vec.h (class auto_string_vec): New (moved from auto_argvec).
6288         (auto_string_vec::~auto_string_vec): Likewise.
6290 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6292         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6293         prevent_decl_creation_for_types fields up and add reset_location field.
6294         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6295         statement if id->reset_location is true.
6296         (copy_edges_for_bb): Do not set goto_locus on the new edges if
6297         id->reset_location is true.
6298         (copy_phis_for_bb): Force input_location on the arguments if
6299         id->reset_location is true.
6300         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6301         is set on the function to be inlined.
6303 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
6305         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6307 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
6309         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6310         registers for Pmode.
6311         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6312         hard registers for the clobbered pseudo.
6314 2018-06-27  Paul Koning  <ni1d@arrl.net>
6316         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6317         mutually exclusive options.
6318         * config/pdp11/constraints.md (h): New constraint.
6319         (O): Update definition to match shift code generation.
6320         (D): New constraint.
6321         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6322         (CCFP): Remove.
6323         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6324         function.
6325         (output_jump): Change arguments.
6326         (pdp11_fixed_cc_regs): New function.
6327         (pdp11_cc_mode): Ditto.
6328         (pdp11_expand_shift): Ditto.
6329         (pdp11_assemble_shift): Ditto.
6330         (pdp11_small_shift): Ditto.
6331         (pdp11_branch_cost): Remove.
6332         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6333         from output.
6334         (pdp11_register_move_cost): Update for CC registers.
6335         (pdp11_rtx_costs): Add case for LSHIFTRT.
6336         (pdp11_output_jump): Add CCNZ mode conditional branches.
6337         (notice_update_cc_on_set): Remove.
6338         (pdp11_cc_mode): New function.
6339         (simple_memory_operand): Correct pre/post decrement case.
6340         (no_side_effect_operand): New function.
6341         (pdp11_regno_reg_class): Add CC_REGS class.
6342         (pdp11_fixed_cc_regs): New function.
6343         (pdp11_small_shift): New function.
6344         (pdp11_expand_shift): New function to expand shift insns.
6345         (pdp11_assemble_shift): New function to output shifts.
6346         (pdp11_branch_cost): Remove.
6347         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6348         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6349         (WCHAR_TYPE): Ditto.
6350         (PTRDIFF_TYPE): Ditto.
6351         (ADJUST_INSN_LENGTH): New macro.
6352         (FIXED_REGISTERS): Add CC registers.
6353         (CALL_USED_REGISTERS): Ditto.
6354         (reg_class): Ditto.
6355         (REG_CLASS_NAMES): Ditto.
6356         (REG_CLASS_CONTENTS): Ditto.
6357         (SELECT_CC_MODE): Use new function.
6358         (TARGET_FLAGS_REGNUM): New macro.
6359         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6360         (cc0_reg_rtx): Remove.
6361         (CC_STATUS_MDEP): Remove.
6362         (CC_STATUS_MDEFP_INIT): Remove.
6363         (CC_IN_FPU): Remove.
6364         (NOTICE_UPDATE_CC): Remove.
6365         (REGISTER_NAMES): Add CC registers.
6366         (BRANCH_COST): Change to constant 1.
6367         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6368         handling.
6369         * config/pdp11/pdp11.opt (mbcopy): Remove.
6370         (mbcopy-builtin): Remove.
6371         (mbranch-cheap): Remove.
6372         (mbranch-expensive): Remove.
6373         * config/pdp11/predicates.md (expand_shift_operand): Update to
6374         match shift code generation.
6375         (ccnz_operator): New predicate.
6376         * doc/invoke.texi (PDP-11 Options): Remove deleted options
6377         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6378         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
6379         exclusive options.
6380         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
6381         description of O constraint.
6383 2018-06-27  Jeff Law  <law@redhat.com>
6384             Austin Law  <austinklaw@gmail.com>
6386         * config/v850/v850.md (addsi3_set_flags): New pattern.
6387         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6388         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6389         (zero_extendhisi2_v850_set_flags): Likewise.
6390         (zero_extendqisi2_v850_set_flags): Likewise.
6391         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6392         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6393         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6395         * config/v850/v850-protos.h (notice_update_cc): Remove.
6396         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6397         (v850_print_operand): Handle 'D' and "d".
6398         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6399         Add handling of arithmetic/logical operations compared against zero.
6400         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6401         Do not look at v850_compare_op, instead get mode from last argument.
6402         (v850_gen_compare): Remove
6403         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6404         after reload for prologue insns.
6405         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6406         patterns.
6407         (construct_save_jarl): Likewise.
6408         (TARGET_FLAGS_REGNUM): Define.
6409         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6410         (NOTICE_UPDATE_CC): Remove.
6411         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6412         than cc0.  Conditionalize on reload_completed.
6413         (cmpsi_insn, setfcc_insn): Likewise.
6414         (tst1 splitter): Turn into define_and_split which sets the flags
6415         after reload.
6416         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6417         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6418         (cstoresf4, cstoredf4): Clobber the flags.
6419         (cmpsi, cmpsf, cmpdf): Remove expanders.
6420         (setf_insn): Remove pattern.
6421         (addsi3): Turn into define_and_split which clobbers the flags after
6422         reload and a suitable pattern (addsi3_clobber_flags) for use after
6423         reload.
6424         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6425         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6426         (ashrsi3, ashrsi3_v850e2): Likewise.
6427         (bins): Clobber the flags.
6428         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6429         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6430         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6431         (call_value_internal_short, call_value_internal_long): Likewise.
6432         (callt_save_interrupt, callt_return_interrupt): Likewise.
6433         (save_interrupt, return_interrupt): Likewise.
6434         (callt_save_all_interrupt, save_all_interrupt): Likewise.
6435         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6436         (restore_all_interrupt, _restore_all_interrupt): Likewise.
6437         (All FP comparisons): Only allow after reload has completed.
6438         (trfsr): Likewise.
6439         (divh, divhu): Tweak output template.
6440         (branch_z_normal, branch_z_invert): Remove
6441         (branch_nz_normal, branch_nz_invert): Likewise.
6442         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6444         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6445         * config/v850/v850.c (notice_update_cc): Remove.
6446         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
6447         (CC_NO_CARRY): Likewise.
6448         (NOTICE_UPDATE_CC): Define to nothing.
6449         * config/v850/v850.md: Remove block comment on cc0 handling
6450         Remove "cc" attribute from all patterns.  Remove cc_status handling
6451         from all patterns.  Minor formatting fixes.
6453 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6455         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6456         (cortex-a76.cortex-a55): Likewise.
6457         * config/aarch64/aarch64-tune.md: Regenerate.
6458         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6459         cortex-a76.cortex-a55.
6461 2018-06-27  Jeff Law  <law@redhat.com>
6463         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6464         (MULTILIB_DIRNAMES): Similarly.
6466 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
6468         * gimple.h (gimple_return_retbnd): Delete.
6469         (gimple_return_set_retbnd): Likewise.
6470         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6471         gimple_return_set_retbnd.
6472         * gimple-pretty-print.c (dump_gimple_return): Remove call to
6473         gimple_return_retbnd and adjust.
6474         * tree-inline.h (struct copy_body_data): Remove retbnd field.
6475         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6476         Explicitly return NULL in a couple more cases.  Move assertion
6477         on debug statements and remove unreachable code.
6478         (reset_debug_binding): Do not test id->retbnd.
6479         (expand_call_inline): Do not set it.
6481 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6483         * configure.ac: Add --disable-gcov option.
6484         * configure: Regenerate.
6485         * Makefile.in: Honour @enable_gcov@.
6486         * doc/install.texi: Document --disable-gcov.
6488 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6490         * config/arm/arm-cpus.in (cortex-a76): New entry.
6491         (cortex-a76.cortex-a55): Likewise.
6492         * config/arm/arm-tables.opt: Regenerate.
6493         * config/arm/arm-tune.md: Likewise.
6494         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6495         * doc/invoke.texi (ARM Options): Document cortex-a76 and
6496         cortex-a76.cortex-a55.
6498 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
6500         PR target/85769
6501         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6503 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6505         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6506         comment.
6507         (EPILOGUE_USES): Likewise.
6509 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
6511         * tree-inline.c (remap_location): New function extracted from...
6512         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
6513         (copy_phis_for_bb): ...here.  Call remap_location.
6514         (copy_cfg_body): Adjust call to copy_edges_for_bb.
6516 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
6518         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6519         unaligned vsx for 16B memset.
6521 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
6523         PR target/86285
6524         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6525         ieee128_float_type_node to long_double_type_node unless
6526         TARGET_LONG_DOUBLE_128 is set.
6528 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
6530         * cfgloop.c (get_loop_location): Convert return type from
6531         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6532         by implicit construction from rtx_insn *, and using
6533         dump_user_location_t::from_function_decl for the fallback case.
6534         * cfgloop.h (get_loop_location): Convert return type from
6535         location_t to dump_user_location_t.
6536         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6537         dump_printf_loc to pass in a dump_location_t rather than a
6538         location_t, via the gimple stmt.
6539         * coverage.c (get_coverage_counts): Update calls to
6540         dump_printf_loc to pass in dump_location_t rather than a
6541         location_t.
6542         * doc/optinfo.texi (Dump types): Convert example of
6543         dump_printf_loc from taking "locus" to taking "insn".  Update
6544         description of the "_loc" calls to cover dump_location_t.
6545         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6546         "selftest.h".
6547         (dump_user_location_t::dump_user_location_t): New constructors,
6548         from gimple *stmt and rtx_insn *.
6549         (dump_user_location_t::from_function_decl): New function.
6550         (dump_loc): Make static.
6551         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6552         const dump_location_t &.
6553         (dump_generic_expr_loc): Delete.
6554         (dump_printf_loc): Convert param "loc" from location_t to
6555         const dump_location_t &.
6556         (selftest::test_impl_location): New function.
6557         (selftest::dumpfile_c_tests): New function.
6558         * dumpfile.h: Include "profile-count.h".
6559         (class dump_user_location_t): New class.
6560         (struct dump_impl_location_t): New struct.
6561         (class dump_location_t): New class.
6562         (dump_printf_loc): Convert 2nd param from source_location to
6563         const dump_location_t &.
6564         (dump_generic_expr_loc): Delete.
6565         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6566         const dump_location_t &.
6567         * gimple-fold.c (fold_gimple_assign): Update call to
6568         dump_printf_loc to pass in a dump_location_t rather than a
6569         location_t, via the gimple stmt.
6570         (gimple_fold_call): Likewise.
6571         * gimple-loop-interchange.cc
6572         (loop_cand::analyze_iloop_reduction_var): Update for change to
6573         check_reduction_path.
6574         (tree_loop_interchange::interchange): Update for change to
6575         find_loop_location.
6576         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6577         change in return-type of find_loop_location.
6578         (graphite_regenerate_ast_isl): Likewise.
6579         * graphite-optimize-isl.c (optimize_isl): Likewise.
6580         * graphite.c (graphite_transform_loops): Likewise.
6581         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6582         pass in a dump_location_t rather than a location_t, via the
6583         gimple stmt.
6584         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6585         * ipa.c (walk_polymorphic_call_targets): Likewise.
6586         * loop-unroll.c (report_unroll): Convert "locus" param from
6587         location_t to dump_location_t.
6588         (decide_unrolling): Update for change to get_loop_location's
6589         return type.
6590         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6591         location_t to dump_user_location_t.
6592         (grid_find_single_omp_among_assignments_1): Updates calls to
6593         dump_printf_loc to pass in a dump_location_t rather than a
6594         location_t, via the gimple stmt.
6595         (grid_parallel_clauses_gridifiable): Convert "tloc" from
6596         location_t to dump_location_t.  Updates calls to dump_printf_loc
6597         to pass in a dump_location_t rather than a location_t, via the
6598         gimple stmt.
6599         (grid_inner_loop_gridifiable_p): Likewise.
6600         (grid_dist_follows_simple_pattern): Likewise.
6601         (grid_gfor_follows_tiling_pattern): Likewise.
6602         (grid_target_follows_gridifiable_pattern): Likewise.
6603         (grid_attempt_target_gridification): Convert initialization
6604         of local "grid" from memset to zero-initialization; FIXME: does
6605         this require C++11?  Update call to dump_printf_loc to pass in a
6606         optinfo_location rather than a location_t, via the gimple stmt.
6607         * profile.c (read_profile_edge_counts): Updates call to
6608         dump_printf_loc to pass in a dump_location_t rather than a
6609         location_t
6610         (compute_branch_probabilities): Likewise.
6611         * selftest-run-tests.c (selftest::run_tests): Call
6612         dumpfile_c_tests.
6613         * selftest.h (dumpfile_c_tests): New decl.
6614         * tree-loop-distribution.c (pass_loop_distribution::execute):
6615         Update for change in return type of find_loop_location.
6616         * tree-parloops.c (parallelize_loops): Likewise.
6617         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6618         "locus" from location_t to dump_user_location_t.
6619         (canonicalize_loop_induction_variables): Likewise.
6620         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6621         for change in return type of find_loop_location.
6622         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6623         to dump_printf_loc to pass in a dump_location_t rather than a
6624         location_t, via the stmt.
6625         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6626         Likewise.
6627         * tree-vect-loop-manip.c (find_loop_location): Convert return
6628         type from source_location to dump_user_location_t.
6629         (vect_do_peeling): Update for above change.
6630         (vect_loop_versioning): Update for change in type of
6631         vect_location.
6632         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6633         from location_t to dump_user_location_t.
6634         (vect_estimate_min_profitable_iters): Update for change in type
6635         of vect_location.
6636         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6637         location_t to dump_location_t.
6638         (vect_slp_bb): Update for change in type of vect_location.
6639         * tree-vectorizer.c (vect_location): Convert from source_location
6640         to dump_user_location_t.
6641         (try_vectorize_loop_1): Update for change in vect_location's type.
6642         (vectorize_loops): Likewise.
6643         (increase_alignment): Likewise.
6644         * tree-vectorizer.h (vect_location): Convert from source_location
6645         to dump_user_location_t.
6646         (find_loop_location): Convert return type from source_location to
6647         dump_user_location_t.
6648         (check_reduction_path): Convert 1st param from location_t to
6649         dump_user_location_t.
6650         * value-prof.c (check_counter): Update call to dump_printf_loc to
6651         pass in a dump_user_location_t rather than a location_t; update
6652         call to error_at for change in type of "locus".
6653         (check_ic_target): Update call to dump_printf_loc to
6654         pass in a dump_user_location_t rather than a location_t, via the
6655         call_stmt.
6657 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
6659         * config/s390/s390.h (enum processor_flags): Do not use
6660         default tune parameter when -march was specified.
6662 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
6664         PR target/86314
6665         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6666         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6667         operands.
6669 2018-06-26  Richard Biener  <rguenther@suse.de>
6671         PR tree-optimization/86287
6672         PR bootstrap/86316
6673         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6674         (vect_analyze_loop): Initialize n_stmts.
6676 2018-06-26  Richard Biener  <rguenther@suse.de>
6678         PR middle-end/86271
6679         * fold-const.c (fold_convertible_p): Pointer extension
6680         isn't valid.
6682 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
6684         PR debug/86064
6685         * dwarf2out.c (loc_list_has_views): Adjust comments.
6686         (dw_loc_list): Split single cross-partition range with
6687         nonzero locview.
6689 2018-06-25  Jeff Law  <law@redhat.com>
6691         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6692         on -mbig-switch by default.
6694         * config/v850/predicates.md (const_float_1_operand): Fix match_code
6695         test.
6696         (const_float_0_operand): Remove unused predicate.
6697         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6698         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6699         (recipsf2): New expander.  Original pattern now called
6700         (recipsf2_insn).
6701         (recipdf2, recipdf2_insn): Similarly.
6702         (rsqrtsf2, rsqrtsf2_insn): Similarly
6703         (rsqrtdf2, rsqrtdf2_insn): Similarly
6705 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
6707         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6708         Simplify logic for FreeBSD (twice).
6710 2018-06-25  Martin Sebor  <msebor@redhat.com>
6712         PR tree-optimization/86204
6713         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6714         a strnlen result if it's less than the length of the string.
6716 2018-06-25  Martin Sebor  <msebor@redhat.com>
6718         PR tree-optimization/85700
6719         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6720         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6721         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6723 2018-06-25  Martin Sebor  <msebor@redhat.com>
6725         * doc/extend.texi (Zero-length arrays): Update and clarify.
6727 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
6729         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6730         added IEEE/IBM long double multilib support on PowerPC little
6731         endian Linux systems.
6732         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6733         (MULTILIB_DEFAULTS): Likewise.
6734         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6735         Likewise.
6736         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6737         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6738         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6740 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
6742         PR middle-end/86311
6743         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6744         (REORDER_45): Likewise.
6746 2018-06-25  Jeff Law  <law@redhat.com>
6748         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6749         dividend to 32 bits.  Adjust length.
6750         (udivmodhi4): Cleanup output template.  Fix length.
6752 2018-06-25  Carl Love  <cel@us.ibm.com>
6754         * config/rs6000/vsx.md: Change word selector to prefered location.
6756 2018-06-25  Richard Biener  <rguenther@suse.de>
6758         PR tree-optimization/86304
6759         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6760         epilogue-if-converted loops as well.
6762 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
6764         * lto-section-out.c (lto_begin_section): Do not print section
6765         name for noaddr and unnumbered dumps.
6767 2018-06-25  Richard Biener  <rguenther@suse.de>
6769         * tree-vectorizer.h (struct vec_info_shared): New structure
6770         with parts split out from struct vec_info and loop_nest from
6771         struct _loop_vec_info.
6772         (struct vec_info): Adjust accordingly.
6773         (struct _loop_vec_info): Likewise.
6774         (LOOP_VINFO_LOOP_NEST): Adjust.
6775         (LOOP_VINFO_DATAREFS): Likewise.
6776         (LOOP_VINFO_DDRS): Likewise.
6777         (struct _bb_vec_info): Likewise.
6778         (BB_VINFO_DATAREFS): Likewise.
6779         (BB_VINFO_DDRS): Likewise.
6780         (struct _stmt_vec_info): Add dr_aux member.
6781         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6782         (DR_MISALIGNMENT_UNINITIALIZED): New.
6783         (set_dr_misalignment): Adjust.
6784         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6785         (vect_analyze_loop): Adjust prototype.
6786         (vect_analyze_loop_form): Likewise.
6787         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6788         Compute dependences lazily.
6789         (vect_record_base_alignments): Use shared datarefs/ddrs.
6790         (vect_verify_datarefs_alignment): Likewise.
6791         (vect_analyze_data_refs_alignment): Likewise.
6792         (vect_analyze_data_ref_accesses): Likewise.
6793         (vect_analyze_data_refs): Likewise.
6794         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6795         constructor parameter for shared part.
6796         (vect_analyze_loop_form): Pass in shared part and adjust.
6797         (vect_analyze_loop_2): Pass in storage for the number of
6798         stmts.  Move loop nest finding to the caller.  Compute
6799         datarefs lazily.
6800         (vect_analyze_loop): Pass in shared part.
6801         (vect_transform_loop): Verify shared datarefs are unchanged.
6802         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6803         constructor parameter for shared part.
6804         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6805         (vect_slp_bb): Verify shared datarefs are unchanged before
6806         transform.
6807         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6808         change.
6809         (new_stmt_vec_info): Initialize DR_AUX misalignment to
6810         DR_MISALIGNMENT_UNINITIALIZED.
6811         * tree-vectorizer.c (vec_info::vec_info): Add constructor
6812         parameter for shared part.
6813         (vec_info::~vec_info): Adjust.
6814         (vec_info_shared::vec_info_shared): New.
6815         (vec_info_shared::~vec_info_shared): Likewise.
6816         (vec_info_shared::save_datarefs): Likewise.
6817         (vec_info_shared::check_datarefs): Likewise.
6818         (try_vectorize_loop_1): Construct shared part live for analyses
6819         of a single loop for multiple vector sizes.
6820         * tree-parloops.c (gather_scalar_reductions): Adjust.
6822 2018-06-25  Richard Biener  <rguenther@suse.de>
6824         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6825         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6826         (vect_analyze_data_refs): Remove similar code from here and
6827         simplify accordingly.
6829 2018-06-25  Richard Biener  <rguenther@suse.de>
6831         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6832         for reverse storage order accesses rather than asserting
6833         they cannot happen here.
6835 2018-06-25  Tom de Vries  <tdevries@suse.de>
6837         PR debug/86257
6838         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6839         Use data16 instead of .byte for insn prefix.
6841 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6843         PR C++/86082
6844         * parser.c (make_char_string_pack): Pass this literal chars
6845         through cpp_interpret_string.
6846         (cp_parser_userdef_numeric_literal): Check the result of
6847         make_char_string_pack.
6849 2018-06-24  Maya Rashish  <coypu@sdf.org>
6851         * ginclude/stddef.h: Simplify conditions around avoiding
6852         re-definition of __size_t.
6854 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6856         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6857         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6859 2018-06-22  Maya Rashish  <coypu@sdf.org>
6861         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6862         made to OpenBSD and NetBSD through the years.
6864 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6866         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6867         behavior of vec_pack (vector double, vector double) to match
6868         behavior of vec_float2 (vector double, vector double).
6870 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6872         * gimplify.c (gimplify_function_tree): Prevent creation
6873         of a trampoline for the address of the current function
6874         passed to entry/exit instrumentation hooks.
6876 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6878         PR target/86222
6879         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6880         correctly.
6882 2018-06-22  Martin Liska  <mliska@suse.cz>
6884         PR tree-optimization/86263
6885         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6886         Bail out if is_enabled is false.
6887         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6888         New declaration.
6889         (jump_table_cluster::is_enabled): New function.
6891 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6893         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6894         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6895         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6896         (lto_input_ts_binfo_tree_pointers): Likewise.
6897         * tree-streamer-out.c (streamer_write_tree_bitfields,
6898         write_ts_binfo_tree_pointers): Likewise.
6899         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6901 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6903         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6905 2018-06-22  Martin Liska  <mliska@suse.cz>
6907         * symbol-summary.h (get): Make it pure and inline move
6908         functionality from ::get function.
6909         (get): Remove and inline into ::get and ::get_create.
6910         (get_create): Move code from ::get function.
6912 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6914         PR target/85994
6915         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6916         -x assembler-with-cpp.
6918 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6920         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6921         _FILE_OFFSET_BITS=64 for C++.
6923 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6925         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6926         conversion insn that shows up when pr85657-3.c is compiled using
6927         IEEE 128-bit long double.
6928         (neg<mode>2_internal): Use the correct mode to check whether the
6929         mode is IBM extended.
6930         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6931         multiply and divide external functions from being created more
6932         than once.
6934 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6936         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6937         functions.
6938         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6939         the edge can be forwarded.
6940         (cfg_layout_merge_blocks): Likewise.
6942 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6944         * except.c (finish_eh_generation): Commit edge insertions only after
6945         the EH edges have been redirected from post-landing to landing pads.
6947 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6949         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6950         create_tmp_var_for to create the FRAME decl.
6951         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6953 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6955         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6956         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6957         debug statement when resetting its value.
6958         (expand_call_inline): Copy the locus of the call onto the assignment
6959         of the return value, if any.  Use local variable in more cases.
6961 2018-06-21  Martin Liska  <mliska@suse.cz>
6963         * ipa-pure-const.c (propagate_nothrow): Use
6964         funct_state_summaries->get.
6965         (dump_malloc_lattice): Likewise.
6966         (propagate_malloc): Likewise.
6968 2018-06-21  Richard Biener  <rguenther@suse.de>
6970         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6971         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6972         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6973         comment.
6974         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6975         BLOCK_ABSTRACT_ORIGIN unconditionally.
6977 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6979         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6980         deleting it.
6981         * ipa-reference.c (ipa_reference_c_finalize): Delete
6982         ipa_ref_opt_sum_summaries and set it to NULL.
6984 2018-06-21  Tom de Vries  <tdevries@suse.de>
6986         PR tree-optimization/85859
6987         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6988         test with comment from bb_no_side_effects_p.
6990 2018-06-21  Richard Biener  <rguenther@suse.de>
6992         PR tree-optimization/86232
6993         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6994         max for constant niter.
6996 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6998         * config/aarch64/aarch64-simd.md
6999         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7001 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7003         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7004         Make opernads of the unspec commutative.
7006 2018-06-21  Richard Biener  <rguenther@suse.de>
7008         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7009         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7010         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7011         (vect_analyze_data_ref_dependence): Re-order checks to deal with
7012         NULL DR_STEP.
7013         (vect_record_base_alignments): Do not record base alignment
7014         for gathers or scatters.
7015         (vect_compute_data_ref_alignment): Drop return value that is always
7016         true.  Bail out early for gathers or scatters.
7017         (vect_enhance_data_refs_alignment): Bail out early for gathers
7018         or scatters.
7019         (vect_find_same_alignment_drs): Likewise.
7020         (vect_analyze_data_refs_alignment): Remove dead code.
7021         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7022         (vect_analyze_data_refs): For possible gathers or scatters do
7023         not create an alternate DR, just check their possible validity
7024         and mark them.  Adjust DECL_NONALIASED handling to not rely
7025         on DR_BASE_ADDRESS.
7026         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7027         update inits of gathers or scatters.
7028         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7029         Also copy gather/scatter flag to pattern vinfo.
7031 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7033         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7034         behavior of vec_packsu (vector unsigned long long, vector unsigned
7035         long long) to match behavior of vec_packs with same signature.
7037 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
7038             Thomas Schwinge <thomas@codesourcery.com>
7039             Cesar Philippidis  <cesar@codesourcery.com>
7041         * gimplify.c (gimplify_scan_omp_clauses): Add support for
7042         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7043         (gimplify_adjust_omp_clauses): Likewise.
7044         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7045         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7046         (gimplify_omp_target_update): Update handling of acc update and
7047         enter/exit data.
7048         * omp-low.c (install_var_field): Remove unused parameter
7049         base_pointers_restrict.
7050         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7051         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7052         FINALIZE}
7053         (omp_target_base_pointers_restrict_p): Delete.
7054         (scan_omp_target): Update call to scan_sharing_clauses.
7055         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7056         FINALIZE}.
7057         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7058         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7059         (convert_local_omp_clauses): Likewise.
7060         * tree-pretty-print.c (dump_omp_clause): Likewise.
7061         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
7062         FINALIZE}.
7063         (omp_clause_code_name): Likewise.
7065 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7067         PR debug/86194
7068         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7069         be narrowed.
7071         PR tree-optimization/86231
7072         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
7073         anti-range don't overwrite *vr0min before using it to compute *vr0max.
7075 2018-06-20  Tom de Vries  <tdevries@suse.de>
7077         PR tree-optimization/86097
7078         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7079         iv type if signedness of iv type is not the same as that of *nit.
7081 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7083         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
7084         EDGE_EH edges, verify they are all EDGE_EH.
7086 2018-06-20  Maya Rashish  <coypu@sdf.org>
7088         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7090 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7092         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7093         * config/aarch64/aarch64.c (xgene1_tunings): Add
7094         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7095         (aarch64_mode_valid_for_sched_fusion_p):
7096         Allow 16-byte modes.
7097         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7098         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7099         128-bit modes.
7100         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7101         New pattern.
7102         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7103         * config/aarch64/iterators.md (VQ2): New mode iterator.
7105 2018-06-20  Martin Liska  <mliska@suse.cz>
7107         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7108         Change default ratio from 10 to 8.
7110 2018-06-20  Martin Liska  <mliska@suse.cz>
7112         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7113         New.
7114         (bit_test_cluster::find_bit_tests): Likewise.
7115         (switch_decision_tree::analyze_switch_statement): Find clusters.
7116         * tree-switch-conversion.h (struct jump_table_cluster): Document
7117         hierarchy.
7119 2018-06-20  Martin Liska  <mliska@suse.cz>
7121         * tree-switch-conversion.c (switch_conversion::collect):
7122         Record m_uniq property.
7123         (switch_conversion::expand): Bail out for special conditions.
7124         (group_cluster::~group_cluster): New.
7125         (group_cluster::group_cluster): Likewise.
7126         (group_cluster::dump): Likewise.
7127         (jump_table_cluster::emit): New.
7128         (switch_decision_tree::fix_phi_operands_for_edges): New.
7129         (struct case_node): Remove struct.
7130         (jump_table_cluster::can_be_handled): New.
7131         (case_values_threshold): Moved to header.
7132         (reset_out_edges_aux): Likewise.
7133         (jump_table_cluster::is_beneficial): New.
7134         (bit_test_cluster::can_be_handled): Likewise.
7135         (add_case_node): Remove.
7136         (bit_test_cluster::is_beneficial): New.
7137         (case_bit_test::cmp): New.
7138         (bit_test_cluster::emit): New.
7139         (expand_switch_as_decision_tree_p): Remove.
7140         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7141         (fix_phi_operands_for_edge): Likewise.
7142         (switch_decision_tree::analyze_switch_statement): New.
7143         (compute_cases_per_edge): Move ...
7144         (switch_decision_tree::compute_cases_per_edge): ... here.
7145         (try_switch_expansion): Likewise.
7146         (switch_decision_tree::try_switch_expansion): Likewise.
7147         (record_phi_operand_mapping): Likewise.
7148         (switch_decision_tree::record_phi_operand_mapping): Likewise.
7149         (emit_case_decision_tree): Likewise.
7150         (switch_decision_tree::emit): Likewise.
7151         (balance_case_nodes): Likewise.
7152         (switch_decision_tree::balance_case_nodes): Likewise.
7153         (dump_case_nodes): Likewise.
7154         (switch_decision_tree::dump_case_nodes): Likewise.
7155         (emit_jump): Likewise.
7156         (switch_decision_tree::emit_jump): Likewise.
7157         (emit_cmp_and_jump_insns): Likewise.
7158         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7159         (emit_case_nodes): Likewise.
7160         (switch_decision_tree::emit_case_nodes): Likewise.
7161         (conditional_probability): Remove.
7162         * tree-switch-conversion.h (enum cluster_type): New.
7163         (PRINT_CASE): New.
7164         (struct cluster): Likewise.
7165         (cluster::cluster): Likewise.
7166         (struct simple_cluster): Likewise.
7167         (simple_cluster::simple_cluster): Likewise.
7168         (struct group_cluster): Likewise.
7169         (struct jump_table_cluster): Likewise.
7170         (struct bit_test_cluster): Likewise.
7171         (struct min_cluster_item): Likewise.
7172         (struct case_tree_node): Likewise.
7173         (case_tree_node::case_tree_node): Likewise.
7174         (jump_table_cluster::case_values_threshold): Likewise.
7175         (struct case_bit_test): Likewise.
7176         (struct switch_decision_tree): Likewise.
7177         (struct switch_conversion): Likewise.
7178         (switch_decision_tree::reset_out_edges_aux): Likewise.
7180 2018-06-20  Martin Liska  <mliska@suse.cz>
7182         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7183         (hoist_edge_and_branch_if_true): Likewise.
7184         (expand_switch_using_bit_tests_p): Likewise.
7185         (struct case_bit_test): Likewise.
7186         (case_bit_test_cmp): Likewise.
7187         (emit_case_bit_tests): Likewise.
7188         (switch_conversion::switch_conversion): New class.
7189         (struct switch_conv_info): Remove old struct.
7190         (collect_switch_conv_info): More to ...
7191         (switch_conversion::collect): ... this.
7192         (check_range): Likewise.
7193         (switch_conversion::check_range): Likewise.
7194         (check_all_empty_except_final): Likewise.
7195         (switch_conversion::check_all_empty_except_final): Likewise.
7196         (check_final_bb): Likewise.
7197         (switch_conversion::check_final_bb): Likewise.
7198         (create_temp_arrays): Likewise.
7199         (switch_conversion::create_temp_arrays): Likewise.
7200         (free_temp_arrays): Likewise.
7201         (gather_default_values): Likewise.
7202         (switch_conversion::gather_default_values): Likewise.
7203         (build_constructors): Likewise.
7204         (switch_conversion::build_constructors): Likewise.
7205         (constructor_contains_same_values_p): Likewise.
7206         (switch_conversion::contains_same_values_p): Likewise.
7207         (array_value_type): Likewise.
7208         (switch_conversion::array_value_type): Likewise.
7209         (build_one_array): Likewise.
7210         (switch_conversion::build_one_array): Likewise.
7211         (build_arrays): Likewise.
7212         (switch_conversion::build_arrays): Likewise.
7213         (gen_def_assigns): Likewise.
7214         (switch_conversion::gen_def_assigns): Likewise.
7215         (prune_bbs): Likewise.
7216         (switch_conversion::prune_bbs): Likewise.
7217         (fix_phi_nodes): Likewise.
7218         (switch_conversion::fix_phi_nodes): Likewise.
7219         (gen_inbound_check): Likewise.
7220         (switch_conversion::gen_inbound_check): Likewise.
7221         (process_switch): Use the newly created class.
7222         (switch_conversion::expand): New.
7223         (switch_conversion::~switch_conversion): New.
7224         * tree-switch-conversion.h: New file.
7226 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7228         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7229         tree-vect-patterns.c.
7230         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7231         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
7232         (vect_recog_sad_pattern): Likewise.
7233         (vect_recog_widen_sum_pattern): Likewise.
7234         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
7235         (vect_recog_widen_shift_pattern): Remove the type_in argument.
7236         (vect_recog_rotate_pattern): Likewise.
7237         (vect_recog_mult_pattern): Likewise.
7238         (vect_recog_vector_vector_shift_pattern): Likewise.
7239         (vect_recog_divmod_pattern): Likewise.
7240         (vect_recog_mixed_size_cond_pattern): Likewise.
7241         (vect_recog_bool_pattern): Likewise.
7242         (vect_recog_mask_conversion_pattern): Likewise.
7243         (vect_try_gather_scatter_pattern): Likewise.
7244         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
7245         (vect_recog_over_widening_pattern): Likewise.
7246         (vect_recog_gather_scatter_pattern): Likewise.
7247         (vect_recog_func_ptr): Move from tree-vectorizer.h
7248         (vect_vect_recog_func_ptrs): Move further down the file.
7249         (vect_recog_func): Likewise.  Remove the third argument.
7250         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7251         (vect_pattern_recog_1): Expect the pattern function to do any
7252         necessary target tests.  Also expect it to provide a vector type.
7253         Remove the type_in handling.
7255 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7257         * tree-vect-patterns.c (vect_pattern_detected): New function.
7258         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7259         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7260         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7261         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7262         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7263         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7264         (vect_recog_mask_conversion_pattern)
7265         (vect_try_gather_scatter_pattern): Likewise.
7267 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7269         * tree-vect-patterns.c (vect_get_internal_def): New function.
7270         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7271         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7272         (search_type_for_mask_1): Use it.
7274 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7276         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7277         redundant WIDEN_SUM_EXPR handling.
7278         (vect_recog_sad_pattern): Likewise.
7280 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7282         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7283         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7284         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7285         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7286         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7288 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7290         * tree-vect-stmts.c (vectorizable_call): Make sure that we
7291         use the stmt_vec_info of the original bb statement for the
7292         new zero assignment, even if the call is part of a pattern.
7294 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7296         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7297         that the sequence is attached to the original statement rather
7298         than the pattern statement.
7299         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7300         PATTERN_DEF_SEQ from the original statement rather than
7301         the main pattern statement.
7302         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7303         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7304         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7306 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7308         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7309         definition statements before the early exit for statements that aren't
7310         live or relevant.
7311         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7312         split out from...
7313         (vect_transform_loop): ...here.  Process pattern definition
7314         statements without first checking whether the main pattern
7315         statement is live or relevant.
7317 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7319         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7320         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7322 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
7324         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7325         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7326         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7327         (expand_block_compare): Change select_block_compare_mode call.
7328         (expand_strncmp_align_check): Use new functions, fix comment.
7329         (emit_final_str_compare_gpr): New function.
7330         (expand_strn_compare): Refactor and clean up code.
7331         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7333 2018-06-19  Tony Reix  <tony.reix@atos.com>
7334             Damien Bergamini  <damien.bergamini@atos.com>
7335             David Edelsohn  <dje.gcc@gmail.com>
7337         * collect2.c (static_obj): New variable.
7338         (static_libs): New variable.
7339         (is_in_list): Uncomment declaration.
7340         (main): Track AIX libraries linked statically.
7341         (is_in_list): Uncomment definition.
7342         (scan_prog_file): Don't add AIX shared libraries initializer
7343         to constructor list if linking statically.
7345 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
7347         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7348         constant.
7349         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7351 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
7353         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7354         blocks.
7356 2018-06-19  Martin Liska  <mliska@suse.cz>
7358         * config/i386/i386.c (ix86_can_inline_p): Do not use
7359         ipa_fn_summaries::get_create.
7360         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7361         get.
7362         (devirtualization_time_bonus): Likewise.
7363         (ipcp_propagate_stage): Likewise.
7364         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7365         (edge_set_predicate): Likewise.
7366         (evaluate_conditions_for_known_args): Likewise.
7367         (evaluate_properties_for_edge): Likewise.
7368         (ipa_call_summary::reset): Tranform to ...
7369         (ipa_call_summary::~ipa_call_summary): ... this.
7370         (ipa_fn_summary::reset): Transform to ...
7371         (ipa_fn_summary::~ipa_fn_summary): ... this.
7372         (ipa_fn_summary_t::remove): Rename to ...
7373         (ipa_fn_summary_t::remove_callees): ... this.
7374         (ipa_fn_summary_t::duplicate): Use placement new
7375         instead of memory copy.
7376         (ipa_call_summary_t::duplicate): Likewise.
7377         (ipa_call_summary_t::remove): Remove.
7378         (dump_ipa_call_summary): Change get_create to get.
7379         (ipa_dump_fn_summary): Dump only when summary exists.
7380         (analyze_function_body): Use symbol_summary::get instead
7381         of get_create.
7382         (compute_fn_summary): Likewise.
7383         (estimate_edge_devirt_benefit): Likewise.
7384         (estimate_edge_size_and_time): Likewise.
7385         (inline_update_callee_summaries): Likewise.
7386         (remap_edge_change_prob): Likewise.
7387         (remap_edge_summaries): Likewise.
7388         (ipa_merge_fn_summary_after_inlining): Likewise.
7389         (write_ipa_call_summary): Likewise.
7390         (ipa_fn_summary_write): Likewise.
7391         (ipa_free_fn_summary): Likewise.
7392         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7393         (struct ipa_call_summary): Likewise.
7394         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7395         of get_create.
7396         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7397         (estimate_size_after_inlining): Likewise.
7398         (estimate_growth): Likewise.
7399         (growth_likely_positive): Likewise.
7400         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7401         (inline_call): Likewise.
7402         * ipa-inline.c (caller_growth_limits): Likewise.
7403         (can_inline_edge_p): Likewise.
7404         (can_inline_edge_by_limits_p): Likewise.
7405         (compute_uninlined_call_time): Likewise.
7406         (compute_inlined_call_time): Likewise.
7407         (want_inline_small_function_p): Likewise.
7408         (edge_badness): Likewise.
7409         (update_caller_keys): Likewise.
7410         (update_callee_keys): Likewise.
7411         (inline_small_functions): Likewise.
7412         (inline_to_all_callers_1): Likewise.
7413         (dump_overall_stats): Likewise.
7414         (early_inline_small_functions): Likewise.
7415         (early_inliner): Likewise.
7416         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7417         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7418         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7419         * ipa-split.c (execute_split_functions): Likewise.
7420         * symbol-summary.h: Likewise.
7421         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7423 2018-06-19  Richard Biener  <rguenther@suse.de>
7425         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7426         (vectorize_loops): ... here.  Fix dbgcnt handling.
7427         (try_vectorize_loop): Wrap try_vectorize_loop_1.
7429 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
7431         PR target/86197
7432         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7433         ieee128 argument takes up only one (vector) register, not two (floating
7434         point) registers.
7436 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7438         * gimplify.c (gimplify_init_constructor): Really never clear for an
7439         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7441 2018-06-19  Richard Biener  <rguenther@suse.de>
7443         PR tree-optimization/86179
7444         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7445         after failed recognition.
7447 2018-06-18  Martin Sebor  <msebor@redhat.com>
7449         PR middle-end/85602
7450         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7451         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7452         Handle integer subtraction.
7453         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7454         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7456 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7458         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7459         param from rtx to rtx_insn *.
7460         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7461         param.
7462         (frv_ifcvt_modify_insn): Likwise.
7463         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7464         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
7465         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7466         as_a <rtx_insn *> cast to local "unprotected_region" once
7467         it's been established that it's not NULL or pc_rtx.
7468         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7469         param "sethi" from rtx to rtx_insn *.
7470         (nds32_group_float_insns): Likewise for param "insn".
7471         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7472         param.
7473         (vax_output_int_subtract): Likewise.
7474         * config/vax/vax.c (vax_output_int_add): Likewise for param
7475         "insn".
7476         (vax_output_int_subtract): Likewise.
7477         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7478         (emit_pattern_after): Likewise for param "after".
7479         (emit_insn_after): Likewise.
7480         (emit_jump_insn_after): Likewise.
7481         (emit_call_insn_after): Likewise.
7482         (emit_debug_insn_after): Likewise.
7483         (emit_pattern_before): Likewise for param "before".
7484         (emit_insn_before): Likewise.
7485         (emit_jump_insn_before): Likewise.
7486         * final.c (get_insn_template): Likewise for param "insn", removing
7487         a cast.
7488         * output.h (get_insn_template): Likewise for 2nd param.
7489         * rtl.h (emit_insn_before): Likewise.
7490         (emit_jump_insn_before): Likewise.
7491         (emit_debug_insn_before_noloc): Likewise.
7492         (emit_insn_after): Likewise.
7493         (emit_jump_insn_after): Likewise.
7494         (emit_call_insn_after): Likewise.
7495         (emit_debug_insn_after): Likewise.
7496         (set_insn_deleted): Likewise for param.
7498 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
7500         PR target/85358
7501         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7502         floating point modes, so that IFmode is numerically greater than
7503         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7504         to declare the ordering.  This prevents IFmode from being
7505         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7506         machine.  Include rs6000-modes.h to share the fractional values
7507         between genmodes* and the rest of the compiler.
7508         (IFmode): Likewise.
7509         (KFmode): Likewise.
7510         (TFmode): Likewise.
7511         * config/rs6000/rs6000-modes.h: New file.
7512         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7513         meaning of rs6000_long_double_size so that 126..128 selects an
7514         appropriate 128-bit floating point type.
7515         (rs6000_option_override_internal): Likewise.
7516         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7517         (TARGET_LONG_DOUBLE_128): Change the meaning of
7518         rs6000_long_double_size so that 126..128 selects an appropriate
7519         128-bit floating point type.
7520         (LONG_DOUBLE_TYPE_SIZE): Update comment.
7521         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7522         source and destination to match the standard usage.
7523         (truncifkf2): Likewise.
7524         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7525         ISA 2.07 to use an explicit clobber, instead of passing in a
7526         temporary.
7527         (copysign<mode>3_soft): Likewise.
7529 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7531         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7532         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7533         (vect_slp_analyze_instance_dependence): Likewise.
7534         (vect_enhance_data_refs_alignment): Likewise.
7535         (vect_analyze_data_refs_alignment): Likewise.
7536         (vect_slp_analyze_and_verify_instance_alignment
7537         (vect_analyze_data_ref_accesses): Likewise.
7538         (vect_prune_runtime_alias_test_list): Likewise.
7539         (vect_analyze_data_refs): Likewise.
7540         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7541         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7542         (vect_analyze_scalar_cycles_1): Likewise.
7543         (vect_get_loop_niters): Likewise.
7544         (vect_analyze_loop_form_1): Likewise.
7545         (vect_update_vf_for_slp): Likewise.
7546         (vect_analyze_loop_operations): Likewise.
7547         (vect_analyze_loop): Likewise.
7548         (vectorizable_induction): Likewise.
7549         (vect_transform_loop): Likewise.
7550         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7551         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7552         (vect_make_slp_decision): Likewise.
7553         (vect_detect_hybrid_slp): Likewise.
7554         (vect_slp_analyze_operations): Likewise.
7555         (vect_slp_bb): Likewise.
7556         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7557         (vectorizable_bswap): Likewise.
7558         (vectorizable_call): Likewise.
7559         (vectorizable_simd_clone_call): Likewise.
7560         (vectorizable_conversion): Likewise.
7561         (vectorizable_assignment): Likewise.
7562         (vectorizable_shift): Likewise.
7563         (vectorizable_operation): Likewise.
7564         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7566 2018-06-18  Martin Sebor  <msebor@redhat.com>
7568         PR tree-optimization/81384
7569         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7570         * builtins.c (expand_builtin_strnlen): New function.
7571         (expand_builtin): Call it.
7572         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7573         * builtins.def (BUILT_IN_STRNLEN): New.
7574         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7575         Warn for bounds in excess of maximum object size.
7576         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7577         single-value ranges.  Handle strnlen.
7578         (handle_builtin_strlen): Handle strnlen.
7579         (strlen_check_and_optimize_stmt): Same.
7580         * doc/extend.texi (Other Builtins): Document strnlen.
7582 2018-06-18  Maya Rashish  <coypu@sdf.org>
7584         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7585         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7586         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7588         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7589         here to ...
7590         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7592 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7594         * tree.c (escaped_string::escape): Replace cast to char * by
7595         const_cast<char *> (unescaped).
7597 2018-06-18  Nick Clifton  <nickc@redhat.com>
7599         PR 84195
7600         * tree.c (escaped_string): New class.  Converts an unescaped
7601         string into its escaped equivalent.
7602         (warn_deprecated_use): Use the new class to convert the
7603         deprecation message, if present.
7604         (test_escaped_strings): New self test.
7605         (test_c_tests): Add test_escaped_strings.
7606         * doc/extend.texi (deprecated): Add a note that the
7607         deprecation message is affected by the -fmessage-length
7608         option, and that control characters will be escaped.
7609         (#pragma GCC error): Document this pragma.
7610         (#pragma GCC warning): Likewise.
7611         * doc/invoke.texi (-fmessage-length): Document this option's
7612         effect on the #warning and #error preprocessor directives and
7613         the deprecated attribute.
7615 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7617         * tree.c (decl_value_expr_lookup): Revert latest change.
7618         (decl_value_expr_insert): Likewise.
7620 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
7622         * gimplify.c (nonlocal_vlas): Delete.
7623         (nonlocal_vla_vars): Likewise.
7624         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7625         referenced VLAs.
7626         (gimplify_body): Do not create and destroy nonlocal_vlas.
7627         * tree-nested.c: Include diagnostic.h.
7628         (use_pointer_in_frame): Tweak.
7629         (lookup_field_for_decl): Add assertion and declare the transformation.
7630         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7631         internal error when the reference is in a wrong context.  Do not
7632         create a debug decl by default.
7633         (note_nonlocal_block_vlas): Delete.
7634         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7635         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
7636         create a debug decl by default.
7637         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7638         call is in a wrong context.
7639         (fixup_vla_decls): New function.
7640         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
7641         debug variables were created.
7642         * tree.c (decl_value_expr_lookup): Add checking assertion.
7643         (decl_value_expr_insert): Likewise.
7645 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
7647         PR middle-end/82479
7648         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7649         * tree-scalar-evolution.c (interpret_expr): Likewise.
7650         (expression_expensive_p): Likewise.
7651         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7652         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7653         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7654         (ssa_defined_by_minus_one_stmt_p): New.
7656 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
7658         PR middle-end/64946
7659         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7660         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7661         * dojump.c (do_jump): Likewise.
7662         * expr.c (expand_expr_real_2): Check operand type's sign.
7663         * fold-const.c (const_unop): Handle ABSU_EXPR.
7664         (fold_abs_const): Likewise.
7665         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7666         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7667         (strip_sign_op_1): Likesise.
7668         * match.pd: Add new pattern to generate ABSU_EXPR.
7669         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7670         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7671         * tree-eh.c (operation_could_trap_helper_p): Likewise.
7672         * tree-inline.c (estimate_operator_cost): Likewise.
7673         * tree-pretty-print.c (dump_generic_node): Likewise.
7674         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7675         * tree.def (ABSU_EXPR): New.
7677 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
7679         PR middle-end/86095
7680         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7681         documented as preserved for backward compatibility only.
7682         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7684         PR rtl-optimization/86108
7685         * bb-reorder.c (create_forwarder_block): Renamed to ...
7686         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
7687         jump from new landing pad to the second part.
7688         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7689         Adjust callers.
7691 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
7693         PR middle-end/85878
7694         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7695         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7696         Only call store_expr for halves if the mode is the same.
7698         PR middle-end/86123
7699         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7700         Fix up comment formatting.
7702 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7704         * typed-splay-tree.h (typed_splay_tree::remove): New function.
7705         (typed_splay_tree::closure,
7706         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7707         (typed_splay_tree::typed_splay_tree,
7708         typed_splay_tree::operator =): Declared private.
7709         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7710         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7711         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7712         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7713         typed_splay_tree::splay_tree_splay,
7714         typed_splay_tree::splay_tree_foreach_helper,
7715         typed_splay_tree::splay_tree_insert,
7716         typed_splay_tree::splay_tree_remove,
7717         typed_splay_tree::splay_tree_lookup,
7718         typed_splay_tree::splay_tree_predecessor,
7719         typed_splay_tree::splay_tree_successor,
7720         typed_splay_tree::splay_tree_min,
7721         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7722         (typed_splay_tree::root, typed_splay_tree::comp,
7723         typed_splay_tree::delete_key,
7724         typed_splay_tree::delete_value): New data members.
7725         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7726         typed_splay_tree::remove.
7728 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
7730         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7731         -mginv and -mno-ginv to the assembler.
7732         * config/mips/mips.opt (-mcrc): New option.
7733         (-mginv): Likewise.
7734         * doc/invoke.text (-mcrc): Document.
7735         (-mginv): Likewise.
7737 2018-06-15  Nick Clifton  <nickc@redhat.com>
7739         PR 84195
7740         * tree.c (escaped_string): New class.  Converts an unescaped
7741         string into its escaped equivalent.
7742         (warn_deprecated_use): Use the new class to convert the
7743         deprecation message, if present.
7744         (test_escaped_strings): New self test.
7745         (test_c_tests): Add test_escaped_strings.
7746         * doc/extend.texi (deprecated): Add a note that the
7747         deprecation message is affected by the -fmessage-length
7748         option, and that control characters will be escaped.
7749         (#pragma GCC error): Document this pragma.
7750         (#pragma GCC warning): Likewise.
7751         * doc/invoke.texi (-fmessage-length): Document this option's
7752         effect on the #warning and #error preprocessor directives and
7753         the deprecated attribute.
7755 2018-06-15  Richard Biener  <rguenther@suse.de>
7757         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7758         here, also noting vector size used.
7759         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
7760         size used in MSG_OPTIMIZED_LOCATIONS dump.
7761         (pass_slp_vectorize::execute): Adjust.
7763 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
7765         PR target/85968
7766         * config/arc/arc.c (arc_return_address_register): Fix
7767         if-condition.
7769 2018-06-15  Richard Biener  <rguenther@suse.de>
7771         PR middle-end/86159
7772         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7773         leave useless conversion stripping to force_gimple_operand_gsi.
7774         (gimplify_build2): Likewise.
7775         (gimplify_build1): Likewise.
7777 2018-06-15  Richard Biener  <rguenther@suse.de>
7779         PR middle-end/86076
7780         * tree-cfg.c (move_stmt_op): unshare invariant addresses
7781         before adjusting their block.
7783 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7785         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7786         multilibs for *-*-rtems*.
7787         * config/riscv/t-rtems: New file.
7789 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
7791         PR middle-end/86122
7792         * match.pd ((A +- CST1) +- CST2): Punt if last resort
7793         unsigned_type_for returns NULL.
7795         PR target/85945
7796         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7797         subregs of multi-word pseudos unless the float mode has word size.
7799 2018-06-14  Richard Biener  <rguenther@suse.de>
7801         PR middle-end/86139
7802         * tree-vect-generic.c (build_word_mode_vector_type): Remove
7803         duplicate and harmful type_hash_canon.
7804         * tree.c (type_hash_canon): Assert we didn't find ourselves.
7806 2018-06-14  Richard Biener  <rguenther@suse.de>
7808         PR ipa/86124
7809         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7810         NULL cgraph_node.
7812 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7814         * config/rtems.h (STDINT_LONG32): Define.
7816 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
7817             Prachi Godbole  <prachi.godbole@imgtec.com>
7819         * config/mips/mips-cpus.def: Define P6600.
7820         * config/mips/mips-tables.opt: Regenerate.
7821         * config/mips/mips.c (mips_ucbranch_type): New enum.
7822         (mips_rtx_cost_data): Add support for P6600.
7823         (mips_issue_rate): Likewise.
7824         (mips_multipass_dfa_lookahead): Likewise.
7825         (mips_avoid_hazard): Likewise.
7826         (mips_reorg_process_insns): Likewise.
7827         (mips_classify_branch_p6600): New function.
7828         * config/mips/mips.h (TUNE_P6600): New define.
7829         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7830         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7831         * config/mips/mips.md: Include p6600.md.
7832         (processor): Add p6600.
7833         * config/mips/p6600.md: New file.
7834         * doc/invoke.texi: Add p6600 to supported architectures.
7836 2018-06-13  Martin Sebor  <msebor@redhat.com>
7838         PR tree-optimization/86114
7839         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7840         of integer types.
7841         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7843 2018-06-13  Richard Biener  <rguenther@suse.de>
7845         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7846         Properly set vector type of the intermediate stmt.
7847         * tree-vect-stmts.c (vectorizable_operation): The destination
7848         var always has vectype_out type.
7850 2018-06-13  Jeff Law  <law@redhat.com>
7852         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7853         integer 0 for argument to print_rtl_with_bb.
7854         (rl78_reorg): Likewise.
7856 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7858         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7859         from rtx to rtx_insn *.
7860         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7861         "label".
7862         (add_sched_insns_for_speculation): Likewise for local "target",
7863         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7864         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7865         from rtx_insn ** to rtx_code_label **.
7866         (reorg_emit_nops): Likewise.
7867         (c6x_reorg): Likewise for local "call_labels".
7868         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7869         rtx to rtx_insn *.
7870         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7871         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7872         the loops over LABEL_REFS.
7873         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7874         braf_label.
7875         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7876         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7877         (split_branches): Strengthen local "olabel" from rtx to
7878         rtx_insn *, adding a safe_as_a cast.
7879         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7880         to "rtx_insn *".
7881         (add_insn_after): Likewise for first two params.
7882         (add_insn_before): Likewise.
7883         (remove_insn): Likewise for param.
7884         (emit_pattern_before_noloc): Likewise for second and third params.
7885         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7886         (emit_call_insn_before_noloc): Likewise.
7887         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7888         to "rtx_insn *".
7889         (emit_barrier_before): Likewise.
7890         (emit_label_before): Strengthen "label" param from "rtx" to
7891         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7892         "rtx_insn *".
7893         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7894         "rtx_insn *".
7895         (emit_pattern_after_noloc): Likewise.
7896         (emit_insn_after_noloc): Likewise.
7897         (emit_jump_insn_after_noloc): Likewise.
7898         (emit_call_insn_after_noloc): Likewise.
7899         (emit_debug_insn_after_noloc): Likewise.
7900         (emit_barrier_after): Likewise.
7901         (emit_label_after): Likewise for both params.
7902         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7903         "loc" param from "int" to "location_t".
7904         (emit_insn_after_setloc): Likewise.
7905         (emit_jump_insn_after_setloc): Likewise.
7906         (emit_call_insn_after_setloc): Likewise.
7907         (emit_debug_insn_after_setloc): Likewise.
7908         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7909         "loc" param from "int" to "location_t".
7910         (emit_pattern_before): Convert NULL_RTX to NULL.
7911         (emit_insn_before_setloc): Convert "loc" param from "int" to
7912         "location_t".
7913         (emit_jump_insn_before_setloc): Likewise.
7914         (emit_call_insn_before_setloc): Likewise.
7915         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7916         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7917         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7918         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7919         Convert 3rd param from "int" to "location_t".
7920         (emit_barrier_before, emit_barrier_after, next_real_insn):
7921         Strengthen param from rtx to rtx_insn *.
7922         (emit_label_before): Strengthen 1st param from "rtx" to
7923         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7924         "rtx_insn *".
7925         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7926         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7927         Strengthen 2nd param from "rtx" to "rtx_insn *".
7928         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7929         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7930         Likewise. Convert 3rd param from "int" to "location_t".
7931         (emit_label_after): Strengthen 1st param from "rtx" to
7932         "rtx_code_label *".
7933         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7934         "rtx_insn *".
7935         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7936         from "rtx" to "rtx_insn *".
7938 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7940         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7941         bodies streamed in with -Q.
7942         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7943         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7944         * gimple-streamer-out.c: Include gimple-pretty-print.h
7945         (output_bb): Dump stmts streamed.
7946         * lto-section-out.c: Include print-tree.h
7947         (lto_begin_section): Dump sections created.
7948         (lto_output_decl_index): Dump decl encoded.
7949         * lto-streamer-out.c: Include print-tree.h
7950         (create_output_block): Dump output block created.
7951         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7952         (output_function): Dump function output.
7953         (output_constructor): Dump constructor streamed.
7954         (write_global_stream): Output indexes encoded.
7955         (produce_asm_for_decls): Dump streams encoded.
7956         * lto-streamer.c (streamer_dump_file): New global var.
7957         * lto-streamer.h (streamer_dump_file): Declare.
7958         * passes.c (ipa_write_summaries): Initialize streamer dump.
7959         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7960         in.
7962 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7964         PR target/86048
7965         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7966         offsets for register save directives.  Emit a second batch of save
7967         directives, if need be, when the function accesses prior frames.
7969 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7971         * config/arc/fpu.md (fmasf4): Force operand to register.
7972         (fnmasf4): Likewise.
7974 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7976         * config/arc/arc-protos.h (arc_pad_return): Remove.
7977         * config/arc/arc.c (machine_function): Remove force_short_suffix
7978         and size_reason.
7979         (arc_print_operand): Adjust printing of '&'.
7980         (arc_verify_short): Remove conditional printing of short suffix.
7981         (arc_final_prescan_insn): Remove reference to size_reason.
7982         (pad_return): New function.
7983         (arc_reorg): Call pad_return.
7984         (arc_pad_return): Remove.
7985         (arc_init_machine_status): Remove reference to force_short_suffix.
7986         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7987         (attr length): When attribute iscompact is true force to 2
7988         regardless; in the case of maybe check if we want to force the
7989         instruction to have 4 bytes length.
7990         (nopv): Change it to generate 4 byte long nop as well.
7991         (blockage): New pattern.
7992         (simple_return): Remove call to arc_pad_return.
7993         (p_return_i): Likewise.
7995 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7997         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7999 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8001         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8002         ARC cores.
8004 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8006         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8007         for ARC700 and ARCv2.
8009 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
8011         PR target/86076
8012         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8013         operands[2] instead of operands[1].
8016 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8018         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8019         case, check whether the outer register overlaps an unallocatable
8020         register, not just whether it fits the required class.
8022 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8024         * poly-int.h (can_div_trunc_p): Add new overload in which all values
8025         are poly_ints.
8026         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8027         (memrefs_conflict_p): Likewise.
8028         (init_alias_analysis): Likewise.
8029         * cfgexpand.c (expand_debug_expr): Likewise.
8030         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8031         * cse.c (fold_rtx): Likewise.
8032         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8033         * expr.c (emit_block_move_hints): Likewise.
8034         (clear_storage_hints, push_block, emit_push_insn): Likewise.
8035         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8036         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8037         (emit_group_store): Likewise.
8038         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
8039         to read the PRE/POST_MODIFY increment.
8040         * calls.c (store_one_arg): Use strip_offset.
8041         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8042         poly_int_rtx_p.
8043         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8044         by a VEC_SELECT.
8045         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8046         (simplify_binary_operation_1): Extend CONST_INT handling to
8047         poly_int_rtx_p.
8048         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8049         than a HOST_WIDE_INT.
8050         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8051         poly_int64.
8052         (adjust_mems, add_stores): Update accodingly.
8053         (vt_canonicalize_addr): Track polynomial offsets.
8054         (emit_note_insn_var_location): Likewise.
8055         (vt_add_function_parameter): Likewise.
8056         (vt_initialize): Likewise.
8058 2018-06-12  Jeff Law  <law@redhat.com>
8060         * config.gcc (alpha*-*-freebsd*): Remove.
8061         * config/alpha/freebsd.h: Remove.
8063 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
8065         PR other/69968
8066         * spellcheck-tree.c (levenshtein_distance): Rename to...
8067         (get_edit_distance): ...this, and update for underlying renaming.
8068         * spellcheck-tree.h (levenshtein_distance): Rename to...
8069         (get_edit_distance): ...this.
8070         * spellcheck.c (levenshtein_distance): Rename to...
8071         (get_edit_distance): ...this.  Convert from Levenshtein distance
8072         to Damerau-Levenshtein distance by supporting transpositions of
8073         adjacent characters.  Rename "v1" to "v_next" and "v0" to
8074         "v_one_ago".
8075         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8076         (selftest::test_edit_distance_unit_test_oneway): ...this, and
8077         update for underlying renaming.
8078         (selftest::levenshtein_distance_unit_test): Rename to...
8079         (selftest::test_get_edit_distance_unit): ...this, and update for
8080         underlying renaming.
8081         (selftest::test_find_closest_string): Add example from PR 69968
8082         where transposition helps
8083         (selftest::test_metric_conditions): Update for renaming.
8084         (selftest::test_metric_conditions): Likewise.
8085         (selftest::spellcheck_c_tests): Likewise.
8086         * spellcheck.h (levenshtein_distance): Rename both overloads to...
8087         (get_edit_distance): ...this.
8088         (best_match::consider): Update for renaming.
8090 2018-06-12  Martin Sebor  <msebor@redhat.com>
8092         PR tree-optimization/85259
8093         * builtins.c (compute_objsize): Handle constant offsets.
8094         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8095         true iff a warning has been issued.
8096         * gimple.h (gimple_nonartificial_location): New function.
8097         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8098         gimple_nonartificial_location and handle -Wno-system-headers.
8099         (handle_builtin_stxncpy): Same.
8101 2018-06-12  Martin Sebor  <msebor@redhat.com>
8103         PR c/85931
8104         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8106 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
8108         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8109         BUILTIN_VEC_XST entries for pointer to double and long long.
8111 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
8113         PR target/85990
8114         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8115         Update comments.
8116         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8117         Likewise.
8119 2018-06-12  Martin Liska  <mliska@suse.cz>
8121         * doc/options.texi: Document IntegerRange.
8123 2018-06-12  Martin Liska  <mliska@suse.cz>
8125         * config/i386/i386.opt: Make MPX-related options as Deprecated.
8126         * opt-functions.awk: Handle Deprecated flag.
8127         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8128         and report error.
8129         (read_cmdline_option): Report warning for a deprecated option.
8130         * opts.h (struct cl_option): Add new field cl_deprecated.
8131         (CL_ERR_DEPRECATED): New.
8133 2018-06-12  Martin Liska  <mliska@suse.cz>
8135         * doc/options.texi: Document Deprecated option flag.
8137 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8139         * config/arc/arc-arch.h (arc_extras): New enum.
8140         (arc_cpu_t):Add field extra.
8141         (arc_cpu_types): Consider the extras.
8142         * config/arc/arc-cpus.def: Add extras info.
8143         * config/arc/arc-opts.h (processor_type): Consider extra field.
8144         * config/arc/arc.c (arc_override_options): Handle extra field.
8146 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8148         * config/arc/arc-arch.h: Update ARC_OPTX macro.
8149         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8150         field.
8151         * config/arc/arc.c (arc_init): Update pic warning.
8152         (irq_range): Update irq range parsing warnings.
8153         (arc_override_options): Update various warning messages.
8154         (arc_handle_aux_attribute): Likewise.
8156 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
8158         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8160 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8162         * doc/sourcebuild.texi: Document usage of line number 0 in verify
8163         compiler messages directives.
8165 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
8167         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8168         * config/mips/mips-tables.opt: Regenerate.
8169         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8170         mips64r6.
8171         * doc/invoke.texi: Document -march=i6500.
8173 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
8175         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8176         (i6400_gpmul): Add cpu_unit.
8177         (i6400_gpdiv): Likewise.
8178         (i6400_msa_add_d): Update reservations.
8179         (i6400_msa_int_add) Likewise.
8180         (i6400_msa_short_logic3) Likewise.
8181         (i6400_msa_short_logic2) Likewise.
8182         (i6400_msa_short_logic) Likewise.
8183         (i6400_msa_move) Likewise.
8184         (i6400_msa_cmp) Likewise.
8185         (i6400_msa_short_float2) Likewise.
8186         (i6400_msa_div_d) Likewise.
8187         (i6400_msa_long_logic1) Likewise.
8188         (i6400_msa_long_logic2) Likewise.
8189         (i6400_msa_mult) Likewise.
8190         (i6400_msa_long_float2) Likewise.
8191         (i6400_msa_long_float4) Likewise.
8192         (i6400_msa_long_float5) Likewise.
8193         (i6400_msa_long_float8) Likewise.
8194         (i6400_fpu_fadd): Include frint type.
8195         (i6400_fpu_store): New define_insn_reservation.
8196         (i6400_fpu_load): Likewise.
8197         (i6400_fpu_move): Likewise.
8198         (i6400_fpu_fcmp): Likewise.
8199         (i6400_fpu_fmadd): Likewise.
8200         (i6400_int_mult): Include imul3nc type and update reservation.
8201         (i6400_int_div): Include idiv3 type and update reservation.
8202         (i6400_int_load): Update to check type not move_type.
8203         (i6400_int_store): Likewise.
8204         (i6400_int_prefetch): Set zero latency.
8206 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
8208         * gcc.c: Document new %@{...} sequence.
8209         (LINK_COMMAND_SPEC): Use it for the -L switches.
8210         (cpp_unique_options): Use it for the -I switches.
8211         (at_file_argbuf): New global variable.
8212         (in_at_file): Likewise.
8213         (alloc_args): Create at_file_argbuf.
8214         (clear_args): Truncate at_file_argbuf.
8215         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8216         (open_at_file): New function.
8217         (close_at_file): Likewise.
8218         (create_at_file): Delete.
8219         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8220         <'o'>: Likewise.
8221         <'@'>: New case.
8222         (validate_switches_from_spec): Deal with %@{...} sequence.
8223         (validate_switches): Likewise.
8224         (driver::finalize): Call clear_args.
8226 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
8228         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8230 2018-06-11  Martin Sebor  <msebor@redhat.com>
8232         * doc/invoke.texi (-Wall): List -Wc++17-compat.
8233         (Wno-class-memaccess): Add @opindex.
8234         (Wno-templates, Wno-multiple-inheritance): Same.
8235         (Wno-virtual-inheritance, Wno-namespaces): Same.
8236         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8237         (Wno-format-overflow, Wno-format-truncation): Same.
8238         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8239         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8240         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8241         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8242         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8243         (Wno-misspelled-isr): Same.
8245 2018-06-11  Martin Sebor  <msebor@redhat.com>
8247         * PR tree-optimization/86083
8248         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8250 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
8252         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8254 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
8256         PR target/85755
8257         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8258         on the correct operand.
8259         (*movdi_internal64): Ditto.
8261 2018-06-11  Martin Liska  <mliska@suse.cz>
8263         PR tree-optimization/86089
8264         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8266 2018-06-11  Julia Koval  <julia.koval@intel.com>
8268         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8269         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8270         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8272 2018-06-11  Olivier Hainque  <hainque@adacore.com>
8274         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8275         for Ada with strict dwarf2.
8277 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
8279         PR target/85755
8280         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8281         addresses.
8283 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
8285         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8287 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
8289         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8290         TARGET_ELF.
8292 2018-06-08  Martin Liska  <mliska@suse.cz>
8294         * tree-cfg.h (debug_function): Fix argument type to match
8295         implementation.
8297 2018-06-08  Martin Liska  <mliska@suse.cz>
8299         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8300         Remove usage of MPX-related (and removed) fields.
8301         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8303 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
8305         * cfg.c (debug): Use TDF_NONE rather than 0.
8306         * cfghooks.c (debug): Likewise.
8307         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8308         (struct dump_option_value_info): Convert to...
8309         (struct kv_pair): ...this template type.
8310         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8311         rather than 0.
8312         (optinfo_verbosity_options): Likewise.
8313         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8314         OPTGROUP_NONE.
8315         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8316         than int for "optgroup_flags" param.
8317         (dump_generic_expr_loc): Use dump_flags_t rather than int for
8318         "dump_kind" param.
8319         (dump_dec): Likewise.
8320         (dump_finish): Use TDF_NONE rather than 0.
8321         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8322         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
8323         than 0.  Update for change to option_ptr.
8324         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8325         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
8326         0.  Update for changes to optinfo_verbosity_options and
8327         optgroup_options.
8328         (opt_info_switch_p): Convert optgroup_flags from int to
8329         optgroup_flags_t.
8330         (dump_basic_block): Use dump_flags_t rather than int
8331         for "dump_kind" param.
8332         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8333         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8334         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8335         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8336         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8337         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8338         TDF_NONE): Convert from macros to...
8339         (enum dump_flag): ...this new enum.
8340         (dump_flags_t): Update to use enum.
8341         (operator|, operator&, operator~, operator|=, operator&=):
8342         Implement for dump_flags_t.
8343         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8344         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8345         Convert from macros to...
8346         (enum optgroup_flag): ...this new enum.
8347         (optgroup_flags_t): New typedef.
8348         (operator|, operator|=): Implement for optgroup_flags_t.
8349         (struct dump_file_info): Convert field "alt_flags" to
8350         dump_flags_t.  Convert field "optgroup_flags" to
8351         optgroup_flags_t.
8352         (dump_basic_block): Use dump_flags_t rather than int for param.
8353         (dump_generic_expr_loc): Likewise.
8354         (dump_dec): Likewise.
8355         (dump_register): Convert param "optgroup_flags" to
8356         optgroup_flags_t.
8357         (opt_info_enable_passes): Likewise.
8358         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8359         than 0.
8360         * gimple-pretty-print.c (debug): Likewise.
8361         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8362         (merged_store_group::apply_stores): Likewise.
8363         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8364         * gimple.c (verify_gimple_pp): Likewise.
8365         * graphite-poly.c (print_pbb_body): Likewise.
8366         * passes.c (pass_manager::register_one_dump_file): Convert
8367         local "optgroup_flags" to optgroup_flags_t.
8368         * print-tree.c (print_node): Use TDF_NONE rather than 0.
8369         (debug): Likewise.
8370         (debug_body): Likewise.
8371         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8372         to optgroup_flags_t.
8373         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8374         than 0.
8375         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8376         (convert_mult_to_fma): Likewise.
8377         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8378         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8379         * tree-vect-data-refs.c (dump_lower_bound): Convert param
8380         "dump_kind" to dump_flags_t.
8382 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8384         * config/rs6000/rs6000.c (min, max): Delete.
8386 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8388         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8389         -mabi=spe and -mabi=no-spe.
8391 2018-06-08  Martin Liska  <mliska@suse.cz>
8393         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8394         where we expect an existing summary.
8396 2018-06-08  Martin Liska  <mliska@suse.cz>
8398         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8399         * ipa-inline.h (estimate_edge_growth): Likewise.
8401 2018-06-08  Martin Liska  <mliska@suse.cz>
8403         * cgraph.c (function_version_hasher::hash): Use
8404         cgraph_node::get_uid ().
8405         (function_version_hasher::equal):
8406         * cgraph.h (cgraph_node::get_uid): New method.
8407         * ipa-inline.c (update_caller_keys): Use
8408         cgraph_node::get_uid ().
8409         (update_callee_keys): Likewise.
8410         * ipa-utils.c (searchc): Likewise.
8411         (ipa_reduced_postorder): Likewise.
8412         * lto-cgraph.c (input_node): Likewise.
8413         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8414         * symbol-summary.h (symtab_insertion): Likewise.
8415         (symtab_removal): Likewise.
8416         (symtab_duplication): Likewise.
8417         * tree-pretty-print.c (dump_function_header): Likewise.
8418         * tree-sra.c (convert_callers_for_node): Likewise.
8420 2018-06-08  Martin Liska  <mliska@suse.cz>
8422         * cgraph.c (symbol_table::create_edge): Always assign a new
8423         unique number.
8424         (symbol_table::free_edge): Do not recycle numbers.
8425         * cgraph.h (cgraph_edge::get): New method.
8426         * symbol-summary.h (symtab_removal): Use it.
8427         (symtab_duplication): Likewise.
8428         (call_summary::hashable_uid): Remove.
8430 2018-06-08  Martin Liska  <mliska@suse.cz>
8432         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8433         (initialize_growth_caches): Remove.
8434         (free_growth_caches): Likewise.
8435         (do_estimate_edge_time): Use edge_growth_cache.
8436         (do_estimate_edge_size): Likewise.
8437         (do_estimate_edge_hints): Likewise.
8438         * ipa-inline.c (reset_edge_caches): Likewise.
8439         (recursive_inlining): Likewise.
8440         (inline_small_functions): Likewise.
8441         * ipa-inline.h (initialize_growth_caches): Remove.
8442         (estimate_edge_size): Likewise.
8443         (estimate_edge_time): Likewise.
8444         (estimate_edge_hints): Likewise.
8445         (reset_edge_growth_cache): Likewise.
8446         * symbol-summary.h (call_summary::remove): New method.
8448 2018-06-08  Martin Liska  <mliska@suse.cz>
8450         * ipa-cp.c (class edge_clone_summary): New summary.
8451         (grow_edge_clone_vectors): Remove.
8452         (ipcp_edge_duplication_hook): Remove.
8453         (class edge_clone_summary_t): New call_summary class.
8454         (ipcp_edge_removal_hook): Remove.
8455         (edge_clone_summary_t::duplicate): New function.
8456         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8457         (create_specialized_node): Likewise.
8458         (ipcp_driver): Initialize edge_clone_summaries and do not
8459         register hooks.
8461 2018-06-08  Martin Liska  <mliska@suse.cz>
8463         * symbol-summary.h (get): New function.
8464         (call_summary::m_initialize_when_cloning): New class member.
8466 2018-06-08  Martin Liska  <mliska@suse.cz>
8468         * cgraph.c (cgraph_node::remove): Do not recycle uid.
8469         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8470         (symbol_table::allocate_cgraph_symbol): Do not set uid.
8471         * passes.c (uid_hash_t): Record removed_nodes by their uids.
8472         (remove_cgraph_node_from_order): Use the removed_nodes set.
8473         (do_per_function_toporder): Likwise.
8474         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8475         instead of summary_uid.
8476         (symtab_removal): Likewise.
8477         (symtab_duplication): Likewise.
8479 2018-06-08  Martin Liska  <mliska@suse.cz>
8481         * ipa-cp.c (ipcp_store_bits_results): Use
8482         ipcp_transformation_sum.
8483         (ipcp_store_vr_results): Likewise.
8484         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8485         to ...
8486         (ipcp_transformation_initialize): ... this.
8487         (ipa_set_node_agg_value_chain):
8488         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8489         (write_ipcp_transformation_info): Likewise.
8490         (read_ipcp_transformation_info): Likewise.
8491         (ipcp_update_bits): Likewise.
8492         (ipcp_update_vr): Likewise.
8493         (ipcp_transform_function): Likewise.
8494         * ipa-prop.h: Rename ipcp_transformation_summary to
8495         ipcp_transformation.
8496         (class ipcp_transformation_t): New function summary.
8497         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8498         (ipa_get_agg_replacements_for_node): Likewise.
8500 2018-06-08  Martin Liska  <mliska@suse.cz>
8502         * ipa-pure-const.c (struct funct_state_d): Do it class instead
8503         of struct.
8504         (class funct_state_summary_t): New function_summary class.
8505         (has_function_state): Remove.
8506         (get_function_state): Likewise.
8507         (set_function_state): Likewise.
8508         (add_new_function): Likewise.
8509         (funct_state_summary_t::insert): New function.
8510         (duplicate_node_data): Remove.
8511         (remove_node_data): Remove.
8512         (funct_state_summary_t::duplicate): New function.
8513         (register_hooks): Create new funct_state_summaries.
8514         (pure_const_generate_summary): Use it.
8515         (pure_const_write_summary): Likewise.
8516         (pure_const_read_summary): Likewise.
8517         (propagate_pure_const): Likewise.
8518         (propagate_nothrow): Likewise.
8519         (dump_malloc_lattice): Likewise.
8520         (propagate_malloc): Likewise.
8521         (execute): Do not register hooks, just remove summary
8522         instead.
8523         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8524         constructor.
8526 2018-06-08  Martin Liska  <mliska@suse.cz>
8528         * ipa-reference.c (remove_node_data): Remove.
8529         (duplicate_node_data): Likewise.
8530         (class ipa_ref_var_info_summary_t): New class.
8531         (class ipa_ref_opt_summary_t): Likewise.
8532         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8533         (get_reference_optimization_summary): Use
8534         ipa_ref_opt_sum_summaries.
8535         (set_reference_vars_info): Remove.
8536         (set_reference_optimization_summary): Likewise.
8537         (ipa_init): Create summaries.
8538         (init_function_info): Use function summary.
8539         (ipa_ref_opt_summary_t::duplicate): New function.
8540         (ipa_ref_opt_summary_t::remove): New function.
8541         (get_read_write_all_from_node): Fix GNU coding style.
8542         (propagate): Use function summary.
8543         (write_node_summary_p): Fix GNU coding style.
8544         (stream_out_bitmap): Likewise.
8545         (ipa_reference_read_optimization_summary): Use function summary.
8546         (ipa_reference_c_finalize): Do not release hooks.
8548 2018-06-08  Martin Liska  <mliska@suse.cz>
8550         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8551         (analyze_function_body): Extract multiple calls of get_create.
8552         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8553         * ipa-inline.c (recursive_inlining): Use ::get method.
8554         * ipa-inline.h (estimate_edge_growth): Likewise.
8556 2018-06-08  Martin Liska  <mliska@suse.cz>
8558         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8559         HSA_INVALID.
8560         (hsa_function_summary::hsa_function_summary): Use the new enum
8561         value.
8562         (hsa_gpu_implementation_p): Use hsa_summaries::get.
8563         * hsa-gen.c (hsa_get_host_function): Likewise.
8564         (get_brig_function_name): Likewise.
8565         * ipa-hsa.c (process_hsa_functions): Likewise.
8566         (ipa_hsa_write_summary): Likewise.
8567         * symbol-summary.h (symtab_duplication): Use ::get function/
8568         (get): New function.
8570 2018-06-08  Martin Liska  <mliska@suse.cz>
8572         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8573         of get.
8574         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8575         (hsa_register_kernel): Likewise.
8576         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8577         * hsa-gen.c (hsa_get_host_function): Likewise.
8578         (get_brig_function_name): Likewise.
8579         (generate_hsa): Likewise.
8580         (pass_gen_hsail::execute): Likewise.
8581         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8582         (devirtualization_time_bonus): Likewise.
8583         (ipcp_propagate_stage): Likewise.
8584         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8585         (edge_set_predicate): Likewise.
8586         (evaluate_conditions_for_known_args): Likewise.
8587         (evaluate_properties_for_edge): Likewise.
8588         (ipa_fn_summary::reset): Likewise.
8589         (ipa_fn_summary_t::duplicate): Likewise.
8590         (dump_ipa_call_summary): Likewise.
8591         (ipa_dump_fn_summary): Likewise.
8592         (analyze_function_body): Likewise.
8593         (compute_fn_summary): Likewise.
8594         (estimate_edge_devirt_benefit): Likewise.
8595         (estimate_edge_size_and_time): Likewise.
8596         (estimate_calls_size_and_time): Likewise.
8597         (estimate_node_size_and_time): Likewise.
8598         (inline_update_callee_summaries): Likewise.
8599         (remap_edge_change_prob): Likewise.
8600         (remap_edge_summaries): Likewise.
8601         (ipa_merge_fn_summary_after_inlining): Likewise.
8602         (ipa_update_overall_fn_summary): Likewise.
8603         (read_ipa_call_summary): Likewise.
8604         (inline_read_section): Likewise.
8605         (write_ipa_call_summary): Likewise.
8606         (ipa_fn_summary_write): Likewise.
8607         (ipa_free_fn_summary): Likewise.
8608         * ipa-hsa.c (process_hsa_functions): Likewise.
8609         (ipa_hsa_write_summary): Likewise.
8610         (ipa_hsa_read_section): Likewise.
8611         * ipa-icf.c (sem_function::merge): Likewise.
8612         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8613         (do_estimate_edge_time): Likewise.
8614         (estimate_size_after_inlining): Likewise.
8615         (estimate_growth): Likewise.
8616         (growth_likely_positive): Likewise.
8617         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8618         (inline_call): Likewise.
8619         * ipa-inline.c (caller_growth_limits): Likewise.
8620         (can_inline_edge_p): Likewise.
8621         (can_inline_edge_by_limits_p): Likewise.
8622         (compute_uninlined_call_time): Likewise.
8623         (compute_inlined_call_time): Likewise.
8624         (want_inline_small_function_p): Likewise.
8625         (edge_badness): Likewise.
8626         (update_caller_keys): Likewise.
8627         (update_callee_keys): Likewise.
8628         (recursive_inlining): Likewise.
8629         (inline_small_functions): Likewise.
8630         (inline_to_all_callers_1): Likewise.
8631         (dump_overall_stats): Likewise.
8632         (early_inline_small_functions): Likewise.
8633         (early_inliner): Likewise.
8634         * ipa-inline.h (estimate_edge_growth): Likewise.
8635         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8636         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8637         * ipa-prop.h (IPA_NODE_REF): Likewise.
8638         (IPA_EDGE_REF): Likewise.
8639         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8640         (propagate_malloc): Likewise.
8641         * ipa-split.c (execute_split_functions): Likewise.
8642         * symbol-summary.h: Rename get to get_create.
8643         (get): Likewise.
8644         (get_create): Likewise.
8645         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8647 2018-06-08  Martin Liska  <mliska@suse.cz>
8649         * symbol-summary.h (release): Move definition out of class
8650         declaration.
8651         (symtab_removal): Likewise.
8652         (symtab_duplication): Likewise.
8654 2018-06-08  Martin Liska  <mliska@suse.cz>
8656         * symbol-summary.h (function_summary): Move constructor
8657         implementation out of class declaration.
8658         (release): Likewise.
8659         (symtab_insertion): Likewise.
8660         (symtab_removal): Likewise.
8661         (symtab_duplication): Likewise.
8662         (get): Likewise.
8664 2018-06-08  Martin Liska  <mliska@suse.cz>
8666         * Makefile.in: Remove support for MPX (macros, related functions,
8667         fields in cgraph_node, ...).
8668         * builtin-types.def (BT_BND): Likewise.
8669         (BT_FN_BND_CONST_PTR): Likewise.
8670         (BT_FN_CONST_PTR_BND): Likewise.
8671         (BT_FN_VOID_PTR_BND): Likewise.
8672         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8673         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8674         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8675         (expand_builtin_mempcpy_with_bounds): Likewise.
8676         (expand_builtin_memset_with_bounds): Likewise.
8677         (expand_builtin_memset_args): Likewise.
8678         (std_expand_builtin_va_start): Likewise.
8679         (expand_builtin): Likewise.
8680         (expand_builtin_with_bounds): Likewise.
8681         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8682         (DEF_LIB_BUILTIN_CHKP): Likewise.
8683         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8684         (DEF_CHKP_BUILTIN): Likewise.
8685         (BUILT_IN_MEMCPY): Likewise.
8686         (BUILT_IN_MEMMOVE): Likewise.
8687         (BUILT_IN_MEMPCPY): Likewise.
8688         (BUILT_IN_MEMSET): Likewise.
8689         (BUILT_IN_STPCPY): Likewise.
8690         (BUILT_IN_STRCAT): Likewise.
8691         (BUILT_IN_STRCHR): Likewise.
8692         (BUILT_IN_STRCPY): Likewise.
8693         (BUILT_IN_STRLEN): Likewise.
8694         (BUILT_IN_MEMCPY_CHK): Likewise.
8695         (BUILT_IN_MEMMOVE_CHK): Likewise.
8696         (BUILT_IN_MEMPCPY_CHK): Likewise.
8697         (BUILT_IN_MEMSET_CHK): Likewise.
8698         (BUILT_IN_STPCPY_CHK): Likewise.
8699         (BUILT_IN_STRCAT_CHK): Likewise.
8700         (BUILT_IN_STRCPY_CHK): Likewise.
8701         * calls.c (store_bounds): Likewise.
8702         (emit_call_1): Likewise.
8703         (special_function_p): Likewise.
8704         (maybe_warn_nonstring_arg): Likewise.
8705         (initialize_argument_information): Likewise.
8706         (finalize_must_preallocate): Likewise.
8707         (compute_argument_addresses): Likewise.
8708         (expand_call): Likewise.
8709         * cfgexpand.c (expand_call_stmt): Likewise.
8710         (expand_return): Likewise.
8711         (expand_gimple_stmt_1): Likewise.
8712         (pass_expand::execute): Likewise.
8713         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8714         (cgraph_node::remove): Likewise.
8715         (cgraph_node::dump): Likewise.
8716         (cgraph_node::verify_node): Likewise.
8717         * cgraph.h (chkp_function_instrumented_p): Likewise.
8718         (symtab_node::get_alias_target): Likewise.
8719         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8720         (cgraph_local_p): Likewise.
8721         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8722         (cgraph_edge::rebuild_references): Likewise.
8723         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8724         (walk_polymorphic_call_targets): Likewise.
8725         (cgraph_node::expand_thunk): Likewise.
8726         (symbol_table::output_weakrefs): Likewise.
8727         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8728         (ix86_handle_option): Likewise.
8729         * config/i386/constraints.md: Likewise.
8730         * config/i386/i386-builtin-types.def (BND): Likewise.
8731         (VOID): Likewise.
8732         (PVOID): Likewise.
8733         (ULONG): Likewise.
8734         * config/i386/i386-builtin.def (BDESC_END): Likewise.
8735         (BDESC_FIRST): Likewise.
8736         (BDESC): Likewise.
8737         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8738         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8739         * config/i386/i386.c (enum reg_class): Likewise.
8740         (ix86_target_string): Likewise.
8741         (ix86_option_override_internal): Likewise.
8742         (ix86_conditional_register_usage): Likewise.
8743         (ix86_valid_target_attribute_inner_p): Likewise.
8744         (ix86_set_indirect_branch_type): Likewise.
8745         (ix86_set_current_function): Likewise.
8746         (ix86_function_arg_regno_p): Likewise.
8747         (init_cumulative_args): Likewise.
8748         (ix86_function_arg_advance): Likewise.
8749         (ix86_function_arg): Likewise.
8750         (ix86_pass_by_reference): Likewise.
8751         (ix86_function_value_regno_p): Likewise.
8752         (ix86_function_value_1): Likewise.
8753         (ix86_function_value_bounds): Likewise.
8754         (ix86_return_in_memory): Likewise.
8755         (ix86_setup_incoming_vararg_bounds): Likewise.
8756         (ix86_va_start): Likewise.
8757         (indirect_thunk_need_prefix): Likewise.
8758         (print_reg): Likewise.
8759         (ix86_print_operand): Likewise.
8760         (ix86_expand_call): Likewise.
8761         (ix86_output_function_return): Likewise.
8762         (reg_encoded_number): Likewise.
8763         (BDESC_VERIFYS): Likewise.
8764         (ix86_init_mpx_builtins): Likewise.
8765         (ix86_init_builtins): Likewise.
8766         (ix86_emit_cmove): Likewise.
8767         (ix86_emit_move_max): Likewise.
8768         (ix86_expand_builtin): Likewise.
8769         (ix86_builtin_mpx_function): Likewise.
8770         (ix86_get_arg_address_for_bt): Likewise.
8771         (ix86_load_bounds): Likewise.
8772         (ix86_store_bounds): Likewise.
8773         (ix86_load_returned_bounds): Likewise.
8774         (ix86_store_returned_bounds): Likewise.
8775         (ix86_class_likely_spilled_p): Likewise.
8776         (ix86_hard_regno_mode_ok): Likewise.
8777         (x86_order_regs_for_local_alloc): Likewise.
8778         (ix86_mitigate_rop): Likewise.
8779         (ix86_bnd_prefixed_insn_p): Likewise.
8780         (ix86_mpx_bound_mode): Likewise.
8781         (ix86_make_bounds_constant): Likewise.
8782         (ix86_initialize_bounds): Likewise.
8783         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8784         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8785         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8786         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8787         (TARGET_CHKP_BOUND_MODE): Likewise.
8788         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8789         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8790         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8791         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8792         * config/i386/i386.h (TARGET_MPX): Likewise.
8793         (TARGET_MPX_P): Likewise.
8794         (VALID_BND_REG_MODE): Likewise.
8795         (FIRST_BND_REG): Likewise.
8796         (LAST_BND_REG): Likewise.
8797         (enum reg_class): Likewise.
8798         (BND_REG_P): Likewise.
8799         (BND_REGNO_P): Likewise.
8800         (BNDmode): Likewise.
8801         (ADJUST_INSN_LENGTH): Likewise.
8802         * config/i386/i386.md: Likewise.
8803         * config/i386/i386.opt: Likewise.
8804         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8805         (defined): Likewise.
8806         (LINK_MPX): Likewise.
8807         (MPX_SPEC): Likewise.
8808         (LIBMPX_SPEC): Likewise.
8809         (LIBMPXWRAPPERS_SPEC): Likewise.
8810         (CHKP_SPEC): Likewise.
8811         * config/i386/predicates.md: Likewise.
8812         * dbxout.c (dbxout_type): Likewise.
8813         * doc/extend.texi: Likewise.
8814         * doc/invoke.texi: Likewise.
8815         * doc/md.texi: Likewise.
8816         * doc/tm.texi: Likewise.
8817         * doc/tm.texi.in: Likewise.
8818         * dwarf2out.c (is_base_type): Likewise.
8819         (gen_formal_types_die): Likewise.
8820         (gen_subprogram_die): Likewise.
8821         (gen_type_die_with_usage): Likewise.
8822         (gen_decl_die): Likewise.
8823         (dwarf2out_late_global_decl): Likewise.
8824         * expr.c (expand_assignment): Likewise.
8825         (emit_storent_insn): Likewise.
8826         (store_expr_with_bounds): Likewise.
8827         (store_expr): Likewise.
8828         (expand_expr_real_1): Likewise.
8829         * expr.h (store_expr_with_bounds): Likewise.
8830         * function.c (use_register_for_decl): Likewise.
8831         (struct bounds_parm_data): Likewise.
8832         (assign_parms_augmented_arg_list): Likewise.
8833         (assign_parm_find_entry_rtl): Likewise.
8834         (assign_parm_is_stack_parm): Likewise.
8835         (assign_parm_load_bounds): Likewise.
8836         (assign_bounds): Likewise.
8837         (assign_parms): Likewise.
8838         (expand_function_start): Likewise.
8839         * gcc.c (CHKP_SPEC): Likewise.
8840         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8841         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8842         (wrestrict_dom_walker::check_call): Likewise.
8843         * gimple.c (gimple_build_call_from_tree): Likewise.
8844         * gimple.h (enum gf_mask): Likewise.
8845         (gimple_call_with_bounds_p): Likewise.
8846         (gimple_call_set_with_bounds): Likewise.
8847         * gimplify.c (gimplify_init_constructor): Likewise.
8848         * ipa-cp.c (initialize_node_lattices): Likewise.
8849         (propagate_constants_across_call): Likewise.
8850         (find_more_scalar_values_for_callers_subset): Likewise.
8851         * ipa-hsa.c (process_hsa_functions): Likewise.
8852         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8853         * ipa-icf.c (sem_function::merge): Likewise.
8854         * ipa-inline.c (early_inliner): Likewise.
8855         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8856         (warn_function_cold): Likewise.
8857         (propagate_pure_const): Likewise.
8858         * ipa-ref.h (enum GTY): Likewise.
8859         * ipa-split.c (find_retbnd): Likewise.
8860         (consider_split): Likewise.
8861         (split_function): Likewise.
8862         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8863         * ipa.c (walk_polymorphic_call_targets): Likewise.
8864         (symbol_table::remove_unreachable_nodes): Likewise.
8865         (process_references): Likewise.
8866         (cgraph_build_static_cdtor_1): Likewise.
8867         * lto-cgraph.c (lto_output_node): Likewise.
8868         (output_refs): Likewise.
8869         (compute_ltrans_boundary): Likewise.
8870         (input_overwrite_node): Likewise.
8871         (input_node): Likewise.
8872         (input_cgraph_1): Likewise.
8873         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8874         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8875         (class pass_chkp_instrumentation_passes): Likewise.
8876         (make_pass_chkp_instrumentation_passes): Likewise.
8877         * passes.def: Likewise.
8878         * rtl.h (struct GTY): Likewise.
8879         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8880         * stor-layout.c (layout_type): Likewise.
8881         * symtab.c: Likewise.
8882         * target.def: Likewise.
8883         * targhooks.c (default_chkp_bound_type): Likewise.
8884         (default_chkp_bound_mode): Likewise.
8885         (default_builtin_chkp_function): Likewise.
8886         (default_chkp_function_value_bounds): Likewise.
8887         (default_chkp_make_bounds_constant): Likewise.
8888         (default_chkp_initialize_bounds): Likewise.
8889         * targhooks.h (default_chkp_bound_type): Likewise.
8890         (default_chkp_bound_mode): Likewise.
8891         (default_builtin_chkp_function): Likewise.
8892         (default_chkp_function_value_bounds): Likewise.
8893         (default_chkp_make_bounds_constant): Likewise.
8894         (default_chkp_initialize_bounds): Likewise.
8895         * toplev.c (compile_file): Likewise.
8896         (process_options): Likewise.
8897         * tree-core.h (DEF_BUILTIN): Likewise.
8898         (DEF_BUILTIN_CHKP): Likewise.
8899         * tree-inline.c (declare_return_variable): Likewise.
8900         (remap_gimple_stmt): Likewise.
8901         (copy_bb): Likewise.
8902         (initialize_inlined_parameters): Likewise.
8903         (expand_call_inline): Likewise.
8904         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8905         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8906         (make_pass_ipa_chkp_produce_thunks): Likewise.
8907         (make_pass_chkp): Likewise.
8908         (make_pass_chkp_opt): Likewise.
8909         (make_pass_chkp_instrumentation_passes): Likewise.
8910         * tree-pretty-print.c (dump_generic_node): Likewise.
8911         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8912         * tree-ssa-dce.c (propagate_necessity): Likewise.
8913         (eliminate_unnecessary_stmts): Likewise.
8914         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8915         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8916         * tree-ssa-sccvn.h: Likewise.
8917         * tree-ssa-strlen.c (get_string_length): Likewise.
8918         (valid_builtin_call): Likewise.
8919         (adjust_last_stmt): Likewise.
8920         (handle_builtin_strchr): Likewise.
8921         (handle_builtin_strcpy): Likewise.
8922         (handle_builtin_stxncpy): Likewise.
8923         (handle_builtin_memcpy): Likewise.
8924         (handle_builtin_strcat): Likewise.
8925         (strlen_check_and_optimize_stmt): Likewise.
8926         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8927         * tree-streamer-in.c: Likewise.
8928         * tree-streamer.c (record_common_node): Likewise.
8929         * tree.c (tree_code_size): Likewise.
8930         (wide_int_to_tree_1): Likewise.
8931         (type_contains_placeholder_1): Likewise.
8932         (build_common_tree_nodes): Likewise.
8933         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8934         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8935         (POINTER_BOUNDS_P): Likewise.
8936         (BOUNDED_TYPE_P): Likewise.
8937         (BOUNDED_P): Likewise.
8938         (CALL_WITH_BOUNDS_P): Likewise.
8939         (pointer_bounds_type_node): Likewise.
8940         * value-prof.c (gimple_ic): Likewise.
8941         * var-tracking.c (vt_add_function_parameters): Likewise.
8942         * varasm.c (make_decl_rtl): Likewise.
8943         (assemble_start_function): Likewise.
8944         (output_constant): Likewise.
8945         (maybe_assemble_visibility): Likewise.
8946         * varpool.c (ctor_for_folding): Likewise.
8947         * chkp-builtins.def: Remove.
8948         * ipa-chkp.c: Remove.
8949         * ipa-chkp.h: Remove.
8950         * rtl-chkp.c: Remove.
8951         * rtl-chkp.h: Remove.
8952         * tree-chkp-opt.c: Remove.
8953         * tree-chkp.c: Remove.
8954         * tree-chkp.h: Remove.
8956 2018-06-07  Carl Love  <cel@us.ibm.com>
8958         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8959         vextract_fp_from_shortl): Add BE support.
8961 2018-06-07  Paul Koning  <ni1d@arrl.net>
8963         * compare-elim.c (try_merge_compare): Don't merge compare if
8964         address contains a side effect.
8965         (try_eliminate_compare): Likewise.
8967 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8969         * config.gcc: Support "tremont".
8970         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8971         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8972         PROCESSOR_TREMONT.
8973         * config/i386/i386.c (m_TREMONT): Define.
8974         (processor_target_table): Add "tremont".
8975         (PTA_TREMONT): Define.
8976         (ix86_lea_outperforms): Add TARGET_TREMONT.
8977         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8978         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8979         and M_INTEL_GOLDMONT_PLUS.
8980         (fold_builtin_cpu): Add "tremont".
8981         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8982         (ix86_option_override_internal): Add "tremont".
8983         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8984         (processor_type): Add PROCESSOR_TREMONT.
8985         * config/i386/x86-tune.def: Add m_TREMONT.
8986         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8988 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8990         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8991         symbol defined for msp430i* devices to be lower case.
8993 2018-06-07  Richard Biener  <rguenther@suse.de>
8995         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8996         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8997         Properly wrap signed arithmetic if overflow wraps.
8999 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
9001         PR tree-optimization/69615
9002         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9003         of a cast from a same precision integral SSA_NAME in a bb dominated
9004         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
9005         cast to utype if rhs2 has already a compatible type.
9007 2018-06-07  Richard Biener  <rguenther@suse.de>
9009         PR tree-optimization/85935
9010         * graphite-scop-detection.c (find_params_in_bb): Analyze
9011         condition operands with respect to the correct loop.  Assert
9012         the analysis doesn't fail.
9014 2018-06-04  Carl Love  <cel@us.ibm.com>
9016         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9017         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
9018         as it is slightly cheaper.
9019         (first_match_or_eos_index_<mode>):
9020         Calculate index using natural element order.
9021         (first_match_index_<mode>):
9022         Calculate index using natural element order.
9023         (first_match_or_eos_index_<mode>):
9024         Calculate index using natural order.
9025         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9026         for BE and LE modes.
9027         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9028         P9V_BUILTIN_VCLZLSBB_V16QI.
9029         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9030         specific.
9032 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9034         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9035         indentation and line wrap for many prototypes.  Add missing
9036         @smallexample directives around block of prototypes for vec_xl and
9037         vec_xst.
9039 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
9041         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9042         track if we pass or return IEEE 128-bit floating point.
9043         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9044         C++ mangling that is compatible with GCC 8.1.
9045         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9046         (init_cumulative_args): Note if we pass or return IEEE 128-bit
9047         floating point types.
9048         (rs6000_function_arg_advance_1): Likewise.
9049         (rs6000_mangle_type): Optionally generate mangled names that match
9050         what GCC 8.1 generated for IEEE 128-bit floating point types.
9051         (rs6000_globalize_decl_name): If we have an external function that
9052         passes or returns IEEE 128-bit types, generate a weak reference
9053         from the mangled name used in GCC 8.1 to the current mangled
9054         name.
9055         (rs6000_init_builtins): Make __ibm128 use the long double type if
9056         long double is IBM extended double.  Make __float128 use the long
9057         double type if long double is IEEE 128-bit.
9059         PR target/85657
9060         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9061         macro for __ibm128 built-in functions.
9062         (PACK_IF): Add __ibm128 pack/unpack functions.
9063         (UNPACK_IF): Likewise.
9064         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9065         enable long double built-in functions if long double is IEEE
9066         128-bit floating point.
9067         (rs6000_invalid_builtin): Update long double built-in function
9068         error message.
9069         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9070         functions, adjust the built-in function to use the long double
9071         built-in function if __ibm128 and long double are the same type.
9072         * doc/extend.texi (PowerPC builtins): Update documention for
9073         __builtin_{,un}pack_longdouble.  Add documentation for
9074         __builtin_{,un}pack_ibm128.
9076 2018-06-06  Jim Wilson  <jimw@sifive.com>
9078         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9079         (struct machine_function): New field interrupt_mode.
9080         (riscv_handle_type_attribute): New function.  Add forward declaration.
9081         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9082         (riscv_expand_epilogue): Check interrupt_mode field.
9083         (riscv_set_current_function): Check interrupt attribute args and
9084         set interrupt_mode field.
9085         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9086         (riscv_sret, riscv_uret): New.
9087         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9088         new arguments to interrupt attribute.
9090 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
9092         PR target/63177
9093         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9094         Don't handle -mcpu=power8 if -mpower9-vector is also used.
9096 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9098         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9099         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9100         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9101         several redundant entries.
9103 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
9105         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9106         type from "rtx" to "rtx_insn *".
9107         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9108         for local "call_insn", removing cast.
9109         (ix86_expand_call): Likewise, introducing a "call_insn" local.
9111 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9113         PR tree-optimization/86066
9114         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9115         for BIT_INSERT_EXPR stores.
9117 2018-06-06  Richard Biener  <rguenther@suse.de>
9119         PR tree-optimization/86062
9120         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9121         component refs ontop
9122         of to be offsetted base.
9124 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9126         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9127         to be static and remove check on interrupt attribute name.
9129 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9131         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9132         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9134 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
9136         PR target/79924
9137         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9138         second argument.
9139         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9140         Remove second argument, change how error is called.
9141         (aarch64_layout_arg): Remove second argument from
9142         aarch64_err_no_fpadvsimd call.
9143         (aarch64_init_cumulative_args): Ditto.
9144         (aarch64_gimplify_va_arg_expr): Ditto.
9145         * config/aarch64/aarch64.md (mov<mode>): Ditto.
9147 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
9149         * config/i386/i386.md (simple_return_indirect_internal): New expander.
9150         (*simple_return_indirect_internal<mode>): Rename from
9151         simple_return_indirect_internal.  Use W mode iterator.
9152         (rstorssp): New expander.
9153         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
9154         (clrssbsy): New expander.
9155         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
9157 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9159         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9160         __typeof__.
9161         (cmse_check_pointed_object): Likewise.
9163 2018-06-05  Martin Liska  <mliska@suse.cz>
9165         PR gcov-profile/47618
9166         * doc/invoke.texi: Document how -fprofile-dir format
9167         is extended.
9169 2018-06-05  Richard Biener  <rguenther@suse.de>
9171         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9172         removal pretend DOM info isn't available so we do not update
9173         it and only remove edges, not dominated blocks.  Actually free
9174         DOM info in case we removed something.  Remove unreachable blocks.
9175         (mfb_keep_latches): Work with either DOM info or marked backedges.
9176         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9177         first.  Mark backedges if DOM info isn't available.
9178         (Re-)compute DOM info after cleanup_control_flow_pre.
9180 2018-06-05  Richard Biener  <rguenther@suse.de>
9182         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9183         (locus_discrim_hasher::hash): Adjust.
9184         (locus_discrim_hasher::equal): Likewise.
9185         (next_discriminator_for_locus): Work on line directly.
9186         (same_line_p): Pass in expanded locus1 as well.
9187         (assign_discriminators): Avoid redundant location expansions.
9189 2018-06-05  Richard Biener  <rguenther@suse.de>
9191         PR tree-optimization/86046
9192         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9193         if required after clearing TREE_ADDRESSABLE.
9195 2018-06-05  Richard Biener  <rguenther@suse.de>
9197         PR tree-optimization/86047
9198         * tree-ssa-loop.c (for_each_index): Glob handling of all
9199         decls and constants and really handle all of them.
9201 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9203         PR target/81497
9204         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9205         qualifier_void_pointer and qualifier_const_void_pointer.
9206         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9207         (arm_init_builtins): Handle the above.
9208         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9209         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9210         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9211         void intrinsics.
9213 2018-06-05  Martin Liska  <mliska@suse.cz>
9215         * auto-profile.c (read_autofdo_file): Do not use
9216         gcov_ctr_summary struct.
9217         (afdo_callsite_hot_enough_for_early_inline): Likewise.
9218         * coverage.c (struct counts_entry): Likewise.
9219         (read_counts_file): Read just single summary entry.
9220         (get_coverage_counts): Use gcov_summary struct.
9221         * coverage.h (get_coverage_counts): Likewise.
9222         * gcov-dump.c (dump_working_sets): Likewise.
9223         (tag_summary): Dump just single summary.
9224         * gcov-io.c (gcov_write_summary): Write just histogram
9225         summary.
9226         (gcov_read_summary): Read just single summary.
9227         (compute_working_sets): Use gcov_summary struct.
9228         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9229         of GCOV_COUNTERS_SUMMABLE.
9230         (GCOV_COUNTERS_SUMMABLE): Remove.
9231         (GCOV_FIRST_VALUE_COUNTER): Replace with
9232         GCOV_COUNTER_V_INTERVAL.
9233         (struct gcov_ctr_summary): Remove.
9234         (struct gcov_summary): Directly use fields of former
9235         gcov_ctr_summary.
9236         (compute_working_sets): Use gcov_summary struct.
9237         * gcov.c (read_count_file): Do not use ctrs fields.
9238         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9239         struct.
9240         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9241         struct.
9242         * profile.c: Likewise.
9243         * profile.h: Likewise.
9245 2018-06-05  Martin Liska  <mliska@suse.cz>
9247         PR gcov-profile/84846
9248         * gcov.c (output_lines): Print working directory only
9249         in intermediate format.
9251 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
9253         * config/s390/s390-builtin-types.def: Add void function type.
9254         * config/s390/s390-builtins.def: Use the function type for the
9255         tbeginc builtin.
9257 2018-06-04  Jim Wilson  <jimw@sifive.com>
9259         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9260         to int.
9261         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9262         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
9263         handle EH_RETURN_DATA_REGNO registers properly.
9264         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9265         (riscv_expand_epilogue): Update comment.  Change argument name and
9266         type.  Update code to use new name and type.  Pass new args to
9267         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
9268         EXCEPTION_RETURN.
9269         * config/riscv/riscv.md (NORMAL_RETURN): New.
9270         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9271         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9272         (eh_return): Call gen_eh_return_internal and emit barrier.
9273         (eh_return_internal): Call riscv_expand_epilogue.
9275 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
9277         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9278         bit_insertion field and declare can_be_merged_into method.
9279         (merged_store_group::can_be_merged_into): New method.
9280         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9281         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
9282         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9284 2018-06-04  Richard Biener  <rguenther@suse.de>
9286         PR tree-optimization/85955
9287         * builtins.c (fold_builtin_sincos): Convert pointers to
9288         destination to appropriate type before dereferencing.
9290 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
9292         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9294 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
9296         * expr.c (expand_expr_real_1): Force the operand into memory if
9297         its TYPE_MODE is BLKmode and if there is no integer mode for
9298         the number of bits being extracted.
9300 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9302         PR target/85832
9303         PR target/86036
9304         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9305         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9307 2018-06-04  Richard Biener  <rguenther@suse.de>
9309         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9310         (cleanup_tree_cfg_noloop): ... single caller.  Do
9311         start_recording_case_labels later.
9313 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
9315         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9316         to _IMMINTRIN_H_INCLUDED.
9317         * config/i386/pconfigintrin.h: Ditto.
9318         * config/i386/waitpkgintrin.h: Ditto.
9319         * config/i386/immintrin.h: Add includes for sgxintrin.h,
9320         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9321         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9322         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9323         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9324         waitpkgintrin.h and cldemoteintrin.h.
9326 2018-06-04  Richard Biener  <rguenther@suse.de>
9328         PR tree-optimization/86038
9329         * tracer.c (find_best_successor): Check probability for
9330         being initialized, bail out if not.
9332 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
9334         PR target/86003
9335         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9336         of bits to ignore when comparing architectures.
9338 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9340         PR tree-optimization/69615
9341         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9342         maximum or minimum of the type, try to merge it also as if
9343         range1 is + [-, x - 1] or + [x + 1, -].
9345         PR c++/86025
9346         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9348 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
9350         PR tree-optimization/86034
9351         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9352         the unsigned bitfield type in a bit insertion sequence if it does not
9353         have a larger precision than the bitfield size.
9354         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9356 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
9358         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9360 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9362         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9363         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9364         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9365         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9367 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9369         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9370         Disable -fdelete-null-pointer-checks for ELF toolchain.
9372 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9373             Kito Cheng  <kito.cheng@gmail.com>
9375         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9376         (nds32le-*-*, nds32be-*-*): Integrate checking process.
9377         (nds32*-*-*): Add glibc and uclibc conditions.
9378         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9379         (TARGET_EXCEPT_UNWIND_INFO): Define.
9380         * config/nds32/elf.h: New file.
9381         * config/nds32/linux.h: New file.
9382         * config/nds32/nds32-elf.opt: New file.
9383         * config/nds32/nds32-linux.opt: New file.
9384         * config/nds32/nds32-fp-as-gp.c
9385         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9386         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9387         TARGET_LINUX_ABI.
9388         (nds32_asm_file_end): Ditto.
9389         (nds32_print_operand): Ditto.
9390         (nds32_insert_attributes): Ditto.
9391         (nds32_init_libfuncs): New function.
9392         (TARGET_HAVE_TLS): Define.
9393         (TARGET_INIT_LIBFUNCS): Define.
9394         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9395         spec content.
9396         (TARGET_ELF): Apply different mcmodel setting.
9397         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9398         been migrated into elf.h and linux.h files.
9399         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9400         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9401         (mcmodel): The content has been migrated into nds32-elf.opt and
9402         nds32-linux.opt files.
9403         * config/nds32/t-elf: New file.
9404         * config/nds32/t-linux: New file.
9406 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9407             Shiva Chen  <shiva0217@gmail.com>
9409         * config/nds32/constants.md (unspec_volatile_element): Add
9410         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9411         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9412         optimization.
9413         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9414         (make_pass_nds32_fp_as_gp): Declare.
9415         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9416         optmization pass.
9417         (nds32_asm_function_end_prologue): Remove unused asm output.
9418         (nds32_asm_function_begin_epilogue): Remove unused asm output.
9419         (nds32_asm_file_start): Output necessary fp_as_gp information.
9420         (nds32_option_override): Adjust register usage.
9421         (nds32_expand_prologue): Consider fp_as_gp situation.
9422         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9423         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9424         (epilogue): Ditto.
9425         (return): Ditto.
9426         (simple_return): Ditto.
9427         (omit_fp_begin): Output special directive for fp_as_gp.
9428         (omit_fp_end): Output special directive for fp_as_gp.
9429         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9430         mforbid-fp-as-gp): New options.
9432 2018-06-01  Mark Wielaard  <mark@klomp.org>
9434         * dwarf2out.c (dwarf2out_finish): Remove generation of
9435         DW_AT_loclists_base.
9437 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
9439         * gimple-ssa-store-merging.c: Include gimple-fold.h.
9440         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9441         (struct merged_store_group): Add bit_insertion field.
9442         (dump_char_array): Use standard hexadecimal format.
9443         (merged_store_group::merged_store_group): Set bit_insertion to false.
9444         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
9445         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
9446         also print the mask in the dump file.
9447         (pass_store_merging::gate): Minor tweak.
9448         (imm_store_chain_info::coalesce_immediate): Fix wrong association
9449         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
9450         stores with INTEGER_CST stores.
9451         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9452         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9453         and use it throughout.  Generate bit insertion sequences if need be.
9454         (pass_store_merging::process_store): Remove redundant condition.
9455         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9457 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
9459         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9460         the 128-bit floating point types.  Fix function comment.
9462 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9464         * config/aarch64/aarch64-simd.md
9465         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9466         mnemonics.
9467         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9468         mnemonics.
9470 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
9472         PR tree-optimization/85989
9473         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9474         variable.
9475         (backprop::intersect_uses): Check it when deciding whether this
9476         is a backedge reference.
9477         (backprop::process_block): Add each phi to m_visited_phis
9478         after visiting it, then clear it at the end.
9480 2018-06-01  Richard Biener  <rguenther@suse.de>
9482         * tree-vectorizer.h (vect_dr_stmt): New function.
9483         (vect_get_load_cost): Adjust.
9484         (vect_get_store_cost): Likewise.
9485         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9486         Use vect_dr_stmt instead of DR_SMTT.
9487         (vect_record_base_alignments): Likewise.
9488         (vect_calculate_target_alignment): Likewise.
9489         (vect_compute_data_ref_alignment): Likewise and make static.
9490         (vect_update_misalignment_for_peel): Likewise.
9491         (vect_verify_datarefs_alignment): Likewise.
9492         (vector_alignment_reachable_p): Likewise.
9493         (vect_get_data_access_cost): Likewise.  Pass down
9494         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9495         (vect_get_peeling_costs_all_drs): Likewise.
9496         (vect_peeling_hash_get_lowest_cost): Likewise.
9497         (vect_enhance_data_refs_alignment): Likewise.
9498         (vect_find_same_alignment_drs): Likewise.
9499         (vect_analyze_data_refs_alignment): Likewise.
9500         (vect_analyze_group_access_1): Likewise.
9501         (vect_analyze_group_access): Likewise.
9502         (vect_analyze_data_ref_access): Likewise.
9503         (vect_analyze_data_ref_accesses): Likewise.
9504         (vect_vfa_segment_size): Likewise.
9505         (vect_small_gap_p): Likewise.
9506         (vectorizable_with_step_bound_p): Likewise.
9507         (vect_prune_runtime_alias_test_list): Likewise.
9508         (vect_analyze_data_refs): Likewise.
9509         (vect_supportable_dr_alignment): Likewise.
9510         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9511         (vect_gen_prolog_loop_niters): Likewise.
9512         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9513         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9514         modify DR_STMT.
9515         (vect_recog_mask_conversion_pattern): Likewise.
9516         (vect_try_gather_scatter_pattern): Likewise.
9517         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9518         to vect_get_store_cost.
9519         (vect_get_store_cost): Get stmt_info instead of DR.
9520         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9521         (vect_get_load_cost): Get stmt_info instead of DR.
9523 2018-06-01  Richard Biener  <rguenther@suse.de>
9525         PR middle-end/86017
9526         * gimple-fold.c (var_decl_component_p): Also allow offsetted
9527         vars wrapped in MEM_REFs.
9529 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
9531         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9532         Fix subreg tests so that we only return a choice between
9533         GENERAL_REGS and FP_REGS if the original classes included both.
9535 2018-06-01  Richard Biener  <rguenther@suse.de>
9537         PR ipa/85960
9538         * tree-ssa-structalias.c (get_function_part_constraint):
9539         Handle NULL fi->decl.
9540         (find_func_aliases_for_call): Properly handle indirect
9541         fi from direct call.
9542         (find_func_clobbers): Likewise.
9543         (ipa_pta_execute): Likewise.
9544         (create_variable_info_for): For functions that are ifunc_resolver
9545         resolve to a varinfo that contains the result of the resolver call.
9546         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9547         aliases.
9549 2018-05-31  Michael Collison  <michael.collison@arm.com>
9551         * config/aarch64/aarch64.md:
9552         (*fix_to_zero_extenddfdi2): New pattern.
9553         * gcc.target/aarch64/fix_extend1.c: New testcase.
9555 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
9557         PR middle-end/78809
9558         PR middle-end/83026
9559         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9560         and BUILT_IN_STRNCMP_EQ.
9561         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9562         BUILT_IN_STRNCMP_EQ.
9563         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9564         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9565         (gimple_fold_builtin): Likewise.
9566         * tree-ssa-strlen.c (compute_string_length): New function.
9567         (determine_min_obsize): New function.
9568         (handle_builtin_string_cmp): New function to handle calls to
9569         string compare functions.
9570         (strlen_optimize_stmt): Add handling to builtin string compare
9571         calls.
9572         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9573         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9574         * tree.c (build_common_builtin_nodes): Add new defines of
9575         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9577 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
9579         PR target/85984
9580         * bb-reorder.c (pass_partition_blocks::gate): Return false for
9581         functions with naked attribute.
9583 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
9585         * config/i386/sse.md (avx_vec_concat<mode>):
9586         Substitute concat_tg_mode mode attribute with xtg_mode.
9587         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9588         (concat_tg_mode): Remove mode attribute.
9590 2018-05-31  Martin Sebor  <msebor@redhat.com>
9592         PR c/82063
9593         * calls.c (alloc_max_size): Correct a logic error/typo.
9594         Treat excessive arguments as infinite.  Warn for invalid arguments.
9595         * doc/invoke.texi (-Walloc-size-larger-than): Update.
9597 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
9599         PR target/85829
9600         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9601         and movx for Haswell.
9603 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
9604             Cesar Philippidis  <cesar@codesourcery.com>
9606         PR middle-end/85879
9607         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9608         when emitting error on private/firstprivate reductions.
9609         * omp-low.c (lower_omp_target): Avoid reference-type processing
9610         on pointers for firstprivate clause.
9612 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9614         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9615         (st1x2): Likewise.
9616         (st1x3): Likewise.
9617         * config/aarch64/aarch64-simd.md
9618         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9619         (aarch64_ld1_x3_<mode>): Likewise
9620         (aarch64_st1x2<VALLDIF:mode>): Likewise
9621         (aarch64_st1_x2_<mode>): Likewise
9622         (aarch64_st1x3<VALLDIF:mode>): Likewise
9623         (aarch64_st1_x3_<mode>): Likewise
9624         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9625         (vld1_s8_x3): Likewise.
9626         (vld1_u16_x3): Likewise.
9627         (vld1_s16_x3): Likewise.
9628         (vld1_u32_x3): Likewise.
9629         (vld1_s32_x3): Likewise.
9630         (vld1_u64_x3): Likewise.
9631         (vld1_s64_x3): Likewise.
9632         (vld1_f16_x3): Likewise.
9633         (vld1_f32_x3): Likewise.
9634         (vld1_f64_x3): Likewise.
9635         (vld1_p8_x3): Likewise.
9636         (vld1_p16_x3): Likewise.
9637         (vld1_p64_x3): Likewise.
9638         (vld1q_u8_x3): Likewise.
9639         (vld1q_s8_x3): Likewise.
9640         (vld1q_u16_x3): Likewise.
9641         (vld1q_s16_x3): Likewise.
9642         (vld1q_u32_x3): Likewise.
9643         (vld1q_s32_x3): Likewise.
9644         (vld1q_u64_x3): Likewise.
9645         (vld1q_s64_x3): Likewise.
9646         (vld1q_f16_x3): Likewise.
9647         (vld1q_f32_x3): Likewise.
9648         (vld1q_f64_x3): Likewise.
9649         (vld1q_p8_x3): Likewise.
9650         (vld1q_p16_x3): Likewise.
9651         (vld1q_p64_x3): Likewise.
9652         (vst1_s64_x2): Likewise.
9653         (vst1_u64_x2): Likewise.
9654         (vst1_f64_x2): Likewise.
9655         (vst1_s8_x2): Likewise.
9656         (vst1_p8_x2): Likewise.
9657         (vst1_s16_x2): Likewise.
9658         (vst1_p16_x2): Likewise.
9659         (vst1_s32_x2): Likewise.
9660         (vst1_u8_x2): Likewise.
9661         (vst1_u16_x2): Likewise.
9662         (vst1_u32_x2): Likewise.
9663         (vst1_f16_x2): Likewise.
9664         (vst1_f32_x2): Likewise.
9665         (vst1_p64_x2): Likewise.
9666         (vst1q_s8_x2): Likewise.
9667         (vst1q_p8_x2): Likewise.
9668         (vst1q_s16_x2): Likewise.
9669         (vst1q_p16_x2): Likewise.
9670         (vst1q_s32_x2): Likewise.
9671         (vst1q_s64_x2): Likewise.
9672         (vst1q_u8_x2): Likewise.
9673         (vst1q_u16_x2): Likewise.
9674         (vst1q_u32_x2): Likewise.
9675         (vst1q_u64_x2): Likewise.
9676         (vst1q_f16_x2): Likewise.
9677         (vst1q_f32_x2): Likewise.
9678         (vst1q_f64_x2): Likewise.
9679         (vst1q_p64_x2): Likewise.
9680         (vst1_s64_x3): Likewise.
9681         (vst1_u64_x3): Likewise.
9682         (vst1_f64_x3): Likewise.
9683         (vst1_s8_x3): Likewise.
9684         (vst1_p8_x3): Likewise.
9685         (vst1_s16_x3): Likewise.
9686         (vst1_p16_x3): Likewise.
9687         (vst1_s32_x3): Likewise.
9688         (vst1_u8_x3): Likewise.
9689         (vst1_u16_x3): Likewise.
9690         (vst1_u32_x3): Likewise.
9691         (vst1_f16_x3): Likewise.
9692         (vst1_f32_x3): Likewise.
9693         (vst1_p64_x3): Likewise.
9694         (vst1q_s8_x3): Likewise.
9695         (vst1q_p8_x3): Likewise.
9696         (vst1q_s16_x3): Likewise.
9697         (vst1q_p16_x3): Likewise.
9698         (vst1q_s32_x3): Likewise.
9699         (vst1q_s64_x3): Likewise.
9700         (vst1q_u8_x3): Likewise.
9701         (vst1q_u16_x3): Likewise.
9702         (vst1q_u32_x3): Likewise.
9703         (vst1q_u64_x3): Likewise.
9704         (vst1q_f16_x3): Likewise.
9705         (vst1q_f32_x3): Likewise.
9706         (vst1q_f64_x3): Likewise.
9707         (vst1q_p64_x3): Likewise.
9709 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9711         * config/msp430/msp430.c (msp430_output_labelref): Prepend
9712         user_label_prefix to name.
9714         * tree-core.h: Update comment about the format of NAME string
9715         passed to handler in attribute_spec.
9717         * config/msp430/msp430.md: Remove erroneous subreg expression from
9718         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9719         zero_extend{q,h}isi2.
9721 2018-05-30  Borislav Petkov  <bp@suse.de>
9723         * doc/extend.texi: Document some architecture specific
9724         constraints and sort entries.
9726 2018-05-30  Martin Sebor  <msebor@redhat.com>
9728         PR middle-end/85369
9729         * builtins.c (expand_builtin_stpcpy_1): New function.
9730         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9731         only if the former succeeds.
9733 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9735         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9736         in saphira.
9738 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9740         * doc/invoke.texi (-flinker-output): Document
9742 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9744         * passes.c (ipa_write_summaries): Only modify statements if body
9745         is in memory.
9746         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9747         incrementally linking.
9748         (ipa_passes): Likewise.
9749         * lto-cgraph.c (lto_output_node): When incrementally linking do not
9750         pass down resolution info.
9751         * common.opt (flag_incremental_link): Update info.
9752         * gcc.c (plugin specs): Turn flinker-output=* to
9753         -plugin-opt=-linker-output-known
9754         * toplev.c (compile_file): Also cut compilation when doing incremental
9755         link.
9756         * flag-types. (enum lto_partition_model): Add
9757         LTO_LINKER_OUTPUT_NOLTOREL.
9758         (invoke.texi): Add -flinker-output docs.
9759         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9760         link same way as WPA; do not stream in dead initializers.
9762         * dwarf2out.c (dwarf2out_die_ref_for_decl,
9763         darf2out_register_external_decl): Support incremental link.
9765 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9767         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9769 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9771         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9772         it down to simple_object_copy_lto_debug_sections.
9773         (run_gcc): Determine incremental LTO link time and configure
9774         lto1 into non-wpa mode, disable renaming of debug sections.
9776 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9778         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9779         descriptions of various incorrectly documented functions.
9781 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9783         Revert:
9784         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9785         address check not strict.
9787 2018-05-30  Richard Biener  <rguenther@suse.de>
9789         PR tree-optimization/85964
9790         * tracer.c (better_p): Drop initialized count check, we only
9791         call the function with initialized counts now.
9792         (find_best_successor): Do find a best edge if one
9793         has uninitialized count.
9794         (find_best_predecessor): Likewise.  Do BB frequency check only
9795         if count is initialized.
9797 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
9799         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9800         (aarch64_ldrstr_offset_compare): New.
9801         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9802         load/store orderings.
9803         (aarch64_gen_adjusted_ldpstp): Likewise.
9805 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
9807         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9808         Check for subset of GENERAL_REGS and FP_REGS.
9809         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9810         r=w alternative.
9812 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
9814         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9815         and wi::to_poly_offset.  Add the current offset and then check
9816         whether the sum fits, rather than using an unchecked addition of
9817         a checked term.  Check for a shwi rather than a uhwi.
9818         * expr.c (get_bit_range): Use tree_to_poly_uint64.
9819         (store_constructor): Use poly_int_tree_p.
9820         (expand_expr_real_1): Likewise.
9821         * function.c (assign_temp): Likewise.
9822         * fold-const.c (const_binop): Use poly_int_tree_p and
9823         wi::to_poly_offset.
9824         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
9825         division.
9826         * ipa-icf-gimple.c (func_checker::compare_operand): Use
9827         to_poly_offset for MEM offsets.
9828         * ipa-icf.c (sem_variable::equals): Likewise.
9829         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9830         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9831         wi::to_poly_offset for BIT_FIELD_REF offsets.
9832         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9833         wi::to_poly_offset.
9834         * var-tracking.c (emit_note_insn_var_location): Use
9835         tree_to_poly_uint64.
9837 2018-05-29  Jim Wilson  <jimw@sifive.com>
9839         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9841 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9843         PR target/85950
9844         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9845         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9846         sequence.
9847         (sse4_1_round<mode>2): Use nonimmediate_operand
9848         for operand 1 predicate.
9850 2018-05-29  Martin Sebor  <msebor@redhat.com>
9851             Richard Biener  <rguenther@suse.de>
9853         PR testsuite/85888
9854         * calls.c (get_size_range): Call determine_value_range instead
9855         of get_value_range..
9856         * tree-vrp.h (determine_value_range): Declared new function.
9857         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9859 2018-05-29  Richard Biener  <rguenther@suse.de>
9861         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9862         sure to use non-pattern stmts for get_earlier_stmt arguments.
9863         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9864         called on pattern stmts.
9865         (get_later_stmt): Likewise.
9867 2018-05-29  Martin Liska  <mliska@suse.cz>
9869         PR gcov-profile/85759
9870         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9871         env variables.
9873 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9875         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9876         VEC_UNPACK_*_EXPR.
9877         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9878         VEC_PACK_*_EXPR.
9880         PR target/85918
9881         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9882         VEC_PACK_FLOAT_EXPR): New tree codes.
9883         * tree-pretty-print.c (op_code_prio): Handle
9884         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9885         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9886         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9887         * tree-inline.c (estimate_operator_cost): Likewise.
9888         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9889         * fold-const.c (const_binop): Likewise.
9890         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9891         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9892         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9893         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9894         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9895         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9896         * expr.c (expand_expr_real_2): Likewise.
9897         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9898         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9899         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9900         optabs.
9901         * optabs.c (expand_widen_pattern_expr): For
9902         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9903         sign from result type rather than operand's type.
9904         (expand_binop_directly): For vec_packu_float_optab and
9905         vec_packs_float_optab allow result type to be different from operand's
9906         type.
9907         * optabs-tree.c (optab_for_tree_code): Handle
9908         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9909         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9910         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9911         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9912         VEC_PACK_FLOAT_EXPR.
9913         * tree-vect-stmts.c (supportable_widening_operation): Handle
9914         FIX_TRUNC_EXPR.
9915         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9916         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9917         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9918         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9919         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9920         mode attributes.
9921         (vec_pack<floatprefix>_float_<mode>): New expander.
9922         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9923         attributes.
9924         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9925         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9926         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9927         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9928         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9929         Document.
9930         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9931         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9932         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9933         VEC_PACK_FLOAT_EXPR): Document.
9935 2018-05-29  Richard Biener  <rguenther@suse.de>
9937         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9938         member.
9939         (stmt_vec_info_vec): Make pointer.
9940         (init_stmt_vec_info_vec): Remove.
9941         (free_stmt_vec_info_vec): Likewise.
9942         (set_stmt_vec_info_vec): New function.
9943         (free_stmt_vec_infos): Likewise.
9944         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9945         (set_vinfo_for_stmt): Likewise.
9946         (get_earlier_stmt): Likewise.
9947         (get_later_stmt): Likewise.
9948         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9949         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9950         (vec_info::~vec_info): Free stmt_vec_infos.
9951         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9952         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9953         (pass_slp_vectorize::execute): Likewise.
9954         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9955         (free_stmt_vec_info_vec): Likewise.
9956         (set_stmt_vec_info_vec): New function.
9957         (free_stmt_vec_infos): Likewise.
9958         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9959         the global stmt_vec_info_vec.
9960         * tree-parloops.c (gather_scalar_reductions): Use
9961         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9962         vector.
9964 2018-05-29  Richard Biener  <rguenther@suse.de>
9966         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9968 2018-05-29  Martin Liska  <mliska@suse.cz>
9969             David Malcolm  <dmalcolm@redhat.com>
9971         * vec.c (test_reverse): New.
9972         (vec_c_tests): Add new test.
9973         * vec.h (vl_ptr>::reverse): New function.
9975 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9977         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9979         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9980         and later.
9982 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9984         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9986 2018-05-28  Richard Biener  <rguenther@suse.de>
9988         PR tree-optimization/85933
9989         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9990         look at stmts marked as vectorizable.
9992 2018-05-28  Richard Biener  <rguenther@suse.de>
9994         PR tree-optimization/85934
9995         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9996         vector boolean check before scalar optimization.
9998 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
10000         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10001         for armv5te.
10003 2018-05-28  Mark Wielaard  <mark@klomp.org>
10005         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10006         if it is an expression containing a minus sign.
10008 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
10010         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10012 2018-05-27  Paul Koning  <ni1d@arrl.net>
10014         * config/pdp11/pdp11.md (truncsihi2): Remove.
10016 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
10017             Chung-Ju Wu  <jasonwucj@gmail.com>
10019         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10020         implementation.
10021         (unaligned_store_dw): Ditto.
10022         * config/nds32/nds32-memory-manipulation.c
10023         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10024         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10025         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10026         (emit_setmem_word_loop): Rename to ...
10027         (emit_setmem_doubleword_loop): ... this.
10028         (nds32_gen_dup_4_byte_to_word_value): New function.
10029         (nds32_gen_dup_8_byte_to_double_word_value): New function.
10030         (nds32_expand_setmem_loop): Refine implementation.
10031         (nds32_expand_setmem_loop_v3m): Ditto.
10032         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10033         pattern.
10035 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10037         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10039 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10041         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10042         (nds32_init_machine_status): Initialize machine->attr_naked_p and
10043         machine->attr_no_prologue_p.
10044         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10045         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10046         (nds32_expand_epilogue): Consider attr_naked_p.
10047         (nds32_expand_epilogue_v3pop): Likewise.
10048         (nds32_can_use_return_insn): Likewise.
10049         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10050         attr_no_prologue_p fields.
10051         * config/nds32/nds32.opt (mret-in-naked-func): New option.
10053 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
10055         PR target/85918
10056         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10057         attributes.
10058         * config/i386/sse.md
10059         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10060         Rename to ...
10061         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10062         ... this.
10063         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10064         Rename to ...
10065         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10066         ... this.
10067         (*<floatsuffix>floatv2div2sf2): Rename to ...
10068         (*float<floatunssuffix>v2div2sf2): ... this.
10069         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10070         (float<floatunssuffix>v2div2sf2_mask): ... this.
10071         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10072         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10073         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10074         to ...
10075         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10076         ... this.
10077         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10078         Rename to ...
10079         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10080         ... this.
10081         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10082         Rename to ...
10083         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10084         ... this.
10085         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10086         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10087         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10088         gen_ufix_truncv8dfv8si2.
10089         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10090         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10091         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10092         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10093         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10094         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10095         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10096         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10098 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10100         PR target/85900
10101         PR target/85345
10102         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10104 2018-05-25  Jim Wilson  <jimw@sifive.com>
10106         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10107         * config/riscv/riscv.c (struct machine_function): Add
10108         interrupt_handler_p and attribute_checked_p fields.
10109         (riscv_attribute_table): Add interrupt.
10110         (riscv_interrupt_type_p): New.
10111         (riscv_save_reg_p): Save extra regs for interrupt handler.
10112         (riscv_use_save_libcall): Return false  for interrupt handler.
10113         (riscv_first_stack_step): Add forward declaration.
10114         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
10115         for interrupt handler with large frame.  Use it for saved reg list.
10116         (riscv_expand_prologue): Move flag_stack_usage_info support to
10117         eliminate duplication.
10118         (riscv_expand_epilogue): Generate mret for interrupt handler.
10119         (riscv_epilogue_uses): New.
10120         (riscv_can_use_return_insn): Return false for interrupt handler.
10121         (riscv_function_ok_for_sibcall): Likewise.
10122         (riscv_set_current_function): Add interrupt handler support.
10123         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10124         * config/riscv/riscv.md (UNSPECV_MRET): New.
10125         (GP_REGNUM): New.
10126         (riscv_frflags, riscv_fsflags): Use tab after opcode.
10127         (riscv_mret): New.
10128         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10130 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
10132         PR tree-optimization/85712
10133         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10134         this candidate has already been replaced in-situ by a copy.
10136 2018-05-25  Jason Merrill  <jason@redhat.com>
10138         PR c++/80485 - inline function non-zero address.
10139         * symtab.c (nonzero_address): Check DECL_COMDAT.
10141 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
10143         PR target/83628
10144         * config/alpha/alpha.md (ashlsi3): New insn pattern.
10145         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
10146         extension of SImode operation.  Use const123_operand predicate.
10147         (*saddsi_1): Remove.
10148         (*saddl_se_1): Ditto.
10149         (*ssubsi_1): Ditto.
10150         (*ssubl_se_1): Ditto.
10151         * config/alpha/predicates.md (const123_operand): New predicate.
10152         * config/alpha/constraints.md (P): Use IN_RANGE.
10154 2018-05-25  Richard Biener  <rguenther@suse.de>
10156         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10157         defaulted to true.
10158         (ref_maybe_used_by_stmt_p): Likewise.
10159         (stmt_may_clobber_ref_p): Likewise.
10160         (stmt_may_clobber_ref_p_1): Likewise.
10161         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10162         and pass it along.
10163         (ref_maybe_used_by_stmt_p): Likewise.
10164         (stmt_may_clobber_ref_p): Likewise.
10165         (stmt_may_clobber_ref_p_1): Likewise.
10166         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10167         the alias oracle to disambiguate DRs with stmts DR analysis
10168         couldn't handle.
10169         (vect_analyze_data_refs): Do not give up on not analyzable
10170         DRs for BB vectorization.  Remove code truncating the dataref
10171         vector.
10173 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
10175         PR target/85832
10176         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10177         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
10178         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10180 2018-05-25  Richard Biener  <rguenther@suse.de>
10182         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10183         function, combining stmt data ref gathering and fatal analysis
10184         parts.
10185         (vect_analyze_data_refs): Remove now redudnant code and simplify.
10186         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10187         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10188         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10189         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10191 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10193         PR tree-optimization/85720
10194         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10195         SCC if all partitions are builtins.
10196         (version_loop_by_alias_check): New parameter.  Generate cancelable
10197         runtime alias check if all partitions are builtins.
10198         (distribute_loop): Update call to above function.
10200 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10202         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10203         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10204         (parm_default_def_partition_arg): Ditto.
10205         (set_parm_default_def_partition): Ditto.
10206         (get_parm_default_def_partitions): Ditto and make it static.
10207         (get_undefined_value_partitions): Ditto and make it static.
10208         (remove_ssa_form): Refactor call to init_var_map here.
10209         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10210         computation for loop region.
10211         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10212         (register_default_def): Delete.
10213         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10214         (parm_default_def_partition_arg): Ditto.
10215         (set_parm_default_def_partition): Ditto.
10216         (get_parm_default_def_partitions): Ditto and make it static.
10217         (get_undefined_value_partitions): Ditto and make it static.
10218         (coalesce_with_default, coalesce_with_default): Update comment.
10219         (create_coalesce_list_for_region): New func factored out from
10220         create_outofssa_var_map.
10221         (populate_coalesce_list_for_outofssa): New func factored out from
10222         create_outofssa_var_map and coalesce_ssa_name.
10223         (create_outofssa_var_map): Delete.
10224         (coalesce_ssa_name): Refactor to support live range computation.
10225         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10226         (get_parm_default_def_partitions): Delete.
10227         (get_undefined_value_partitions): Ditto.
10228         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10229         computation for loop region.
10230         (new_tree_live_info, loe_visit_block): Ditto.
10231         (live_worklist, set_var_live_on_entry): Ditto.
10232         (calculate_live_on_exit, verify_live_on_entry): Ditto.
10233         * tree-ssa-live.h (struct _var_map): New fields.
10234         (init_var_map): Change decl.
10235         (region_contains_p): New.
10237 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10239         * tree-ssa-live.h (live_merge_and_clear): Delete.
10241 2018-05-25  Richard Biener  <rguenther@suse.de>
10243         PR c++/85912
10244         * tree-dump.c (dequeue_and_dump): Remove access to removed
10245         operand 2 of a SWITCH_EXPR.
10247 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10249         * doc/sourcebuild.texi (vect_double_cond_arith): Include
10250         multiplication and division.
10251         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10252         (cond_udiv@var{m}, cond_umod@var{m}): Document.
10253         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10254         (cond_udiv_optab, cond_umod_optab): New optabs.
10255         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10256         (IFN_COND_RDIV): New internal functions.
10257         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10258         TRUNC_MOD_EXPR and RDIV_EXPR.
10259         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10260         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10261         New unspecs.
10262         (SVE_INT_BINARY): Include mult.
10263         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10264         (optab, sve_int_op): Handle mult.
10265         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10266         UNSPEC_COND_DIV.
10267         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10268         for SVE_INT_BINARY_SD.
10270 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10272         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10273         (optab, sve_int_op): Handle div and udiv.
10274         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10275         for SVE_INT_BINARY_SD.
10276         (*<optab><mode>3): New insn for the same.
10278 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10280         * tree-vect-patterns.c: Include predict.h.
10281         (vect_recog_divmod_pattern): Restrict check for division support
10282         to when optimizing for size.
10284 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10286         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10287         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10288         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10289         (gimple_match_op::set_op): Likewise.
10290         (gimple_resimplify4): Declare.
10291         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10292         (expr::gen_transform): Likewise.
10293         (decision_tree::gen): Generate a simplification routine for 4 operands.
10294         * gimple-match-head.c (gimple_simplify): Add an overload for
10295         4 operands.  In the top-level function, handle up to 4 call
10296         arguments and call gimple_resimplify4.
10297         (gimple_resimplify4): New function.
10298         (build_call_internal): Pass a fourth operand.
10299         (maybe_push_to_seq): Likewise.
10300         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10301         Fold VEC_COND_EXPRs of an operation and a default value into
10302         an IFN_COND_* function if possible.
10303         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10304         New unspecs.
10305         (SVE_COND_FP_BINARY): Include them.
10306         (optab, sve_fp_op): Handle them.
10307         (SVE_INT_BINARY_REV): New code iterator.
10308         (SVE_COND_FP_BINARY_REV): New int iterator.
10309         (commutative): New int attribute.
10310         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10311         Declare.
10312         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10313         function.
10314         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10315         (*cond_<optab><mode>): New patterns for reversed operands.
10317 2018-05-25  Richard Biener  <rguenther@suse.de>
10319         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10320         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10321         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10322         (STMT_VINFO_GROUPED_ACCESS): Adjust.
10323         * tree-vect-data-refs.c (everywhere): Adjust users.
10324         * tree-vect-loop.c (everywhere): Likewise.
10325         * tree-vect-slp.c (everywhere): Likewise.
10326         * tree-vect-stmts.c (everywhere): Likewise.
10327         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10329 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10331         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10332         Rename to...
10333         (gcc_cv_as_section_exclude): ... this.
10334         Try Solaris as #exclude syntax.
10335         * configure: Regenerate.
10336         * config.in: Regenerate.
10337         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10338         SECTION_EXCLUDE.
10339         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10340         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10342         * varasm.c (default_elf_asm_named_section): Don't check if
10343         HAVE_GAS_SECTION_EXCLUDE is defined.
10345 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10347         * doc/md.texi: Update the documentation of the cond_* optabs
10348         to mention the new final operand.  Fix GET_MODE_NUNITS call.
10349         Describe the scalar case too.
10350         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10351         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10352         instead of 2.
10353         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10354         (get_conditional_internal_fn): Update comment.
10355         * tree-vect-loop.c (vectorizable_reduction): Pass the original
10356         accumulator value as a final argument to conditional functions.
10357         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10358         a define_expand and add an "else" operand.  Assert for now that
10359         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
10360         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10361         (*cond_<optab><mode>): New patterns.
10362         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10363         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10364         (UNSPEC_COND_EOR): Delete.
10365         (optab): Remove associated mappings.
10366         (SVE_INT_BINARY): New code iterator.
10367         (sve_int_op): Remove int attribute and add "minus" to the code
10368         attribute.
10369         (SVE_COND_INT_OP): Delete.
10370         (SVE_COND_FP_OP): Rename to...
10371         (SVE_COND_FP_BINARY): ...this.
10373 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10375         * optabs.c (can_reuse_operands_p): New function.
10376         (maybe_legitimize_operands): Try to reuse the results for
10377         earlier operands.
10379 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10381         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10382         Add {q} suffix to insn mnemonic.
10384 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10386         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10387         (msp430_warn_func_return): New.
10389 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
10391         * fold-const.c (tree_nonzero_bits): New function.
10392         * fold-const.h (tree_nonzero_bits): Likewise.
10393         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10394         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10396 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10398         PR target/85900
10399         PR target/85345
10400         * varasm.c (assemble_alias): Check ifunc_resolver only on
10401         FUNCTION_DECL.
10403 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10405         PR target/85903
10406         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10407         when memory input operand is handled.
10409 2018-05-24  Luis Machado  <luis.machado@linaro.org>
10411         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10412         global.
10413         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10415 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10417         * match.pd: Delay FMA folds until after vectorization.
10419 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10421         PR target/83009
10422         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10423         address check not strict.
10425 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10427         * gimple-match.h (gimple_match_op): New class.
10428         (mprts_hook): Replace parameters with a gimple_match_op *.
10429         (maybe_build_generic_op): Likewise.
10430         (gimple_simplified_result_is_gimple_val): Replace parameters with
10431         a const gimple_match_op *.
10432         (gimple_simplify): Replace code_helper * and tree * parameters with
10433         a gimple_match_op * parameter.
10434         (gimple_resimplify1): Replace code_helper *, tree and tree *
10435         parameters with a gimple_match_op * parameter.
10436         (gimple_resimplify2): Likewise.
10437         (gimple_resimplify3): Likewise.
10438         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10439         parameters with a gimple_match_op * parameter.
10440         * gimple-match-head.c (gimple_simplify): Change prototypes of
10441         auto-generated functions to take a gimple_match_op * instead of
10442         separate code_helper * and tree * parameters.  Make the same
10443         change in the top-level overload and update calls to the
10444         gimple_resimplify routines.  Update calls to the auto-generated
10445         functions and to maybe_push_res_to_seq in the publicly-facing
10446         operation-specific gimple_simplify overloads.
10447         (gimple_match_op::MAX_NUM_OPS): Define.
10448         (gimple_resimplify1): Replace rcode and ops with a single res_op
10449         parameter.  Update call to gimple_simplify.
10450         (gimple_resimplify2): Likewise.
10451         (gimple_resimplify3): Likewise.
10452         (mprts_hook): Replace parameters with a gimple_match_op *.
10453         (maybe_build_generic_op): Likewise.
10454         (build_call_internal): Replace type, nargs and ops with
10455         a gimple_match_op *.
10456         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10457         with a single gimple_match_op *.  Update calls to mprts_hook,
10458         build_call_internal and gimple_simplified_result_is_gimple_val.
10459         Factor out code that is common to the tree_code and combined_fn cases.
10460         * genmatch.c (expr::gen_transform): Replace tem_code and
10461         tem_ops with a gimple_match_op called tem_op.  Update calls
10462         to the gimple_resimplify functions and maybe_push_res_to_seq.
10463         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10464         res_ops.  Update call to the gimple_resimplify functions.
10465         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10466         (decision_tree::gen): Make the functions take a gimple_match_op *
10467         called res_op instead of separate res_code and res_ops parameters.
10468         Update call accordingly.
10469         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10470         and ops with a single res_op parameter.  Update calls to
10471         maybe_build_generic_op and maybe_push_res_to_seq.
10472         (fold_stmt_1): Update calls to gimple_simplify and
10473         replace_stmt_with_simplification.
10474         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10475         and gimple_simplified_result_is_gimple_val.
10476         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10477         gimple_simplify.
10478         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10479         with a gimple_match_op *.
10480         (vn_nary_build_or_lookup): Likewise.  Update call to
10481         vn_nary_build_or_lookup_1.
10482         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10483         gimple_match_op *.  Update calls to the gimple_resimplify routines
10484         and to gimple_simplified_result_is_gimple_val.
10485         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10486         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10487         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10488         (visit_nary_op): Likewise.
10489         (visit_reference_op_load): Likewise.
10491 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10493         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10494         modifier for printing the step amount.
10496 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
10498         PR target/78849
10499         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10500         types.
10502 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
10504         * doc/sourcebuild.texi (Endianness): New subsubsection.
10506 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10508         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10509         <prefetch_dynamic_strides>: New const bool field.
10510         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10511         prefetch_dynamic_strides.
10512         (exynosm1_prefetch_tune): Likewise.
10513         (thunderxt88_prefetch_tune): Likewise.
10514         (thunderx_prefetch_tune): Likewise.
10515         (thunderx2t99_prefetch_tune): Likewise.
10516         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10517         false.
10518         (aarch64_override_options_internal): Update to set
10519         PARAM_PREFETCH_DYNAMIC_STRIDES.
10520         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10521         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10522         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10523         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10524         prefetch-dynamic-strides setting.
10526 2018-05-23  Luis Machado  <luis.machado@linaro.org>
10528         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10529         <minimum_stride>: New const int field.
10530         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10531         minimum_stride field defaulting to -1.
10532         (exynosm1_prefetch_tune): Likewise.
10533         (thunderxt88_prefetch_tune): Likewise.
10534         (thunderx_prefetch_tune): Likewise.
10535         (thunderx2t99_prefetch_tune): Likewise.
10536         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10537         <default_opt_level>: Set to 3.
10538         (aarch64_override_options_internal): Update to set
10539         PARAM_PREFETCH_MINIMUM_STRIDE.
10540         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10541         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10542         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10543         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10544         stride is constant and is below the minimum stride threshold.
10546 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10548         * config/arm/arm-cpus.in (mode26): Delete.
10549         (armv4): Delete mode26 reference.
10550         * config/arm/arm.c (arm_configure_build_target): Delete use of
10551         isa_bit_mode26.
10553 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
10555         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10556         New insn pattern.
10557         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10558         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
10559         for non-SSE modes.
10560         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
10561         (floatunsdidf2): Ditto.
10563 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
10565         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10566         (fixuns_trunc<mode>si2_avx512f): Ditto.
10567         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10568         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10569         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10571 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
10573         PR rtl-optimization/79985
10574         * df-scan.c (df_insn_refs_collect): Remove special case for
10575         global registers and asm statements.
10577 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
10579         * extend.texi (Global Register Variables): Rewrite the bullet list.
10580         Note that the register is available for allocation. Note that access
10581         via inline asm must use constraints. Add note about async-signal
10582         handlers. Remove paragraph about automagic register selection.
10584 2018-05-23  Richard Biener  <rguenther@suse.de>
10586         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10587         of fixed offset from memset VN.
10589 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
10591         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10592         first_interp field.
10593         (alloc_cand_and_find_basis): Initialize first_interp field.
10594         (slsr_process_mul): Modify first_interp field.
10595         (slsr_process_add): Likewise.
10596         (slsr_process_cast): Modify first_interp field for each new
10597         interpretation.
10598         (slsr_process_copy): Likewise.
10599         (dump_candidate): Dump first_interp field.
10600         (replace_mult_candidate): Process all interpretations, not just
10601         subsequent ones.
10602         (replace_rhs_if_not_dup): Likewise.
10603         (replace_one_candidate): Likewise.
10605 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
10607         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10608         Add new boolean.
10609         (aarch64_needs_frame_chain): New function.
10610         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10612 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
10614         PR target/84882
10615         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10616         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10617         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10618         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10619         as true for strict-align.
10620         (aarch64_can_inline_p): Perform checks even when callee has no
10621         attributes to check for strict alignment.
10622         * doc/extend.texi (AArch64 Function Attributes): Document
10623         no-strict-align.
10624         * doc/invoke.texi: (AArch64 Options): Likewise.
10626 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
10628         PR tree-optimization/85853
10629         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10630         the handling of the root of the node to...
10631         (vect_slp_analyze_node_operations_1): ...this new function,
10632         and run the whole thing with the child nodes' def types
10633         set according to their SLP node's def type.
10635 2018-05-23  Richard Biener  <rguenther@suse.de>
10637         PR middle-end/85874
10638         * tree-data-ref.c (create_runtime_alias_checks): Defer
10639         and ignore overflow warnings.
10641 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
10643         PR tree-optimization/85822
10644         * tree-vrp.c (is_masked_range_test): Fix handling of negative
10645         constants.
10647 2018-05-23  Richard Biener  <rguenther@suse.de>
10649         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10650         memset constants via native_interpret_expr.
10652 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
10654         PR target/85345
10655         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10656         attribute.
10657         (cgraph_node::create_alias): Likewise.
10658         (cgraph_node::get_availability): Check ifunc_resolver instead
10659         of looking up ifunc attribute.
10660         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10661         * varasm.c (do_assemble_alias): Likewise.
10662         (assemble_alias): Likewise.
10663         (default_binds_local_p_3): Likewise.
10664         * cgraph.h (cgraph_node): Add ifunc_resolver.
10665         (cgraph_node::only_called_directly_or_aliased_p): Return false
10666         for IFUNC resolver.
10667         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10668         attribute.
10669         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10670         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10671         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10672         instead of looking up ifunc attribute.
10674 2018-05-22  Luis Machado  <luis.machado@linaro.org>
10676         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10678 2018-05-22  Martin Sebor  <msebor@redhat.com>
10680         PR middle-end/85359
10681         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10682         only when expasion succeeds.
10683         (expand_builtin_strcmp): Same.
10684         (expand_builtin_strncmp): Same.
10686 2018-05-22  Martin Sebor  <msebor@redhat.com>
10688         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10690 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10691             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10693         * config/aarch64/aarch64-ldpstp.md: Replace uses of
10694         aarch64_mem_pair_operand with memory_operand and delete operand swapping
10695         code.
10696         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10697         Add check for legitimate_address.
10698         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10699         (aarch64_swap_ldrstr_operands): New.
10700         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10701         Define prototype.
10703 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10704             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10706         * config/aarch64/aarch64.md: New patterns to generate stp
10707         and ldp.
10708         (store_pair_sw, store_pair_dw): New patterns to generate stp for
10709         single words and double words.
10710         (load_pair_sw, load_pair_dw): Likewise.
10711         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10712         Delete.
10713         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10714         Delete.
10715         * config/aarch64/aarch64-ldpstp.md: Modify peephole
10716         for different mode ldpstp and add peephole for merged zero stores.
10717         Likewise for loads.
10718         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10719         Add size check.
10720         (aarch64_gen_store_pair): Rename calls to match new patterns.
10721         (aarch64_gen_load_pair): Rename calls to match new patterns.
10722         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10723         (load_pair<DREG:mode><DREG2:mode>): ... This.
10724         (store_pair<mode>): Rename to...
10725         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10726         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10727         New mode iterators.
10728         (V_INT_EQUIV): Handle SImode.
10729         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10730         New predicate.
10732 2018-05-22  Martin Sebor  <msebor@redhat.com>
10734         PR c/85623
10735         * calls.c (maybe_warn_nonstring_arg): Use string length to set
10736         or ajust the presumed bound on an operation to avoid unnecessary
10737         warnings.
10739 2018-05-22  Martin Sebor  <msebor@redhat.com>
10741         PR tree-optimization/85826
10742         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10743         assuming that a DECL necesarily has a constant size.
10745 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
10747         PR middle-end/85862
10748         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10750 2018-05-22  Richard Biener  <rguenther@suse.de>
10752         PR tree-optimization/85834
10753         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10754         non-constant and non-zero memset arguments.
10756 2018-05-22  Martin Liska  <mliska@suse.cz>
10758         PR ipa/85607
10759         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10761 2018-05-22  Richard Biener  <rguenther@suse.de>
10763         PR tree-optimization/85863
10764         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10765         comparisons when vectype is specified.
10766         (vectorizable_condition): Do not specify vectype for
10767         vect_is_simple_cond when SLP vectorizing.
10769 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
10771         PR target/85657
10772         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10773         define __ibm128 as long double.
10774         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10775         as a distinct type when IEEE 128-bit support is enabled.
10776         (init_float128_ieee): Fix up conversions between IFmode and IEEE
10777         128-bit types to use the correct functions.
10778         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10779         convert between 128-bit floating point types that have different
10780         modes but the same representation, instead of using gen_lowpart to
10781         makean alias.
10782         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10783         KFmode.
10784         (IFKF_reg): New attributes to give the register constraints for
10785         IFmode and KFmode.
10786         (extend<mode>tf2_internal): New insns to mark an explicit
10787         conversion between 128-bit floating point types that have a
10788         different mode but share the same representation.
10790 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
10792         PR tree-optimization/85814
10793         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10794         a null return from get_strinfo when unsharing the next
10795         strinfo in the chain.
10797 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10799         PR gcc/84923
10800         * varasm.c (weak_finish): Clean up weak_decls.
10802 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10804         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10805         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10806         UNSPEC_UADALP values.
10807         * config/aarch64/iterators.md (ABAL): New int iterator.
10808         (ABDL2): Likewise.
10809         (ADALP): Likewise.
10810         (sur): Add mappings for the above.
10811         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10812         New define_insn.
10813         (aarch64_<sur>abal<mode>_4): Likewise.
10814         (aarch64_<sur>adalp<mode>_3): Likewise.
10815         (<sur>sadv16qi): New define_expand.
10817 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
10819         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10820         (*movdf_internal): Ditto.
10821         (*rcpsf2_sse): Ditto.
10822         (*rsqrtsf2_sse): Ditto.
10823         (*sqrt<mode>2_sse): Ditto.
10825 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
10827         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10828         eor3q<mode>4.
10829         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10830         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10831         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10832         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10833         vbcaxq_s64): New.
10834         * config/aarch64/arm_neon.h: Likewise.
10835         * config/aarch64/iterators.md (VQ_I): New.
10837 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
10839         * config.gcc: Add arc/t-multilib-linux to tmake_file for
10840         arc*-*-linux*.
10841         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10842         MULTILIB_DIRNAMES
10844 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10846         * config/nds32/constraints.md (S): New constraint.
10847         * config/nds32/nds32.md (call_internal): Use constraint S.
10848         (call_value_internal): Likewise.
10849         (sibcall_internal): Likewise.
10850         (sibcall_value_internal): Likewise.
10852 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10853             Chung-Ju Wu  <jasonwucj@gmail.com>
10855         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10856         into consideration.
10858 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10859             Chung-Ju Wu  <jasonwucj@gmail.com>
10861         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10862         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10863         (nds32_rtx_costs_impl): Simplify.
10864         (nds32_address_cost_impl): Simplify.
10865         (nds32_init_rtx_costs): New function.
10866         (nds32_rtx_costs_speed_prefer): Likewise.
10867         (nds32_rtx_costs_size_prefer): Likewise.
10868         (nds32_address_cost_speed_prefer): Likewise.
10869         (nds32_address_cost_speed_fwprop): Likewise.
10870         (nds32_address_cost_size_prefer): Likewise.
10871         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10872         * config/nds32/nds32.c (nds32_option_override): Use
10873         nds32_init_rtx_costs function.
10875 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10877         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10878         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10879         (TARGET_PIPELINE_N8): Likewise.
10880         (TARGET_PIPELINE_N10): Likewise.
10881         (TARGET_PIPELINE_N13): Likewise.
10882         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10884 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10886         * config/nds32/nds32-fpu.md: Update copyright year.
10888 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10890         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10892 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10894         * config/nds32/nds32.c
10895         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10896         * config/nds32/nds32.opt (minline-asm-r15): New option.
10898 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10900         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10901         MASK_HW_ABS.
10902         * config/nds32/nds32.md (abssi2): New pattern.
10904 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10906         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10907         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10908         Merge insn pattern from sse_cvtsi2ss<round_name> and
10909         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10910         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10911         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10912         using SWI48 mode iterator.
10913         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10914         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10915         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10916         pattern from sse_cvttss2si<round_saeonly_name>
10917         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10918         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10919         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10920         using SWI48 mode iterator.
10921         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10922         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10923         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10924         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10925         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10926         using SWI48 mode iterator.
10927         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10928         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10929         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10930         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10931         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10932         SWI48 mode iterator.
10933         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10934         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10935         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10936         pattern from sse_cvttsd2si<round_saeonly_name>
10937         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10939 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10941         * config/nds32/nds32-md-auxiliary.c
10942         (nds32_valid_smw_lwm_base_p): Refine.
10943         (nds32_output_smw_single_word): Refine.
10944         (nds32_output_smw_double_word): New.
10945         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10947 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10949         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10950         (nds32_output_stack_pop): Refine.
10951         (nds32_expand_unaligned_load): Refine.
10952         (nds32_expand_unaligned_store): Refine.
10954 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10955             Chung-Ju Wu  <jasonwucj@gmail.com>
10957         * config/nds32/constants.md: Add TP_REGNUM constant.
10958         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10959         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10960         UNSPEC_ADD32.
10961         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10962         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10963         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10964         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10965         and PIC code generation.
10966         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10967         code generation.
10968         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10969         optimization.
10970         * config/nds32/nds32.md: Support TLS and PIC.
10971         * config/nds32/nds32.c: Support TLS and PIC.
10972         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10973         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10974         predicate.
10976 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10978         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10979         mode with E_ prefix.
10981 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10982             Chung-Ju Wu  <jasonwucj@gmail.com>
10984         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10985         * config/nds32/nds32-md-auxiliary.c
10986         (symbolic_reference_mentioned_p): New.
10987         (nds32_legitimize_ict_address): New.
10988         (nds32_expand_ict_move): New.
10989         (nds32_indirect_call_referenced_p): New.
10990         (nds32_symbol_binds_local_p): Delete.
10991         (nds32_long_call_p): Modify.
10992         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10993         * config/nds32/nds32-protos.h
10994         (symbolic_reference_mentioned_p): Declare.
10995         (nds32_legitimize_ict_address): Declare.
10996         (nds32_expand_ict_move): Declare.
10997         (nds32_indirect_call_referenced_p): Declare.
10998         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10999         (nds32_relax_group): Use nds32_ict_const_p as condition.
11000         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11001         (nds32_asm_file_start): Output ict_model directive in asm code.
11002         (nds32_legitimate_address_p): Consider indirect call.
11003         (nds32_print_operand): Consider indirect call.
11004         (nds32_print_operand_address): Consider indirect call.
11005         (nds32_insert_attributes): Handle "indirect_call" attribute.
11006         (TARGET_LEGITIMATE_ADDRESS_P): Define.
11007         (TARGET_LEGITIMATE_CONSTANT_P): Define.
11008         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11009         (TARGET_DELEGITIMIZE_ADDRESS): Define.
11010         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11011         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11012         (TARGET_ICT_MODEL_SMALL): Define.
11013         (TARGET_ICT_MODEL_LARGE): Define.
11014         * config/nds32/nds32.md (movsi): Consider ict model.
11015         (call, call_value): Consider ict model.
11016         (sibcall, sibcall_value): Consider ict model.
11017         * config/nds32/nds32.opt (mict-model): New option.
11018         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11019         model.
11021 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
11022             Monk Chiang  <sh.chiang04@gmail.com>
11023             Jim Wilson <jimw@sifive.com>
11025         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11026         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
11027         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11028         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11029         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
11030         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11031         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11032         compute save_libcall_adjustment properly.
11033         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11034         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11035         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11036         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11037         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11038         (ABI_SPEC): Handle mabi=ilp32e.
11039         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11040         (RVE): Add RVE mask.
11041         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11042         <-march>: Add rv32e as an example.
11044 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
11046         PR c++/82899
11047         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11048         (intra_create_variable_infos): Handle C++ constructors.
11050 2018-05-18  Martin Liska  <mliska@suse.cz>
11052         * passes.def: Remove a redundant pass.
11054 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
11056         PR bootstrap/85838
11057         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11059 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11061         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11062         (ARMv4): Update.
11063         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11064         (ARMv6m): Update.
11065         (armv2, armv2a, armv3, armv3m): Delete architectures.
11066         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11067         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11068         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11069         Delete cpus.
11070         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11071         (*mulsidi3adddi): Likewise.
11072         (mulsidi3): Likewise.
11073         (*mulsidi3_nov6): Likewise.
11074         (umulsidi3): Likewise.
11075         (umulsidi3_nov6): Likewise.
11076         (umaddsidi4): Likewise.
11077         (*umulsidi3adddi): Likewise.
11078         (smulsi3_highpart): Likewise.
11079         (*smulsi3_highpart_nov6): Likewise.
11080         (umulsi3_highpart): Likewise.
11081         (*umulsi3_highpart_nov6): Likewise.
11082         * config/arm/arm.h (arm_arch3m): Delete.
11083         * config/arm/arm.c (arm_arch3m): Delete.
11084         (arm_option_override_internal): Update armv3-related comment.
11085         (arm_configure_build_target): Delete use of isa_bit_mode32.
11086         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11087         (arm_rtx_costs_internal): Delete check of arm_arch3m.
11088         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11089         (mulsa3): Likewise.
11090         (mulusa3): Likewise.
11091         * config/arm/arm-protos.h (arm_arch3m): Delete.
11092         * config/arm/arm-tables.opt: Regenerate.
11093         * config/arm/arm-tune.md: Likewise.
11094         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11095         deleted architectures.
11097 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11099         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11100         (armv5t, armv5te): New features.
11101         (ARMv5, ARMv5e): Delete fgroups.
11102         (ARMv5t, ARMv5te): Adjust for above changes.
11103         (ARMv6m): Likewise.
11104         (armv5, armv5e): Delete arches.
11105         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11106         arm_arch5.
11107         (*call_reg_arm): Likewise.
11108         (*call_value_reg_armv5): Likewise.
11109         (*call_value_reg_arm): Likewise.
11110         (*call_symbol): Likewise.
11111         (*call_value_symbol): Likewise.
11112         (*sibcall_insn): Likewise.
11113         (*sibcall_value_insn): Likewise.
11114         (clzsi2): Likewise.
11115         (prefetch): Likewise.
11116         (define_split and define_peephole2 dependent on arm_arch5):
11117         Likewise.
11118         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11119         arm_arch5e.
11120         (TARGET_ARM_QBIT): Likewise.
11121         (TARGET_DSP_MULTIPLY): Likewise.
11122         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11123         (arm_arch5, arm_arch5e): Delete.
11124         (arm_arch5t, arm_arch5te): Declare.
11125         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11126         (arm_arch5t): Declare.
11127         (arm_option_reconfigure_globals): Update for the above.
11128         (arm_options_perform_arch_sanity_checks): Update comment, replace
11129         use of arm_arch5 with arm_arch5t.
11130         (use_return_insn): Likewise.
11131         (arm_emit_call_insn): Likewise.
11132         (output_return_instruction): Likewise.
11133         (arm_final_prescan_insn): Likewise.
11134         (arm_coproc_builtin_available): Likewise.
11135         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11136         arm_arch5e with arm_arch5t and arm_arch5te.
11137         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11138         (arm_arch5t, arm_arch5te): Declare.
11139         * config/arm/arm-tables.opt: Regenerate.
11140         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11141         * config/arm/t-multilib: Likewise.
11142         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11143         instead of arm_arch5.
11144         (*call_reg_thumb1): Likewise.
11145         (*call_value_reg_thumb1_v5): Likewise.
11146         (*call_value_reg_thumb1): Likewise.
11147         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11148         unreachable path.
11149         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11151 2018-05-18  Martin Liska  <mliska@suse.cz>
11153         PR gcov-profile/84846
11154         * doc/gcov.texi: Document -t option of gcov tool.
11156 2018-05-18  Martin Liska  <mliska@suse.cz>
11158         PR gcov-profile/84846
11159         * gcov.c (print_usage): Add new -t option.
11160         (process_args): Handle the option.
11161         (generate_results): Use stdout as output when requested by
11162         the option.
11164 2018-05-18  Martin Liska  <mliska@suse.cz>
11166         PR gcov-profile/84846
11167         * coverage.c (coverage_init): Write PWD to .gcno file.
11168         * doc/gcov.texi: Document how working directory is printed.
11169         * gcov-dump.c (dump_gcov_file): Print PWD.
11170         * gcov.c (output_intermediate_file): Likewise.
11171         (read_graph_file): Read PWD string.
11172         (output_lines): Print PWD.
11174 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11176         PR middle-end/85817
11177         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11178         for retval and return false if all args to phi are zero.
11180 2018-05-18  Richard Biener  <rguenther@suse.de>
11182         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11183         method.
11184         (evrp_dom_walker::before_dom_children): Call it.
11186 2018-05-18  Richard Biener  <rguenther@suse.de>
11188         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11189         results when processing array refs with variable index.
11191 2018-05-18  Toon Moene  <toon@moene.org>
11193         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11194         directly after that of -floop-interchange. Indicate that both
11195         options are enabled by default when specifying -O3.
11197 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11199         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11200         iterator.  Delete separate integer-mode vec_set<mode> expander.
11201         (aarch64_simd_vec_setv2di): Delete.
11202         (vec_setv2di): Delete.
11203         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11204         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
11205         the "w, r" alternative.
11207 2018-05-18  Martin Liska  <mliska@suse.cz>
11209         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11210         * tree-pass.h (make_pass_lower_switch_O0): New function.
11211         * tree-switch-conversion.c (node_has_low_bound): Remove.
11212         (node_has_high_bound): Likewise.
11213         (node_is_bounded): Likewise.
11214         (class pass_lower_switch): Make it a template type and create
11215         two instances.
11216         (pass_lower_switch::execute): Add template argument.
11217         (make_pass_lower_switch): New function.
11218         (make_pass_lower_switch_O0): New function.
11219         (do_jump_if_equal): Remove.
11220         (emit_case_nodes): Simplify to just handle all 3 cases and leave
11221         all the hard work to tree optimization passes.
11223 2018-05-18  Martin Liska  <mliska@suse.cz>
11225         * dbgcnt.c (limit_low): Renamed from limit.
11226         (limit_high): New variable.
11227         (dbg_cnt_is_enabled): Check for upper limit.
11228         (dbg_cnt): Adjust dumping.
11229         (dbg_cnt_set_limit_by_index): Add new argument for high
11230         value.
11231         (dbg_cnt_set_limit_by_name): Likewise.
11232         (dbg_cnt_process_single_pair): Parse new format.
11233         (dbg_cnt_process_opt): Use strtok.
11234         (dbg_cnt_list_all_counters): Remove 'value' and add
11235         'limit_high'.
11236         * doc/invoke.texi: Document changes.
11238 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
11240         * doc/sourcebuild.texi (scalar_all_fma): Document.
11241         * tree.def (FMA_EXPR): Delete.
11242         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11243         * internal-fn.c (ternary_direct): New macro.
11244         (expand_ternary_optab_fn): Likewise.
11245         (direct_ternary_optab_supported_p): Likewise.
11246         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11247         * builtins.c (fold_builtin_fma): Delete.
11248         (fold_builtin_3): Don't call it.
11249         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11250         * expr.c (expand_expr_real_2): Likewise.
11251         * fold-const.c (operand_equal_p): Likewise.
11252         (fold_ternary_loc): Likewise.
11253         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11254         * gimple.c (DEFTREECODE): Likewise.
11255         * gimplify.c (gimplify_expr): Likewise.
11256         * optabs-tree.c (optab_for_tree_code): Likewise.
11257         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11258         * tree-eh.c (operation_could_trap_p): Likewise.
11259         (stmt_could_throw_1_p): Likewise.
11260         * tree-inline.c (estimate_operator_cost): Likewise.
11261         * tree-pretty-print.c (dump_generic_node): Likewise.
11262         (op_code_prio): Likewise.
11263         * tree-ssa-loop-im.c (stmt_cost): Likewise.
11264         * tree-ssa-operands.c (get_expr_operands): Likewise.
11265         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11266         * fold-const-call.h (fold_fma): Delete.
11267         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11268         CFN_FNMA and CFN_FNMS.
11269         (fold_fma): Delete.
11270         * genmatch.c (combined_fn): New enum.
11271         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11272         (commutative_op): New function.
11273         (commutate): Use it.  Handle more than 2 operands.
11274         (dt_operand::gen_gimple_expr): Use commutative_op.
11275         (parser::parse_expr): Allow :c to be used with non-binary
11276         operators if the commutative operand is known.
11277         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11278         CFN_FMS, CFN_FNMA and CFN_FNMS.
11279         (backprop::process_assign_use): Remove FMA_EXPR handling.
11280         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11281         (gen_hsa_fma): New function.
11282         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11283         IFN_FNMA and IFN_FNMS.
11284         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11285         * gimple-fold.h (follow_all_ssa_edges): Declare.
11286         * gimple-fold.c (follow_all_ssa_edges): New function.
11287         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11288         gimple_build interface and use follow_all_ssa_edges to fold the result.
11289         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11290         instead of checking for optabs directly.
11291         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11292         rather than FMA_EXPRs.
11293         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11294         call to IFN_FMA instead of an FMA_EXPR.
11296 2018-05-17  Jim Wilson  <jimw@sifive.com>
11298         * expr.c (do_tablejump): When converting index to Pmode, if we have a
11299         sign extended promoted subreg, and the range does not have the sign bit
11300         set, then do a sign extend.
11302         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11303         test, check for sign extended subreg and/or constant operands, and
11304         do a sign extend in that case.
11306 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
11308         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11309         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11310         Add untyped.
11311         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11312         Change logics_shift_reg to logics_shift_imm.
11313         (thunderx2t99_fp_loadpair_basic): Delete.
11314         (thunderx2t99_fp_storepair_basic): Delete.
11315         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11316         (thunderx2t99_asimd_polynomial): Delete.
11317         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11318         and neon_fp_mul_d_scalar_q.
11319         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11320         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11321         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11322         (thunderx2t99_asimd_lut): Add missing tbl types.
11323         (thunderx2t99_asimd_ext): Delete.
11324         (thunderx2t99_asimd_load1_1_mult): Delete.
11325         (thunderx2t99_asimd_load1_2_mult): Delete.
11326         (thunderx2t99_asimd_load1_ldp): New.
11327         (thunderx2t99_asimd_load1): New.
11328         (thunderx2t99_asimd_load2): Add missing *load2* types.
11329         (thunderx2t99_asimd_load3): New.
11330         (thunderx2t99_asimd_load4): New.
11331         (thunderx2t99_asimd_store1_1_mult): Delete.
11332         (thunderx2t99_asimd_store1_2_mult): Delete.
11333         (thunderx2t99_asimd_store2_mult): Delete.
11334         (thunderx2t99_asimd_store2_onelane): Delete.
11335         (thunderx2t99_asimd_store_stp): New.
11336         (thunderx2t99_asimd_store1): New.
11337         (thunderx2t99_asimd_store2): New.
11338         (thunderx2t99_asimd_store3): New.
11339         (thunderx2t99_asimd_store4): New.
11341 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
11343         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11344         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
11346 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
11347             Segher Boessenkool  <segher@kernel.crashing.org>
11349         PR target/85698
11350         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11351         operand.
11353 2018-05-17  Richard Biener  <rguenther@suse.de>
11355         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11356         for pruning loop and prune defs feeding only already visited PHIs.
11358 2018-05-17  Richard Biener  <rguenther@suse.de>
11360         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11362 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
11363             Richard Biener  <rguenther@suse.de>
11365         PR tree-optimization/85793
11366         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11367         for VMAT_ELEMENTWISE.
11369 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11371         * internal-fn.h (lookup_internal_fn): Declare
11372         * internal-fn.c (lookup_internal_fn): New function.
11373         * gimple.c (gimple_build_call_from_tree): Handle calls to
11374         internal functions.
11375         * gimple-pretty-print.c (dump_gimple_call): Print "." before
11376         internal function names.
11377         * tree-pretty-print.c (dump_generic_node): Likewise.
11378         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11380 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11382         * gimple-fold.h (gimple_build): Make the function forms take
11383         combined_fn rather than built_in_function.
11384         (gimple_simplify): Likewise.
11385         * gimple-match-head.c (gimple_simplify): Likewise.
11386         * gimple-fold.c (gimple_build): Likewise.
11387         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11388         rather than gimple_build_call_internal.
11389         (get_initial_defs_for_reduction): Likewise.
11390         (vect_create_epilog_for_reduction): Likewise.
11391         (vectorizable_live_operation): Likewise.
11393 2018-05-17  Martin Liska  <mliska@suse.cz>
11395         * gimple-ssa-sprintf.c (format_directive): Do not use
11396         space in between 'G_' and '('.
11398 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
11400         PR target/85323
11401         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11402         even if the mask is not all ones.
11404         PR target/85323
11405         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11406         vector.
11407         (ix86_gimple_fold_builtin): Likewise.
11409         PR target/85323
11410         * config/i386/i386.c: Include tree-vector-builder.h.
11411         (ix86_vector_shift_count): New function.
11412         (ix86_fold_builtin): Fold shift builtins by scalar count.
11413         (ix86_gimple_fold_builtin): Likewise.
11415         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11416         _mm512_setzero): New intrinsics.
11418 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
11419             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11421         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11422         code generation for cases where splatting a value is not useful.
11423         * simplify-rtx.c (simplify_ternary_operation): Simplify
11424         vec_merge across a vec_duplicate and a paradoxical subreg forming
11425         a vector mode to a vec_concat.
11427 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
11429         * config.gcc: Support "goldmont-plus".
11430         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11431         "goldmont-plus".
11432         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11433         PROCESSOR_GOLDMONT_PLUS.
11434         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11435         (processor_target_table): Add "goldmont-plus".
11436         (PTA_GOLDMONT_PLUS): Define.
11437         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11438         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11439         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11440         (fold_builtin_cpu): Add "goldmont-plus".
11441         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11442         (ix86_option_override_internal): Add "goldmont-plus".
11443         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11444         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11445         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11446         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11448 2018-05-17  Richard Biener  <rguenther@suse.de>
11450         PR tree-optimization/85757
11451         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11452         remove defs that only feed that PHI from further processing.
11454 2018-05-16  Jim Wilson  <jimw@sifive.com>
11456         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11457         asterisk to name.
11458         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11460 2018-05-16  Mark Wielaard  <mark@klomp.org>
11462         * dwarf2out.c (count_index_strings): New function.
11463         (output_indirect_strings): Call count_index_strings and generate
11464         header for dwarf_version >= 5.
11466 2018-05-16  Mark Wielaard  <mark@klomp.org>
11468         * dwarf2out.c (dwarf_FORM): New function.
11469         (set_indirect_string): Use dwarf_FORM.
11470         (reset_indirect_string): Likewise.
11471         (size_of_die): Likewise.
11472         (value_format): Likewise.
11473         (output_die): Likewise.
11474         (add_skeleton_AT_string): Likewise.
11475         (output_macinfo_op): Likewise.
11476         (index_string): Likewise.
11477         (output_index_string_offset): Likewise.
11478         (output_index_string): Likewise.
11479         (count_index_strings): Likewise.
11481 2018-05-16  Carl Love  <cel@us.ibm.com>
11483         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11484         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11486 2018-05-16  Martin Jambor  <mjambor@suse.cz>
11488         * ipa-prop.c (ipa_free_all_edge_args): Remove.
11489         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11491 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
11493         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11494         (fnma<mode>4): Likewise.
11495         (fms<mode>4): Likewise.
11496         (fnms<mode>4): Likewise.
11497         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11498         (aarch64_fnma<mode>4): Likewise.
11499         (aarch64_fms<mode>4): Likewise.
11500         (aarch64_fnms<mode>4): Likewise.
11501         (aarch64_fnmadd<mode>4): Likewise.
11503 2018-05-16  Jason Merrill  <jason@redhat.com>
11505         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
11507 2018-05-16  Richard Biener  <rguenther@suse.de>
11509         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11510         (dump_stmt_cost): Declare.
11511         (add_stmt_cost): Dump cost we add.
11512         (add_stmt_costs): New function.
11513         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11514         No longer exported.
11515         (vect_analyze_stmt): Adjust prototype.
11516         (vectorizable_condition): Likewise.
11517         (vectorizable_live_operation): Likewise.
11518         (vectorizable_reduction): Likewise.
11519         (vectorizable_induction): Likewise.
11520         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11521         cost vector to pass to vectorizable_ and record afterwards.
11522         (vect_model_reduction_cost): Take cost vector argument and adjust.
11523         (vect_model_induction_cost): Likewise.
11524         (vectorizable_reduction): Likewise.
11525         (vectorizable_induction): Likewise.
11526         (vectorizable_live_operation): Likewise.
11527         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11528         SLP_TREE_NUMBER_OF_VEC_STMTS.
11529         (vect_analyze_slp_cost_1): Remove.
11530         (vect_analyze_slp_cost): Likewise.
11531         (vect_slp_analyze_node_operations): Take visited args and
11532         a target cost vector.  Avoid processing already visited stmt sets.
11533         (vect_slp_analyze_operations): Use a local cost vector to gather
11534         costs and register those of non-discarded instances.
11535         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11536         (vect_schedule_slp_instance): Remove copying of
11537         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
11538         zero.
11539         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11540         adding cost.  Record cost entry location.
11541         (vect_prologue_cost_for_slp_op): Function to compute cost of
11542         a constant or invariant generated for SLP vect in the prologue,
11543         split out from vect_analyze_slp_cost_1.
11544         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
11545         (vect_model_promotion_demotion_cost): Likewise.
11546         (vect_model_store_cost): Likewise, make static.
11547         (vect_model_load_cost): Likewise.
11548         (vectorizable_bswap): Add cost vector arg and adjust.
11549         (vectorizable_call): Likewise.
11550         (vectorizable_simd_clone_call): Likewise.
11551         (vectorizable_conversion): Likewise.
11552         (vectorizable_assignment): Likewise.
11553         (vectorizable_shift): Likewise.
11554         (vectorizable_operation): Likewise.
11555         (vectorizable_store): Likewise.
11556         (vectorizable_load): Likewise.
11557         (vectorizable_condition): Likewise.
11558         (vectorizable_comparison): Likewise.
11559         (can_vectorize_live_stmts): Likewise.
11560         (vect_analyze_stmt): Likewise.
11561         (vect_transform_stmt): Adjust calls to vectorizable_*.
11562         * tree-vectorizer.c: Include gimple-pretty-print.h.
11563         (dump_stmt_cost): New function.
11565 2018-05-16  Richard Biener  <rguenther@suse.de>
11567         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11568         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11569         * tree-ssa-dse.c: Include tree-ssa-loop.h.
11570         (check_name): New callback.
11571         (dse_classify_store): Track cycles via a visited bitmap of PHI
11572         defs and simplify handling of in-loop and across loop dead stores
11573         and properly fail for loop-variant refs.  Handle byte-tracking with
11574         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11575         limiting the walk.
11577 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
11579         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11580         (vect_get_mask_type_for_stmt): Likewise.
11581         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11582         split out from...
11583         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
11584         to determine the statement's vector type and the vector type that
11585         should be used for calculating nunits.  Deal with cases in which
11586         the type has to be deferred.
11587         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11588         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11589         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11590         (vect_determine_vf_for_stmt): New functions, split out from...
11591         (vect_determine_vectorization_factor): ...here.
11592         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11593         (vect_get_mask_type_for_stmt): New functions, split out from
11594         vect_determine_vectorization_factor.
11596 2018-05-16  Richard Biener  <rguenther@suse.de>
11598         * tree-cfg.c (verify_gimple_assign_ternary): Properly
11599         verify the [VEC_]COND_EXPR embedded comparison.
11601 2018-05-15  Martin Sebor  <msebor@redhat.com>
11603         PR tree-optimization/85753
11604         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11605         RECORD_TYPE in addition to ARRAY_TYPE.
11607 2018-05-15  Martin Sebor  <msebor@redhat.com>
11609         PR middle-end/85643
11610         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11612 2018-05-15  Richard Biener  <rguenther@suse.de>
11614         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11615         add by_clobber_p one.  Change algorithm to collect all defs
11616         representing uses we need to walk and try reducing them to
11617         a single one before failing.
11618         (dse_dom_walker::dse_optimize_stmt): Adjust.
11620 2018-05-13  Mark Wielaard  <mark@klomp.org>
11622         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11623         (size_of_loc_descr): Likewise.
11624         (output_loc_operands): Likewise.
11625         (output_loc_operands_raw): Likewise.
11626         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11627         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11628         (hash_loc_operands): Likewise.
11629         (compare_loc_operands): Likewise.
11631 2018-05-14  Mark Wielaard  <mark@klomp.org>
11633         * dwarf2out.c (count_index_addrs): New function.
11634         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11636 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11638         PR tree-optimization/83648
11639         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11640         return value as malloc candidate.
11642 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11644         PR ipa/85734
11645         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11646         param as true in call to suggest_attribute.
11648 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
11650         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11651         -mreadonly-in-sdata.
11653 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11655         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11656         New pattern.
11657         (aarch64_crypto_aesd_fused): Likewise.
11659 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
11661         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11662         (movsi_aarch64): Likewise.
11663         (load_pairsi): Likewise.
11664         (load_pairdi): Likewise.
11665         (store_pairsi): Likewise.
11666         (store_pairdi): Likewise.
11667         (load_pairsf): Likewise.
11668         (load_pairdf): Likewise.
11669         (store_pairsf): Likewise.
11670         (store_pairdf): Likewise.
11671         (zero_extend): Likewise.
11672         (trunc): Swap alternatives.
11673         (fcvt_target): Add '?' to prefer w over r.
11675 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
11677         PR target/85756
11678         * config/i386/i386.md: Disallow non-commutative arithmetics in
11679         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11680         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
11681         in the peephole2 before it.
11683 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
11685         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11686         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11687         (ix86_handle_option): Handle -mcldemote.
11688         * config.gcc: New header.
11689         * config/i386/cldemoteintrin.h: New file.
11690         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11691         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11692         -mcldemote.
11693         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11694         OPTION_MASK_ISA_CLDEMOTE.
11695         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11696         (ix86_valid_target_attribute_inner_p): Ditto.
11697         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11698         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11699         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11700         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11701         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11702         (cldemote): New.
11703         * config/i386/i386.opt: Add -mcldemote.
11704         * config/i386/x86intrin.h: New header.
11705         * doc/invoke.texi: Add -mcldemote.
11707 2018-05-14  Richard Biener  <rguenther@suse.de>
11709         * doc/match-and-simplify.texi: Adjust :s documentation.
11711 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
11713         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11714         intended memcpy size.
11715         (REORDER_45): Likewise.
11717 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
11719         * sort.cc: New file.
11720         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11721         * vec.c (qsort_chk): Use gcc_qsort.
11722         * Makefile.in (OBJS-libcommon): Add sort.o.
11723         (build/sort.o): New target.  Use it...
11724         (BUILD_RTL): ... here, and...
11725         (build/gencfn-macros): ... here, and...
11726         (build/genmatch): ... here.
11728 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11729             Chung-Ju Wu  <jasonwucj@gmail.com>
11731         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11732         * config/nds32/nds32-graywolf.md: New file.
11733         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11734         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11735         pipeline.
11736         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11737         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11738         * config/nds32/nds32.md (pipeline_model): Add graywolf.
11739         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11740         * config/nds32/pipelines.md: Include n15 settings.
11742 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11743             Chung-Ju Wu  <jasonwucj@gmail.com>
11745         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11746         * config/nds32/nds32-n13.md: New file.
11747         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11748         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11749         pipeline.
11750         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11751         * config/nds32/nds32.md (pipeline_model): Add n13.
11752         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11753         * config/nds32/pipelines.md: Include n13 settings.
11755 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11756             Chung-Ju Wu  <jasonwucj@gmail.com>
11758         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11759         * config/nds32/nds32-n10.md: New file.
11760         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11761         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11762         pipeline.
11763         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11764         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11765         * config/nds32/nds32.md (pipeline_model): Add n10.
11766         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11767         * config/nds32/pipelines.md: Include n10 settings.
11769 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
11770             Kito Cheng  <kito.cheng@gmail.com>
11771             Chung-Ju Wu  <jasonwucj@gmail.com>
11773         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11774         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11775         Add enum values for DSP extension instructions.
11776         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11777         New constraints.
11778         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11779         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11780         New code iterators.
11781         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11782         * config/nds32/nds32-dspext.md: New file for DSP implementation.
11783         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11784         * config/nds32/nds32-intrinsic.md: Likewise.
11785         * config/nds32/nds32_intrinsic.h: Likewise.
11786         * config/nds32/nds32-md-auxiliary.c: Likewise.
11787         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11788         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11789         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11790         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11791         * config/nds32/nds32-protos.h: New declarations for DSP extension.
11792         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11793         TYPE_DMAC in switch statement.
11794         * config/nds32/nds32.c: New checking and implementation for DSP
11795         extension instructions.
11796         * config/nds32/nds32.h: Likewise.
11797         * config/nds32/nds32.md: Likewise.
11798         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11799         * config/nds32/predicates.md: Implement new predicates for DSP
11800         extension.
11802 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11804         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11805         Reformat alternatives and attributes so it is easier to identify
11806         which constraints/attributes go with which instruction.
11807         (mov<mode>_hardfloat32, FMOVE64): Likewise.
11808         (mov<mode>_softfloat32, FMOVE64): Likewise.
11809         (mov<mode>_hardfloat64, FMOVE64): Likewise.
11810         (mov<mode>_softfloat64, FMOVE64): Likewise.
11812 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11814         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11815         subsection.
11816         (Basic PowerPC Built-in Functions): The new name of the
11817         subsection previously known as "PowerPC Built-in Functions".
11818         (Basic PowerPC Built-in Functions Available on all Configurations):
11819         New subsubsection.
11820         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11821         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11822         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11823         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11825 2018-05-11  Martin Jambor  <mjambor@suse.cz>
11827         PR ipa/85655
11828         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11829         single const.
11831 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11833         PR target/85733
11834         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11836 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
11838         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11839         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11840         (ix86_handle_option): Handle -mwaitpkg.
11841         * config.gcc: New header.
11842         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11843         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11844         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11845         function type.
11846         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11847         OPTION_MASK_ISA_WAITPKG.
11848         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11849         (ix86_option_override_internal): Add PTA_WAITPKG.
11850         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11851         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11852         IX86_BUILTIN_TPAUSE.
11853         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11854         __builtin_ia32_umwait and __builtin_ia32_tpause.
11855         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11856         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11857         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11858         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11859         UNSPECV_TPAUSE): New.
11860         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11861         * config/i386/i386.opt: Add -mwaitpkg.
11862         * config/i386/waitpkgintrin.h: New file.
11863         * config/i386/x86intrin.h: New header.
11864         * doc/invoke.texi: Add -mwaitpkg.
11866 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11868         PR target/85606
11869         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11870         equivalent.
11871         (cortex-m0): Use armv6s-m isa.
11872         (cortex-m0plus): Likewise.
11873         (cortex-m1): Likewise.
11874         (cortex-m0.small-multiply): Likewise.
11875         (cortex-m0plus.small-multiply): Likewise.
11876         (cortex-m1.small-multiply): Likewise.
11878 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11879             Jakub Jelinek  <jakub@redhat.com>
11881         PR tree-optimization/85692
11882         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11883         source permute as well.
11885 2018-05-11  Martin Liska  <mliska@suse.cz>
11887         PR sanitizer/85556
11888         * doc/extend.texi: Document LLVM style format for no_sanitize
11889         attribute.
11891 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11893         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11894         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11895         (mode_supports_vsx_dform_quad): Likewise.
11896         (mode_supports_vmx_dform): Move these functions to be next to the
11897         other mode_supports functions.
11898         (mode_supports_dq_form): Likewise.
11899         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11900         mode_supports_dq_form.
11901         (reg_offset_addressing_ok_p): Likewise.
11902         (offsettable_ok_by_alignment): Likewise.
11903         (rs6000_legitimate_offset_address_p): Likewise.
11904         (legitimate_lo_sum_address_p): Likewise.
11905         (rs6000_legitimize_address): Likewise.
11906         (rs6000_legitimize_reload_address): Likewise.
11907         (rs6000_secondary_reload_inner): Likewise.
11908         (rs6000_preferred_reload_class): Likewise.
11909         (rs6000_output_move_128bit): Likewise.
11911 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11913         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11914         Generate SImode target register for null target.
11915         <case IX86_BUILTIN_XGETBV>: Ditto.
11916         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11917         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11919 2018-05-10  Carl Love  <cel@us.ibm.com>
11921         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11922         dcbtt and dcbtstt if operands[2] is 0.
11924 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11926         PR target/85693
11927         * config/i386/sse.md (usadv64qi): New expander.
11929 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11931         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11932         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11933         -maltivec=be support.
11934         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11935         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11936         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11937         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11938         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11939         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11940         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11941         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11942         altivec_vsumsws): Adjust.
11943         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11944         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11945         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11946         support.
11947         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11948         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11949         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11950         (altivec_lve<VI_char>x): Delete expand.
11951         (*altivec_lve<VI_char>x_internal): Rename to...
11952         (altivec_lve<VI_char>x): ... this.
11953         (altivec_lvxl_<mode>): Delete expand.
11954         (*altivec_lvxl_<mode>_internal): Rename to ...
11955         (altivec_lvxl_<mode>): ... this.
11956         (altivec_stvxl_<mode>): Delete expand.
11957         (*altivec_stvxl_<mode>_internal): Rename to ...
11958         (altivec_stvxl_<mode>): ... this.
11959         (altivec_stve<VI_char>x): Delete expand.
11960         (*altivec_stve<VI_char>x_internal): Rename to ...
11961         (altivec_stve<VI_char>x): ... this.
11962         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11963         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11964         reduc_plus_scal_<mode>): Adjust.
11965         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11966         comment.
11967         (rs6000_cpu_cpp_builtins): Adjust.
11968         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11969         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11970         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11971         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11972         -maltivec=be support.
11973         (rs6000_split_vec_extract_var): Adjust.
11974         (rs6000_split_v4si_init): Adjust.
11975         (swap_selector_for_mode): Delete.
11976         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11977         altivec_expand_stvex_be): Delete.
11978         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11979         -maltivec=be support.
11980         (rs6000_gimple_fold_builtin): Ditto.
11981         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11982         Adjust.
11983         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11984         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11985         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11986         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11987         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11988         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11989         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11990         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11991         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11992         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11993         anonymous split): Adjust.
11994         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11995         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11997 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11999         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12000         when --with-gxx-include-dir is also specified.
12001         * configure: Regenerate.
12003 2018-05-09  Jim Wilson  <jimw@sifive.com>
12005         PR target/84797
12006         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12007         * config/riscv/t-withmultilib: New.
12008         * config/riscv/withmultilib.h: New.
12009         * doc/install.texi: Document RISC-V --with-multilib-list support.
12011 2018-05-09  Richard Biener  <rguenther@suse.de>
12013         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12014         vector.
12015         (vect_bb_vectorization_profitable_p): Adjust.  Compute
12016         actual scalar cost using the cost vector and the add_stmt_cost
12017         machinery.
12019 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12021         PR rtl-optimization/85645
12022         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12023         in the REG_CFA_REGISTER note for LR, don't leave it empty.
12025 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12027         PR rtl-optimization/85645
12028         * shrink-wrap.c (spread_components): Return a boolean saying if
12029         anything was changed.
12030         (try_shrink_wrapping_separate): Iterate spread_components until
12031         nothing changes anymore.
12033 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12035         PR rtl-optimization/85645
12036         * regrename.c (build_def_use): Also kill the chains that include the
12037         destination of a REG_CFA_REGISTER note.
12039 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12041         PR rtl-optimization/85645
12042         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12043         insn that has a REG_CFA_REGISTER note.
12045 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
12047         * cfgexpand.c (expand_clobber): New function.
12048         (expand_gimple_stmt_1): Use it.
12049         * tree-vect-stmts.c (vect_clobber_variable): New function,
12050         split out from...
12051         (vectorizable_simd_clone_call): ...here.
12052         (vectorizable_store): Emit a clobber either side of an
12053         IFN_STORE_LANES sequence.
12054         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12056 2018-05-09  Tom de Vries  <tom@codesourcery.com>
12058         PR target/85626
12059         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12060         (define_insn "trap_if_false"): Add exit after trap.
12062 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
12064         PR rtl-optimization/85638
12065         * bb-reorder.c: Include common/common-target.h.
12066         (create_forwarder_block): New function extracted from...
12067         (fix_up_crossing_landing_pad): ...here.  Rename into...
12068         (dw2_fix_up_crossing_landing_pad): ...this.
12069         (sjlj_fix_up_crossing_landing_pad): New function.
12070         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12071         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12072         from both partitions and exit the loop after one iteration.
12074 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12076         Revert:
12077         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12078         subsection.
12079         (Basic PowerPC Built-in Functions): The new name of the
12080         subsection previously known as "PowerPC Built-in Functions".
12081         (Basic PowerPC Built-in Functions Available on all Configurations):
12082         New subsubsection.
12083         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12084         subsubsection.
12085         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12086         subsubsection.
12087         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12088         subsubsection.
12089         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12090         subsubsection.
12092 2018-05-08  Jim Wilson  <jimw@sifive.com>
12094         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12095         (LD_EMUL_SUFFIX): New.
12096         (LINK_SPEC): Use it.
12098 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12100         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12101         subsection.
12102         (Basic PowerPC Built-in Functions): The new name of the
12103         subsection previously known as "PowerPC Built-in Functions".
12104         (Basic PowerPC Built-in Functions Available on all Configurations):
12105         New subsubsection.
12106         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12107         subsubsection.
12108         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12109         subsubsection.
12110         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12111         subsubsection.
12112         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12113         subsubsection.
12115 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12117         PR target/85683
12118         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12119         after cmpelim optimization.
12121 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
12123         * config.gcc: Support "goldmont".
12124         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12125         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12126         PROCESSOR_GOLDMONT.
12127         * config/i386/i386.c (m_GOLDMONT): Define.
12128         (processor_target_table): Add "goldmont".
12129         (PTA_GOLDMONT): Define.
12130         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12131         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12132         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12133         (fold_builtin_cpu): Add "goldmont".
12134         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12135         (ix86_option_override_internal): Add "goldmont".
12136         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12137         (processor_type): Add PROCESSOR_GOLDMONT.
12138         * config/i386/i386.md: Add CPU "glm".
12139         * config/i386/glm.md: New file.
12140         * config/i386/x86-tune.def: Add m_GOLDMONT.
12141         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12143 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12145         PR target/85572
12146         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12147         E_V4DImode.
12148         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12149         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
12150         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
12152         PR target/85317
12153         * config/i386/i386.c (ix86_fold_builtin): Handle
12154         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12156         PR target/85480
12157         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12158         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12160 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
12162         PR target/85658
12163         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12164         (check_arch): Likewise.
12165         (check_fpu): Return the result rather than printing it.
12166         (end arch): Fix operator precedence.
12167         (end cpu): Likewise.
12168         (END): Print the result from check_fpu.
12170 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12171             Alan Hayward  <alan.hayward@arm.com>
12172             David Sherwood  <david.sherwood@arm.com>
12174         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12175         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12176         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12177         (*fcmuo<mode>_and): New patterns.
12179 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12181         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12182         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12183         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12184         (cmp_op, sve_imm_con): New code attributes.
12185         (SVE_COND_INT_CMP, imm_con): Delete.
12186         (cmp_op): Remove above unspecs from int attribute.
12187         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12188         to...
12189         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
12190         comparison-specific unspecs.
12191         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12192         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12193         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12194         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12195         (*vec_fcm<cmp_op><mode>): Rename to...
12196         (*fcm<cmp_op><mode>): ...this and adjust likewise.
12197         (*vec_fcmuo<mode>): Rename to...
12198         (*fcmuo<mode>): ...this and adjust likewise.
12199         (*pred_fcm<cmp_op><mode>): New pattern.
12200         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12201         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12202         functions.
12203         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12204         and UNORDERED.
12205         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12206         (aarch64_emit_sve_predicated_cond): New function.
12207         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12208         (aarch64_emit_unspec_cond_or): Replace with...
12209         (aarch64_emit_sve_or_conds): ...this new function.  Use
12210         aarch64_emit_sve_ptrue_op for the individual comparisons and
12211         aarch64_emit_binop to OR them together.
12212         (aarch64_emit_inverted_unspec_cond): Replace with...
12213         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
12214         aarch64_emit_sve_ptrue_op for the comparison and
12215         aarch64_emit_unop to invert the result.
12216         (aarch64_expand_sve_vec_cmp_float): Update after the above
12217         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
12219 2018-05-07  Nathan Sidwell  <nathan@acm.org>
12221         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12222         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12223         (Backwards Compatibility): Likewise.
12225 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12227         PR bootstrap/85681
12228         Revert:
12229         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12231         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12232         <prefetch_dynamic_strides>: New const bool field.
12233         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12234         prefetch_dynamic_strides.
12235         (exynosm1_prefetch_tune): Likewise.
12236         (thunderxt88_prefetch_tune): Likewise.
12237         (thunderx_prefetch_tune): Likewise.
12238         (thunderx2t99_prefetch_tune): Likewise.
12239         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12240         to false.
12241         (aarch64_override_options_internal): Update to set
12242         PARAM_PREFETCH_DYNAMIC_STRIDES.
12243         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12244         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12245         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12246         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12247         prefetch-dynamic-strides setting.
12249         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12251         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12252         <minimum_stride>: New const int field.
12253         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12254         minimum_stride field.
12255         (exynosm1_prefetch_tune): Likewise.
12256         (thunderxt88_prefetch_tune): Likewise.
12257         (thunderx_prefetch_tune): Likewise.
12258         (thunderx2t99_prefetch_tune): Likewise.
12259         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12260         (aarch64_override_options_internal): Update to set
12261         PARAM_PREFETCH_MINIMUM_STRIDE.
12262         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12263         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12264         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12265         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12266         stride is constant and is below the minimum stride threshold.
12268 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12270         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12271         to 512.
12273 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12275         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12276         <prefetch_dynamic_strides>: New const bool field.
12277         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12278         prefetch_dynamic_strides.
12279         (exynosm1_prefetch_tune): Likewise.
12280         (thunderxt88_prefetch_tune): Likewise.
12281         (thunderx_prefetch_tune): Likewise.
12282         (thunderx2t99_prefetch_tune): Likewise.
12283         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12284         to false.
12285         (aarch64_override_options_internal): Update to set
12286         PARAM_PREFETCH_DYNAMIC_STRIDES.
12287         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12288         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12289         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12290         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12291         prefetch-dynamic-strides setting.
12293 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12295         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12296         <minimum_stride>: New const int field.
12297         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12298         minimum_stride field.
12299         (exynosm1_prefetch_tune): Likewise.
12300         (thunderxt88_prefetch_tune): Likewise.
12301         (thunderx_prefetch_tune): Likewise.
12302         (thunderx2t99_prefetch_tune): Likewise.
12303         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12304         (aarch64_override_options_internal): Update to set
12305         PARAM_PREFETCH_MINIMUM_STRIDE.
12306         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12307         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12308         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12309         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12310         stride is constant and is below the minimum stride threshold.
12312 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
12314         PR c++/85659
12315         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12316         the type is addressable.  Don't force op into register if it has
12317         BLKmode.
12319 2018-05-05  Roland McGrath  <mcgrathr@google.com>
12321         PR other/77609
12322         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12323         any section for which we don't know a specific type it should have,
12324         regardless of name.  Previously this was done only for the exact
12325         names ".init_array", ".fini_array", and ".preinit_array".
12326         (default_elf_asm_named_section): Add comment about
12327         relationship with default_section_type_flags and SECTION_NOTYPE.
12328         (get_section): Don't consider it a type conflict if one side has
12329         SECTION_NOTYPE and the other doesn't, as long as neither has the
12330         SECTION_BSS et al used in the default_section_type_flags logic.
12332 2018-05-05  Tom de Vries  <tom@codesourcery.com>
12334         PR target/85653
12335         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12336         (workaround_barsyncs): New function.
12337         (nvptx_reorg): Use workaround_barsyncs.
12338         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12339         (define_expand "nvptx_membar_cta"): New define_expand.
12340         (define_insn "*nvptx_membar_cta"): New insn.
12342 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
12344         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12345         To improve optimization opportunities.
12346         * builtin-types.def: The new needed builtin types for the above.
12348 2018-05-04  Richard Biener  <rguenther@suse.de>
12350         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12351         * gimple-ssa-store-merging.c
12352         (imm_store_chain_info::output_merged_store): Remove redundant create,
12353         release split_store vector contents on failure.
12354         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12355         scalar stmt vector on cache hit.
12357 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
12359         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12360         Xilinx FP support.
12361         * config.gcc (powerpc-xilinx-eabi*): Remove.
12362         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12363         support.
12364         (fusion_addis_mem_combo_load): Ditto.
12365         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12366         FP support.
12367         (rs6000_cpu_cpp_builtins): Ditto.
12368         * config/rs6000/rs6000-linux.c
12369         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12370         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12371         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12372         support.
12373         (rs6000_setup_reg_addr_masks): Ditto.
12374         (rs6000_init_hard_regno_mode_ok): Ditto.
12375         (rs6000_option_override_internal): Ditto.
12376         (legitimate_lo_sum_address_p): Ditto.
12377         (rs6000_legitimize_address): Ditto.
12378         (rs6000_legitimize_reload_address): Ditto.
12379         (rs6000_legitimate_address_p): Ditto.
12380         (abi_v4_pass_in_fpr): Ditto.
12381         (setup_incoming_varargs): Ditto.
12382         (rs6000_gimplify_va_arg): Ditto.
12383         (rs6000_split_multireg_move): Ditto.
12384         (rs6000_savres_strategy): Ditto.
12385         (rs6000_emit_prologue_components): Ditto.
12386         (rs6000_emit_epilogue_components): Ditto.
12387         (rs6000_emit_prologue): Ditto.
12388         (rs6000_emit_epilogue): Ditto.
12389         (rs6000_elf_file_end): Ditto.
12390         (rs6000_function_value): Ditto.
12391         (rs6000_libcall_value): Ditto.
12392         * config/rs6000/rs6000.h: Ditto.
12393         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12394         (TARGET_MINMAX): ... this.  New.
12395         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12396         * config/rs6000/rs6000.md: Remove Xilinx FP support.
12397         (*movsi_internal1_single): Delete.
12398         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12399         mfpu=, mxilinx-fpu): Delete.
12400         * config/rs6000/singlefp.h: Delete.
12401         * config/rs6000/sysv4.h: Remove Xilinx FP support.
12402         * config/rs6000/t-rs6000: Ditto.
12403         * config/rs6000/t-xilinx: Delete.
12404         * config/rs6000/titan.md: Adjust for fp_type removal.
12405         * config/rs6000/vsx.md: Remove Xilinx FP support.
12406         (VStype_simple): Delete.
12407         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12408         * config/rs6000/xfpu.h: Delete.
12409         * config/rs6000/xfpu.md: Delete.
12410         * config/rs6000/xilinx.h: Delete.
12411         * config/rs6000/xilinx.opt: Delete.
12412         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12413         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12415 2018-05-04  Tom de Vries  <tom@codesourcery.com>
12417         PR libgomp/85639
12418         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12419         if ignore == 0.
12421 2018-05-04  Richard Biener  <rguenther@suse.de>
12423         PR middle-end/85627
12424         * tree-complex.c (update_complex_assignment): We are always in SSA form.
12425         (expand_complex_div_wide): Likewise.
12426         (expand_complex_operations_1): Likewise.
12427         (expand_complex_libcall): Preserve EH info of the original stmt.
12428         (tree_lower_complex): Handle removed blocks.
12429         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12430         on complex multiplication and division libcall builtins.
12432 2018-05-04  Richard Biener  <rguenther@suse.de>
12434         PR middle-end/85574
12435         * fold-const.c (negate_expr_p): Restrict negation of operand
12436         zero of a division to when we know that can happen without
12437         overflow.
12438         (fold_negate_expr_1): Likewise.
12440 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
12442         PR libstdc++/85466
12443         * real.h (real_nextafter): Declare.
12444         * real.c (real_nextafter): New function.
12445         * fold-const-call.c (fold_const_nextafter): New function.
12446         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12447         CASE_CFN_NEXTTOWARD.
12448         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12449         even when arg1_mode is different from arg0_mode.
12451 2018-05-03  Nathan Sidwell  <nathan@acm.org>
12453         * doc/extend.texi (Deprecated Features): Remove
12454         -ffriend-injection.
12455         (Backwards Compatibility): Likewise.
12456         * doc/invoke.texi (C++ Language Options): Likewise.
12457         (C++ Dialect Options): Likewise.
12459 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
12461         PR target/85530
12462         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12463         _mm512_mask_mullox_epi64): New intrinsics.
12465 2018-05-03  Tom de Vries  <tom@codesourcery.com>
12467         PR testsuite/85106
12468         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12469         dump files): Add offload-tree.
12471 2018-05-03  Richard Biener  <rguenther@suse.de>
12473         PR tree-optimization/85615
12474         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12475         to loops not nested in BBs loop father to avoid creating multi-entry
12476         loops.
12478 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12480         PR tree-optimization/70291
12481         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12482         arguments.  Change return type to tree.  Emit libcall as a new
12483         statement rather than replacing existing one when inplace_p is true.
12484         (expand_complex_multiplication_components): New function.
12485         (expand_complex_multiplication): Expand floating-point complex
12486         multiplication using the above.
12487         (expand_complex_division): Rename inner_type parameter to type.
12488         Update expand_complex_libcall call-site.
12489         (expand_complex_operations_1): Update expand_complex_multiplication
12490         and expand_complex_division call-sites.
12492 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
12494         PR target/85582
12495         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12496         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12497         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12498         the highest significant bit of the shift count mask is clear.  In
12499         check whether and[sq]i3 is needed verify that all significant bits
12500         of the shift count other than the highest are set.
12502 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12504         PR libgomp/82428
12505         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12506         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12507         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12508         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12509         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12510         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12511         __builtin_goacc_parlevel_size.
12513 2018-05-02  Richard Biener  <rguenther@suse.de>
12515         PR tree-optimization/85597
12516         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12517         do not use split vect_get_vec_defs call but call vect_get_slp_defs
12518         directly.
12520 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12522         PR testsuite/85106
12523         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12524         dump files): Add ltrans-tree.
12526 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12528         PR testsuite/85106
12529         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12530         dump files): Add wpa-ipa.
12532 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
12534         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
12535         powerpc*-*-linux*paired* target.
12536         * config/rs6000/750cl.h: Delete.
12537         * config/rs6000/paired.h: Delete.
12538         * config/rs6000/paired.md: Delete.
12539         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12540         float support.
12541         * config/rs6000/rs6000-builtin.def: Remove paired float support.
12542         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12543         comment.  Remove paired float support.
12544         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12545         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12546         VECTOR_PAIRED.
12547         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12548         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12549         declarations.
12550         * config/rs6000/rs6000.c: Remove paired float support.
12551         (paired_expand_vector_init, paired_expand_vector_move,
12552         paired_emit_vector_compare, paired_emit_vector_cond_expr,
12553         (paired_expand_lv_builtin, paired_expand_stv_builtin,
12554         paired_expand_builtin, paired_expand_predicate_builtin,
12555         paired_init_builtins): Delete.
12556         * config/rs6000/rs6000.h: Remove paired float support.
12557         * config/rs6000/rs6000.md: Remove paired float support.
12558         (move_from_CR_ov_bit): Delete.
12559         * config/rs6000/rs6000.opt (mpaired): Delete.
12560         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12561         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12563 2018-05-02  Richard Biener  <rguenther@suse.de>
12565         PR middle-end/85567
12566         * gimplify.c (gimplify_save_expr): When in SSA form allow
12567         SAVE_EXPRs to compute to SSA vars.
12569 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
12571         PR target/85582
12572         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12573         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12574         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12575         clobber operands[2], instead use a new pseudo.  Formatting fixes.
12577 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
12579         PR tree-optimization/85586
12580         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12581         exit early for statements in the same group if the accesses are
12582         not strided.
12584 2018-05-02  Tom de Vries  <tom@codesourcery.com>
12586         PR lto/85451
12587         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12588         error message.
12590 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
12592         PR tree-optimization/85143
12593         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12595 2018-05-01  Tom de Vries  <tom@codesourcery.com>
12597         PR lto/85451
12598         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12599         not found" error message.
12601 2018-05-01  Tom de Vries  <tom@codesourcery.com>
12603         PR other/83786
12604         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12605         * vec.c (test_ordered_remove_if): New function.
12606         (vec_c_tests): Call test_ordered_remove_if.
12607         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12608         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12609         * tree-vect-patterns.c (vect_pattern_recog_1): Use
12610         VEC_ORDERED_REMOVE_IF.
12612 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12614         PR tree-optimization/82665
12615         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12616         pointer subtraction where arguments come from a memchr call.
12618 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
12620         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12621         --push-state --as-needed and --pop-state instead of --as-needed and
12622         --no-as-needed if ld supports it.
12623         * configure: Regenerated.
12625         PR web/85578
12626         * doc/install.texi2html: Replace _002d with - and _002a with * in
12627         generated html files using sed.
12629 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12631         PR c++/85523
12632         * gcc-rich-location.c (blank_line_before_p): New function.
12633         (use_new_line): New function.
12634         (gcc_rich_location::add_fixit_insert_formatted): New function.
12635         * gcc-rich-location.h
12636         (gcc_rich_location::add_fixit_insert_formatted): New function.
12638 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12640         * selftest.c (assert_streq): Rename "expected" and "actual" to
12641         "val1" and "val2".  Extend NULL-handling to cover both inputs
12642         symmetrically, while still requiring both to be non-NULL for a pass.
12643         * selftest.h (assert_streq): Rename "expected" and "actual" to
12644         "val1" and "val2".
12645         (ASSERT_EQ): Likewise.
12646         (ASSERT_EQ_AT): Likewise.
12647         (ASSERT_KNOWN_EQ): Likewise.
12648         (ASSERT_KNOWN_EQ_AT): Likewise.
12649         (ASSERT_NE): Likewise.
12650         (ASSERT_MAYBE_NE): Likewise.
12651         (ASSERT_MAYBE_NE_AT): Likewise.
12652         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
12653         the assertion to pass.
12654         (ASSERT_STREQ_AT): Likewise.
12656 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12658         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12659         interaction with -pie.
12661 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12663         * selftest.h: Fix alphabetization of per-source-file selftest
12664         declarations.
12666 2018-04-30  Jason Merrill  <jason@redhat.com>
12668         PR c++/61982 - dead stores to destroyed objects.
12669         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12670         of clobber.
12672 2018-04-30  Jason Merrill  <jason@redhat.com>
12674         * tree.c (build_clobber): New.
12675         * tree.h: Declare it.
12676         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12678 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12680         * diagnostic-show-locus.c (layout::layout): Update for
12681         location_get_source_line returning a char_span.
12682         (struct char_span): Move to input.h.
12683         (struct correction): Update for fields in char_span becoming
12684         private.
12685         (struct source_line): Update for location_get_source_line
12686         returning a char_span.
12687         (layout::print_line): Likewise.
12688         * edit-context.c (edited_file::print_content): Likewise.
12689         (edited_file::print_diff_hunk): Likewise.
12690         (edited_file::print_run_of_changed_lines): Likewise.
12691         (edited_file::get_num_lines): Likewise.
12692         (edited_line::edited_line): Likewise.
12693         * final.c (asm_show_source): Likewise.
12694         * input.c (location_get_source_line): Convert return type
12695         from const char * to char_span, losing the final "line_len"
12696         param.
12697         (dump_location_info): Update for the above.
12698         (get_substring_ranges_for_loc): Likewise.  Use a char_span
12699         when handling the literal within the line.
12700         (test_reading_source_line): Update for location_get_source_line
12701         returning a char_span.
12702         * input.h (class char_span): Move here from
12703         diagnostic-show-locus.c, converting from a struct to a class.
12704         Make data members private.
12705         (char_span::operator bool): New.
12706         (char_span::length): New.
12707         (char_span::get_buffer): New.
12708         (char_span::operator[]): New.
12709         (char_span::subspan): Make const.
12710         (char_span::xstrdup): New.
12711         (location_get_source_line): Convert return type from const char *
12712         to char_span, losing the final "line_size" param.
12714 2018-04-30  Jan Hubicka  <jh@suse.cz>
12716         * lto-wrapper.c (ltrans_priorities): New static var.
12717         (cmp_priority): New.
12718         (run_gcc): Read priorities and if doing parallel build order
12719         the Makefile by them.
12721 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12723         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12725 2018-04-30  Richard Biener  <rguenther@suse.de>
12727         * tree-cfg.c (verify_address): Remove base argument, add
12728         flag whether to check TREE_ADDRESSABLE and do that.
12729         (verify_expr): Remove.
12730         (verify_types_in_gimple_reference): Add pieces from verify_expr.
12731         (verify_gimple_assign_single): Likewise.
12732         (verify_gimple_switch): Likewise.
12733         (verify_expr_location_1): Dereference tp once.  Add (disabled)
12734         piece from verify_expr.
12735         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12737 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12739         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12741 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12743         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12744         (small_data_pattern): Likewise.
12745         (arc_rewrite_small_data): Likewise.
12746         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12747         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12748         (get_symbol_alignment): New function.
12749         (legitimate_small_data_address_p): Likewise.
12750         (legitimate_scaled_address): Update, call
12751         legitimate_small_data_address_p.
12752         (output_sdata): New static variable.
12753         (arc_print_operand): Update how we handle small data operands.
12754         (arc_print_operand_address): Likewise.
12755         (arc_legitimate_address_p): Update, use
12756         legitimate_small_data_address_p.
12757         (arc_rewrite_small_data_p): Remove.
12758         (arc_rewrite_small_data_1): Likewise.
12759         (arc_rewrite_small_data): Likewise.
12760         (small_data_pattern): Likewise.
12761         (compact_sda_memory_operand): Update to use
12762         legitimate_small_data_address_p and get_symbol_alignment.
12763         (prepare_move_operands): Don't rewite sdata pattern.
12764         (prepare_extend_operands): Remove.
12765         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12766         pattern.
12767         (zero_extendqisi2): Likewise.
12768         (zero_extendhisi2): Likewise.
12769         (extendqihi2): Likewise.
12770         (extendqisi2): Likewise.
12771         (extendhisi2): Likewise.
12772         (addsi3): Likewise.
12773         (subsi3): Likewise.
12774         (andsi3): Likewise.
12775         * config/arc/constraints.md (Usd): Change it to memory constraint.
12777 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12779         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12780         as source of std instructions.
12781         * config/arc/arc.md (movsi_insn): Update pattern predicate to
12782         allow 6-bit constants as source for store instructions.
12783         (movdi_insn): Update instruction pattern to allow 6-bit constants
12784         as source for store instructions.
12786 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12788         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12790 2018-04-30  Nathan Sidwell  <nathan@acm.org>
12791             Sandra Loosemore <sandra@codesourcery.com>
12793         * dumpfile.c (dump_open): Allow '-' for stdout.
12794         * doc/invoke.texi (Developer Options): Document dump filename
12795         determination early.  Document stdin/stdout selection.
12797 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
12799         Microblaze Target: PIC data text relative
12801         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12802         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12803         Add declaration.
12804         * config/microblaze/microblaze.h (microblaze_constant_address_p):
12805         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12806         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12807         New addressing mode for data-text relative position indepenedent code.
12808         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12809         'ADDRESS_SYMBOLIC_TXT_REL'.
12810         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12811         (microblaze_legitimate_pic_operand): Exclude function calls from
12812         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12813         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12814         addresses cases.
12815         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12816         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12817         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12818         for 'address + offset'.
12819         (microblaze_expand_prologue): Add new function prologue call for
12820         'r20' assignation.
12821         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12822         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12823         table in case of TARGET_PIC_DATA_TEXT_REL.
12824         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12825         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12826         Add new macros 'UNSPEC_TEXT',
12827         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12828         + exclude function calls from 'UNSPEC_PLT' in case of data text
12829         relative mode.
12830         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12831         new target hook for generating address diff vector tables in case of
12832         flag_pic.
12833         * doc/tm.texi : Regenerate.
12834         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12835         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12836         of addr diff vector generation.
12837         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12838         target hook definition.
12839         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12840         Add default function for generate_pic_addr_diff_vec -> flag_pic.
12841         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12842         option for data text relative.
12844 2018-04-30  Richard Biener  <rguenther@suse.de>
12846         * tree-chrec.h (evolution_function_is_constant_p): Remove
12847         redundant check.
12848         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12850 2018-04-30  Richard Biener  <rguenther@suse.de>
12852         PR bootstrap/85571
12853         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12855 2018-04-30  Richard Biener  <rguenther@suse.de>
12857         PR tree-optimization/28364
12858         PR tree-optimization/85275
12859         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12860         copying first exit test.
12862 2018-04-28  Mark Wielaard  <mark@klomp.org>
12864         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12865         dwarf_version >= 5.
12866         (dwarf_AT): Handle DW_AT_addr_base.
12867         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12869 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12871         PR target/84431
12872         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12873         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12874         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12875         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12877 2018-04-28  Richard Biener  <rguenther@suse.de>
12879         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12880         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12881         to reflect use.  Only add interesting stmts.
12883 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12885         PR ipa/85549
12886         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12887         the jump function allows for passing through aggregate values.
12889 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12891         * input.h (in_system_header_at): Convert from macro to inline
12892         function.
12893         (from_macro_expansion_at): Likewise.
12894         (from_macro_definition_at): Likewise.
12896 2018-04-27  Jeff Law  <law@redhat.com>
12898         * config.gcc: Mark tile* targets as deprecated/obsolete.
12900 2018-04-27  Richard Biener  <rguenther@suse.de>
12902         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12903         fix for ILP32.
12905 2018-04-27  Richard Biener  <rguenther@suse.de>
12907         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12909 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12911         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12912         with Yd constraint. Set "preferred_for_speed" attribute from
12913         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12914         with Yd constraint.
12915         (*movdi_internal): Ditto.
12916         (movti_interunit splitters): Remove
12917         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12918         (movdi_interunit splitters): Ditto.
12919         * config/i386/constraints.md (Ye): Remove.
12920         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12922 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12924         PR target/85512
12925         * config/aarch64/constraints.md (Usg): Limit to 31.
12926         (Usj): Limit to 63.
12928 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12930         PR tree-optimization/85529
12931         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12932         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12933         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12934         zero extension or masking of the MSB bit.
12935         (optimize_range_tests): Add FIRST_BB argument, pass it through
12936         to optimize_range_tests_var_bound.
12937         (maybe_optimize_range_tests, reassociate_bb): Adjust
12938         optimize_range_tests callers.
12940 2018-04-26  Richard Biener  <rguenther@suse.de>
12941             Jakub Jelinek  <jakub@redhat.com>
12943         * cgraph.h (symbol_table): Just declare debug method here.
12944         * symtab.c (symbol_table::debug): Define.
12946 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12948         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12950 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12952         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12953         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12954         (*movdi_internal): Substitute Yi and Yj constraint with x
12955         and Ym and Yn constraint with y constraint.  Update "isa"
12956         attribute and set "preferred_for_speed" attribute from
12957         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12958         (*movsi_internal): Ditto.
12959         (*movdf_internal): Ditto.
12960         (*movsf_internal): Ditto.
12961         (*zero_extendsidi2): Ditto.
12962         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12963         (sse2_loadld): Ditto.
12964         (*vec_extract<ssevecmodelower>_0): Ditto.
12965         (*vec_extractv4si_0_zext_sse4): Ditto.
12966         (vec_concatv2di): Ditto.
12967         (*vec_dup<mode>): Ditto.
12968         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12969         * config/i386/constraints.md (Yi): Remove.
12970         (Yj): Remove.
12971         (Ym): Remove.
12972         (Yn): Remove.
12974 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12976         * dumpfile.c (dump_open): New.
12977         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12978         (dump_finish): Detect stdio/stderr by value not name.
12980 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12982         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12984 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12986         PR target/84952
12987         * config/nvptx/nvptx.c (verify_neutering_jumps)
12988         (verify_neutering_labels): New function
12989         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12991 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12993         PR target/84025
12994         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12995         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12996         need neutering.
12998 2018-04-26  Richard Biener <rguenther@suse.de>
12999             Tom de Vries  <tom@codesourcery.com>
13001         PR lto/85422
13002         * lto-streamer-out.c (output_function): Fixup loops if required to match
13003         discovery done in the reader.
13005 2018-04-26  Richard Biener  <rguenther@suse.de>
13007         PR tree-optimization/85116
13008         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13009         have a loop exit from the single latch predecessor.  Remove
13010         case of header with just condition.
13011         (ch_base::copy_headers): Exclude infinite loops from any
13012         processing.
13013         (pass_ch::execute): Record exits.
13015 2018-04-26  Richard Biener  <rguenther@suse.de>
13017         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13018         prologue cost vector and pass it to vect_get_load_cost.
13019         (vect_get_peeling_costs_all_drs): Likewise.
13020         (vect_peeling_hash_get_lowest_cost): Likewise.
13021         (vect_enhance_data_refs_alignment): Likewise.
13023 2018-04-26  Richard Biener  <rguenther@suse.de>
13025         PR middle-end/85450
13026         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13027         checking of integer<->pointer conversions.
13028         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13029         sign-/zero-extending pointer types.
13030         (expand_omp_for_static_chunk): Likewise.
13032 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
13033             Jean Lee  <xiaoyur347@gmail.com>
13035         * config/mips/mips.c (mips_asan_shadow_offset): New function.
13036         (TARGET_ASAN_SHADOW_OFFSET): Define.
13037         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13038         true for -fsanitize=address.
13040 2018-04-25  Mark Wielaard  <mark@klomp.org>
13042         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13043         shorter ones.
13045 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13047         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13048         than "alu", remove explicit "memory" and "imm_disp" attributes.
13049         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13051         PR middle-end/85414
13052         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13053         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13054         gen_lowpart_no_emit.
13056 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
13058         PR target/85473
13059         * config/i386/i386.c (ix86_expand_builtin): Change memory
13060         operand to XI, extend p0 to Pmode.
13061         * config/i386/i386.md: Change unspec volatile and operand
13062         1 mode to XI, change operand 0 mode to P.
13064 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13066         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13067         GET_MODE_MASK before any checking.
13068         (nds32_can_use_bset_p): Likewise.
13069         (nds32_can_use_btgl_p): Likewise.
13071 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13073         * config/nds32/nds32-doubleword.md: New define_split pattern for
13074         illegal register number.
13076 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13078         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13080 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13082         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13084 2018-04-25  Richard Biener  <rguenther@suse.de>
13086         * lto-streamer.h (LTO_major_version): Bump to 8.
13088 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13090         * BASE-VER: Set to 9.0.0.
13092 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
13094         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13095         in __abskf2 and __powikf2.
13097 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13099         PR target/85512
13100         * config/aarch64/constraints.md (Usg, Usj): New constraints.
13101         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13102         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13103         Use the above on operand 2.  Reindent.
13104         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13106 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13108         PR target/85485
13109         * common/config/i386/i386-common.c (ix86_handle_option): Don't
13110         handle OPT_mcet.
13111         * config/i386/i386.opt (mcet): Removed.
13112         * doc/install.texi: Remove -mcet documentation.
13113         * doc/invoke.texi: Likewise.
13115 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13117         PR target/85485
13118         * doc/install.texi: Remove -mcet from bootstrap-cet.
13120 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13122         PR target/85511
13123         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13124         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13125         if TARGET_64BIT.
13127         PR target/85503
13128         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13129         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13130         containing a CONST_VECTOR.
13132 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
13134         * doc/install.texi: Update newlib dependency for nvptx.
13136 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13138         PR target/85508
13139         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13140         instead of INTVAL when shifting x left.
13142 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
13144         PR tree-optimization/85478
13145         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13146         vect_grouped_store_supported for single element vectors.
13148 2018-04-24  Richard Biener  <rguenther@suse.de>
13150         PR target/85491
13151         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13152         load cost increase to the case of non-constant step.
13154 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13156         PR target/84828
13157         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13158         destination if any_malformed_asm.
13160 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
13162         PR middle-end/85496
13163         * expr.c (store_field): In the bitfield case, if the value comes from
13164         a function call and is returned in registers by means of a PARALLEL,
13165         do not change the mode of the temporary unless BLKmode and VOIDmode.
13167 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
13169         PR rtl-optimization/85423
13170         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13171         dependencies to debug insns when the previous insn is non-debug.
13173 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13175         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13176         enums into a single definition.
13177         (fls): Fix predicates and printing.
13178         (seti): Likewise.
13180 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13182         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13183         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13184         and short u6 immediate.
13185         (check_if_valid_sleep_operand): Remove.
13186         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13188 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13190         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13191         flag_always_save_lp condition.
13192         * config/nds32/nds32.opt (malways-save-lp): New option.
13194 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13196         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13197         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13198         * config/nds32/nds32.h
13199         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13200         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13202 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13204         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13205         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13207 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13208             Chung-Ju Wu  <jasonwucj@gmail.com>
13210         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13211         Declare.
13212         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13213         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13215 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13217         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13219 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13221         * config/nds32/nds32-protos.h (nds32_data_alignment,
13222         nds32_local_alignment): Declare.
13223         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13224         nds32_local_alignment): New functions.
13225         (TARGET_CONSTANT_ALIGNMENT): Define.
13226         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13228 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13230         * config/nds32/nds32.c
13231         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13232         (TARGET_MODES_TIEABLE_P): Likewise.
13234 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13236         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13237         level Ofast and Og.
13239 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
13240             Chung-Ju Wu  <jasonwucj@gmail.com>
13242         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13243         for unaligned access.
13244         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13245         unaligned access.
13246         * config/nds32/nds32-intrinsic.md: Likewise.
13247         * config/nds32/nds32_intrinsic.h: Likewise.
13248         * config/nds32/nds32.h (nds32_builtins): Likewise.
13249         * config/nds32/nds32.opt (munaligned-access): New option.
13250         * config/nds32/nds32.c (nds32_asm_file_start): Display
13251         flag_unaligned_access status.
13253 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13255         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13256         -mno-relax is present.
13257         * config/riscv/linux.h (LINK_SPEC): Ditto.
13259 2018-04-20  Martin Sebor  <msebor@redhat.com>
13261         PR c/85365
13262         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13263         for null pointers.
13264         (gimple_fold_builtin_stxcpy_chk): Same.
13265         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13267 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
13269         PR target/85456
13270         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13271         __powikf2 when long double is IEEE 128-bit.
13273 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13275         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13276         step to make sure stack always aligned.
13278 2018-04-20  Carl Love  <cel@us.ibm.com>
13280         PR target/83402
13281         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13282         size check for arg0.
13284 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13285             Tom de Vries  <tom@codesourcery.com>
13287         PR target/85445
13288         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13289         Emit insns for calls too.
13290         (nvptx_find_par): Always look for worker-level predecessor insn.
13291         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
13292         calls.
13293         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13294         (nvptx_process_pars): Propagate frames for calls.
13296 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
13298         PR target/85469
13299         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13300         Removed.
13301         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13302         (ix86_handle_option): Don't handle OPT_mibt.
13303         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13304         __SHSTK__.
13305         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13306         has_ibt and ibt.
13307         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13308         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13309         (ix86_target_macros): Define __CET__ with flag_cf_protection
13310         for -fcf-protection.
13311         * config/i386/i386.c (isa2_opts): Remove -mibt.
13312         * config/i386/i386.h (TARGET_IBT): Removed.
13313         (TARGET_IBT_P): Likewise.
13314         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13315         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13316         * config/i386/i386.opt (mcet): Update help message.
13317         (mshstk): Likewise.
13318         (mibt): Removed.
13319         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
13320         -mcet as an alias for -mshstk.
13322 2018-04-20  Richard Biener <rguenther@suse.de>
13324         PR middle-end/85475
13325         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13326         complexity by forcing a single use of the multiply operand.
13328 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13330         ipa/85449
13331         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13332         recursion dependency to only apply to non-clones.
13334 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13336         ipa/85447
13337         * ipa-cp.c (create_specialized_node): Check that clones of
13338         self-recursive edges exist during IPA-CP.
13340 2018-04-19  Toon Moene  <toon@moene.org>
13342         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13343         by -O3.
13345 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13347         PR tree-optimization/85467
13348         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13349         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
13350         VECTOR_CST element to type.
13352 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13354         PR target/85397
13355         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13356         * config/i386/i386.md (builtin_setjmp_setup): Removed.
13357         (builtin_longjmp): Likewise.
13358         (save_stack_nonlocal): New pattern.
13359         (restore_stack_nonlocal): Likewise.
13361 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13363         PR target/85404
13364         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13365         Replace ASM_OUTPUT_LABEL with fprintf.
13367 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13369         PR target/85417
13370         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13371         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13372         * config/i386/i386-c.c (ix86_target_macros_internal): Also
13373         define __IBT__ and __SHSTK__ for -fcf-protection.
13374         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13375         TARGET_IBT.
13376         (ix86_trampoline_init): Likewise.
13377         (x86_output_mi_thunk): Likewise.
13378         (ix86_notrack_prefixed_insn_p): Likewise.
13379         (ix86_option_override_internal): Don't disallow -fcf-protection.
13380         * config/i386/i386.md (rdssp<mode>): Also enable for
13381         -fcf-protection.
13382         (incssp<mode>): Likewise.
13383         (nop_endbr): Likewise.
13384         * config/i386/i386.opt (mcet): Change help message to built-in
13385         functions only.
13386         (mibt): Likewise.
13387         (mshstk): Likewise.
13388         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13389         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
13390         enable CET built-in functions.
13392 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
13394         * common/config/i386/i386-common.c
13395         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13396         OPTION_MASK_ISA_MOVDIRI_UNSET,
13397         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13398         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13399         * config.gcc (movdirintrin.h): New header.
13400         * config/i386/cpuid.h (bit_MOVDIRI,
13401         bit_MOVDIR64B): New bits.
13402         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13403         and -mmvodir64b.
13404         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13405         (VOID, PVOID, PCVOID)): New function types.
13406         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13407         __builtin_ia32_directstoreu_u64,
13408         __builtin_ia32_movdir64b): New builtins.
13409         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13410         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13411         and -mmovdiri.
13412         (ix86_valid_target_attribute_inner_p): Ditto.
13413         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13414         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13415         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13416         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13417         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13418         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13419         (movdiri<mode>, movdir64b_<mode>): New.
13420         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13421         * config/i386/immintrin.h: Include movdirintrin.h.
13422         * config/i386/movdirintrin.h: New file.
13423         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13425 2018-04-19  Richard Biener  <rguenther@suse.de>
13427         PR middle-end/85455
13428         * cfg.c (clear_bb_flags): When loop state says we have
13429         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13431 2018-04-19  Richard Biener  <rguenther@suse.de>
13433         PR tree-optimization/84737
13434         * tree-vect-data-refs.c (vect_copy_ref_info): New function
13435         copying restrict info.
13436         (vect_setup_realignment): Use it.
13437         * tree-vectorizer.h (vect_copy_ref_info): Declare.
13438         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13439         the first DR to all generated stores.
13440         (vectorizable_load): Likewise for loads.
13442 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13444         PR tree-optimization/85446
13445         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13446         the integral and pointer types to have the same precision.
13448         * doc/install.texi: Document --disable-cet being the default and
13449         --enable-cet=auto.
13451 2018-04-18  Martin Liska  <mliska@suse.cz>
13453         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13454         style.
13456 2018-04-18  Martin Liska  <mliska@suse.cz>
13458         Revert
13459         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13461         PR ipa/83983
13462         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13463         arguments if they are comparable.
13465 2018-04-18  Martin Liska  <mliska@suse.cz>
13467         Revert
13468         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
13470         PR lto/84805
13471         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13472         incomplete types.
13474 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
13476         PR target/85388
13477         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13478         ENDBR after calling __morestack.
13480 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
13482         PR jit/85384
13483         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13484         by using gcc_base_ver to generate a gcc_driver_version, and use
13485         it when generating GCC_DRIVER_NAME.
13486         * configure: Regenerate.
13488 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
13490         PR target/81084
13491         * config.gcc: Obsolete powerpc*-*-*spe*.
13493 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13495         PR debug/84637
13496         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13497         (stabstr_D): Change type of unum from unsigned int to
13498         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
13499         type.
13501 2018-04-17  Jim Wilson  <jimw@sifive.com>
13503         PR 84856
13504         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13505         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13506         Set arg_pointer_offset after using pretend_args_size.
13508 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13510         PR rtl-optimization/85431
13511         * dse.c (record_store): Ignore zero width stores.
13513         PR sanitizer/85230
13514         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
13515         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13516         __builtin_stack_restore rather than after it.
13517         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13518         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13519         argument instead of virtual_dynamic_stack_rtx.
13521 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13523         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13524         New prototype.
13525         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13526         Add note to error message to explain internal mapping of overloaded
13527         built-in function name to non-overloaded built-in function name.
13528         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13529         function.
13531 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13533         PR target/85424
13534         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13535         where the inputs overlap with the output.
13537 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13539         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13540         (=v, v) alternative and explicit "memory" attribute.
13541         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
13542         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13543         attributes.
13544         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13545         "sselog1" type instead of "sselog".
13546         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13547         "sselog".  Remove explicit "memory" attribute.
13548         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13549         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13550         attributes.
13551         (vec_extract_hi_v32hi): Merge all alternatives into one, use
13552         "sselog1" type instead of "sselog".  Remove explicit "memory"
13553         attribute.
13554         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13555         use "sselog1" type instead of "sselog".  Remove explicit "memory"
13556         attribute.
13557         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13558         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13559         attributes.
13560         (vec_extract_hi_v64qi): Merge all alternatives into one, use
13561         "sselog1" type instead of "sselog".  Remove explicit "memory"
13562         attribute.
13563         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13564         use "sselog1" type instead of "sselog".  Remove explicit "memory"
13565         attribute.
13567         PR target/85430
13568         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13570         PR middle-end/85414
13571         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13572         on a SUBREG.
13574 2018-04-17  Martin Jambor  <mjambor@suse.cz>
13576         PR ipa/85421
13577         * ipa-cp.c (create_specialized_node): Call
13578         expand_all_artificial_thunks if necessary.
13580 2018-04-17  Martin Liska  <mliska@suse.cz>
13582         PR lto/85405
13583         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13584         in message, remote space in between '_G' and '('.
13586 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
13588         PR target/85281
13589         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13590         avx512f_vmcmp<mode>3<round_saeonly_name>,
13591         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13592         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13593         avx512f_rndscale<mode><round_saeonly_name>,
13594         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13595         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13596         Use %<iptr>2 instead of %2 for -masm=intel.
13597         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13598         avx512f_vcvttss2usi<round_saeonly_name>,
13599         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13600         -masm=intel.
13601         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13602         avx512f_vcvttsd2usi<round_saeonly_name>,
13603         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13604         Use %q1 instead of %1 for -masm=intel.
13605         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13606         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13607         of %3 for -masm=intel.
13608         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13609         -masm=intel.
13610         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13611         -masm=intel.
13612         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13613         -masm=intel.
13614         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13615         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13616         %g1.
13617         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13618         -masm=intel.
13619         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13620         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13621         %g1 and one with %0 and %1.
13622         (avx512er_vmrcp28<mode><round_saeonly_name>,
13623         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13624         %1 for -masm=intel.
13625         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13626         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13627         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13628         of %0 and %{%4%} for -masm=intel.
13629         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13630         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13631         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13632         order of %0 and %{%5%}%{z%} for -masm=intel.
13634 2018-04-17  Jan Hubicka  <jh@suse.cz>
13636         PR lto/85405
13637         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13639 2018-04-17  Martin Liska  <mliska@suse.cz>
13641         PR ipa/85329
13642         * multiple_target.c (create_dispatcher_calls): Set apostrophes
13643         for target_clone error message.  Make default implementation
13644         clone to be a local declaration.
13645         (separate_attrs): Add new argument and check for an empty
13646         string.
13647         (expand_target_clones): Handle it.
13648         (ipa_target_clone): Make redirection just for target_clones
13649         functions.
13651 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
13652             Tom de Vries  <tom@codesourcery.com>
13654         PR middle-end/84955
13655         * omp-expand.c (expand_oacc_for): Add dummy false branch for
13656         tiled basic blocks without omp continue statements.
13658 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
13660         PR target/83660
13661         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13662         vec_extract expression as having side effects to make sure it gets
13663         a cleanup point.
13665 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
13667         PR target/85403
13668         * config/i386/i386.c (get_builtin_code_for_version): Check
13669         error_mark_node.
13671 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
13673         PR target/84331
13674         * config.gcc: Support "skylake".
13675         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13676         PROCESSOR_SKYLAKE.
13677         * config/i386/i386.c (m_SKYLAKE): Define.
13678         (processor_target_table): Add "skylake".
13679         (ix86_option_override_internal): Add "skylake".
13680         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13681         PROCESSOR_CANNONLAKE.
13682         (get_builtin_code_for_version): Fix priority for
13683         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13684         PROCESSOR_SKYLAKE-AVX512.
13685         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13686         (processor_type): Add PROCESSOR_SKYLAKE.
13688 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
13689             Jason Merrill  <jason@redhat.com>
13691         PR c++/85112
13692         * convert.c (convert_to_integer_1): Use direct recursion for
13693         enumeral types and types with a precision less than the number
13694         of bits in their mode.
13696 2018-04-16  Julia Koval  <julia.koval@intel.com>
13698         PR target/84413
13699         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13700         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13702 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
13704         PR target/85293
13705         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13706         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13707         and -mno-direct-move.
13709 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
13711         PR target/83402
13712         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13713         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13714         Ensure negative shifts result in {0}.
13716 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
13718         PR rtl-optimization/79916
13719         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13720         regs (if any) to define how to gnerate SD moves when LRA is in
13721         progress.
13723 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
13725         PR rtl-optimization/85393
13726         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13727         * except.c (expand_dw2_landing_pad_for_region): Make static.
13728         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13729         a label and unconditional jump to old_bb, rather than
13730         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13731         basic block.
13733         PR rtl-optimization/85376
13734         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13735         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13736         instead of a specific value.
13738 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13739             Bin Cheng  <bin.cheng@arm.com>
13741         PR tree-optimization/82965
13742         PR tree-optimization/83991
13743         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13744         by_profile_only parameter.
13745         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13746         information if the loop was predicted to iterate too many times.
13747         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13749 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13751         PR lto/71991
13752         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13753         always inline.
13755 2018-04-13  Martin Liska  <mliska@suse.cz>
13756             Jakub Jelinek  <jakub@redhat.com>
13758         PR middle-end/81657
13759         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13760         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13761         * builtins.c (expand_builtin_memory_copy_args): Use
13762         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13763         handle dest_addr == pc_rtx.
13765 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
13767         PR target/85291
13768         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13769         asked to not generate direct moves.
13770         (fix_trunc<mode>si2_stfiwx): Similar.
13771         (fix_trunc<mode>si2_internal): Similar.
13773 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13775         PR debug/83157
13776         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13777         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13778         lookup if dest in some wider mode is known to be const0_rtx and
13779         if so, record permanent equivalence for it to be ZERO_EXTEND of
13780         the narrower mode destination.
13782 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13784         * lto-streamer-out.c (output_function): Revert 259346.
13785         * omp-expand.c (expand_oacc_for): Likewise.
13787 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
13789         PR rtl-optimization/85354
13790         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13791         * sel-sched.c (sel_global_init): ... here.
13793 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
13795         PR target/85238
13796         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13797         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13798         mode for PE-COFF targets.
13799         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13800         (i386_pe_asm_lto_end): Likewise.
13801         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13802         (TARGET_ASM_LTO_END): Likewise.
13803         * config/i386/winnt.c (saved_debug_info_level): New static variable.
13804         (i386_pe_asm_lto_start): New function.
13805         (i386_pe_asm_lto_end): Likewise.
13807 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13808             Richard Biener  <rguenther@suse.de>
13810         PR middle-end/84955
13811         * lto-streamer-out.c (output_function): Fix CFG loop state before
13812         streaming out.
13813         * omp-expand.c (expand_oacc_for): Handle calls to internal
13814         functions like regular functions.
13816 2018-04-12  Richard Biener  <rguenther@suse.de>
13818         PR lto/85371
13819         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13820         for the early LTO debug to properly generate references to it
13821         during DIE emission.  Do not re-use that for the skeleton for
13822         split-dwarf.
13823         (dwarf2out_early_finish): Likewise.
13825 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13827         PR target/85328
13828         * config/i386/sse.md
13829         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13830         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13831         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13832         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13833         and output is a reg, avoid creating invalid lowpart subreg, but
13834         instead split into a 512-bit move.  Don't split if not AVX512VL,
13835         input is xmm16+ reg and output is a mem.
13836         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13837         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13838         xmm16+ reg and output is a mem.
13840 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13842         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13843         also for flag_dwarf2_cfi_asm.
13845 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13847         PR rtl-optimization/85342
13848         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13849         a bool scalar var inside of the loop instead.  Don't try to update
13850         recog_data.operand after failed apply_change_group.
13852 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13854         PR target/85296
13855         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13856         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13857         array with flexible array member as array without given dimension.
13858         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13859         argument for undefined param to true.
13861 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13863         PR target/85321
13864         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13865         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13866         from PowerPC section.
13867         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13868         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13869         help text that is too long.
13870         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13871         help text that is too long.
13872         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13873         help text that is too long.
13875 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13877         * config/alpha/alpha.md (stack_probe_internal): Rename
13878         from "probe_stack".  Update all callers.
13880 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13882         PR rtl-optimization/84566
13883         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13884         sched_macro_fuse_insns.
13886 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13888         PR target/84301
13889         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13890         (compute_block_dependences): ... from here.
13892 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13894         PR tree-optimization/85331
13895         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13896         from int to HOST_WIDE_INT.
13898 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13900         PR ipa/84149
13901         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13902         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13903         not the same as the source val.
13904         (cgraph_edge_brings_value_p): New parameter.
13905         (gather_edges_for_value): Pass destination value to
13906         cgraph_edge_brings_value_p.
13907         (perhaps_add_new_callers): Likewise.
13908         (get_info_about_necessary_edges): Likewise and exclude values brought
13909         only by self-recursive edges.
13910         (create_specialized_node): Redirect only clones of self-calling edges.
13911         (+self_recursive_pass_through_p): New function.
13912         (find_more_scalar_values_for_callers_subset): Use it.
13913         (find_aggregate_values_for_callers_subset): Likewise.
13914         (known_aggs_to_agg_replacement_list): Removed.
13915         (decide_whether_version_node): Re-calculate known constants for all
13916         remaining context clones.
13918 2018-04-11  Richard Biener  <rguenther@suse.de>
13920         PR lto/85339
13921         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13922         from early DWARF output.
13923         (dwarf2out_early_finish): Output line info unconditionally into
13924         early DWARF and add reference to it.
13926 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13928         PR target/85281
13929         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13930         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13931         other than V2DFmode using iptr mode attribute.
13932         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13934 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13936         PR rtl-optimization/84659
13937         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13939 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13941         PR debug/85302
13942         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13943         SIZEP is NULL.
13944         (output_loc_list): Pass address of a dummy size variable even in the
13945         locview handling loop.
13946         (index_location_lists): Add comment on why skip_loc_list_entry can't
13947         call size_of_locs.
13949 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13951         PR target/85261
13952         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13953         into register.
13955 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13957         PR target/85321
13958         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13959         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13960         and -mstring-compare-inline-limit.
13962 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13964         PR target/85287
13965         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13966         for stack clash protection in a register whenever we need it to be in
13967         a register.
13969 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13971         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13972         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13974 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13976         PR target/85321
13977         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13978         the help text.
13979         (mlong-double-): Ditto.
13980         * config/rs6000/sysv4.opt (msdata=): Ditto.
13981         (mtls-size=): Ditto.
13983 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13985         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13986         erroneous entries for
13987         "vector int vec_ldl (int, long int *)", and
13988         "vector unsigned int vec_ldl (int, unsigned long int *)".
13989         Add comments and entries for
13990         "vector bool char vec_ldl (int, bool char *)",
13991         "vector bool short vec_ldl (int, bool short *)",
13992         "vector bool int vec_ldl (int, bool int *)",
13993         "vector bool long long vec_ldl (int, bool long long *)",
13994         "vector pixel vec_ldl (int, pixel *)",
13995         "vector long long vec_ldl (int, long long *)",
13996         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13997         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13998         type tree bool_long_long_type_node and correct definition of
13999         bool_V2DI_type_node to make reference to this new type tree.
14000         (rs6000_mangle_type): Replace erroneous reference to
14001         bool_long_type_node with bool_long_long_type_node.
14002         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14003         comments to emphasize sign distinctions for char and int types and
14004         replace RS6000_BTI_bool_long constant with
14005         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
14006         use of RS6000_BTI_pixel.
14007         (bool_long_type_node): Remove this macro definition.
14008         (bool_long_long_type_node): New macro definition
14010 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14012         PR rtl-optimization/85300
14013         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14014         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14015         simplify_unary_operation fails.
14017 2018-04-10  Martin Liska  <mliska@suse.cz>
14019         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14020         cgraph_edge and ipa_ref.
14022 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14024         PR target/85177
14025         PR target/85255
14026         * config/i386/sse.md
14027         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14028         computation of the VEC_MERGE selector from mask.
14029         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14030         Fix decoding of the VEC_MERGE selector into mask.
14032 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14034         PR tree-optimization/85286
14035         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14037 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14039         * final.c (final_1): Set insn_last_address as well as
14040         insn_current_address.
14042 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14044         PR target/85173
14045         * explow.c (emit_stack_probe): Call validize_mem on memory location
14046         before passing it to gen_probe_stack.  Create address operand and
14047         legitimize it for the probe_stack_address case.
14049 2018-04-09  Jan Hubicka  <jh@suse.cz>
14051         PR lto/85078
14052         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14053         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14054         * tree.c (free_lang_data_in_type): Fix handling of binfos;
14055         walk basetypes.
14056         (free_lang_data): Rebuild type inheritance graph.
14058 2018-04-09  Martin Sebor  <msebor@redhat.com>
14060         * invoke.texi (-finline-small-functions): Mention other optimization
14061         options.
14062         (-findirect-inlining, -fpartial-inlining): Same.
14063         (-finline-functions-called-once): Same.
14064         (-freorder-blocks-and-partition): Same.
14066 2018-04-09  Jan Hubicka  <jh@suse.cz>
14068         PR rtl/84058
14069         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14070         jumps; choose last target that matches the criteria (i.e.
14071         no partition changes for non-crossing jumps).
14072         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14073         support for redirecting crossing jumps to non-crossing.
14075 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
14077         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14078         also for naked functions.
14080 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
14082         * config/arc/arc.md (add_shift): New pattern.
14083         (add_shift2): Likewise.
14084         (sub_shift): Likewise.
14085         (sub_shift_cmp0_noout): Likewise.
14086         (compare_si_ashiftsi): Likewise.
14087         (xbfu_cmp0_noout): New combine pattern.
14088         (xbfu_cmp0"): Likewise.
14089         (movsi_set_cc_insn): Place the predicable variant first.
14090         (commutative_binary_cmp0_noout): Remove clobber.
14091         (commutative_binary_cmp0): New pattern.
14092         (noncommutative_binary_cmp0): Likewise.
14093         (noncommutative_binary_cmp0_noout): Likewise.
14094         (noncommutative_binary_comparison_result_used): Removed.
14095         (rsub_cmp0): New pattern.
14096         (rsub_cmp0_noout): Likewise.
14097         (extzvsi): Changed, keep only meaningful variants.
14098         (SQH, SEZ): New iterators.
14099         (SQH_postfix): New mode attribute.
14100         (SEZ_prefix): New code attribute.
14101         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14102         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14103         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14104         of numerical value.
14105         (noncommutative_operator): Check the availability of barrel
14106         shifter option.
14108 2018-04-09  Richard Biener  <rguenther@suse.de>
14110         PR tree-optimization/85284
14111         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14112         Only use the niter constraining form of simple_iv when the exit
14113         is always executed.
14115 2018-04-09  Tom de Vries  <tom@codesourcery.com>
14117         PR target/84041
14118         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14119         (define_expand "*memory_barrier"): New define_expand.
14120         (define_insn "memory_barrier"): New insn.
14122 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14124         PR rtl-optimization/80463
14125         PR rtl-optimization/83972
14126         PR rtl-optimization/83480
14128         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14129         correct producer for the insn.
14130         (tidy_control_flow): Fixup seqnos in case of debug insns.
14132 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14134         PR rtl-optimization/83913
14136         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14137         different sched-times when merging exprs.
14139 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14141         PR rtl-optimization/83962
14143         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14144         tidy_fallthru_edge and tidy_control_flow.
14146 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14148         PR rtl-optimization/83530
14150         * sel-sched.c (force_next_insn): New global variable.
14151         (remove_insn_for_debug): When force_next_insn is true, also leave only
14152         next insn in the ready list.
14153         (sel_sched_region): When the region wasn't scheduled, make another pass
14154         over it with force_next_insn set to 1.
14156 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14158         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14159         into tm_file.
14160         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14161         for interrupt control.
14162         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14163         functions for interrupt control.
14164         * config/nds32/nds32-intrinsic.md: Likewise.
14165         * config/nds32/nds32_intrinsic.h: Likewise.
14166         * config/nds32/nds32.h (nds32_builtins): Likewise.
14168 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14170         * config/nds32/nds32.c (nds32_init_machine_status,
14171         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14172         strict_aligned_p field.
14173         (nds32_expand_to_rtl_hook): New function.
14174         (TARGET_EXPAND_TO_RTL_HOOK): Define.
14175         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14177 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14178             Chung-Ju Wu  <jasonwucj@gmail.com>
14180         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14181         * config/nds32/nds32-n7.md: New file.
14182         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14183         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14184         pipeline.
14185         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14186         * config/nds32/nds32.md (pipeline_model): Add n7.
14187         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14188         * config/nds32/pipelines.md: Include n7 settings.
14190 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14191             Chung-Ju Wu  <jasonwucj@gmail.com>
14193         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14194         * config/nds32/nds32-e8.md: New file.
14195         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14196         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14197         pipeline.
14198         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14199         * config/nds32/nds32.md (pipeline_model): Add e8.
14200         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14201         * config/nds32/pipelines.md: Include e8 settings.
14203 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14204             Chung-Ju Wu  <jasonwucj@gmail.com>
14206         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14207         * config/nds32/nds32-n8.md: New file.
14208         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14209         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14210         pipeline.
14211         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14212         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14213         * config/nds32/nds32.md (pipeline_model): Add n8.
14214         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14215         * config/nds32/pipelines.md: Include n8 settings.
14217 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14218             Chung-Ju Wu  <jasonwucj@gmail.com>
14220         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14221         * config/nds32/nds32-n9-2r1w.md: New file.
14222         * config/nds32/nds32-n9-3r2w.md: New file.
14223         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14224         nds32_register_ports): New or modify for cpu n9.
14225         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14226         pipeline.
14227         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14228         * config/nds32/nds32-utils.c: New file.
14229         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14230         TARGET_MUL_SLOW): Define.
14231         * config/nds32/nds32.md (pipeline_model): New attribute.
14232         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14233         New options that support cpu n9.
14234         * config/nds32/pipelines.md: Include n9 settings.
14235         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14237 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14239         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14240         information if necessary.
14241         (output_cond_branch_compare_zero): Likewise.
14242         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14243         (nds32_target_alignment): Refine for alignment.
14244         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14245         (FUNCTION_BOUNDARY): Modify.
14246         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14247         align case.
14248         * config/nds32/nds32.opt (malways-align, malign-functions): New.
14250 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14252         * config/nds32/constants.md (unspec_volatile_element): Add values for
14253         TLB operation and data prefetch.
14254         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14255         functions for TLB operation and data prefetch.
14256         * config/nds32/nds32-intrinsic.md: Likewise.
14257         * config/nds32/nds32_intrinsic.h: Likewise.
14258         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14259         (nds32_print_operand): Likewise.
14260         * config/nds32/nds32.h (nds32_builtins): Likewise.
14262 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
14263         Andrew Pinski <pinsika@gcc.gnu.org>
14265         PR middle-end/82976
14266         * match.pd: Use constant_boolean_node of correct type instead of
14267         boolean_true_node or boolean_false_node for simplifying
14268         pointer comparisons to zero.
14270 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14272         PR tree-optimization/80021
14273         * tree.c (verify_type_variant): Make error call in verify_variant_match
14274         translatable and remove final full stop.
14276 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14278         * config/nds32/constants.md (unspec_volatile_element): Add
14279         UNSPEC_VOLATILE_EH_RETURN.
14280         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14281         nds32_output_stack_pop): Support dwarf exception handling process.
14282         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14283         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14284         exception handling process.
14285         (nds32_compute_stack_frame): Likewise.
14286         (nds32_return_addr_rtx): Likewise.
14287         (nds32_initial_elimination_offset): Likewise.
14288         (nds32_expand_prologue): Likewise.
14289         (nds32_expand_epilogue): Likewise.
14290         (nds32_dynamic_chain_address): New function.
14291         * config/nds32/nds32.h (machine_function): Add fields for dwarf
14292         exception handling.
14293         (DYNAMIC_CHAIN_ADDRESS): Define.
14294         (EH_RETURN_DATA_REGNO): Define.
14295         (EH_RETURN_STACKADJ_RTX): Define.
14296         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14297         patterns for dwarf exception handling.
14299 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14301         * config/nds32/nds32.h: Clean up obsolete macros.
14303 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14305         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14306         Add enum values for particular instructions.
14307         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14308         particular intrinsic functions.
14309         * config/nds32/nds32-intrinsic.md: Likewise.
14310         * config/nds32/nds32_intrinsic.h: Likewise.
14311         * config/nds32/nds32.h (nds32_builtins): Likewise.
14312         * config/nds32/nds32.md (type): Add pbsad and pbsada.
14313         (btst, ave): New patterns for particular instructions.
14315 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14317         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14318         Add enum values for atomic load/store and memory sync.
14319         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14320         and memory sync.
14321         * config/nds32/nds32-intrinsic.md: Likewise.
14322         * config/nds32/nds32_intrinsic.h: Likewise.
14323         * config/nds32/nds32.h (nds32_builtins): Likewise.
14325 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14327         PR tree-optimization/85257
14328         * fold-const.c (native_encode_vector): If not all elts could fit
14329         and off is -1, return 0 rather than offset.
14330         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14331         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14332         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
14333         adjust buffer in native_interpret_expr call.
14335 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14337         * config/nds32/constants.md (unspec_volatile_element): Add cache
14338         control enum values.
14339         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14340         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14341         * config/nds32/nds32.c (nds32_cctl_names): New.
14342         (nds32_print_operand): Handle cache control register names.
14343         * config/nds32/nds32.h (nds32_builtins): New enum values.
14344         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14345         macros.
14346         * config/nds32/nds32.md (type): Add mmu.
14347         * config/nds32/pipelines.md (simple_insn): Add mmu.
14349 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14351         * config/nds32/nds32.md (type): Remove call.
14352         * config/nds32/pipelines.md (simple_insn): Likewise.
14354 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14356         * config/nds32/constants.md (unspec_volatile_element): Add
14357         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14358         UNSPEC_VOLATILE_FMFCFG.
14359         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14360         description for fmfcfg and fmfcsr.
14361         (bdesc_1arg): Add fmtcsr.
14362         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14363         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14364         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14365         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14366         unspec_fmfcfg): New patterns.
14367         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14368         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14369         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14370         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14371         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14372         __nds32__fmfcfg): Define.
14374 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14376         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14377         intrinsic register names.
14378         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14379         intrinsic register enum values and macros.
14381 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14383         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14384         for load/store addressing form.
14385         (nds32_print_operand_address): Likewise.
14387 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
14389         PR target/85196
14390         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14391         based on LABEL_REF.  Remove useless assertion.
14392         (pic_address_needs_scratch): Fix formatting.
14393         (sparc_legitimize_pic_address): Minor tweaks.
14394         (sparc_delegitimize_address): Adjust assertion accordingly.
14395         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14396         into symbolic_operand.
14397         (movsi_high_pic_label_ref): Likewise.
14398         (movsi_lo_sum_pic_label_ref): Likewise.
14399         (movdi_pic_label_ref): Likewise.
14400         (movdi_high_pic_label_ref): Likewise.
14401         (movdi_lo_sum_pic_label_ref): Likewise.
14403 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
14405         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14406         custom LIB_SPEC setup.
14408 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
14409             Kito Cheng  <kito.cheng@gmail.com>
14411         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14412         * config/riscv/freebsd.h: New.
14414 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14416         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14417         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14418         file.
14420 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14421             Kito Cheng  <kito.cheng@gmail.com>
14423         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14424         nds32_output_call, nds32_symbol_binds_local_p): New functions.
14425         * config/nds32/nds32-protos.h (nds32_output_call,
14426         nds32_output_return): Declare.
14427         * config/nds32/nds32.md: Refine all the call and return patterns.
14429 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14431         PR debug/85252
14432         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14433         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14435         PR rtl-optimization/84872
14436         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14437         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14438         EDGE_CROSSING edge.
14440 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
14442         * expr.c (copy_blkmode_to_reg): Revert 254862.
14443         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14445 2018-04-06  Richard Biener  <rguenther@suse.de>
14447         PR middle-end/85244
14448         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14449         after seeing a component reference with an adjacent field.  Treat
14450         refs to arrays at struct end of external decls similar to
14451         refs to unconstrained commons.
14453 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14455         PR sanitizer/85213
14456         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14457         look through SAVE_EXPRs with non-side-effects argument.  Adjust
14458         recursive calls.
14459         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14460         save_p here.
14462 2018-04-06  Richard Biener  <rguenther@suse.de>
14464         PR middle-end/85180
14465         * alias.c (find_base_term): New wrapper around find_base_term
14466         unwinding CSELIB_VAL_PTR changes.
14467         (find_base_term): Do not restore CSELIB_VAL_PTR during the
14468         recursion.
14470 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14472         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14473         instructions.
14474         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14475         constant definitions.
14476         ("nop"): lr 0,0 -> nopr r0
14477         ("nop_lr0", "nop_lr1"): New insn definitions.
14479 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14481         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14482         NDS32_V3PUSH_AVAILABLE_P macro.
14484 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
14485             Chung-Ju Wu  <jasonwucj@gmail.com>
14487         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14488         (nds32*-*-*): Add float and fpu_config into supported_defaults.
14489         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14490         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14491         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14492         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14493         * config/nds32/constraints.md: New constraints and checking for hard
14494         float configuration.
14495         * config/nds32/iterators.md: New mode iterator and attribute for hard
14496         float configuration.
14497         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14498         patterns.
14499         * config/nds32/nds32-fpu.md: New file.
14500         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14501         deal with hard float code generation.
14502         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14503         ARCH_V3S.
14504         (abi_type, float_reg_number): New enum type.
14505         * config/nds32/nds32-predicates.c: New predicates for hard float.
14506         * config/nds32/nds32-protos.h: Declare functions for hard float.
14507         * config/nds32/nds32.c: Implementation for hard float configuration.
14508         * config/nds32/nds32.h: Definitions for hard float configuration.
14509         * config/nds32/nds32.md: Include hard float machine description and
14510         modify patterns for hard float configuration.
14511         * config/nds32/nds32.opt: New options for hard float configuration.
14512         * config/nds32/predicates.md: New predicates for hard float
14513         configuration.
14515 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14517         * common/config/nds32/nds32-common.c
14518         (nds32_option_optimization_table): Enable -mreleax-hint by default.
14520 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
14522         PR middle-end/85195
14523         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14524         CONSTRUCTOR_ELT (ctor, ...)->value.
14526 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
14528         PR target/85193
14529         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14531 2018-04-05  Tom de Vries  <tom@codesourcery.com>
14533         PR target/85204
14534         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14535         cond jump.
14537 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
14538             Kito Cheng  <kito.cheng@gmail.com>
14540         * config/nds32/constraints.md (U33): Fine-tune checking condition.
14541         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14542         * config/nds32/nds32.h (nds32_16bit_address_type): Add
14543         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14545 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
14546             Kito Cheng  <kito.cheng@gmail.com>
14548         * config/nds32/constraints.md (Ufe): New memory constraint.
14549         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14550         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14551         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14552         operands.
14553         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14554         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14556 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14558         * config/nds32/nds32.md: Use optimize_size in the condition for
14559         alu-shift instructions.
14561 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14563         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14565 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14567         * config/nds32/nds32.md (negsi2): Refine pattern.
14569 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
14570             Chung-Ju Wu  <jasonwucj@gmail.com>
14572         * config/nds32/iterators.md (shift_rotate): New code iterator.
14573         (shift): New code attribute.
14574         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14575         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14576         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14577         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14578         bit-wise operations.
14579         (andsi3, *andsi3): Ditto.
14580         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14581         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14582         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14583         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14584         nds32_ior_operand, nds32_xor_operand): New predicates.
14586 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14588         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14589         (addsi3, subsi3): ... this.
14591 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14593         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14595 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14597         * config/nds32/nds32.md: Adjust indention.
14599 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
14601         * config/nds32/nds32.md (feature): New attribute.
14603 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
14605         * config/nds32/nds32.md (subtype): New attribute.
14607 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14609         PR target/85203
14610         * config/arm/arm-builtins.c (arm_expand_builtin): Change
14611         expansion to perform a bitwise AND of the argument followed by a
14612         boolean negation of the result.
14614 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
14616         PR rtl-optimization/84878
14617         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14618         the basic block.  Assert the use reference is not artificial and that
14619         it has an associated insn.
14621 2018-04-04  Michael Matz  <matz@suse.de>
14623         * builtins.c (compute_objsize): Pass correct operand
14624         to array_at_struct_end_p.
14626 2018-04-04  Richard Biener  <rguenther@suse.de>
14628         PR lto/85176
14629         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14630         from contexts for DINFO_LEVEL_TERSE and below.
14632 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14634         * config/nds32/nds32-doubleword.md (move_<mode>): Require
14635         resiter_operand condition.
14636         * config/nds32/nds32.md (*move<mode>): Ditto.
14638 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14639             Monk Chiang  <sh.chiang04@gmail.com>
14641         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14643 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14645         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14647 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14648             Kito Cheng  <kito.cheng@gmail.com>
14650         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14651         nds32_cond_code_str, output_cond_branch,
14652         output_cond_branch_compare_zero, nds32_expand_cbranch,
14653         nds32_expand_cstore, nds32_expand_movcc,
14654         nds32_output_cbranchsi4_equality_zero,
14655         nds32_output_cbranchsi4_equality_reg,
14656         nds32_output_cbranchsi4_equality_reg_or_const_int,
14657         nds32_output_cbranchsi4_greater_less_zero: New functions.
14658         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14659         nds32_expand_cstore, nds32_expand_movcc,
14660         nds32_output_cbranchsi4_equality_zero,
14661         nds32_output_cbranchsi4_equality_reg,
14662         nds32_output_cbranchsi4_equality_reg_or_const_int,
14663         nds32_output_cbranchsi4_greater_less_zero): Declare.
14664         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14665         nds32_rimm11s_operand): New predicates.
14666         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14667         * config/nds32/nds32.md: Rewrite all the branch and conditional move
14668         patterns.
14670 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
14672         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14673         * config/nds32/nds32.md: Ditto.
14674         * config/nds32/pipelines.md: Ditto.
14676 2018-04-04  Richard Biener  <rguenther@suse.de>
14678         PR tree-optimization/85168
14679         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14680         propagating abnormals.
14682 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14684         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14686 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14687             Kito Cheng  <kito.cheng@gmail.com>
14689         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14690         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14691         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14692         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14693         * config/nds32/nds32.md (sibcall_internal): New.
14694         (sibcall_register): Remove.
14695         (sibcall_immediate): Remove.
14696         (sibcall_value_internal): New.
14697         (sibcall_value_register): Remove.
14698         (sibcall_value_immediate): Remove.
14699         * config/nds32/predicates.md (nds32_general_register_operand): New.
14700         (nds32_call_address_operand): New.
14702 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14704         PR rtl-optimization/85167
14705         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14706         bb_defs if *split_p, instead preinitialize it to NULL.
14708         PR tree-optimization/85156
14709         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14710         evaluating the argument multiple times.
14712 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
14714         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14715         than vector.
14716         (_mm_cvtpd_ps): Likewise.
14717         (_mm_cvttpd_epi32): Likewise.
14718         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14719         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14720         vector, pixel, and bool following altivec.h include.
14722 2018-04-03  Martin Sebor  <msebor@redhat.com>
14724         * doc/extend.texi (Common Function Attributes): Clarify.
14725         (const attribute): Likewise.
14726         (pure attribute): Likewise.
14728 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14730         PR target/85169
14731         * config/i386/i386.c (ix86_expand_vector_set): Use
14732         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
14734 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
14736         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14737         instructions when changing rounding bits to preserve precision bits
14738         in the x87 control word.
14740 2018-04-03  Martin Liska  <mliska@suse.cz>
14742         PR tree-optimization/82491
14743         * rtl.h (strip_offset_and_add): Replace += suboffset with
14744         poly_uint64 () + suboffset.
14746 2018-03-29  Martin Liska  <mliska@suse.cz>
14747             Martin Jambor  <mjambor@suse.cz>
14749         PR ipa/84947
14750         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14751         param_type is not an integral or pointer type.
14753 2018-04-03  Richard Biener  <rguenther@suse.de>
14755         * sese.h (recompute_all_dominators): Remove.
14757 2018-04-02  Martin Sebor  <msebor@redhat.com>
14759         * doc/invoke.texi (-Wrestrict): Fix typos.
14761 2018-04-02  Jim Wilson  <jimw@sifive.com>
14763         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14764         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14765         (<optab>di3, <optab>si3_extend): Likewise.
14766         (<optab>si3_mask, <optab>si3_mask_1): New.
14767         (<optab>di3_mask, <optab>di3_mask_1): New.
14768         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14769         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14770         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14772 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
14774         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14775         example.
14777 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14779         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14780         (nds32_canonicalize_comparison): New function.
14782 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14783             Kito Cheng  <kito.cheng@gmail.com>
14784             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14786         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14787         * config/nds32/constants.md (unspec_volatile_element): Add
14788         UNSPEC_VOLATILE_RELAX_GROUP.
14789         * config/nds32/nds32-relax-opt.c: New file.
14790         * config/nds32/nds32-predicates.c
14791         (nds32_symbol_load_store_p): New function.
14792         * config/nds32/nds32-protos.h
14793         (nds32_symbol_load_store_p): Declare function.
14794         (make_pass_nds32_relax_opt): Declare new rtl pass function.
14795         * config/nds32/nds32.c
14796         (nds32_register_pass): New function to register pass.
14797         (nds32_register_passes): New function to register passes.
14798         * config/nds32/nds32.md (relax_group): New pattern.
14799         * config/nds32/nds32.opt (mrelax-hint): New option.
14800         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14802 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
14804         * config/nds32/t-nds32: Modify files dependency.
14806 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14808         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14809         (PROFILE_HOOK): Define its implementation.
14811 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14813         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14814         type and 32-bit size.
14816 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
14818         PR middle-end/85090
14819         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14820         (V_128_256): New mode iterator.
14821         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14822         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14823         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14824         of V.
14825         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14826         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14828 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
14830         PR target/83315
14831         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14832         NaN inputs correctly.
14834 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
14836         PR target/80546
14837         * config/rs6000/vsx.md (??r): New mode attribute.
14838         (*vsx_mov<mode>_64bit): Use it.
14839         (*vsx_mov<mode>_32bit): Likewise.
14841 2018-03-30  Martin Sebor  <msebor@redhat.com>
14843         PR tree-optimization/84818
14844         * builtins.c (check_access): Use warning_n.
14846 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14848         PR target/83822
14849         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14850         condition.
14851         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14852         condition.
14854 2018-03-30  Julia Koval  <julia.koval@intel.com>
14856         PR target/84413
14857         * x86-tune.def (movx, partial_reg_dependency): Enable for
14858         m_SKYLAKE_AVX512.
14860 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14862         PR inline-asm/84985
14863         * lra-constraints.c (process_alt_operands): Move setting
14864         this_alternative_matches below.
14866 2018-03-29  Martin Liska  <mliska@suse.cz>
14868         PR lto/84995.
14869         * doc/invoke.texi: Document how LTO works with debug info.
14870         Describe auto-load support of binutils.  Mention 'x86-64'
14871         as valid option value of -march option.
14873 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14875         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14877         PR c/85094
14878         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14879         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14880         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14881         checking.
14883 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14885         PR target/84912
14886         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14887         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14888         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14889         for RS6000_BTM_POWERPC64.
14890         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14891         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14892         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14893         definition.
14894         (DIVDE): Use it.
14895         (DIVDEU): Likewise.
14897 2018-03-28  Carl Love  <cel@us.ibm.com>
14899         Revert
14900         2017-09-27  Carl Love  <cel@us.ibm.com>
14902         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14903         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14904         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14905         fctiw instruction.
14907 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14909         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14910         instead of __vector bool.
14911         (_mm_max_pu8): Likewise.
14912         (_mm_min_pi16): Likewise.
14914 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14916         PR target/84912
14917         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14918         (DIVWEUO): Likewise.
14919         (DIVDEO): Likewise.
14920         (DIVDEUO): Likewise.
14921         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14922         DIVWEUO and DIVDEUO.
14923         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14924         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14925         (div_extend): Likewise.
14926         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14927         builtin function.
14928         (__builtin_divweuo): Likewise.
14929         (__builtin_divdeo): Likewise.
14930         (__builtin_divdeuo): Likewise.
14932 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14934         PR target/85095
14935         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14936         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14938         PR tree-optimization/82004
14939         * gimple-match-head.c (optimize_pow_to_exp): New function.
14940         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14941         Don't fold to exp if optimize_pow_to_exp is false.
14943 2018-03-28  Martin Liska  <mliska@suse.cz>
14945         PR other/84819
14946         * calls.c (initialize_argument_information): Fix trailing space.
14947         * common.opt: Fix typo and provide better explanation for
14948         -fsanitize-coverage option.
14949         * config/i386/i386.opt: Fix typo.
14951 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14952             Martin Liska  <mliska@suse.cz>
14954         PR sanitizer/85081
14955         * gimplify.c (asan_poison_variable): Don't do the check for
14956         gimplify_omp_ctxp here.
14957         (gimplify_decl_expr): Do it here.
14958         (gimplify_target_expr): Likewise.
14960 2018-03-28  Martin Liska  <mliska@suse.cz>
14962         PR target/84988
14963         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14964         chkp_type_bounds_count if MPX is not enabled.
14966 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14968         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14970 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14972         PR target/84914
14973         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14974         function to create the function decl for complex long double
14975         multiply and divide for -mabi=ieeelongdouble.
14976         (init_float128_ieee): Call it.
14978 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14980         PR target/85044
14981         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14982         -fcf-protection=branch -mibt.
14983         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14985 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14987         PR target/81863
14988         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14989         arm_word_relocations.
14991 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14993         PR target/85056
14994         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14995         extern array declarations.
14997 2018-03-27  Richard Biener  <rguenther@suse.de>
14999         PR middle-end/84067
15000         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15001         explicit single_use checks.
15003 2018-03-27  Richard Biener  <rguenther@suse.de>
15005         PR tree-optimization/85082
15006         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15007         Valueize the VUSE.
15009 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15011         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15012         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15013         Turn on fasynchronous-unwind-tables and funwind-tables.
15015 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
15017         PR target/85073
15018         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15019         (*bmi_blsr_<mode>_ccz): Ditto.
15021 2018-03-26  Tom de Vries  <tom@codesourcery.com>
15023         PR tree-optimization/85063
15024         * omp-general.c (offloading_function_p): New function.  Factor out
15025         of ...
15026         * omp-offload.c (pass_omp_target_link::gate): ... here.
15027         * omp-general.h (offloading_function_p): Declare.
15028         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15029         with attribute omp declare target for offloading functions.
15031 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
15033         PR tree-optimization/84005
15034         * tree-data-ref.h (get_base_for_alignment): Declare.
15035         * tree-data-ref.c (get_base_for_alignment_1): New function.
15036         (get_base_for_alignment): Likewise.
15037         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15038         get_base_for_alignment to find a suitable base object, instead
15039         of always using drb->base_address.
15041 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15043         PR inline-asm/85022
15044         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15045         known size by default.
15047 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
15049         PR inline-asm/85030
15050         * lra-constraints.c (process_alt_operands): Don't match BLKmode
15051         and non BLKmode operands.
15053 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15055         PR target/85026
15056         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15057         Clean up attributes.
15059 2018-03-23  Richard Biener  <rguenther@suse.de>
15061         PR debug/85020
15062         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15063         we are going to emit early debug for LTO.
15065 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15067         PR inline-asm/85034
15068         * function.c (match_asm_constraints_1): Don't optimize if input
15069         doesn't satisfy general_operand predicate for output's mode.
15071         PR inline-asm/85022
15072         * alias.c (write_dependence_p): Don't require for x_canonicalized
15073         non-VOIDmode if x has VOIDmode.
15075         PR sanitizer/85029
15076         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15077         just don't try to optimize it rather than assert it never happens.
15079 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15081         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15082         macro expansions for definition of ST_INTERNAL_<mode> and
15083         LD_INTERNAL_<mode> builtins.
15084         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15085         Remove prototype.
15086         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15087         function.
15088         (altivec_expand_st_builtin): Likewise.
15089         (altivec_expand_builtin): Remove calls to deleted functions.
15090         (rs6000_address_for_altivec): Delete this function.
15091         * config/rs6000/vector.md: Remove expands for
15092         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15094 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
15096         PR target/84826
15097         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15098         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15099         re-computing once computed.
15100         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15101         (arm_init_machine_status): Initialize
15102         machine->static_chain_stack_bytes.
15104 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15106         PR target/84760
15107         * doc/extend.texi: Add four new prototypes for vec_ld.
15108         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15109         definitions for more logical presentation.
15110         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15111         entries for V1TI variants of __builtin_altivec_ld builtin.
15112         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15113         handling of V1TI variant of LVX icode pattern.
15114         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15115         (rs6000_gimple_fold_builtin): Likewise.
15116         (altivec_init_builtins): Add code to define
15117         __builtin_altivec_lvx_v1ti function.
15119 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15121         PR inline-asm/84941
15122         * function.c (match_asm_constraints_1): Don't do the optimization
15123         if input isn't a REG, SUBREG, MEM or constant.
15125 2018-03-22  Tom de Vries  <tom@codesourcery.com>
15127         PR tree-optimization/84956
15128         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15129         bb_has_abnormal_pred.
15131 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15133         PR sanitizer/85018
15134         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15135         DECL_INITIAL (decl) to decl at the end.
15136         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15137         adjust the comment.
15139 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
15141         * doc/extend.texi (__builtin_tgmath): Document when complex
15142         integer types are treated as _Complex _Float64.
15144 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15146         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15148 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15150         PR tree-optimization/84960
15151         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15152         if it is ENTRY block, move them into single succ of ENTRY in that case.
15154 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
15156         PR tree-optimization/84811
15157         * poly-int.h (poly_span_traits): Remove the T3 parameter and
15158         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15159         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15160         (known_subrange_p): Update accordingly.  Cast each value involved
15161         in the size comparison, rather than casting the result of the
15162         subtraction.
15164 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15166         PR tree-optimization/84982
15167         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15168         by flipping the least significant bit rather than all bits from
15169         bitpos to bitpos + bitsize - 1.
15171 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15173         * doc/extend.texi (Deprecated Features): Remove mention of
15174         long-deleted deprecations.
15176 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15178         PR jit/84288
15179         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15180         * configure: Regenerate.
15182 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15184         PR tree-optimization/83126
15185         * tree-parloops.c (num_phis): New function.
15186         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15188 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15190         * doc/extend.texi (Deprecated Features): Update deprecated flags,
15191         mention anon-struct/union members and trailing attributes.
15193 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
15195         PR tree-optimization/84969
15196         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15197         builtin memset partitions if they set different rhs values.
15199 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15201         PR rtl-optimization/84989
15202         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15203         VEC_DUPLICATE with scalar result mode.
15205 2018-03-21  Martin Liska  <mliska@suse.cz>
15207         PR ipa/84963
15208         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15209         not intended return statement.
15211 2018-03-21  Martin Liska  <mliska@suse.cz>
15213         PR target/84988
15214         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15215         (chkp_find_bound_slots_1): Limit number of iterations.
15217 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
15219         PR target/84838
15220         * Minor grammar fixes for x86 options.
15222 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15224         PR debug/84875
15225         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15226         holding REG_CFA_RESTORE notes, instead turn them into a USE.
15228 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
15230         PR target/83789
15231         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15232         (altivec_lvx_<mode>_1op): Likewise.
15233         (altivec_stvx_<mode>_2op): Likewise.
15234         (altivec_stvx_<mode>_1op): Likewise.
15235         (altivec_lvx_<VM2:mode>): New define_expand.
15236         (altivec_stvx_<VM2:mode>): Likewise.
15237         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15238         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15239         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15240         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15241         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15242         (rs6000_gen_lvx): Likewise.
15243         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15244         (altivec_expand_stv_builtin): Likewise.
15245         (altivec_expand_builtin): Likewise.
15246         * config/rs6000/vector.md: Likewise.
15248 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15250         PR target/82518
15251         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15252         BYTES_BIG_ENDIAN.
15254 2018-03-20  Richard Biener  <rguenther@suse.de>
15256         PR target/84986
15257         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15258         sign-conversions as zero, fall back to standard scalar_stmt
15259         cost for the rest.
15261 2018-03-20  Martin Liska  <mliska@suse.cz>
15263         PR ipa/84825
15264         * predict.c (rebuild_frequencies): Handle case when we have
15265         PROFILE_ABSENT, but flag_guess_branch_prob is false.
15267 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15269         PR target/84990
15270         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15271         flag_section_anchors.
15272         * varasm.c (use_blocks_for_decl_p): Remove hack for
15273         dw2_force_const_mem.
15275         PR target/84845
15276         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15277         to ...
15278         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
15279         be created, use lowpart_subreg of operands[0] rather than operands[0]
15280         itself.
15281         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15282         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15283         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15284         and n constraint instead of aarch64_shift_imm_di and Usd.
15285         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15286         (*aarch64_<optab>_reg_minus<mode>3): ... this.
15288 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
15290         PR target/82989
15291         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15292         to favor GPR over NEON registers.
15293         (<shift>di3_neon): Likewise.
15295 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15297         PR target/84952
15298         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15299         (nvptx_process_pars): Emit bar.sync asap and alap.
15301 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15303         PR target/84954
15304         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15305         seen_label if seen_label is already set.
15307 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15309         PR target/84945
15310         * config/i386/i386.c (fold_builtin_cpu): For features above 31
15311         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15312         Use 1U instead of 1.  Formatting fixes.
15314         PR c/84953
15315         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15316         instead of TREE_TYPE (s1) for the return value.
15318 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
15320         PR tree-optimization/84946
15321         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15322         bitsize + bitsize in poly_uint64 rather than poly_int64.
15324         PR sanitizer/78651
15325         * dwarf2asm.c: Include fold-const.c.
15326         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15327         of decl rather than decl itself.
15329         PR rtl-optimization/84643
15330         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15332 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
15334         PR sanitizer/78651
15335         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15336         calling assemble_variable.
15338 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
15340         PR target/81647
15341         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15342         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15344 2018-03-19  Jim Wilson  <jimw@sifive.com>
15346         PR bootstrap/84856
15347         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15348         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15349         (riscv_first_stack_step): Likewise.
15350         (riscv_option_override): Use STACK_BOUNDARY instead of
15351         MIN_STACK_BOUNDARY.
15352         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15353         MIN_STACK_BOUNDARY.
15354         (BIGGEST_ALIGNMENT): Set to 128.
15355         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15356         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15357         STACK_BOUNDARY.
15359 2018-03-19  Richard Biener  <rguenther@suse.de>
15361         PR tree-optimization/84933
15362         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15363         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15365 2018-03-19  Richard Biener  <rguenther@suse.de>
15367         PR tree-optimization/84859
15368         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15369         (cond_if_else_store_replacement): Perform sinking operation on
15370         single-store BBs regardless of MAX_STORES_TO_SINK setting.
15371         Generalize what a BB with a single eligible store is.
15373 2018-03-19  Richard Biener  <rguenther@suse.de>
15375         PR tree-optimization/84929
15376         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15377         chrec_is_positive against non-chrec arg.
15379 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
15381         PR target/84711
15382         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15384 2018-03-18  Martin Liska  <mliska@suse.cz>
15386         PR rtl-optimization/84635
15387         * regrename.c (build_def_use): Use matches_mode only when
15388         matches >= 0.
15390 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
15392         PR tree-optimization/84913
15393         * tree-vect-loop.c (vectorizable_reduction): Don't try to
15394         vectorize chains of COND_EXPRs.
15396 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15398         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15400 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15402         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15404 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15406         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15408 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15409             Kito Cheng  <kito.cheng@gmail.com>
15411         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15412         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15413         (nds32_adjust_reg_alloc_order): New function.
15414         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15416 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
15418         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15419         nds32_print_operand, nds32_print_operand_address): Use
15420         HOST_WIDE_INT_PRINT_DEC instead.
15422 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15424         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15426 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
15428         PR target/84902
15429         * config/i386/i386.c (initial_ix86_tune_features,
15430         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15431         unsigned long long.
15432         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15433         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15434         rather than 1u << ix86_tune.  Formatting fix.
15435         (ix86_option_override_internal): Change ix86_arch_mask from
15436         unsigned int to unsigned HOST_WIDE_INT, initialize to
15437         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15438         (ix86_function_specific_restore): Likewise.
15440 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15442         PR target/84899
15443         * postreload.c (reload_combine_recognize_pattern): Perform
15444         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15445         truncate_int_for_mode the result for the destination's mode.
15447         PR c/84909
15448         * hsa-gen.c (mem_type_for_type): Fix comment typo.
15449         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15450         Likewise.
15451         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15452         Likewise.
15454 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
15456         PR target/84876
15457         * lra-assigns.c (lra_split_hard_reg_for): Don't use
15458         regno_allocno_class_array and sorted_pseudos.
15459         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15460         insns where regno is used.
15462 2018-03-16  Martin Liska  <mliska@suse.cz>
15464         PR ipa/84833
15465         * multiple_target.c (create_dispatcher_calls): Redirect
15466         reference in the symbol table.
15468 2018-03-16  Martin Liska  <mliska@suse.cz>
15470         PR ipa/84722
15471         * multiple_target.c (create_dispatcher_calls): Redirect also
15472         an alias.
15474 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15476         PR c++/79937
15477         PR c++/82410
15478         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15479         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15480         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15482 2018-03-16  Julia Koval  <julia.koval@intel.com>
15484         * doc/invoke.texi (Skylake Server): Add CLWB.
15485         Cannonlake): Remove CLWB.
15487 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15489         PR tree-optimization/84841
15490         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15491         1 << 3.
15492         (FLOAT_ONE_CONST_TYPE): Define.
15493         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15494         (sort_by_operand_rank): Put entries with higher constant_type last
15495         rather than first to match comments.
15497 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
15499         * config/nios2/nios2.md (movsi_internal): Fix thinko in
15500         split predicate.
15502 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
15504         PR c++/79085
15505         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15506         check and use address of target always.
15508 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
15510         PR target/84574
15511         * config/i386/i386.c (indirect_thunk_needed): Update comments.
15512         (indirect_thunk_bnd_needed): Likewise.
15513         (indirect_thunks_used): Likewise.
15514         (indirect_thunks_bnd_used): Likewise.
15515         (indirect_return_needed): New.
15516         (indirect_return_bnd_needed): Likewise.
15517         (output_indirect_thunk_function): Add a bool argument for
15518         function return.
15519         (output_indirect_thunk_function): Don't generate alias for
15520         function return thunk.
15521         (ix86_code_end): Call output_indirect_thunk_function to generate
15522         function return thunks.
15523         (ix86_output_function_return): Set indirect_return_bnd_needed
15524         and indirect_return_needed instead of indirect_thunk_bnd_needed
15525         and indirect_thunk_needed.
15527 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
15529         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15530         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15531         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15533 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
15534             Paul Hua <paul.hua.gm@gmail.com>
15536         PR c/84852
15537         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15539 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
15541         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15542         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15543         resp. SFmode cases.
15545 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
15547         PR target/84711
15548         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15549         instead of GET_MODE_SIZE when comparing Units.
15551 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15553         PR target/68256
15554         * varasm.c (hash_section): Return an unchangeble hash value
15555         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15556         Return !aarch64_can_use_per_function_literal_pools_p ().
15558 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
15560         PR target/84860
15561         * optabs.c (emit_conditional_move): Pass address of cmode's copy
15562         rather than address of cmode as last argument to prepare_cmp_insn.
15564 2018-03-15  Julia Koval  <julia.koval@intel.com>
15566         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15567         F_AVX512VNNI, F_AVX512BITALG): New.
15569 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
15571         PR target/83451
15572         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
15573         insn for floating-point loads and stores.
15575 2018-03-14  Carl Love  <cel@us.ibm.com>
15577         * config/rs6000/rs6000-c.c: Add macro definitions for
15578         ALTIVEC_BUILTIN_VEC_PERMXOR.
15579         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15580         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15581         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15582         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15583         UNSPEC_VPERMXOR.
15584         * config/doc/extend.texi: Add prototypes for vec_permxor.
15586 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
15588         PR c/84852
15589         * diagnostic-show-locus.c (class layout_point): Convert m_line
15590         from int to linenum_type.
15591         (line_span::comparator): Use linenum "compare" function when
15592         comparing line numbers.
15593         (test_line_span): New function.
15594         (layout_range::contains_point): Convert param "row" from int to
15595         linenum_type.
15596         (layout_range::intersects_line_p): Likewise.
15597         (layout::will_show_line_p): Likewise.
15598         (layout::print_source_line): Likewise.
15599         (layout::should_print_annotation_line_p): Likewise.
15600         (layout::print_annotation_line): Likewise.
15601         (layout::print_leading_fixits): Likewise.
15602         (layout::annotation_line_showed_range_p): Likewise.
15603         (struct line_corrections): Likewise for field m_row.
15604         (line_corrections::line_corrections): Likewise for param "row".
15605         (layout::print_trailing_fixits): Likewise.
15606         (layout::get_state_at_point): Likewise.
15607         (layout::get_x_bound_for_row): Likewise.
15608         (layout::print_line): Likewise.
15609         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15610         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15611         * input.c (selftest::test_linenum_comparisons): New function.
15612         (selftest::input_c_tests): Call it.
15613         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15614         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15615         * selftest.h (ASSERT_GT): New macro.
15616         (ASSERT_GT_AT): New macro.
15617         (ASSERT_LT): New macro.
15618         (ASSERT_LT_AT): New macro.
15620 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
15622         PR rtl-optimization/84780
15623         * combine.c (distribute_links): Don't make a link based on pc_rtx.
15625 2018-03-14  Martin Liska  <mliska@suse.cz>
15627         * tree.c (record_node_allocation_statistics): Use
15628         get_stats_node_kind.
15629         (get_stats_node_kind): New function extracted from
15630         record_node_allocation_statistics.
15631         (free_node): Use get_stats_node_kind.
15633 2018-03-14  Richard Biener  <rguenther@suse.de>
15635         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15636         that the value-set of ANTIC_IN doesn't grow.
15638         Revert
15639         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15640         member.
15641         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15642         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15644 2018-03-14  Julia Koval  <julia.koval@intel.com>
15646         * config.gcc (icelake-client, icelake-server): New.
15647         (icelake): Remove.
15648         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15649         (initial_ix86_arch_features): Ditto.
15650         (PTA_SKYLAKE): Add SGX.
15651         (PTA_ICELAKE): Remove.
15652         (PTA_ICELAKE_CLIENT): New.
15653         (PTA_ICELAKE_SERVER): New.
15654         (ix86_option_override_internal): Split up icelake on icelake client and
15655         icelake server.
15656         (get_builtin_code_for_version): Ditto.
15657         (fold_builtin_cpu): Ditto.
15658         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15659         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15660         * config/i386/i386.h (processor_type): Ditto.
15661         * doc/invoke.texi: Ditto.
15663 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
15665         PR sanitizer/83392
15666         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15667         INTEGER_CST offset, add it together with bitpos / 8 and
15668         sign extend based on POINTER_SIZE.
15670         PR target/84844
15671         Revert
15672         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
15674         PR target/78090
15675         * config/i386/constraints.md (Yc): New register constraint.
15676         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15677         Use Yc constraint for alternative 2 of operand 0.  Remove
15678         preferred_for_speed attribute.
15680 2018-03-14  Richard Biener  <rguenther@suse.de>
15682         PR tree-optimization/84830
15683         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15684         with the old one to avoid oscillations.
15686 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
15688         PR target/83712
15689         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15690         pseudos.
15691         (assign_by_spills): Return a flag of reload assignment failure.
15692         Do not process the reload assignment failures.  Do not spill other
15693         reload pseudos if they has the same reg class.  Update n if
15694         necessary.
15695         (lra_assign): Add a return arg.  Set up from the result of
15696         assign_by_spills call.
15697         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15698         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15699         usage_insns if it is not NULL.
15700         (spill_hard_reg_in_range): New function.
15701         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15702         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15703         function prototypes.
15704         (lra_assign): Change prototype.
15705         * lra.c (lra): Add code to deal with fails by splitting hard reg
15706         live ranges.
15708 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
15710         * config/riscv/riscv.opt (mrelax): New option.
15711         * config/riscv/riscv.c (riscv_file_start): Emit ".option
15712         "norelax" when riscv_mrelax is disabled.
15713         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15715 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15717         PR target/84743
15718         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15719         reassociation for int modes.
15721 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15723         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15724         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15725         for big-endian.
15726         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15727         * config/aarch64/aarch64-sve.md
15728         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15729         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15730         (*extend<mode><Vwide>2): Rename to...
15731         (aarch64_sve_extend<mode><Vwide>2): ...this.
15732         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15733         renaming the old pattern to...
15734         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
15735         unsigned packs.
15736         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15737         define_expand, renaming the old pattern to...
15738         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15739         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15740         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15741         account when deciding which SVE instruction the optab should use.
15742         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15744 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15746         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15747         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15748         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15749         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15750         (tlsdesc_small_<mode>): Turn a define_expand and use
15751         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
15752         (tlsdesc_small_advsimd_<mode>): ...this.
15753         (tlsdesc_small_sve_<mode>): New pattern.
15755 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15757         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15758         (UNSPEC_UMUL_HIGHPART): New constants.
15759         (MUL_HIGHPART): New int iteraor.
15760         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15761         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15762         define_expand.
15763         (*<su>mul<mode>3_highpart): New define_insn.
15765 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15767         PR lto/84805
15768         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15769         incomplete types.
15771 2018-03-13  Martin Liska  <mliska@suse.cz>
15773         PR ipa/84658.
15774         * (sem_item_optimizer::sem_item_optimizer): Initialize new
15775         vector.
15776         (sem_item_optimizer::~sem_item_optimizer): Release it.
15777         (sem_item_optimizer::merge_classes): Register variable aliases.
15778         (sem_item_optimizer::fixup_pt_set): New function.
15779         (sem_item_optimizer::fixup_points_to_sets): Likewise.
15780         * ipa-icf.h: Declare new variables and functions.
15782 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
15784         PR middle-end/84834
15785         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15786         integer_pow2p@2 and test integer_pow2p in condition.
15787         (A < 0 ? C : 0): Similarly for @1.
15789         PR middle-end/84831
15790         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15791         characters starting at p contain '\0' character, don't look beyond
15792         that.
15794         PR target/84827
15795         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15796         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15798         PR target/84828
15799         * reg-stack.c (change_stack): Change update_end var from int to
15800         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15801         also call set_block_for_insn on the newly added insns and rescan.
15803         PR target/84786
15804         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15805         on the last operand.
15807         PR c++/84704
15808         * tree.c (stabilize_reference_1): Return save_expr (e) for
15809         STATEMENT_LIST even if it doesn't have side-effects.
15811 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
15813         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15815 2018-03-12  Renlin Li  <renlin.li@arm.com>
15817         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15818         aarch64_output_scalar_simd_mov_immediate.
15820 2018-03-12  Martin Sebor  <msebor@redhat.com>
15822         PR tree-optimization/83456
15823         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15824         for perfectly overlapping calls to memcpy.
15825         (gimple_fold_builtin_memory_chk): Same.
15826         (gimple_fold_builtin_strcpy): Handle no-warning.
15827         (gimple_fold_builtin_stxcpy_chk): Same.
15828         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15830 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15832         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15833         parameter.  Use it for SFmode.
15834         (rs6000_function_arg_advance_1): Adjust.
15835         (rs6000_function_arg): Adjust.
15836         (rs6000_gimplify_va_arg): Pass false for that new parameter.
15838 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15840         PR rtl-optimization/84169
15841         PR rtl-optimization/84780
15842         * combine.c (can_combine_p): Check for a 2-insn combination whether
15843         the destination register is used between the two insns, too.
15845 2018-03-12  Richard Biener  <rguenther@suse.de>
15847         PR tree-optimization/84803
15848         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15849         for refs DR analysis didn't process.
15851 2018-03-12  Richard Biener  <rguenther@suse.de>
15853         PR tree-optimization/84777
15854         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15855         force-vectorize loops ignore whether we are optimizing for size.
15857 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15859         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15860         (TARGET_MD_ASM_ADJUST): Define.
15862 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15863             Kito Cheng  <kito.cheng@gmail.com>
15864             Chung-Ju Wu  <jasonwucj@gmail.com>
15866         * config/nds32/nds32.c (nds32_compute_stack_frame,
15867         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15868         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15869         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15870         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15871         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15872         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15873         * config/nds32/nds32.md (prologue, epilogue): Use macro
15874         NDS32_V3PUSH_AVAILABLE_P to do checking.
15876 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15878         PR debug/58150
15879         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15880         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15881         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15882         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15883         addition of most attributes on !orig_type_die or the attribute not
15884         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15886 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15887             Chung-Ju Wu  <jasonwucj@gmail.com>
15889         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15890         __NDS32_VH__ macro.
15891         * config/nds32/nds32.opt (mvh): New option.
15893 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15894             Chung-Ju Wu  <jasonwucj@gmail.com>
15896         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15897         function.
15898         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15899         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15900         definition.
15902 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15903             Chung-Ju Wu  <jasonwucj@gmail.com>
15905         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15906         function.
15907         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15908         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15910 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15911             Kito Cheng  <kito.cheng@gmail.com>
15912             Chung-Ju Wu  <jasonwucj@gmail.com>
15914         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15915         UNSPEC_FFMISM and UNSPEC_FLMISM.
15916         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15917         for ffb, ffmism and flmism.
15918         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15919         (unspec_ffmism): Ditto.
15920         (unspec_flmism): Ditto.
15921         (nds32_expand_builtin_impl): Check if string extension is available.
15922         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15923         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15925 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15927         Reverting patch:
15928         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15930         PR target/83712
15931         * lra-assigns.c (assign_by_spills): Return a flag of reload
15932         assignment failure.  Do not process the reload assignment
15933         failures.  Do not spill other reload pseudos if they has the same
15934         reg class.
15935         (lra_assign): Add a return arg.  Set up from the result of
15936         assign_by_spills call.
15937         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15938         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15939         usage_insns if it is not NULL.
15940         (spill_hard_reg_in_range): New function.
15941         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15942         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15943         function prototypes.
15944         (lra_assign): Change prototype.
15945         * lra.c (lra): Add code to deal with fails by splitting hard reg
15946         live ranges.
15948 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15950         PR target/84807
15951         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15953 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15955         PR debug/84620
15956         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15957         (dw_val_node): Add val_symbolic_view.
15958         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15959         (symview_upper_bound): New.
15960         (new_line_info_table): Initialize symviews_since_reset.
15961         (dwarf2out_source_line): Count symviews_since_reset and set
15962         symview_upper_bound.
15963         (dw_val_equal_p): Handle symview.
15964         (add_AT_symview): New.
15965         (print_dw_val): Handle symview.
15966         (attr_checksum, attr_checksum_ordered): Likewise.
15967         (same_dw_val_p, size_of_die): Likewise.
15968         (value_format, output_die): Likewise.
15969         (add_high_low_attributes): Use add_AT_symview for entry_view.
15970         (dwarf2out_finish): Reset symview_upper_bound, clear
15971         zero_view_p.
15973 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15975         PR target/83969
15976         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15977         Add strict argument and use it.
15978         (rs6000_split_multireg_move): Update for new strict argument.
15979         (mem_operand_gpr): Disallow all non-offsettable addresses.
15980         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15982 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15984         PR target/84772
15985         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15986         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15987         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15989         PR c++/84767
15990         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15991         decl, use remap_type if we want to use the type.
15993 2018-03-09  Martin Sebor  <msebor@redhat.com>
15995         PR tree-optimization/84526
15996         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15997         Remove dead code.
15998         (builtin_access::generic_overlap): Be prepared to handle non-array
15999         base objects.
16001 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
16003         PR rtl-optimization/84682
16004         * lra-constraints.c (process_address_1): Check is_address flag
16005         for address constraints.
16006         (process_alt_operands): Likewise.
16007         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16008         preprocess_constraints.
16009         * recog.h (preprocess_constraints): Add oploc parameter.
16010         Adjust callers.
16011         * recog.c (preprocess_constraints): Test address_operand for
16012         CT_ADDRESS constraints.
16014 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16016         PR target/83712
16017         * lra-assigns.c (assign_by_spills): Return a flag of reload
16018         assignment failure.  Do not process the reload assignment
16019         failures.  Do not spill other reload pseudos if they has the same
16020         reg class.
16021         (lra_assign): Add a return arg.  Set up from the result of
16022         assign_by_spills call.
16023         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16024         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16025         usage_insns if it is not NULL.
16026         (spill_hard_reg_in_range): New function.
16027         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16028         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16029         function prototypes.
16030         (lra_assign): Change prototype.
16031         * lra.c (lra): Add code to deal with fails by splitting hard reg
16032         live ranges.
16034 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16036         PR target/83193
16037         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16038         Accept complain bool parameter.  Only emit errors if it is true.
16039         (arm_parse_cpu_option_name): Likewise.
16040         (arm_target_thumb_only): Adjust callers of the above.
16041         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16042         prototype to take a default true bool parameter.
16043         (arm_parse_arch_option_name): Likewise.
16045 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
16046             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
16048         PR jit/64089
16049         PR jit/84288
16050         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16051         * configure: Regenerate.
16052         * configure.ac ("linker --version-script option"): New.
16053         ("linker soname option"): New.
16055 2018-03-09  Richard Biener  <rguenther@suse.de>
16057         PR tree-optimization/84775
16058         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16059         immediate uses of predicate stmts and mark them modified.
16061         Revert
16062         PR tree-optimization/84178
16063         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16064         to caller.
16065         (version_loop_for_if_conversion): Delay update_ssa call.
16066         (tree_if_conversion): Delay update_ssa until after predicate
16067         insertion.
16069 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
16071         PR target/84763
16072         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16073         when the function accesses prior frames.
16075 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16077         PR debug/84456
16078         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16079         gen_llsym, otherwise call maybe_gen_llsym.
16081         PR inline-asm/84742
16082         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16083         has ',' character inside of it.
16085 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16087         PR target/84748
16088         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16089         as clobbering CC_REGNUM.
16091 2018-03-08  Richard Biener  <rguenther@suse.de>
16093         PR middle-end/84552
16094         * tree-scalar-evolution.c: Include tree-into-ssa.h.
16095         (follow_copies_to_constant): Do not follow SSA names registered
16096         for update.
16098 2018-03-08  Richard Biener  <rguenther@suse.de>
16100         PR tree-optimization/84178
16101         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16102         to caller.
16103         (version_loop_for_if_conversion): Delay update_ssa call.
16104         (tree_if_conversion): Delay update_ssa until after predicate
16105         insertion.
16107 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
16109         PR tree-optimization/84178
16110         * tree-if-conv.c (release_bb_predicate): Remove the
16111         the assertion that the stmts have NULL use_ops.
16112         Discard the statements, asserting that they haven't
16113         yet been added to a BB.
16115 2018-03-08  Richard Biener  <rguenther@suse.de>
16117         PR tree-optimization/84746
16118         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16119         (phi_translate): Pass in destination ANTIC_OUT set.
16120         (phi_translate_1): Likewise.  For a simplified result lookup
16121         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16122         (phi_translate_set): Adjust.
16123         (do_pre_regular_insertion): Likewise.
16124         (do_pre_partial_partial_insertion): Likewise.
16126 2018-03-08  Martin Liska  <mliska@suse.cz>
16128         PR gcov-profile/84735
16129         * doc/gcov.texi: Document usage of profile files.
16130         * gcov-io.h: Document changes in the format.
16132 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
16134         PR debug/84404
16135         PR debug/84408
16136         * dwarf2out.c (struct dw_line_info_table): Update comments for
16137         view == -1.
16138         (FORCE_RESET_NEXT_VIEW): New.
16139         (FORCE_RESETTING_VIEW_P): New.
16140         (RESETTING_VIEW_P): Check for -1 too.
16141         (ZERO_VIEW_P): Likewise.
16142         (new_line_info_table): Force-reset next view.
16143         (dwarf2out_begin_function): Likewise.
16144         (dwarf2out_source_line): Simplify zero_view_p initialization.
16145         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16146         view directly.  Omit view when omitting .loc at line 0.
16148 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16150         PR tree-optimization/84740
16151         * tree-switch-conversion.c (process_switch): Call build_constructors
16152         only if info.phi_count is non-zero.
16154         PR tree-optimization/84739
16155         * tree-tailcall.c (find_tail_calls): Check call arguments against
16156         DECL_ARGUMENTS (current_function_decl) rather than
16157         DECL_ARGUMENTS (func) when checking for tail recursion.
16159 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16161         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16162         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16163         Volker Reichelt's entry and add entries for people that perform
16164         GCC fuzzy testing and report numerous bugs.
16166 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
16168         PR target/82411
16169         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16170         readonly data in sdata, if that is disabled.
16171         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16172         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16173         -mreadonly-in-sdata option.
16175 2018-03-07  Martin Sebor  <msebor@redhat.com>
16177         PR tree-optimization/84468
16178         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16179         basic block when looking for nul assignment.
16181 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
16183         PR target/84277
16184         * except.h (output_function_exception_table): Adjust prototype.
16185         * except.c (output_function_exception_table): Remove FNNAME parameter
16186         and add SECTION parameter.  Ouput one part of the table at a time.
16187         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16188         the first part of the exception table and emit unwind directives.
16189         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16190         (i386_pe_seh_cold_init): Likewise.
16191         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16192         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16193         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16194         (ix86_output_call_insn): Emit a nop in one more case for SEH.
16195         * config/i386/winnt.c: Include except.h.
16196         (struct seh_frame_state): Add reg_offset, after_prologue and
16197         in_cold_section fields.
16198         (i386_pe_seh_end_prologue): Set seh->after_prologue.
16199         (i386_pe_seh_cold_init): New function.
16200         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16201         to seh->in_cold_section.
16202         (seh_emit_push): Record the offset of the push.
16203         (seh_emit_save): Record the offet of the save.
16204         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16205         Test seh->after_prologue to disregard the epilogue.
16206         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16207         (i386_pe_end_cold_function): New function.
16209 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16211         PR fortran/84565
16212         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16213         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16215         PR c++/84704
16216         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16217         on tmp_var.
16218         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16219         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16221         PR middle-end/84723
16222         * multiple_target.c: Include tree-inline.h and intl.h.
16223         (expand_target_clones): Diagnose and fail if node->definition and
16224         !tree_versionable_function_p (node->decl).
16226 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
16228         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16229         sprint_ul.
16230         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16231         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16232         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16234 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16236         PR target/84710
16237         * combine.c (try_combine): Use reg_or_subregno instead of handling
16238         just paradoxical SUBREGs and REGs.
16240 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
16242         * config/arc/arc.c (arc_finalize_pic): Remove function.
16243         (arc_must_save_register): We use single base PIC register, remove
16244         checks to save/restore the PIC register.
16245         (arc_expand_prologue): Likewise.
16246         * config/arc/arc-protos.h (arc_set_default_type_attributes):
16247         Remove.
16248         (arc_verify_short): Likewise.
16249         (arc_attr_type): Likewise.
16250         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16251         (walk_stores): Likewise.
16252         (arc_address_cost): Make it static.
16253         (arc_verify_short): Likewise.
16254         (branch_dest): Likewise.
16255         (arc_attr_type): Likewise.
16256         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16257         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16258         (arc_final_prescan_insn): Remove inserting the nops due to
16259         hardware hazards.  It is done in reorg step.
16260         (insn_length_variant_t): Remove.
16261         (insn_length_parameters_t): Likewise.
16262         (arc_insn_length_parameters): Likewise.
16263         (arc_get_insn_variants): Likewise.
16264         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16266 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16268         PR inline-asm/84683
16269         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16270         assertion failure.
16272         PR tree-optimization/84687
16273         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16274         on new_node->decl.
16275         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16277 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16279         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16280         Rename to ppc_speculation_barrier.
16281         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16282         __builtin_ppc_speculation_barrier.
16284 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16286         PR target/84700
16287         * combine.c (combine_simplify_rtx): Don't try to simplify if
16288         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16289         are equal to x.
16291 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
16293         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16294         to 32 bytes when compiling for POWER9.
16296 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16298         PR target/84564
16299         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16300         regparm >= 3 with no arg reg available also for calls with
16301         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
16303         PR target/84524
16304         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16305         orig,vex.
16306         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
16308 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
16310         PR target/84264
16311         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16313 2018-03-05  Richard Biener  <rguenther@suse.de>
16315         PR tree-optimization/84486
16316         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16317         When inserting a __builtin_assume_aligned call set the LHS
16318         SSA name alignment info accordingly.
16320 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
16322         PR tree-optimization/84114
16323         * config/aarch64/aarch64.c (aarch64_reassociation_width)
16324         Avoid reassociation of FLOAT_MODE addition.
16326 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
16328         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16329         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16330         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16331         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16332         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16333         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16334         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16335         and -mwbnoinvd.
16336         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16337         __builtin_ia32_wbinvd): New builtins.
16338         (SPECIAL_ARGS2): New.
16339         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16340         (SPECIAL_ARGS2): New.
16341         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16342         (ix86_valid_target_attribute_inner_p): Ditto.
16343         (ix86_init_mmx_sse_builtins): Add special_args2.
16344         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16345         TARGET_WBNOINVD_P): New.
16346         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16347         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16348         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16349         * config/i386/immintrin.h (_wbinvd): New intrinsic.
16350         * config/i386/pconfigintrin.h: New file.
16351         * config/i386/wbnoinvdintrin.h: Ditto.
16352         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16353         wbnoinvdintrin.h.
16354         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16356 2018-03-05  Richard Biener  <rguenther@suse.de>
16358         PR tree-optimization/84670
16359         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16360         member.
16361         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16362         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16363         (compute_antic_aux): Only assert the number of values in ANTIC_IN
16364         doesn't grow if all successors (recursively) were visited at least
16365         once.
16367 2018-03-05  Richard Biener  <rguenther@suse.de>
16369         PR tree-optimization/84650
16370         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16371         if executed in the loop pipeline.
16373 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
16375         * doc/configfiles.texi (Configuration Files): Move info about
16376         conditionalizing $target-protos.h to...
16377         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
16378         differs from $target-protos.h.
16380 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
16381             Chung-Ju Wu  <jasonwucj@gmail.com>
16383         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16384         * config/nds32/nds32-multiple.md (setmemsi): Define.
16385         * config/nds32/nds32-memory-manipulation.c
16386         (nds32_gen_dup_4_byte_to_word_value): New.
16387         (emit_setmem_word_loop): New.
16388         (emit_setmem_byte_loop): New.
16389         (nds32_expand_setmem_loop): New.
16390         (nds32_expand_setmem_loop_v3m): New.
16391         (nds32_expand_setmem_unroll): New.
16392         (nds32_expand_setmem): New.
16394 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16395             Chung-Ju Wu  <jasonwucj@gmail.com>
16397         * config/nds32/nds32-memory-manipulation.c
16398         (nds32_emit_load_store): New.
16399         (nds32_emit_post_inc_load_store): New.
16400         (nds32_emit_mem_move): New.
16401         (nds32_emit_mem_move_block): New.
16402         (nds32_expand_movmemsi_loop_unknown_size): New.
16403         (nds32_expand_movmemsi_loop_known_size): New.
16404         (nds32_expand_movmemsi_loop): New.
16405         (nds32_expand_movmemsi_unroll): New.
16406         (nds32_expand_movmemqi): Rename ...
16407         (nds32_expand_movmemsi): ... to this.
16408         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16409         (movmemsi): ... to this.
16410         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16411         (nds32_expand_movmemsi): ... to this.
16413 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16414             Monk Chiang  <sh.chiang04@gmail.com>
16415             Chung-Ju Wu  <jasonwucj@gmail.com>
16417         * config/nds32/nds32-protos.h
16418         (nds32_expand_load_multiple): New arguments.
16419         (nds32_expand_store_multiple): Ditto.
16420         (nds32_valid_multiple_load_store): Rename ...
16421         (nds32_valid_multiple_load_store_p): ... to this.
16422         * config/nds32/nds32-memory-manipulation.c
16423         (nds32_expand_load_multiple): Refine implementation.
16424         (nds32_expand_store_multiple): Ditto.
16425         * config/nds32/nds32-multiple.md
16426         (load_multiple): Update nds32_expand_load_multiple interface.
16427         (store_multiple): Update nds32_expand_store_multiple interface.
16428         * config/nds32/nds32-predicates.c
16429         (nds32_valid_multiple_load_store): Rename ...
16430         (nds32_valid_multiple_load_store_p): ... to this and refine
16431         implementation.
16432         * config/nds32/predicates.md
16433         (nds32_load_multiple_and_update_address_operation): New predicate.
16434         (nds32_store_multiple_and_update_address_operation): New predicate.
16436 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16437             Chung-Ju Wu  <jasonwucj@gmail.com>
16439         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16440         (combo): New attribute.
16441         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16443 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16445         * config/nds32/nds32.opt: Change -mcmodel= default value.
16447 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
16448             Monk Chiang  <sh.chiang04@gmail.com>
16449             Chung-Ju Wu  <jasonwucj@gmail.com>
16451         * config/nds32/constants.md (unspec_element): New enum.
16452         * config/nds32/constraints.md (Umw): New constraint.
16453         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16454         * config/nds32/nds32-intrinsic.md: Likewise.
16455         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16456         (nds32_valid_smw_lwm_base_p): New.
16457         (nds32_output_smw_single_word): New.
16458         (nds32_output_lmw_single_word): New.
16459         (nds32_expand_unaligned_load): New.
16460         (nds32_expand_unaligned_store): New.
16461         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16462         (nds32_output_smw_single_word): Declare.
16463         (nds32_output_lmw_single_word): Declare.
16464         (nds32_expand_unaligned_load): Declare.
16465         (nds32_expand_unaligned_store): Declare.
16466         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16467         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16468         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16469         NDS32_BUILTIN_UASTORE_DW.
16470         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16471         predicate.
16473 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
16474             Kito Cheng  <kito.cheng@gmail.com>
16475             Chung-Ju Wu  <jasonwucj@gmail.com>
16477         * config/nds32/nds32-intrinsic.c
16478         (nds32_expand_builtin_null_ftype_reg): Delete.
16479         (nds32_expand_builtin_reg_ftype_imm): Ditto.
16480         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16481         (nds32_read_argument): New.
16482         (nds32_legitimize_target): Ditto.
16483         (nds32_legitimize_argument): Ditto.
16484         (nds32_check_constant_argument): Ditto.
16485         (nds32_expand_unop_builtin): Ditto.
16486         (nds32_expand_unopimm_builtin): Ditto.
16487         (nds32_expand_binop_builtin): Ditto.
16488         (nds32_builtin_decl_impl): Ditto.
16489         (builtin_description): Ditto.
16490         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16491         (nds32_init_builtins_impl): Ditto.
16492         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16493         (nds32_builtin_decl): New.
16494         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16495         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16497 2018-03-02  Jeff Law  <law@redhat.com>
16499         * reorg.c (stop_search_p): Handle DEBUG_INSN.
16500         (redundant_insn, fill_simple_delay_slots): Likewise.
16501         (fill_slots_from_thread): Likewise.
16502         * resource.c (mark_referenced_resources): Likewise.
16503         (mark_set_resources, find_dead_or_set_registers): Likewise.
16505 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16507         * substring-locations.h (format_warning_va): Formatting fix for
16508         ATTRIBUTE_GCC_DIAG.
16509         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16510         argument.
16511         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16512         * substring-locations.c: Include intl.h.
16513         (format_warning_va): Turned into small wrapper around
16514         format_warning_n_va, renamed to ...
16515         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16516         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16517         use ngettext.
16518         (format_warning_at_substring_n): New function.
16519         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16520         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
16521         format_warning_at_substring with just a shorter name instead of
16522         const function pointer.
16523         (fmtwarn_n): New function.
16524         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16525         appropriate, get rid of all the fmtstr temporaries, move conditionals
16526         with G_() wrapped string literals directly into fmtwarn arguments,
16527         cast dir.len to (int), formatting fixes.
16529 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
16531         * doc/invoke.texi: Remove "Cilk Plus" references.
16533 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16534             Richard Biener  <rguenther@suse.de>
16536         PR ipa/84628
16537         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16538         for error or warning attributes if CALL_FROM_THUNK_P is set.
16539         Formatting fixes.
16541 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16543         PR target/56540
16544         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16545         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16547         PR target/56540
16548         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16549         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16551         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16552         instead of -1U in last predictors element's probability member.
16554 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16556         PR ipa/83983
16557         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16558         arguments if they are comparable.
16560 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
16562         PR tree-optimization/84634
16563         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16564         masks and masked_loop_p with a single loop_masks, making sure it's
16565         null for bb vectorization.
16567 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
16569         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16570         (vect_analyze_data_ref_access): Use loop->safe_len rather than
16571         loop->force_vectorize to check whether there is no alias.
16573 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
16575         PR target/84614
16576         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16577         prototypes.
16578         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16579         comments.
16580         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16581         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16582         instead of a loop around prev_real_insn.
16583         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16584         prev_real_insn.
16586         PR inline-asm/84625
16587         * config/i386/i386.c (ix86_print_operand): Use conditional
16588         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16589         zero vector.
16591 2018-03-02  Richard Biener  <rguenther@suse.de>
16593         PR tree-optimization/84427
16594         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16595         (bitmap_set_subtract_values): Rewrite to handle multiple
16596         exprs per value.
16597         (clean): Likewise.
16598         (prune_clobbered_mems): Likewise.
16599         (phi_translate): Take edge instead of pred/phiblock.
16600         (phi_translate_1): Likewise.
16601         (phi_translate_set): Likewise.  Insert all translated
16602         exprs for a value into the set, keeping possibly multiple
16603         expressions per value.
16604         (compute_antic_aux): Adjust for phi_translate changes.
16605         When intersecting union the expressions and prune those
16606         not in the final value set, keeping possibly multiple
16607         expressions per value.  Do not use value-insertion
16608         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16609         all expressions.  Add verification that the value-sets
16610         only shrink during iteration.
16611         (compute_partial_antic_aux): Adjust for the phi_translate changes.
16612         (do_pre_regular_insertion): Likewise.
16613         (do_pre_partial_partial_insertion): Likewise.
16615 2018-03-02  Richard Biener  <rguenther@suse.de>
16617         PR target/82005
16618         * config/darwin.c (saved_debug_info_level): New static global.
16619         (darwin_asm_lto_start): Disable debug info generation for LTO out.
16620         (darwin_asm_lto_end): Restore debug info generation settings.
16622 2018-03-01  Martin Liska  <mliska@suse.cz>
16624         PR sanitizer/82484
16625         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16626         volatile arguments.
16628 2018-03-01  Richard Biener  <rguenther@suse.de>
16630         PR debug/84645
16631         * dwarf2out.c (gen_variable_die): Properly handle late VLA
16632         type annotation with LTO when debug was disabled at compile-time.
16634 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
16636         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16637         XINT with INTVAL.
16638         (mips_final_postscan_insn): Likewise.
16640 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
16642         PR rtl-optimization/84528
16643         * alias.c (init_alias_target): Add commentary.
16644         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16645         a unique base value if the frame pointer is not eliminated
16646         to the stack pointer.
16648 2018-03-01  Tom de Vries  <tom@codesourcery.com>
16650         PR rtl-optimization/83327
16651         * lra-int.h (hard_regs_spilled_into): Declare.
16652         * lra.c (hard_regs_spilled_into): Define.
16653         (init_reg_info): Init hard_regs_spilled_into.
16654         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16655         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16656         (process_bb_lives): Handle hard_regs_spilled_into.
16657         (lra_create_live_ranges_1): Before doing liveness propagation, clear
16658         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16660 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
16662         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16663         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16664         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16665         * config/rs6000/aix72.h: New file.
16667 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
16669         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16670         instead of warning_at with conditional singular and plural messages
16671         where possible.
16673         PR target/52991
16674         * stor-layout.c (update_alignment_for_field): For
16675         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16676         && !DECL_PACKED (field), do the alignment update, just use
16677         only desired_align instead of MAX (type_align, desired_align)
16678         as the alignment.
16679         (place_field): Don't do known_align < desired_align handling
16680         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16681         is non-NULL, instead do it after rli->prev_field handling and
16682         only if not within a bitfield word.  For DECL_PACKED (field)
16683         use type_align of BITS_PER_UNIT.
16685 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
16687         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16688         superfluous parentheses and trailing spaces.
16690 2018-02-28  Richard Biener  <rguenther@suse.de>
16692         PR tree-optimization/84584
16693         * graphite-scop-detection.c (scop_detection::add_scop): Discard
16694         SCoPs with fake exit edge.
16696 2018-02-28  Martin Liska  <mliska@suse.cz>
16698         PR testsuite/84597
16699         * timevar.c (timer::print): Fix format to properly print 100%
16700         values.
16702 2018-02-28  Richard Biener  <rguenther@suse.de>
16704         PR middle-end/84607
16705         * genmatch.c (capture_info::walk_match): Do not mark
16706         captured expressions without operands as expr_p given
16707         they act more like predicates and should be subject to
16708         "lost tail" side-effect preserving.
16710 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
16712         PR rtl-optimization/81611
16713         * auto-inc-dec.c (attempt_change): Move dead note from
16714         mem_insn if it's the next use of regno
16715         (find_address): Take address use of reg holding
16716         non-incremented value.  Add parm to limit search to the named
16717         reg only.
16718         (merge_in_block): Attempt to use a mem insn that is the next
16719         use of the original regno.
16721 2018-02-27  Martin Sebor  <msebor@redhat.com>
16723         PR c++/83871
16724         * doc/invoke.texi (-Wmissing-attributes): New option.
16725         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16727 2018-02-27  Martin Sebor  <msebor@redhat.com>
16729         PR translation/84207
16730         * diagnostic-core.h (warning_n, error_n, inform_n): Change
16731         n argument to unsigned HOST_WIDE_INT.
16732         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16733         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
16734         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16735         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16737 2018-02-27  Richard Biener  <rguenther@suse.de>
16739         PR tree-optimization/84512
16740         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16741         Do not use the estimate returned from record_stmt_cost for
16742         the scalar iteration cost but sum properly using add_stmt_cost.
16744 2018-02-27  Richard Biener  <rguenther@suse.de>
16746         PR tree-optimization/84466
16747         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16748         Adjust last change to less strictly validate use operands.
16750 2018-02-27  Martin Liska  <mliska@suse.cz>
16752         PR gcov-profile/84548
16753         * gcov.c (process_file): Allow partial overlap and consider it
16754         also as group functions.
16755         (output_lines): Properly calculate range of lines for a group.
16757 2018-02-27  Martin Liska  <mliska@suse.cz>
16759         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16760         'ggc' suffixes.  Change first column width.
16761         (timer::print): Fix formatting of the column.
16763 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
16765         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16766         preserve inline entry blocks for the sake of debug inline
16767         entry point markers alone.
16768         (remove_unused_locals): Suggest in comments a better place to
16769         force the preservation of inline entry blocks that are
16770         otherwise unused, but do not preserve them.
16772 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16774         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16776 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16778         PR target/84039
16779         * config/i386/constraints.md (Bs): Replace
16780         ix86_indirect_branch_register with
16781         TARGET_INDIRECT_BRANCH_REGISTER.
16782         (Bw): Likewise.
16783         * config/i386/i386.md (indirect_jump): Likewise.
16784         (tablejump): Likewise.
16785         (*sibcall_memory): Likewise.
16786         (*sibcall_value_memory): Likewise.
16787         Peepholes of indirect call and jump via memory: Likewise.
16788         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16789         (*sibcall_value_GOT_32): Likewise.
16790         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16791         (GOT_memory_operand): Likewise.
16792         (call_insn_operand): Likewise.
16793         (sibcall_insn_operand): Likewise.
16794         (GOT32_symbol_operand): Likewise.
16795         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16797 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16799         PR rtl-optimization/83496
16800         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16801         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
16802         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16803         redundant insn, if any.
16804         (relax_delay_slots): Likewise.
16805         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16807 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
16809         PR tree-optimization/83965
16810         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16811         that grouped statements are part of a reduction chain.  Return
16812         true if the statement is not marked as a reduction itself but
16813         is part of a group.
16814         (vect_recog_dot_prod_pattern): Don't check whether the statement
16815         is part of a group here.
16816         (vect_recog_sad_pattern): Likewise.
16817         (vect_recog_widen_sum_pattern): Likewise.
16819 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16821         PR debug/84545
16822         * final.c (rest_of_clean_state): Also look for calls inside sequences.
16824 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16826         PR target/84530
16827         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16828         the bool argument.
16829         (ix86_output_indirect_function_return): New prototype.
16830         (ix86_split_simple_return_pop_internal): Likewise.
16831         * config/i386/i386.c (indirect_return_via_cx): New.
16832         (indirect_return_via_cx_bnd): Likewise.
16833         (indirect_thunk_name): Handle return va CX_REG.
16834         (output_indirect_thunk_function): Create alias for
16835         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16836         (ix86_output_indirect_jmp): Remove the bool argument.
16837         (ix86_output_indirect_function_return): New function.
16838         (ix86_split_simple_return_pop_internal): Likewise.
16839         * config/i386/i386.md (*indirect_jump): Don't pass false
16840         to ix86_output_indirect_jmp.
16841         (*tablejump_1): Likewise.
16842         (simple_return_pop_internal): Change it to define_insn_and_split.
16843         Call ix86_split_simple_return_pop_internal to split it for
16844         -mfunction-return=.
16845         (simple_return_indirect_internal): Call
16846         ix86_output_indirect_function_return instead of
16847         ix86_output_indirect_jmp.
16849 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16851         PR bootstrap/84405
16852         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16853         memset and value initialization afterwards.
16855 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16857         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16859 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16861         PR target/84521
16862         * common/config/aarch64/aarch64-common.c
16863         (aarch_option_optimization_table[]): Switch
16864         off fomit-frame-pointer
16866 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16867             Chung-Ju Wu  <jasonwucj@gmail.com>
16869         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16870         volatile memory.
16871         (store_multiple): Ditto.
16873 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16875         * config.gcc: Add --with-cpu support for nds32 target.
16876         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16877         * config/nds32/nds32.opt: Add -mcpu= option.
16879 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16881         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16882         isel=yes): Warn for these deprecated options.
16884 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16886         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16887         ISA_2_5_MASKS_EMBEDDED.
16889 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16891         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16892         p->max as pointers rather than using iterative_hash_expr.
16894 2018-02-23  Carl Love  <cel@us.ibm.com>
16896         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16897         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16898         BU_P8V_OVERLOAD_2.
16899         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16900         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16901         P8V_BUILTIN_VEC_VUNSIGNED2.
16903 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16905         PR target/81572
16906         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16907         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16908         LRA_UNKNOWN_ALT.
16909         * lra-constraints.c (curr_insn_transform): Set up
16910         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16911         LRA_UNKNOWN_ALT.
16912         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16913         * lra-eliminations.c (spill_pseudos): Ditto.
16914         (process_insn_for_elimination): Ditto.
16915         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16916         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16917         LRA_NON_CLOBBERED_ALT.
16919 2018-02-22  Martin Sebor  <msebor@redhat.com>
16921         PR tree-optimization/84480
16922         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16923         to maybe_diag_stxncpy_trunc.  Call it.
16924         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16925         from gimple_fold_builtin_strcpy.  Print inlining stack.
16926         (handle_builtin_stxncpy): Print inlining stack.
16927         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16929 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16931         PR target/84176
16932         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16933         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16934         and -fcheck-pointer-bounds are used together.
16935         (indirect_thunk_prefix): New enum.
16936         (indirect_thunk_need_prefix): New function.
16937         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16938         "_nt" instead of "_bnd" for NOTRACK prefix.
16939         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16940         (output_indirect_thunk_function): Likewise.
16941         (): Likewise.
16942         (ix86_code_end): Update output_indirect_thunk_function calls.
16943         (ix86_output_indirect_branch_via_reg): Replace
16944         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16945         (ix86_output_indirect_branch_via_push): Likewise.
16946         (ix86_output_function_return): Likewise.
16947         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16948         incompatible with -fcf-protection=branch and
16949         -fcheck-pointer-bounds.
16951 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16953         PR target/83335
16954         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16955         Change gcc_assert call to output_operand_lossage.
16957 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16959         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16961 2018-02-22  DJ Delorie  <dj@redhat.com>
16962             Sebastian Perta  <sebastian.perta@renesas.com>
16963             Oleg Endo  <olegendo@gcc.gnu.org>
16965         * config/rx/rx.c (rx_rtx_costs): New function.
16966         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16968 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16970         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16972 2018-02-22  Martin Liska  <mliska@suse.cz>
16974         PR driver/83193
16975         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16976         Add "native" as a possible value.
16978 2018-02-22  Martin Liska  <mliska@suse.cz>
16980         PR driver/83193
16981         * config/i386/i386.c (ix86_option_override_internal):
16982         Add "native" as a possible value for -march and -mtune.
16984 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16986         PR target/84502
16987         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16988         to all type variants.
16990         PR tree-optimization/84503
16991         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16992         width as info->bitpos + info->bitsize - start.
16993         (merged_store_group::merge_overlapping): Simplify width computation.
16994         (check_no_overlap): New function.
16995         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16996         start + width and last_order of the group, fail if check_no_overlap
16997         fails.
16998         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16999         to group if check_no_overlap fails.
17001 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17003         * config/rs6000/altivec.md: Delete contraint arguments to
17004         define_expand, define_split, and define_peephole2, and in
17005         define_insn_and_split if always unused.
17006         * config/rs6000/darwin.md: Ditto.
17007         * config/rs6000/dfp.md: Ditto.
17008         * config/rs6000/rs6000.md: Ditto.
17009         * config/rs6000/sync.md: Ditto.
17010         * config/rs6000/vector.md: Ditto.
17011         * config/rs6000/vsx.md: Ditto.
17013 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17015         * config/rs6000/altivec.md: Write output control strings as braced
17016         blocks instead of double-quoted strings.
17017         * config/rs6000/darwin.md: Ditto.
17018         * config/rs6000/rs6000.md: Ditto.
17019         * config/rs6000/vector.md: Ditto.
17020         * config/rs6000/vsx.md: Ditto.
17022 2018-02-21  Jason Merrill  <jason@redhat.com>
17024         PR c++/84314 - ICE with templates and fastcall attribute.
17025         * attribs.c (build_type_attribute_qual_variant): Remove assert.
17027 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17029         * ipa-cp.c (determine_versionability): Fix comment typos.
17031 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17033         PR c/84229
17034         * ipa-cp.c (determine_versionability): Do not version functions caling
17035         va_arg_pack.
17037 2018-02-21  Martin Liska  <mliska@suse.cz>
17039         PR driver/83193
17040         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17041         Add "native" as a possible value.
17042         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
17043         the macro when native cpu detection is available.
17045 2018-02-21  Martin Liska  <mliska@suse.cz>
17047         PR driver/83193
17048         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17049         Add "native" as a possible value.
17050         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17051         when native cpu detection is available.
17053 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
17054             Martin Sebor  <msebor@redhat.com>
17056         PR tree-optimization/84478
17057         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17058         false.
17059         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17060         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17061         support which is conservatively correct, for 2 only stay conservative
17062         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
17063         argument to the 2 argument get_range_strlen, adjust 6 arg
17064         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17065         false.
17066         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17067         (gimple_fold_builtin_strlen): Pass true as last argument to
17068         get_range_strlen.
17070 2018-02-20  Martin Sebor  <msebor@redhat.com>
17072         PR middle-end/84095
17073         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17074         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
17075         (builtin_memref::builtin_memref): Factor out parts into
17076         set_base_and_offset and call it.
17078 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17080         PR middle-end/84406
17081         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17082         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17083         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
17084         search at the associated MODE_INT.
17086 2018-02-20  Jeff Law  <law@redhat.com>
17088         PR middle-end/82123
17089         PR tree-optimization/81592
17090         PR middle-end/79257
17091         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17092         for range data rather than using global data.
17093         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17094         range data rather than using global data.
17095         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17096         pass it to children as needed.
17097         (struct directive::fmtresult): Similarly.
17098         (struct directive::set_width): Similarly.
17099         (struct directive::set_precision): Similarly.
17100         (format_integer, format_directive, parse_directive): Similarly.
17101         (format_none): Accept unnamed vr_values parameter.
17102         (format_percent, format_floating, format_character): Similarly.
17103         (format_string, format_plain): Similarly.
17104         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17105         the EVRP range analyzer for range data rather than using global data.
17106         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17107         gimple-ssa-evrp-analyze.h
17108         (class sprintf_dom_walker): Add after_dom_children member function.
17109         Add evrp_range_analyzer member.
17110         (sprintf_dom_walker::before_dom_children): Call into the EVRP
17111         range analyzer as needed.
17112         (sprintf_dom_walker::after_dom_children): New member function.
17113         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17114         if not optimizing.
17115         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17116         (evrp_range_analyzer::pop_to_marker): Likewise.
17118 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17120         PR tree-optimization/84419
17121         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17122         with the required type if its current type is compatible but
17123         different.
17125 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
17127         PR middle-end/82004
17128         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17129         after vectorization.
17131 2018-02-20  Martin Liska  <mliska@suse.cz>
17133         PR driver/83193
17134         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17135         possible values if we don't have a hint.
17137 2018-02-20  Martin Liska  <mliska@suse.cz>
17139         PR c/84310
17140         PR target/79747
17141         * final.c (shorten_branches): Build align_tab array with one
17142         more element.
17143         * opts.c (finish_options): Add alignment option limit check.
17144         (MAX_CODE_ALIGN): Likewise.
17145         (MAX_CODE_ALIGN_VALUE): Likewise.
17146         * doc/invoke.texi: Document maximum allowed option value for
17147         all -falign-* options.
17149 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
17151         PR target/84146
17152         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17153         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17154         * var-tracking.c (emit_note_insn_var_location): Remove all references
17155         to NOTE_INSN_CALL_ARG_LOCATION.
17156         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17157         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17158         Use copy_rtx_if_shared.
17159         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17160         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17161         (dwarf2out_var_location): Remove handling of
17162         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17163         on call_insn.
17164         * final.c (final_scan_insn): Remove all references to
17165         NOTE_INSN_CALL_ARG_LOCATION.
17166         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
17167         before dumping final insns.
17168         * except.c (emit_note_eh_region_end): Remove all references to
17169         NOTE_INSN_CALL_ARG_LOCATION.
17170         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17171         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17172         * config/arc/arc.c (hwloop_optimize): Likewise.
17173         * config/arm/arm.c (create_fix_barrier): Likewise.
17174         * config/s390/s390.c (s390_chunkify_start): Likewise.
17175         * config/sh/sh.c (find_barrier): Likewise.
17176         * config/i386/i386.c (rest_of_insert_endbranch,
17177         ix86_seh_fixup_eh_fallthru): Likewise.
17178         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17179         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17180         * config/frv/frv.c (frv_function_prologue): Likewise.
17181         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
17182         reg note.
17183         (note_outside_basic_block_p): Remove all references to
17184         NOTE_INSN_CALL_ARG_LOCATION.
17185         * gengtype.c (adjust_field_rtx_def): Likewise.
17186         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17187         Likewise.
17188         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17189         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17191         PR c++/84444
17192         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17193         is ADDR_EXPR.
17195         PR tree-optimization/84452
17196         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17197         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17198         is NULL.
17200 2018-02-19  Martin Liska  <mliska@suse.cz>
17202         PR sanitizer/82183
17203         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17205 2018-02-19  Martin Liska  <mliska@suse.cz>
17206             Richard Sandiford  <richard.sandiford@linaro.org>
17208         PR tree-optimization/82491
17209         * gimple-fold.c (get_base_constructor): Make earlier bail out
17210         to prevent ubsan.
17212 2018-02-19  Carl Love  <cel@us.ibm.com>
17214         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17215         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17216         BU_P8V_OVERLOAD_1.
17217         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17218         P8V_BUILTIN_VEC_NEG.
17220 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
17222         * config/rl78/rl78.md (movdf): New define expand.
17224 2018-02-19  Martin Liska  <mliska@suse.cz>
17226         PR other/80589
17227         * doc/invoke.texi: Fix typo.
17228         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17230 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
17232         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17233         handle rs6000_single_float and rs6000_double_float specially for
17234         e500 family CPUs.
17236 2018-02-16  Jeff Law  <law@redhat.com>
17238         * config/rx/rx.c (add_pop_cfi_notes): New function.;
17239         (pop_regs): Use it.
17241 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17243         PR ipa/84425
17244         * ipa-inline.c (inline_small_functions): Fix a typo.
17246 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17248         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17250 2018-02-16  Carl Love  <cel@us.ibm.com>
17252         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17253         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17254         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17255         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17256         expansion to P8V_BUILTIN_VEC_FLOAT2.
17258 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
17260         PR rtl-optimization/70023
17261         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17262         src_regno into account.
17264 2018-02-16  Carl Love  <cel@us.ibm.com>
17266         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17267         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17268         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17269         * config/rs6000/rs6000.c: Remove case statements for
17270         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17271         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17272         and P9V_BUILTIN_VEC_VINSERT4B.
17273         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17274         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17275         * config/rs6000/vsx.md:
17276         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17277         vec_insert4b.
17279 2018-02-16  Carl Love  <cel@us.ibm.com>
17281         * config/rs6000/altivec.h: Add builtin names vec_extract4b
17282         vec_insert4b.
17283         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17284         definitions.
17285         * config/rs6000/rs6000-c.c: Add the definitions for
17286         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17287         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17288         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17289         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
17290         definition for insert4b and define insn *insert3b_internal.
17291         * doc/extend.texi: Add documentation for vec_extract4b.
17293 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17295         * doc/extend.texi (Backwards Compatibility): Mention friend
17296         injection.  Note for-scope is deprecated.
17297         * doc/invoke.texi (-ffriend-injection): Deprecate.
17299 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
17301         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17302         that moved to I2, also allow destinations that are a paradoxical
17303         subreg (instead of a normal reg).
17305 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
17307         PR target/83831
17308         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17309         to QImode.
17311 2018-02-16  Richard Biener  <rguenther@suse.de>
17313         PR tree-optimization/84037
17314         PR tree-optimization/84016
17315         PR target/82862
17316         * config/i386/i386.c (ix86_builtin_vectorization_cost):
17317         Adjust vec_construct for the fact we need additional higher latency
17318         128bit inserts for AVX256 and AVX512 vector builds.
17319         (ix86_add_stmt_cost): Scale vector construction cost for
17320         elementwise loads.
17322 2018-02-16  Richard Biener  <rguenther@suse.de>
17324         PR tree-optimization/84417
17325         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17326         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17327         (non_rewritable_lvalue_p): Likewise, use poly-ints.
17329 2018-02-16  Martin Liska  <mliska@suse.cz>
17331         PR sanitizer/84307
17332         * internal-fn.def (ASAN_CHECK): Set proper flags.
17333         (ASAN_MARK): Likewise.
17335 2018-02-16  Julia Koval  <julia.koval@intel.com>
17337         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17338         from PTA_CANNONLAKE.
17340 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17342         PR target/84272
17343         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17344         Use ++iter rather than iter++ for std::list iterators.
17345         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
17346         defer deleting them until all nodes in the forest are processed.  Do
17347         free even leaf nodes.  Change to_process into auto_vec.
17349         PR bootstrap/84405
17350         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17351         * vec.h (vec_default_construct): Use memset instead of placement new
17352         if BROKEN_VALUE_INITIALIZATION is defined.
17353         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17354         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17355         is defined.
17357         PR rtl-optimization/83723
17358         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17359         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
17360         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
17361         recursive calls.
17362         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17363         callers.
17364         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17366 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
17368         PR rtl-optimization/81443
17369         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17370         from inner REGs to paradoxical SUBREGs.
17372 2018-02-16  Richard Biener  <rguenther@suse.de>
17374         PR tree-optimization/84399
17375         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17376         For operands we can analyze at their definition make sure we can
17377         analyze them at each use as well.
17379 2018-02-16  Richard Biener  <rguenther@suse.de>
17381         PR tree-optimization/84190
17382         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17383         volatile accesses if the decl isn't volatile.
17385 2018-02-15  Jason Merrill  <jason@redhat.com>
17387         PR c++/84314 - ICE with templates and fastcall attribute.
17388         * attribs.c (build_type_attribute_qual_variant): Don't clobber
17389         TYPE_CANONICAL on an existing type.
17391 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
17393         PR tree-optimization/84383
17394         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17395         dstoff nor call operand_equal_p if dstbase is NULL.
17397         PR tree-optimization/84334
17398         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17399         also a CONSTANT_CLASS_P, punt.
17401 2018-02-14  Jim Wilson  <jimw@sifive.com>
17403         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17404         first SMALL_OPERAND check.  New local min_second_step.  Move assert
17405         to where locals are set.  Add TARGET_RVC support.
17406         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17408 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
17410         * doc/invoke.texi: Correct -Wformat-overflow code sample.
17412 2018-02-14  Martin Sebor  <msebor@redhat.com>
17414         PR tree-optimization/83698
17415         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17416         arrays constrain the offset range to their bounds.
17417         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17418         (builtin_access::overlap): Avoid setting the size of overlap if it's
17419         already been set.
17420         (maybe_diag_overlap): Also consider arrays when deciding what values
17421         of offsets to include in diagnostics.
17423 2018-02-14  Martin Sebor  <msebor@redhat.com>
17425         PR c/84108
17426         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17427         that correspond to the kind of a declaration.
17429 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
17431         PR target/83984
17432         * config/pa/pa.md: Load address of PIC label using the linkage table
17433         if the label is nonlocal.
17435 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17437         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17438         warning message if user requests -maltivec=be.
17439         * doc/invoke.texi: Document deprecation of -maltivec=be.
17441 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
17443         PR target/84220
17444         * config/rs6000/rs6000-c.c: Update definitions for
17445         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17446         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17448 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17450         PR target/84239
17451         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17452         add _get_ssp intrinsics. Remove argument from
17453         __builtin_ia32_rdssp[d|q].
17454         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17455         * config/i386/i386-builtin.def: Remove argument from
17456         __builtin_ia32_rdssp[d|q].
17457         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17458         ix86_expand_special_args_builtin for _rdssp[d|q].
17459         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17460         Clear register before usage.
17461         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17462         Add documentation for new _get_ssp and _inc_ssp intrinsics.
17464 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
17466         PR tree-optimization/84357
17467         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17468         operand 1 of an ARRAY_REF too.
17470 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
17472         PR target/83831
17473         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17474         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17475         declarations.
17476         (set_of_reg): New struct.
17477         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17478         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17479         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17480         functions.
17481         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17482         Split into bitclr, bitset, bitinvert patterns if appropriate.
17483         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17484         use rx_fuse_in_memory_bitop.
17485         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17486         to named insn, correct maximum insn length.
17488 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
17490         PR target/79242
17491         * machmode.def: Define a complex mode for PARTIAL_INT.
17492         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17493         MODE_PARTIAL_INT.
17494         * doc/rtl.texi: Document CSPImode.
17495         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17496         handling.
17497         (msp430_hard_regno_nregs_with_padding): Likewise.
17499 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
17501         PR target/84279
17502         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17504 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
17506         PR rtl-optimization/84169
17507         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
17508         we generated a parallel as new i3 and we split that to new i2 and i3
17509         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
17510         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
17511         those to i2, not i1.  Partially rewrite this scan code.
17513 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
17515         PR c/82210
17516         * stor-layout.c (place_field): For variable length fields, adjust
17517         offset_align afterwards not just based on the field's alignment,
17518         but also on the size.
17520         PR middle-end/84309
17521         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17522         of exps and logs in the use_exp2 case.
17524 2018-02-13  Jeff Law  <law@redhat.com>
17526         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17527         entry for "vector".
17529         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17530         ARGS as unused.
17532 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
17534         PR debug/84342
17535         PR debug/84319
17536         * common.opt (gas-loc-support, gas-locview-support): New.
17537         (ginline-points, ginternal-reset-location-views): New.
17538         * doc/invoke.texi: Document them.  Use @itemx where intended.
17539         (gvariable-location-views): Adjust.
17540         * target.def (reset_location_view): New.
17541         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17542         (TARGET_RESET_LOCATION_VIEW): New.
17543         * doc/tm.texi: Rebuilt.
17544         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17545         (dwarf2out_default_as_locview_support): New.
17546         (output_asm_line_debug_info): Use option variables.
17547         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17548         (output_loc_list): Likewise.
17549         (add_high_low_attributes): Check option variables.
17550         Don't output entry view attribute in strict mode.
17551         (gen_inlined_subroutine_die): Check option variables.
17552         (dwarf2out_inline_entry): Likewise.
17553         (init_sections_and_labels): Likewise.
17554         (dwarf2out_early_finish): Likewise.
17555         (maybe_reset_location_view): New, from...
17556         (dwarf2out_var_location): ... here.  Call it.
17557         * debug.h (dwarf2out_default_as_loc_support): Declare.
17558         (dwarf2out_default_as_locview_support): Declare.
17559         * hooks.c (hook_int_rtx_insn_0): New.
17560         * hooks.h (hook_int_rtx_insn_0): Declare.
17561         * toplev.c (process_options): Take -gas-loc-support and
17562         -gas-locview-support from dwarf2out.  Enable
17563         -gvariable-location-views by default only with locview
17564         assembler support.  Enable -ginternal-reset-location-views by
17565         default only if the target defines the corresponding hook.
17566         Enable -ginline-points by default if location views are
17567         enabled; force it disabled if statement frontiers are
17568         disabled.
17569         * tree-inline.c (expand_call_inline): Check option variables.
17570         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17572 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
17574         PR tree-optimization/84321
17575         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17576         handling.  Also check whether the anti-range contains any values
17577         that satisfy the mask; switch to a VR_RANGE if not.
17579 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
17581         PR sanitizer/84340
17582         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17584 2018-02-13  Martin Jambor  <mjambor@suse.cz>
17586         PR c++/83990
17587         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17588         of call statements, also set location of a load to a temporary.
17590 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
17592         * config/rl78/rl78.c (add_vector_labels): New function.
17593         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17594         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17595         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17596         which checks that no arguments are passed.
17597         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17598         * doc/extend.texi: Documentation for the new attribute.
17600 2018-02-13  Andreas Schwab  <schwab@suse.de>
17602         * config/riscv/linux.h (CPP_SPEC): Define.
17604 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
17606         PR target/84335
17607         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17608         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17609         OPTION_MASK_ISA_AES as first argument to def_builtin_const
17610         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17611         instead of OPTION_MASK_ISA_PCLMUL as first argument to
17612         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17613         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17614         temporarily for AES and PCLMUL builtins.
17616         PR tree-optimization/84339
17617         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17618         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17619         Formatting fixes.
17621         PR middle-end/84309
17622         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17623         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17624         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17625         inline function.
17626         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17627         inline function.
17628         * omp-simd-clone.h: New file.
17629         * omp-simd-clone.c: Include omp-simd-clone.h.
17630         (expand_simd_clones): No longer static.
17631         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17632         cgraph.h and omp-simd-clone.h.
17633         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17634         (vect_recog_widen_shift_pattern): Formatting fix.
17635         (vect_pattern_recog_1): Don't check optab for calls.
17637         PR target/84336
17638         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17639         operands[2] into a REG before using gen_lowpart on it.
17641 2018-02-12  Jeff Law  <law@redhat.com>
17643         PR target/83760
17644         * config/sh/sh.c (find_barrier): Consider a sibling call
17645         a barrier as well.
17647         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17648         successfully back substituting a reg.
17650 2018-02-12  Richard Biener  <rguenther@suse.de>
17652         PR tree-optimization/84037
17653         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17654         parameter, move visited init to caller.
17655         (vect_slp_analyze_operations): Separate cost from validity
17656         check, initialize visited once for all instances.
17657         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17658         for all instances.
17659         * tree-vect-stmts.c (vect_model_simple_cost): Make early
17660         out an assert.
17661         (vect_model_promotion_demotion_cost): Likewise.
17662         (vectorizable_bswap): Guard cost modeling with !slp_node
17663         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17664         SLP stmts.
17665         (vectorizable_call): Likewise.
17666         (vectorizable_conversion): Likewise.
17667         (vectorizable_assignment): Likewise.
17668         (vectorizable_shift): Likewise.
17669         (vectorizable_operation): Likewise.
17670         (vectorizable_store): Likewise.
17671         (vectorizable_load): Likewise.
17672         (vectorizable_condition): Likewise.
17673         (vectorizable_comparison): Likewise.
17675 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
17677         PR sanitizer/84307
17678         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17679         (ASAN_MARK): Fix fnspec to account for return value, change pointer
17680         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17682 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17684         PR middle-end/83665
17685         * params.def (inline-min-speedup): Increase from 8 to 15.
17686         (max-inline-insns-auto): Decrease from 40 to 30.
17687         * ipa-split.c (consider_split): Add some buffer for function to
17688         be considered inlining candidate.
17689         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17690         default values.
17692 2018-02-12  Richard Biener  <rguenther@suse.de>
17694         PR tree-optimization/84037
17695         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17696         matched stmts if we cannot swap the non-matched ones.
17698 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17700         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17701         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17702         _mm_maskz_scalef_round_ss): New intrinsics.
17703         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17704         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17705         __builtin_ia32_scalefss_round): Remove.
17706         (__builtin_ia32_scalefsd_mask_round,
17707         __builtin_ia32_scalefss_mask_round): New intrinsics.
17708         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17709         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17710         ((match_operand:VF_128 2 "<round_nimm_predicate>"
17711         "<round_constraint>")): Changed to ...
17712         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17713         "<round_scalar_constraint>")): ... this.
17714         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17715         %0, %1, %2<round_op3>}"): Changed to ...
17716         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17717         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17718         %2<round_scalar_mask_op3>}"): ... this.
17719         * config/i386/subst.md (round_scalar_nimm_predicate): New.
17721 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17723         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17724         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17725         (_mm_maskz_sqrt_round_ss): New intrinsics.
17726         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17727         (__builtin_ia32_sqrtsd_mask_round)
17728         (__builtin_ia32_sqrtss_mask_round): New builtins.
17729         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17730         (__builtin_ia32_sqrtss_round): Remove.
17731         (__builtin_ia32_sqrtsd_mask_round)
17732         (__builtin_ia32_sqrtss_mask_round): New builtins.
17733         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17734         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17735         ((match_operand:VF_128 1 "vector_operand"
17736         "xBm,<round_constraint>")): Changed to ...
17737         ((match_operand:VF_128 1 "vector_operand"
17738         "xBm,<round_scalar_constraint>")): ... this.
17739         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17740         %0, %2, %<iptr>1<round_op3>}): Changed to ...
17741         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17742         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17743         %<iptr>1<round_scalar_mask_op3>}): ... this.
17744         ((set_attr "prefix" "<round_prefix>")): Changed to ...
17745         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17747 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
17749         PR target/84266
17750         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17751         Cast vec_cmpeq result to correct type.
17752         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17753         Cast vec_cmpgt result to correct type.
17755 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
17757         * final.c (final_scan_insn_1): Renamed from...
17758         (final_scan_insn): ... this.  New wrapper, to recover
17759         seen from the outermost call in recursive ones.
17760         * config/sparc/sparc.c (output_return): Drop seen from call.
17761         (output_sibcall): Likewise.
17762         * config/visium/visium.c (output_branch): Likewise.
17764 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
17766         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17767         function label.
17769 2018-02-10  Alan Modra  <amodra@gmail.com>
17771         PR target/84300
17772         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17773         Specify LR as an input.
17775 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
17777         PR sanitizer/83987
17778         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17779         remove_member_access_dummy_vars): New functions.
17780         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17781         lower_omp_1, execute_lower_omp): Use them.
17783         PR rtl-optimization/84308
17784         * shrink-wrap.c (spread_components): Release todo vector.
17786 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
17788         PR rtl-optimization/57193
17789         * ira-color.c (struct allocno_color_data): Add member
17790         conflict_allocno_hard_prefs.
17791         (update_conflict_allocno_hard_prefs): New.
17792         (bucket_allocno_compare_func): Add a preference based on
17793         conflict_allocno_hard_prefs.
17794         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17795         (color_allocnos): Remove a dead code.  Initiate
17796         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
17798 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17800         PR target/84226
17801         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17802         constraint from =wa to wa.  Avoid a subreg on the output operand,
17803         instead use a pseudo and subreg it in a move.
17804         (p9_xxbrd_<mode>): Changed to ...
17805         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17806         (p9_xxbrd_v2df): New expander.
17807         (p9_xxbrw_<mode>): Changed to ...
17808         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17809         (p9_xxbrw_v4sf): New expander.
17811 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17813         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17815 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
17817         PR target/83926
17818         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17819         multiply in 32-bit mode.
17820         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17821         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17822         mode.
17824 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17826         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17827         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17828         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17829         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17831 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
17833         PR lto/84213
17834         * dwarf2out.c (is_trivial_indirect_ref): New function.
17835         (dwarf2out_late_global_decl): Do not generate a location
17836         attribute for variables that have a non-trivial DECL_VALUE_EXPR
17837         and that are not defined in the current unit.
17839 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17841         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17842         instead of a libcall for UNORDERED.
17844 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17846         PR target/82641
17847         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17848         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17850 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17852         PR target/PR84295
17853         * config/s390/s390.c (s390_set_current_function): Invoke
17854         s390_indirect_branch_settings also if fndecl didn't change.
17856 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17858         * config/rs6000/rs6000.md (blockage): Set length to zero.
17860 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17862         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17864 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17866         PR sanitizer/84285
17867         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17868         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17869         -static-lib*san.
17871         PR debug/84252
17872         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17873         PARALLEL incoming that failed vt_get_decl_and_offset check.
17875         PR middle-end/84237
17876         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17877         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17878         TREE_READONLY bit.
17879         (get_variable_section): For decls in named .bss* sections pass true as
17880         second argument to bss_initializer_p.
17882 2018-02-09  Marek Polacek  <polacek@redhat.com>
17883             Jakub Jelinek  <jakub@redhat.com>
17885         PR c++/83659
17886         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17887         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17888         Sync some changes from cxx_fold_indirect_ref.
17890 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17892         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17893         markers.
17894         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17895         (BLOCK_INLINE_ENTRY_LABEL): New.
17896         (dwarf2out_var_location): Disregard inline entry markers.
17897         (inline_entry_data): New struct.
17898         (inline_entry_data_hasher): New hashtable type.
17899         (inline_entry_data_hasher::hash): New.
17900         (inline_entry_data_hasher::equal): New.
17901         (inline_entry_data_table): New variable.
17902         (add_high_low_attributes): Add DW_AT_entry_pc and
17903         DW_AT_GNU_entry_view attributes if a pending entry is found
17904         in inline_entry_data_table.  Add old entry_pc attribute only
17905         if debug nonbinding markers are disabled.
17906         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17907         markers are enabled.
17908         (block_within_block_p, dwarf2out_inline_entry): New.
17909         (dwarf2out_finish): Check that no entries remained in
17910         inline_entry_data_table.
17911         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17912         (final_scan_insn, notice_source_line): Likewise.
17913         (rest_of_clean_state): Skip inline entry markers.
17914         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17915         markers.
17916         * gimple.c (gimple_build_debug_inline_entry): New.
17917         * gimple.h (enum gimple_debug_subcode): Add
17918         GIMPLE_DEBUG_INLINE_ENTRY.
17919         (gimple_build_debug_inline_entry): Declare.
17920         (gimple_debug_inline_entry_p): New.
17921         (gimple_debug_nonbind_marker_p): Adjust.
17922         * insn-notes.def (INLINE_ENTRY): New.
17923         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17924         inline entry marker notes.
17925         (print_insn): Likewise.
17926         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17927         (INSN_DEBUG_MARKER_KIND): Likewise.
17928         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17929         * tree-inline.c (expand_call_inline): Build and insert
17930         debug_inline_entry stmt.
17931         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17932         inline entry blocks early, if nonbind markers are enabled.
17933         (dump_scope_block): Dump fragment info.
17934         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17935         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17936         (gimple_build_debug_inline_entry): New.
17937         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17938         Enable/disable inline entry points too.
17939         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17940         (DEBUG_INSN): Describe inline entry markers.
17942         * common.opt (gvariable-location-views): New.
17943         (gvariable-location-views=incompat5): New.
17944         * config.in: Rebuilt.
17945         * configure: Rebuilt.
17946         * configure.ac: Test assembler for view support.
17947         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17948         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17949         * dwarf2out.c (var_loc_view): New typedef.
17950         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17951         (dwarf2out_locviews_in_attribute): New.
17952         (dwarf2out_locviews_in_loclist): New.
17953         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17954         (enum dw_line_info_opcode): Add LI_adv_address.
17955         (struct dw_line_info_table): Add view.
17956         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17957         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17958         (zero_view_p): New variable.
17959         (ZERO_VIEW_P): New macro.
17960         (output_asm_line_debug_info): New.
17961         (struct var_loc_node): Add view.
17962         (add_AT_view_list, AT_loc_list): New.
17963         (add_var_loc_to_decl): Add view param.  Test it against last.
17964         (new_loc_list): Add view params.  Record them.
17965         (AT_loc_list_ptr): Handle loc and view lists.
17966         (view_list_to_loc_list_val_node): New.
17967         (print_dw_val): Handle dw_val_class_view_list.
17968         (size_of_die): Likewise.
17969         (value_format): Likewise.
17970         (loc_list_has_views): New.
17971         (gen_llsym): Set vl_symbol too.
17972         (maybe_gen_llsym, skip_loc_list_entry): New.
17973         (dwarf2out_maybe_output_loclist_view_pair): New.
17974         (output_loc_list): Output view list or entries too.
17975         (output_view_list_offset): New.
17976         (output_die): Handle dw_val_class_view_list.
17977         (output_dwarf_version): New.
17978         (output_compilation_unit_header): Use it.
17979         (output_skeleton_debug_sections): Likewise.
17980         (output_rnglists, output_line_info): Likewise.
17981         (output_pubnames, output_aranges): Update version comments.
17982         (output_one_line_info_table): Output view numbers in asm comments.
17983         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17984         Call maybe_gen_llsym.
17985         (loc_list_from_tree_1): Adjust.
17986         (add_AT_location_description): Create view list attribute if
17987         needed, check it's absent otherwise.
17988         (convert_cfa_to_fb_loc_list): Adjust.
17989         (maybe_emit_file): Call output_asm_line_debug_info for test.
17990         (dwarf2out_var_location): Reset views as needed.  Precompute
17991         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17992         attribute.  Set view.
17993         (new_line_info_table): Reset next view.
17994         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17995         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17996         the assembler, or select appropriate line info opcodes.
17997         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17998         (optimize_string_length): Catch it.  Adjust.
17999         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
18000         dw_val_class_view_list, and remove it if no longer needed.
18001         (hash_loc_list): Hash view numbers.
18002         (loc_list_hasher::equal): Compare them.
18003         (optimize_location_lists): Check whether a view list symbol is
18004         needed, and whether the locview attribute is present, and
18005         whether they match.  Remove the locview attribute if no longer
18006         needed.
18007         (index_location_lists): Call skip_loc_list_entry for test.
18008         (dwarf2out_finish): Call output_asm_line_debug_info for test.
18009         Use output_dwarf_version.
18010         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18011         (struct dw_val_node): Add val_view_list.
18012         * final.c (SEEN_NEXT_VIEW): New.
18013         (set_next_view_needed): New.
18014         (clear_next_view_needed): New.
18015         (maybe_output_next_view): New.
18016         (final_start_function): Rename to...
18017         (final_start_function_1): ... this.  Take pointer to FIRST,
18018         add SEEN parameter.  Emit param bindings in the initial view.
18019         (final_start_function): Reintroduce SEEN-less interface.
18020         (final): Rename to...
18021         (final_1): ... this.  Take SEEN parameter.  Output final pending
18022         next view at the end.
18023         (final): Reintroduce seen-less interface.
18024         (final_scan_insn): Output pending next view before switching
18025         sections or ending a block.  Mark the next view as needed when
18026         outputting variable locations.  Notify debug backend of section
18027         changes, and of location view changes.
18028         (rest_of_handle_final): Adjust.
18029         * toplev.c (process_options): Autodetect value for debug variable
18030         location views option.  Warn on incompat5 without -gdwarf-5.
18031         * doc/invoke.texi (gvariable-location-views): New.
18032         (gvariable-location-views=incompat5): New.
18033         (gno-variable-location-views): New.
18035 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
18037         PR tree-optimization/84136
18038         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18039         that the result of find_edge is non-NULL.
18041 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18043         PR target/83008
18044         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18045         storing integer register in SImode.  Fix cost of 256 and 512
18046         byte aligned SSE register store.
18048 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18050         * config/i386/i386.c (ix86_multiplication_cost): Fix
18051         multiplication cost for TARGET_AVX512DQ.
18053 2018-02-08  Marek Polacek  <polacek@redhat.com>
18055         PR tree-optimization/84238
18056         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18057         get_range_strlen.
18059 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18061         PR tree-optimization/84265
18062         * tree-vect-stmts.c (vectorizable_store): Don't treat
18063         VMAT_CONTIGUOUS accesses as grouped.
18064         (vectorizable_load): Likewise.
18066 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18068         PR tree-optimization/81635
18069         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18070         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18071         (test_round_for_mask): New functions.
18072         (wide_int_cc_tests): Call test_round_for_mask.
18073         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18074         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18075         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18076         range returned by get_range_info.
18078 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18080         PR ipa/81360
18081         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18082         * symtab.c: Include builtins.h
18083         (symtab_node::output_to_lto_symbol_table_p): Move here
18084         from lto-streamer-out.c:output_symbol_p.
18085         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18086         (output_symbol_p): Move all logic to symtab.c
18087         (produce_symtab): Update.
18089 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18091         * config/s390/s390-opts.h (enum indirect_branch): Define.
18092         * config/s390/s390-protos.h (s390_return_addr_from_memory)
18093         (s390_indirect_branch_via_thunk)
18094         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18095         (enum s390_indirect_branch_type): Define.
18096         * config/s390/s390.c (struct s390_frame_layout, struct
18097         machine_function): Remove.
18098         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18099         (indirect_branch_table_label_no, indirect_branch_table_name):
18100         Define variables.
18101         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18102         (enum s390_indirect_branch_option): Define.
18103         (s390_return_addr_from_memory): New function.
18104         (s390_handle_string_attribute): New function.
18105         (s390_attribute_table): Add new attribute handler.
18106         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18107         (s390_indirect_branch_via_thunk): New function.
18108         (s390_indirect_branch_via_inline_thunk): New function.
18109         (s390_function_ok_for_sibcall): When jumping via thunk disallow
18110         sibling call optimization for non z10 compiles.
18111         (s390_emit_call): Force indirect branch target to be a single
18112         register.  Add r1 clobber for non-z10 compiles.
18113         (s390_emit_epilogue): Emit return jump via return_use expander.
18114         (s390_reorg): Handle JUMP_INSNs as execute targets.
18115         (s390_option_override_internal): Perform validity checks for the
18116         new command line options.
18117         (s390_indirect_branch_attrvalue): New function.
18118         (s390_indirect_branch_settings): New function.
18119         (s390_set_current_function): Invoke s390_indirect_branch_settings.
18120         (s390_output_indirect_thunk_function):  New function.
18121         (s390_code_end): Implement target hook.
18122         (s390_case_values_threshold): Implement target hook.
18123         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18124         macros.
18125         * config/s390/s390.h (struct s390_frame_layout)
18126         (struct machine_function): Move here from s390.c.
18127         (TARGET_INDIRECT_BRANCH_NOBP_RET)
18128         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18129         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18130         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18131         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18132         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18133         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18134         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18135         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18136         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18137         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18138         (mnemonic attribute): Add values which aren't recognized
18139         automatically.
18140         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18141         pattern for branch conversion.  Fix mnemonic attribute.
18142         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18143         indirect branch via thunk if requested.
18144         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18145         ("*indirect_jump"): Disable for branch conversion using out of
18146         line thunks.
18147         ("indirect_jump_via_thunk<mode>_z10")
18148         ("indirect_jump_via_thunk<mode>")
18149         ("indirect_jump_via_inlinethunk<mode>_z10")
18150         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18151         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18152         ("casesi_jump_via_inlinethunk<mode>_z10")
18153         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18154         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18155         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18156         ("*indirect2_jump"): Disable for branch conversion.
18157         ("casesi_jump"): Turn into expander and expand patterns for branch
18158         conversion.
18159         ("return_use"): New expander.
18160         ("*return"): Emit return via thunk and rename it to ...
18161         ("*return<mode>"): ... this one.
18162         * config/s390/s390.opt: Add new options and and enum for the
18163         option values.
18165 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18167         * lra-constraints.c (match_reload): Unconditionally use
18168         gen_lowpart_SUBREG, rather than selecting between that
18169         and equivalent gen_rtx_SUBREG code.
18171 2018-02-08  Richard Biener  <rguenther@suse.de>
18173         PR tree-optimization/84233
18174         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18175         changed flag instead of boguously re-using phi_inserted.
18177 2018-02-08  Martin Jambor  <mjambor@suse.cz>
18179         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18180         static local variables.
18182 2018-02-08  Richard Biener  <rguenther@suse.de>
18184         PR tree-optimization/84278
18185         * tree-vect-stmts.c (vectorizable_store): When looking for
18186         smaller vector types to perform grouped strided loads/stores
18187         make sure the mode is supported by the target.
18188         (vectorizable_load): Likewise.
18190 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18192         * config/aarch64/aarch64.c (aarch64_components_for_bb):
18193         Increase LDP/STP opportunities by adding adjacent callee-saves.
18195 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18197         PR rtl-optimization/84068
18198         PR rtl-optimization/83459
18199         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18201 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
18203         PR tree-optimization/84224
18204         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18205         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18206         non-zero arguments.
18208 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
18210         PR target/84113
18211         * config/rs6000/altivec.md (*restore_world): Remove LR use.
18212         * config/rs6000/predicates.md (restore_world_operation): Adjust op
18213         count, remove one USE.
18215 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18217         * doc/install.texi (Configuration): Document the
18218         --with-long-double-format={ibm,ieee} PowerPC configuration
18219         options.
18221         PR target/84154
18222         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18223         Convert from define_expand to be define_insn_and_split.  Rework
18224         float/double/_Float128 conversions to QI/HI/SImode to work with
18225         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
18226         conversions to QI/HImode types did a store and then a load to
18227         truncate the value.  For conversions to VSX registers, don't split
18228         the insn, instead emit the code directly.  Use the code iterator
18229         any_fix to combine signed and unsigned conversions.
18230         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18231         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18232         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18233         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18234         (fix_<mode>di2_hw): Likewise.
18235         (fixuns_<mode>di2_hw): Likewise.
18236         (fix_<mode>si2_hw): Likewise.
18237         (fixuns_<mode>si2_hw): Likewise.
18238         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18239         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18240         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18241         fix<uns>_trunc<SFDF:mode>si2_p8.
18242         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18243         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18244         (fix<uns>_<mode>_mem): Likewise.
18245         (fctiw<u>z_<mode>_mem): Likewise.
18246         (fix<uns>_<mode>_mem): Likewise.
18247         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18248         the register allocator from doing a direct move to the GPRs to do
18249         a store, and instead use the ISA 3.0 store byte/half-word from
18250         vector register instruction.  For IEEE 128-bit floating point,
18251         also optimize stores of 32-bit ints.
18252         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18254 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
18256         * genextract.c (push_pathstr_operand): New function to support
18257         [a-zA-Z].
18258         (walk_rtx): Call push_pathstr_operand.
18259         (print_path): Support [a-zA-Z].
18261 2018-02-07  Richard Biener  <rguenther@suse.de>
18263         PR tree-optimization/84037
18264         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18265         (cse_and_gimplify_to_preheader): Declare.
18266         (vect_get_place_in_interleaving_chain): Likewise.
18267         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18268         ivexpr_map.
18269         (_loop_vec_info::~_loop_vec_info): Delete it.
18270         (cse_and_gimplify_to_preheader): New function.
18271         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18272         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18273         (vectorizable_load): Likewise.  For grouped stores always base
18274         the IV on the first element.
18275         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18276         condition before gimplifying.
18278 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18280         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18281         *DIV_EXPR and *MOD_EXPR.
18283 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
18285         PR target/84248
18286         * config/i386/i386.c (ix86_option_override_internal): Mask out
18287         the CF_SET bit when checking -fcf-protection.
18289 2018-02-07  Tom de Vries  <tom@codesourcery.com>
18291         PR libgomp/84217
18292         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18293         enough.
18295 2018-02-07  Richard Biener  <rguenther@suse.de>
18297         PR tree-optimization/84204
18298         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18299         this place.
18301         PR tree-optimization/84205
18302         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18303         special-case isl_ast_op_zdiv_r.
18305         PR tree-optimization/84223
18306         * graphite-scop-detection.c (gather_bbs::before_dom_children):
18307         Only add conditions from within the region.
18308         (gather_bbs::after_dom_children): Adjust.
18310 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
18312         PR target/84209
18313         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18314         * config/avr/avr.md: Only post-reload split REG-REG moves if
18315         either register is GENERAL_REG_P.
18317 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18319         PR tree-optimization/84235
18320         * tree-ssa-scopedtables.c
18321         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18322         if the subtraction is performed in floating point type where NaNs are
18323         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18324         build 1.  Formatting fix.
18326 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
18328         PR target/84146
18329         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18330         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18331         and skip it regardless of bb boundaries.  Use CALL_P macro,
18332         don't test INSN_P (insn) together with CALL_P or JUMP_P check
18333         unnecessarily, formatting fix.
18335 2018-02-06  Michael Collison  <michael.collison@arm.com>
18337         * config/arm/thumb2.md:
18338         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18339         (*thumb_mov_notscc): Ditto.
18341 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
18343         PR target/84154
18344         * config/rs6000/rs6000.md (su code attribute): Use "u" for
18345         unsigned_fix, not "s".
18347 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18349         * configure.ac (gcc_fn_eh_frame_ro): New function.
18350         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18351         correct .eh_frame permissions.
18352         * configure: Regenerate.
18354 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
18356         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18357         irrelevant options.
18359 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18361         * config/rs6000/rs6000.c (rs6000_option_override_internal):
18362         Display warning message for -mno-speculate-indirect-jumps.
18364 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
18366         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18367         Undocumented.
18368         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18370 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
18372         PR tree-optimization/84225
18373         * tree-eh.c (find_trapping_overflow): Only call
18374         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18376 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18378         PR target/84145
18379         * config/i386/i386.c: Reimplement the check of possible options
18380         -mibt/-mshstk conbination. Change error messages.
18381         * doc/invoke.texi: Fix a typo: remove extra '='.
18383 2018-02-06  Marek Polacek  <polacek@redhat.com>
18385         PR tree-optimization/84228
18386         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18388 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
18390         PR target/82641
18391         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18392         emitted arch directives.
18393         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18394         __ARM_FEATURE_COPROC before changing architectures.
18396 2018-02-06  Richard Biener  <rguenther@suse.de>
18398         * config/i386/i386.c (print_reg): Fix typo.
18399         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18401 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
18403         * configure: Regenerate.
18405 2018-02-05  Martin Sebor  <msebor@redhat.com>
18407         PR tree-optimization/83369
18408         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18409         inlining context.
18411 2018-02-05  Martin Liska  <mliska@suse.cz>
18413         * doc/invoke.texi: Cherry-pick upstream r323995.
18415 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
18417         * ira.c (ira_init_register_move_cost): Adjust comment.
18419 2018-02-05  Martin Liska  <mliska@suse.cz>
18421         PR gcov-profile/84137
18422         * doc/gcov.texi: Fix typo in documentation.
18424 2018-02-05  Martin Liska  <mliska@suse.cz>
18426         PR gcov-profile/83879
18427         * doc/gcov.texi: Document necessity of --dynamic-list-data when
18428         using dlopen functionality.
18430 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
18432         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18433         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18434         _mm_maskz_range_ss, _mm_mask_range_round_ss,
18435         _mm_maskz_range_round_ss): New intrinsics.
18436         (__builtin_ia32_rangesd128_round)
18437         (__builtin_ia32_rangess128_round): Remove.
18438         (__builtin_ia32_rangesd128_mask_round,
18439         __builtin_ia32_rangess128_mask_round): New builtins.
18440         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18441         __builtin_ia32_rangess128_round): Remove.
18442         (__builtin_ia32_rangesd128_mask_round,
18443         __builtin_ia32_rangess128_mask_round): New builtins.
18444         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18445         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18446         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18447         "<round_saeonly_constraint>")): Changed to ...
18448         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18449         "<round_saeonly_scalar_constraint>")): ... this.
18450         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18451         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18452         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18453         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18454         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18456 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
18458         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18459         options.
18460         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18461         Remove all values except native, 8540 and 8548.
18463 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
18465         * config/i386/i386.c (ix86_output_function_return): Pass
18466         INVALID_REGNUM, instead of -1, as invalid register number to
18467         indirect_thunk_name and output_indirect_thunk.
18469 2018-02-02  Julia Koval  <julia.koval@intel.com>
18471         * config.gcc: Add -march=icelake.
18472         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18473         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18474         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18475         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18476         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18477         (processor_target_table): Add icelake.
18478         (ix86_option_override_internal): Handle new PTAs.
18479         (get_builtin_code_for_version): Handle icelake.
18480         (M_INTEL_COREI7_ICELAKE): New.
18481         (fold_builtin_cpu): Handle icelake.
18482         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18483         * doc/invoke.texi: Add -march=icelake.
18485 2018-02-02  Julia Koval  <julia.koval@intel.com>
18487         * config/i386/i386.c (ix86_option_override_internal): Change flags type
18488         to wide_int_bitmask.
18489         * wide-int-bitmask.h: New.
18491 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18493         PR target/84066
18494         * config/i386/i386.md: Replace Pmode with word_mode in
18495         builtin_setjmp_setup and builtin_longjmp to support x32.
18497 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
18499         PR target/56010
18500         PR target/83743
18501         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18502         #include "opts.h".
18503         (rs6000_supported_cpu_names): New static variable.
18504         (linux_cpu_translation_table): Likewise.
18505         (elf_platform) <cpu>: Define new static variable and use it.
18506         Translate kernel AT_PLATFORM name to canonical name if needed.
18507         Error if platform name is unknown.
18509 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
18511         PR target/84089
18512         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18514 2018-02-01  Jeff Law  <law@redhat.com>
18516         PR target/84128
18517         * config/i386/i386.c (release_scratch_register_on_entry): Add new
18518         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
18519         the scratch if RELEASE_VIA_POP is false.
18520         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18521         If we have to save a temporary register, decrement SIZE appropriately.
18522         Pass new arguments to release_scratch_register_on_entry.
18523         (ix86_adjust_stack_and_probe): Likewise.
18524         (ix86_emit_probe_stack_range): Pass new arguments to
18525         release_scratch_register_on_entry.
18527 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
18529         PR rtl-optimization/84157
18530         * combine.c (change_zero_ext): Use REG_P predicate in
18531         front of HARD_REGISTER_P predicate.
18533 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
18535         * config/avr/avr.c (avr_option_override): Move disabling of
18536         -fdelete-null-pointer-checks to...
18537         * common/config/avr/avr-common.c (avr_option_optimization_table):
18538         ...here.
18540 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18542         PR tree-optimization/81635
18543         * tree-data-ref.c (split_constant_offset_1): For types that
18544         wrap on overflow, try to use range info to prove that wrapping
18545         cannot occur.
18547 2018-02-01  Renlin Li  <renlin.li@arm.com>
18549         PR target/83370
18550         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18551         TAILCALL_ADDR_REGS.
18552         (aarch64_register_move_cost): Likewise.
18553         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18554         TAILCALL_ADDR_REGS.
18555         (REG_CLASS_NAMES): Likewise.
18556         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18557         TAILCALL_ADDR_REGS. Remove IP registers.
18558         * config/aarch64/aarch64.md (Ucs): Update register constraint.
18560 2018-02-01  Richard Biener  <rguenther@suse.de>
18562         * domwalk.h (dom_walker::dom_walker): Add additional constructor
18563         for specifying RPO order and allow NULL for that.
18564         * domwalk.c (dom_walker::dom_walker): Likewise.
18565         (dom_walker::walk): Handle NULL RPO order.
18566         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18567         in RPO order.
18568         (rewrite_update_dom_walker): Likewise.
18569         (mark_def_dom_walker): Likewise.
18571 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18573         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18574         (aarch64_maybe_expand_sve_subreg_move): Declare.
18575         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18576         * config/aarch64/predicates.md (aarch64_any_register_operand): New
18577         predicate.
18578         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18579         that are semantically a reverse operation.
18580         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18581         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18582         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18583         functions.
18584         (aarch64_can_change_mode_class): For big-endian, forbid changes
18585         between two SVE modes if they have different element sizes.
18587 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18589         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18590         the TImode handling for big-endian targets.
18592 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18594         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18595         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
18596         not just bytes.
18597         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18598         Remove BSWAP handing for big-endian targets and use the form of
18599         LD1RQ appropariate for the mode.
18601 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18603         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18604         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18605         duplicated element.
18607 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
18609         PR tearget/83845
18610         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18611         check for operands that need to go through aarch64_sve_reload_be.
18613 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
18615         PR tree-optimization/81661
18616         PR tree-optimization/84117
18617         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18618         * tree-eh.c: Include gimplify.h.
18619         (find_trapping_overflow, replace_trapping_overflow,
18620         rewrite_to_non_trapping_overflow): New functions.
18621         * tree-vect-loop.c: Include tree-eh.h.
18622         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18623         * tree-data-ref.c: Include tree-eh.h.
18624         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18626 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
18628         PR rtl-optimization/84123
18629         * combine.c (change_zero_ext): Check if hard register satisfies
18630         can_change_dest_mode before calling gen_lowpart_SUBREG.
18632 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
18634         PR target/82444
18635         * ira.c (ira_init_register_move_cost): Remove assert.
18637 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18639         PR rtl-optimization/84071
18640         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18641         * doc/tm.texi: Regenerate.
18643 2018-01-31  Richard Biener  <rguenther@suse.de>
18645         PR tree-optimization/84132
18646         * tree-data-ref.c (analyze_miv_subscript): Properly
18647         check whether evolution_function_is_affine_multivariate_p
18648         before calling gcd_of_steps_may_divide_p.
18650 2018-01-31  Julia Koval  <julia.koval@intel.com>
18652         PR target/83618
18653         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18654         * config/i386/i386.md (rdpid_rex64) New.
18655         (rdpid): Make 32bit only.
18657 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
18659         PR lto/84105
18660         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18661         an IDENTIFIER_NODE for FUNCTION_TYPE's.
18663 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18665         Revert
18666         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18668         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18670 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
18672         PR rtl-optimization/84071
18673         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18674         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18676 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18678         * config/arc/arc.c (arc_handle_aux_attribute): New function.
18679         (arc_attribute_table): Add 'aux' attribute.
18680         (arc_in_small_data_p): Consider aux like variables.
18681         (arc_is_aux_reg_p): New function.
18682         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18683         (arc_get_aux_arg): New function.
18684         (prepare_move_operands): Handle aux-register access.
18685         (arc_handle_aux_attribute): New function.
18686         * doc/extend.texi (ARC Variable attributes): Add subsection.
18688 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18690         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18691         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18692         (arc_attribute_table): Add 'uncached' attribute.
18693         (arc_print_operand): Print '.di' flag for uncached memory
18694         accesses.
18695         (arc_in_small_data_p): Do not consider for small data the uncached
18696         types.
18697         (arc_is_uncached_mem_p): New function.
18698         * config/arc/predicates.md (compact_store_memory_operand): Check
18699         for uncached memory accesses.
18700         (nonvol_nonimm_operand): Likewise.
18701         * doc/extend.texi (ARC Type Attribute): New subsection.
18703 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
18705         PR c/84100
18706         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18707         falign-loops=): Add Optimization flag.
18709 2018-01-30  Jeff Law  <law@redhat.com>
18711         PR target/84064
18712         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18713         INT_REGISTERS_SAVED.  Check it prior to calling
18714         get_scratch_register_on_entry.
18715         (ix86_adjust_stack_and_probe): Similarly.
18716         (ix86_emit_probe_stack_range): Similarly.
18717         (ix86_expand_prologue): Corresponding changes.
18719 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18721         PR target/40411
18722         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18723         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18725 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
18727         PR target/84112
18728         * lra-constraints.c (curr_insn_transform): Process AND in the
18729         address.
18731 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
18733         PR rtl-optimization/83986
18734         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18735         dependence against last_pending_memory_flush in addition to
18736         pending_jump_insns.
18738 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
18740         PR tree-optimization/81611
18741         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18742         copies.
18744 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18746         PR target/83758
18747         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18748         a reg rtx.
18750 2018-01-30  Richard Biener  <rguenther@suse.de>
18751             Jakub Jelinek  <jakub@redhat.com>
18753         PR tree-optimization/84111
18754         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18755         inner loops added during recursion, as they don't have up-to-date
18756         SSA form.
18758 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18760         PR ipa/81360
18761         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18762         (can_inline_edge_by_limits_p): ... here.
18763         (can_early_inline_edge_p, check_callers,
18764         update_caller_keys, update_callee_keys, recursive_inlining,
18765         add_new_edges_to_heap, speculation_useful_p,
18766         inline_small_functions,
18767         inline_small_functions, flatten_function,
18768         inline_to_all_callers_1): Update.
18770 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18772         * profile-count.c (profile_count::combine_with_ipa_count): Handle
18773         zeros correctly.
18775 2018-01-30  Richard Biener  <rguenther@suse.de>
18777         PR tree-optimization/83008
18778         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18779         invariant and constant vector uses in stmts when they need
18780         more than one stmt.
18782 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18784         PR bootstrap/84017
18785         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18786         * configure: Regenerate.
18788 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18790         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18791         pattern.
18792         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18793         Use gen_rtx_REG rather than gen_lowpart.
18795 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18797         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18798         rather than 0 when creating partial subregs.
18800 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18802         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18803         of usage.
18805 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18807         PR target/81550
18808         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18809         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18810         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18811         flags.  This restores the settings used before the 2017-07-24.
18812         Turning off pre increment/decrement/modify allows IVOPTS to
18813         optimize DF/SF loops where the index is an int.
18815 2018-01-29  Richard Biener  <rguenther@suse.de>
18816             Kelvin Nilsen  <kelvin@gcc.gnu.org>
18818         PR bootstrap/80867
18819         * tree-vect-stmts.c (vectorizable_call): Don't call
18820         targetm.vectorize_builtin_md_vectorized_function if callee is
18821         NULL.
18823 2018-01-22  Carl Love  <cel@us.ibm.com>
18825         * doc/extend.tex: Fix typo in second arg in
18826         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18828 2018-01-29  Richard Biener  <rguenther@suse.de>
18830         PR tree-optimization/84086
18831         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18832         (flush_ssaname_freelist): When SSA names were released reset
18833         the SCEV hash table.
18835 2018-01-29  Richard Biener  <rguenther@suse.de>
18837         PR tree-optimization/84057
18838         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18839         removed paths when removing edges.
18841 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18843         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18844         -mfunction-return=@var{choice}.
18846 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18848         PR diagnostic/84034
18849         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18850         Handle CR like TAB.
18851         (layout::print_source_line): Likewise.
18852         (test_get_line_width_without_trailing_whitespace): Add test cases.
18854 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18856         PR middle-end/84040
18857         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18858         debug insns.
18860 2018-01-26  Jim Wilson  <jimw@sifive.com>
18862         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18864         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18865         specified.
18867 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18869         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18870         and CMP + SUB-immediate -> SUBS.
18872 2018-01-26  Martin Sebor  <msebor@redhat.com>
18874         PR tree-optimization/83896
18875         * tree-ssa-strlen.c (get_string_len): Rename...
18876         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18877         Avoid assuming length is constant.
18878         (handle_char_store): Use HOST_WIDE_INT for string length.
18880 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18882         PR target/81763
18883         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18884         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18886 2018-01-26  Richard Biener  <rguenther@suse.de>
18888         PR rtl-optimization/84003
18889         * dse.c (record_store): Only record redundant stores when
18890         the earlier store aliases at least all accesses the later one does.
18892 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18894         PR rtl-optimization/83985
18895         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18896         REG_CFA_RESTORE insns.
18897         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18898         REG_CFA_RESTORE insns here.
18900         PR c/83989
18901         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18902         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18904 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18906         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18907         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18908         (arc_init): Likewise.
18909         (arc_override_options): Likewise.
18910         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18911         value.
18912         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18913         support.
18914         * config/arc/arc.h (TARGET_DBNZ): Define.
18915         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18916         properly set the tune attribute.
18917         (dbnz): Use TARGET_DBNZ guard.
18918         * config/arc/arc.opt (mtune): Add core3 option.
18920 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18922         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18923         recognize new pic like addresses.
18924         (arc_delegitimize_address): Clean up.
18926 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18928         * config/arc/arc-arches.def: Option mrf16 valid for all
18929         architectures.
18930         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18931         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18932         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18933         * config/arc/arc-tables.opt: Regenerate.
18934         * config/arc/arc.c (arc_conditional_register_usage): Handle
18935         reduced register file case.
18936         (arc_file_start): Set must have build attributes.
18937         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18938         mrf16 option value.
18939         * config/arc/arc.opt (mrf16): Add new option.
18940         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18941         * config/arc/genmultilib.awk: Handle new mrf16 option.
18942         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18943         * config/arc/t-multilib: Regenerate.
18944         * doc/invoke.texi (ARC Options): Document mrf16 option.
18946 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18948         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18949         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18950         (arc_attribute_table): Add 'secure_call' attribute.
18951         (arc_print_operand): Print secure call operand.
18952         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18953         secure.
18954         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18955         (call_i): Add support for sjli instruction.
18956         (call_value_i): Likewise.
18957         * config/arc/constraints.md (Csc): New constraint.
18959 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18960             John Eric Martin  <John.Martin@emmicro-us.com>
18962         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18963         * config/arc/arc.c (_arc_jli_section): New struct.
18964         (arc_jli_section): New type.
18965         (rc_jli_sections): New static variable.
18966         (arc_handle_jli_attribute): New function.
18967         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18968         (arc_file_end): New function.
18969         (TARGET_ASM_FILE_END): Define.
18970         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18971         (arc_add_jli_section): New function.
18972         (jli_call_scan): Likewise.
18973         (arc_reorg): Call jli_call_scan.
18974         (arc_output_addsi): Remove 'S' from printing asm operand.
18975         (arc_is_jli_call_p): New function.
18976         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18977         operand.
18978         (movhi_insn): Likewise.
18979         (movsi_insn): Likewise.
18980         (movsi_set_cc_insn): Likewise.
18981         (loadqi_update): Likewise.
18982         (load_zeroextendqisi_update): Likewise.
18983         (load_signextendqisi_update): Likewise.
18984         (loadhi_update): Likewise.
18985         (load_zeroextendhisi_update): Likewise.
18986         (load_signextendhisi_update): Likewise.
18987         (loadsi_update): Likewise.
18988         (loadsf_update): Likewise.
18989         (movsicc_insn): Likewise.
18990         (bset_insn): Likewise.
18991         (bxor_insn): Likewise.
18992         (bclr_insn): Likewise.
18993         (bmsk_insn): Likewise.
18994         (bicsi3_insn): Likewise.
18995         (cmpsi_cc_c_insn): Likewise.
18996         (movsi_ne): Likewise.
18997         (movsi_cond_exec): Likewise.
18998         (clrsbsi2): Likewise.
18999         (norm_f): Likewise.
19000         (normw): Likewise.
19001         (swap): Likewise.
19002         (divaw): Likewise.
19003         (flag): Likewise.
19004         (sr): Likewise.
19005         (kflag): Likewise.
19006         (ffs): Likewise.
19007         (ffs_f): Likewise.
19008         (fls): Likewise.
19009         (call_i): Remove 'S' asm letter, add jli instruction.
19010         (call_value_i): Likewise.
19011         * config/arc/arc.op (mjli-always): New option.
19012         * config/arc/constraints.md (Cji): New constraint.
19013         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19014         operand.
19015         (subsf3_fpx): Likewise.
19016         (mulsf3_fpx): Likewise.
19017         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19018         asm operand.
19019         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19020         function attrbutes.
19021         * doc/invoke.texi (ARC): Document mjli-always option.
19023 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
19025         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19026         avoid addition with 0 and use incw and decw where possible.
19028 2018-01-26  Richard Biener  <rguenther@suse.de>
19030         PR tree-optimization/81082
19031         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19032         association if it requires casting to unsigned.
19033         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19034         from fold_plusminus_mult_expr to catch important cases late when
19035         range info is available.
19037 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19039         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19040         * configure.ac (hidden_linkonce): New test.
19041         * configure: Regenerate.
19042         * config.in: Regenerate.
19044 2018-01-26  Julia Koval  <julia.koval@intel.com>
19046         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19047         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19048         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19049         _mm_mask_bitshuffle_epi64_mask): Fix type.
19050         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19051         USI_FTYPE_V4DI_V4DI_USI): Remove.
19052         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19053         __builtin_ia32_vpshufbitqmb256_mask,
19054         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19055         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19056         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19058 2018-01-26  Alan Modra  <amodra@gmail.com>
19060         PR target/84033
19061         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19062         UNSPEC_VBPERMQ.  Sort other unspecs.
19064 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
19066         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19068 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
19070         PR middle-end/83055
19071         * predict.c (drop_profile): Do not push/pop cfun; update also
19072         node->count.
19073         (handle_missing_profiles): Fix logic looking for zero profiles.
19075 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
19077         PR middle-end/83977
19078         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19079         on functions with #pragma omp declare simd or functions with simd
19080         attribute.
19081         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19082         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19083         Remove trailing \n from warning_at calls.
19085 2018-01-25  Tom de Vries  <tom@codesourcery.com>
19087         PR target/84028
19088         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19089         for neutered workers.
19091 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
19093         PR target/68467
19094         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19095         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19097 2018-01-24  Jeff Law  <law@redhat.com>
19099         PR target/83994
19100         * i386.c (get_probe_interval): Move to earlier point.
19101         (ix86_compute_frame_layout): If -fstack-clash-protection and
19102         the frame is larger than the probe interval, then use pushes
19103         to save registers rather than reg->mem moves.
19104         (ix86_expand_prologue): Remove conditional for int_registers_saved
19105         assertion.
19107 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
19109         PR target/84014
19110         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19111         min/max for never referenced object.
19113 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
19115         PR middle-end/83977
19116         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19117         here.
19118         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19119         attributes from DECL_ATTRIBUTES (decl) without affecting
19120         DECL_ATTRIBUTES (current_function_decl).
19121         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19122         functions with non-NULL DECL_ABSTRACT_ORIGIN.
19124 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
19126         PR tree-optimization/83979
19127         * fold-const.c (fold_comparison): Use constant_boolean_node
19128         instead of boolean_{true,false}_node.
19130 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
19132         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19133         with zero counts.
19135 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19137         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19138         Simplify the clause that sets the length attribute.
19139         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19140         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19141         clause that sets the length attribute.
19142         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19144 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19146         PR target/83589
19147         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19148         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19149         Add strict parameter.
19150         (prevent_branch_around_nothing): Insert dummy insn between branch to
19151         label and label with no ptx insn inbetween.
19152         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19154 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19156         PR target/81352
19157         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19158         for neutered threads in warp.
19159         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19161 2018-01-24  Richard Biener  <rguenther@suse.de>
19163         PR tree-optimization/83176
19164         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19165         operands.
19167 2018-01-24  Richard Biener  <rguenther@suse.de>
19169         PR tree-optimization/82819
19170         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19171         code generating pluses that are no-ops in the target precision.
19173 2018-01-24  Richard Biener  <rguenther@suse.de>
19175         PR middle-end/84000
19176         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19178 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19180         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19181         to merge probabilities.
19182         * predict.c (probably_never_executed): Also mark as cold functions
19183         with global 0 profile and guessed local profile.
19184         * profile-count.c (profile_probability::combine_with_count): New
19185         member function.
19186         * profile-count.h (profile_probability::operator*,
19187         profile_probability::operator*=, profile_probability::operator/,
19188         profile_probability::operator/=): Reduce precision to adjusted
19189         and set value to guessed on contradictory divisions.
19190         (profile_probability::combine_with_freq): Remove.
19191         (profile_probability::combine_wiht_count): Declare.
19192         (profile_count::force_nonzero):: Set to adjusted.
19193         (profile_count::probability_in):: Set quality to adjusted.
19194         * tree-ssa-tail-merge.c (replace_block_by): Use
19195         combine_with_count.
19197 2018-01-23  Andrew Waterman  <andrew@sifive.com>
19198             Jim Wilson  <jimw@sifive.com>
19200         * config/riscv/riscv.c (riscv_stack_boundary): New.
19201         (riscv_option_override): Set riscv_stack_boundary.  Handle
19202         riscv_preferred_stack_boundary_arg.
19203         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19204         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19205         (STACK_BOUNDARY): Set to riscv_stack_boundary.
19206         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19207         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19208         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19210 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
19212         PR target/83905
19213         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19214         of struct ix86_frame.
19215         (ix86_expand_epilogue): Likewise.  Add a local variable for
19216         the reg_save_offset field in struct ix86_frame.
19218 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
19220         PR tree-optimization/82604
19221         * tree-loop-distribution.c (enum partition_kind): New enum item
19222         PKIND_PARTIAL_MEMSET.
19223         (partition_builtin_p): Support above new enum item.
19224         (generate_code_for_partition): Ditto.
19225         (compute_access_range): Differentiate cases that equality can be
19226         proven at all loops, the innermost loops or no loops.
19227         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19228         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
19229         (finalize_partitions, distribute_loop): Don't fuse partition of
19230         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19231         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19232         parloop is enabled.
19234 2018-01-23  Martin Liska  <mliska@suse.cz>
19236         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19237         order to ignore the predictor.
19238         (PRED_POLYMORPHIC_CALL): Likewise.
19239         (PRED_RECURSIVE_CALL): Likewise.
19241 2018-01-23  Martin Liska  <mliska@suse.cz>
19243         * tree-profile.c (tree_profiling): Print function header to
19244         aware reader which function we are working on.
19245         * value-prof.c (gimple_find_values_to_profile): Do not print
19246         not interesting value histograms.
19248 2018-01-23  Martin Liska  <mliska@suse.cz>
19250         * profile-count.h (enum profile_quality): Add
19251         profile_uninitialized as the first value. Do not number values
19252         as they are zero based.
19253         (profile_count::verify): Update sanity check.
19254         (profile_probability::verify): Likewise.
19256 2018-01-23  Nathan Sidwell  <nathan@acm.org>
19258         * doc/invoke.texi (ffor-scope): Deprecate.
19260 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19262         PR tree-optimization/83510
19263         * domwalk.c (set_all_edges_as_executable): New function.
19264         (dom_walker::dom_walker): Convert bool param
19265         "skip_unreachable_blocks" to enum reachability.  Move setup of
19266         edge flags to set_all_edges_as_executable and only do it when
19267         reachability is REACHABLE_BLOCKS.
19268         * domwalk.h (enum dom_walker::reachability): New enum.
19269         (dom_walker::dom_walker): Convert bool param
19270         "skip_unreachable_blocks" to enum reachability.
19271         (set_all_edges_as_executable): New decl.
19272         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
19273         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19274         "reachability".
19275         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19276         but converting true to REACHABLE_BLOCKS.
19277         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19278         * tree-vrp.c
19279         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19280         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19281         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19282         REACHABLE_BLOCKS.
19283         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19284         if check_all_array_refs will be called.
19286 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19288         * tree.c (selftest::test_location_wrappers): Add more test
19289         coverage.
19291 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19293         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19294         (selftest::test_bit_in_range): Likewise.
19296 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19298         PR testsuite/83888
19299         * doc/sourcebuild.texi (vect_float): Say that the selector
19300         only describes the situation when -funsafe-math-optimizations is on.
19301         (vect_float_strict): Document.
19303 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19305         PR tree-optimization/83965
19306         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19307         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19308         instead of checking only for a reduction.
19309         (vect_recog_widen_sum_pattern): Likewise.
19311 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19313         * predict.c (probably_never_executed): Only use precise profile info.
19314         (compute_function_frequency): Skip after inlining hack since we now
19315         have quality checking.
19317 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19319         * profile-count.h (profile_probability::very_unlikely,
19320         profile_probability::unlikely, profile_probability::even): Set
19321         precision to guessed.
19323 2018-01-23  Richard Biener  <rguenther@suse.de>
19325         PR tree-optimization/83963
19326         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19327         Properly terminate dominator walk when crossing the exit edge not
19328         when visiting its source block.
19330 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
19332         PR c++/83918
19333         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19334         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19336 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
19338         PR tree-optimization/83957
19339         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
19340         semicolon after for body surrounded by braces.
19342         PR tree-optimization/83081
19343         * profile-count.h (profile_probability::split): New method.
19344         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19345         Use profile_probability::split.
19346         (do_compare_rtx_and_jump): Fix adjustment of probabilities
19347         when splitting a single conditional jump into 2.
19349 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
19351         PR tree-optimization/69452
19352         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19353         decl.
19355 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19357         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19358         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19359         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19361 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19363         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19364         declaration.
19365         * config/rl78/rl78.md (movdi): New define_expand.
19366         * config/rl78/rl78.c (rl78_split_movdi): New function.
19368 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
19370         PR target/83862
19371         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19372         no longer used.
19373         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19374         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19375         128-bit to produce an UNSPEC move to get the double word with the
19376         signbit and then a shift directly to do signbit.
19377         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19378         implementation with a new version that just does either a direct
19379         move or a regular move.  Move memory interface to separate insns.
19380         Move insns so they are next to the expander.
19381         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19382         with signbit move.  Split big and little endian case.
19383         (signbit<mode>2_dm_mem_le): Likewise.
19384         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19385         (signbit<mode>2_dm2): Likewise.
19387 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19389         * config/rl78/rl78.md (anddi3): New define_expand.
19391 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19393         * config/rl78/rl78.md (umindi3): New define_expand.
19395 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19397         * config/rl78/rl78.md (smindi3): New define_expand.
19399 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19401         * config/rl78/rl78.md (smaxdi3): New define_expand.
19403 2018-01-22  Carl Love  <cel@us.ibm.com>
19405         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19406         LVX_V1TI): Add macro expansion.
19407         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19408         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19409         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19410         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19411         Change check to determine if the instruction is a byte reversing
19412         entry.  Fix typo in comment.
19413         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19414         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19415         Add def_builtin calls for new builtins.
19416         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19417         Add define_insn expansion.
19419 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19421         * config/rl78/rl78.md (umaxdi3): New define_expand.
19423 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19425         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19426         for non-QImode registers.
19428 2018-01-22  Richard Biener  <rguenther@suse.de>
19430         PR tree-optimization/83963
19431         * graphite-scop-detection.c (scop_detection::get_sese): Delay
19432         including the loop exit block.
19433         (scop_detection::merge_sese): Likewise.
19434         (scop_detection::add_scop): Do it here instead.
19436 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19438         * doc/sourcebuild.texi (arm_softfloat): Document.
19440 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
19442         PR gcc/77734
19443         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19444         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19445         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19447 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19448             David Edelsohn  <dje.gcc@gmail.com>
19450         PR target/83946
19451         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19452         Change "crset eq" to "crset 2".
19453         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19454         (*call_indirect_aix<mode>_nospec): Likewise.
19455         (*call_value_indirect_aix<mode>_nospec): Likewise.
19456         (*call_indirect_elfv2<mode>_nospec): Likewise.
19457         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19458         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19459         change assembly output from . to $.
19460         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19461         (indirect_jump<mode>_nospec): Change assembly output from . to $.
19462         (*tablejump<mode>_internal1_nospec): Likewise.
19464 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
19466         PR target/80870
19467         * config/sh/sh_optimize_sett_clrt.cc:
19468         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19470 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
19472         PR tree-optimization/83940
19473         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19474         offset_dt to vect_constant_def rather than vect_unknown_def_type.
19475         (vect_check_load_store_mask): Add a mask_dt_out parameter and
19476         use it to pass back the definition type.
19477         (vect_check_store_rhs): Likewise rhs_dt_out.
19478         (vect_build_gather_load_calls): Add a mask_dt argument and use
19479         it instead of a call to vect_is_simple_use.
19480         (vectorizable_store): Update calls to vect_check_load_store_mask
19481         and vect_check_store_rhs.  Use the dt returned by the latter instead
19482         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
19483         instead of calls to vect_is_simple_use.  Pass the scalar rather
19484         than the vector operand to vect_is_simple_use when handling
19485         second and subsequent copies of an rhs value.
19486         (vectorizable_load): Update calls to vect_check_load_store_mask
19487         and vect_build_gather_load_calls.  Use the cached mask_dt and
19488         gs_info.offset_dt instead of calls to vect_is_simple_use.
19490 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
19492         PR middle-end/83945
19493         * tree-emutls.c: Include gimplify.h.
19494         (lower_emutls_2): New function.
19495         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19496         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19497         it before further processing.
19499         PR target/83930
19500         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19501         UINTVAL (trueop1) instead of INTVAL (op1).
19503 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
19505         PR debug/81570
19506         PR debug/83728
19507         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19508         INCOMING_FRAME_SP_OFFSET if not defined.
19509         (scan_trace): Add ENTRY argument.  If true and
19510         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19511         emit a note to adjust the CFA offset.
19512         (create_cfi_notes): Adjust scan_trace callers.
19513         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19514         INCOMING_FRAME_SP_OFFSET in the CIE.
19515         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19516         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19517         Likewise.
19518         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19519         * doc/tm.texi: Regenerated.
19521 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19523         PR rtl-optimization/83147
19524         * lra-constraints.c (remove_inheritance_pseudos): Use
19525         lra_substitute_pseudo_within_insn.
19527 2018-01-19  Tom de Vries  <tom@codesourcery.com>
19528             Cesar Philippidis  <cesar@codesourcery.com>
19530         PR target/83920
19531         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19533 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
19535         PR target/83790
19536         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19537         spaces for function labels.
19539 2018-01-19  Martin Liska  <mliska@suse.cz>
19541         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19542         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19543         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19544         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19545         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19546         (PRED_CONST_RETURN): Change from 69 to 65.
19547         (PRED_NULL_RETURN): Change from 91 to 71.
19548         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19549         (PRED_LOOP_GUARD): Change from 66 to 73.
19551 2018-01-19  Martin Liska  <mliska@suse.cz>
19553         * predict.c (predict_insn_def): Add new assert.
19554         (struct branch_predictor): Change type to signed integer.
19555         (test_prediction_value_range): Amend test to cover
19556         PROB_UNINITIALIZED.
19557         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19558         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19559         (PRED_LOOP_ITERATIONS_MAX): Likewise.
19560         (PRED_LOOP_IV_COMPARE): Likewise.
19561         * predict.h (PROB_UNINITIALIZED): Define new constant.
19563 2018-01-19  Martin Liska  <mliska@suse.cz>
19565         * predict.c (dump_prediction): Add new format for
19566         analyze_brprob.py script which is enabled with -details
19567         suboption.
19568         * profile-count.h (precise_p): New function.
19570 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
19572         PR tree-optimization/83922
19573         * tree-vect-loop.c (vect_verify_full_masking): Return false if
19574         there are no statements that need masking.
19575         (vect_active_double_reduction_p): New function.
19576         (vect_analyze_loop_operations): Use it when handling phis that
19577         are not in the loop header.
19579 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
19581         PR tree-optimization/83914
19582         * tree-vect-loop.c (vectorizable_induction): Don't convert
19583         init_expr or apply the peeling adjustment for inductions
19584         that are nested within the vectorized loop.
19586 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19588         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19589         instead of NEG.
19591 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
19593         PR sanitizer/81715
19594         PR testsuite/83882
19595         * function.h (gimplify_parameters): Add gimple_seq * argument.
19596         * function.c: Include gimple.h and options.h.
19597         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19598         for the added local temporaries if needed.
19599         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19600         if there are any parameter cleanups, wrap whole body into a
19601         try/finally with the cleanups.
19603 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
19605         PR target/82964
19606         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19607         Use GET_MODE_CLASS for scalar floating point.
19609 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
19611         PR ipa/82256
19612         patch by PaX Team
19613         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19614         Fix call of call_cgraph_insertion_hooks.
19616 2018-01-18  Martin Sebor  <msebor@redhat.com>
19618         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19620 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
19622         PR ipa/83619
19623         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19624         frequencies.
19626 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
19628         PR other/70268
19629         * common.opt: (-ffile-prefix-map): New option.
19630         * opts.c (common_handle_option): Defer it.
19631         * opts-global.c (handle_common_deferred_options): Handle it.
19632         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19633         * file-prefix-map.h: New file.
19634         (remap_debug_filename, add_debug_prefix_map): ...here.
19635         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19636         * final.c (debug_prefix_map, add_debug_prefix_map
19637         remap_debug_filename): Move to...
19638         * file-prefix-map.c: New file.
19639         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19640         generalize, get rid of alloca(), use strrchr() instead of strchr().
19641         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19642         Implement in terms of add_prefix_map().
19643         (remap_macro_filename, remap_debug_filename): Implement in term of
19644         remap_filename().
19645         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19646         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19647         * dbxout.c: Include file-prefix-map.h.
19648         * varasm.c: Likewise.
19649         * vmsdbgout.c: Likewise.
19650         * xcoffout.c: Likewise.
19651         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19652         * doc/cppopts.texi (-fmacro-prefix-map): Document.
19653         * doc/invoke.texi (-ffile-prefix-map): Document.
19654         (-fdebug-prefix-map): Update description.
19656 2018-01-18  Martin Liska  <mliska@suse.cz>
19658         * config/i386/i386.c (indirect_thunk_name): Document that also
19659         lfence is emitted.
19660         (output_indirect_thunk): Document why both instructions
19661         (pause and lfence) are generated.
19663 2018-01-18  Richard Biener  <rguenther@suse.de>
19665         PR tree-optimization/83887
19666         * graphite-scop-detection.c
19667         (scop_detection::get_nearest_dom_with_single_entry): Remove.
19668         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19669         (scop_detection::merge_sese): Re-implement with a flood-fill
19670         algorithm that properly finds a SESE region if it exists.
19672 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
19674         PR c/61240
19675         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19676         pointer_diff optimizations use view_convert instead of convert.
19678 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19680         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19681         Generate different code for -mno-speculate-indirect-jumps.
19682         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19683         (*call_indirect_aix<mode>): Disable for
19684         -mno-speculate-indirect-jumps.
19685         (*call_indirect_aix<mode>_nospec): New define_insn.
19686         (*call_value_indirect_aix<mode>): Disable for
19687         -mno-speculate-indirect-jumps.
19688         (*call_value_indirect_aix<mode>_nospec): New define_insn.
19689         (*sibcall_nonlocal_sysv<mode>): Generate different code for
19690         -mno-speculate-indirect-jumps.
19691         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19693 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19695         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19696         long double type, set the flags for noting the default long double
19697         type, even if we don't pass or return a long double type.
19699 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
19701         PR ipa/83051
19702         * ipa-inline.c (flatten_function): Do not overwrite final inlining
19703         failure.
19705 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
19707         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19708         support for merge[hl].
19709         (fold_mergehl_helper): New helper function.
19710         (tree-vector-builder.h): New #include for tree_vector_builder usage.
19711         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19712         (altivec_vmrglw_direct): Add xxmrglw insn.
19714 2018-01-17  Andrew Waterman  <andrew@sifive.com>
19716         * config/riscv/riscv.c (riscv_conditional_register_usage): If
19717         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19719 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
19721         PR lto/83121
19722         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19723         call the lto_location_cache before reading the
19724         DECL_SOURCE_LOCATION of the types.
19726 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
19727             Richard Sandiford  <richard.sandiford@linaro.org>
19729         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19730         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19731         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19732         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19733         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19734         Add declaration.
19735         * config/aarch64/constraints.md (aarch64_movti_operand):
19736         Limit immediates.
19737         * config/aarch64/predicates.md (Uti): Add new constraint.
19739 2018-01-17  Carl Love  <cel@us.ibm.com>
19741         * config/rs6000/vsx.md (define_expand xl_len_r,
19742         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19743         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19744         lxvll.
19745         (define_expand, define_insn): Move the shift left from  the
19746         define_insn to the define_expand for lxvl and stxvl instructions.
19747         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19748         and XL_LEN_R definitions to PURE.
19750 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
19752         * config/i386/i386.c (indirect_thunk_name): Declare regno
19753         as unsigned int.  Compare regno with INVALID_REGNUM.
19754         (output_indirect_thunk): Ditto.
19755         (output_indirect_thunk_function): Ditto.
19756         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
19757         in the call to output_indirect_thunk_function.
19759 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
19761         PR middle-end/83884
19762         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19763         rather than the size of inner_type to determine the stack slot size
19764         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19766 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
19768         PR target/83546
19769         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19770         to PTA_SILVERMONT.
19772 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
19774         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19775         endian Linux systems to optionally enable multilibs for selecting
19776         the long double type if the user configured an explicit type.
19777         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19778         have no long double multilibs if not defined.
19779         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19780         warn if the user used -mabi={ieee,ibm}longdouble and we built
19781         multilibs for long double.
19782         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19783         appropriate multilib option.
19784         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19785         multilib options.
19786         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19787         for building long double multilibs.
19788         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19790 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
19792         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19793         copies.
19795         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19796         64 bits.
19797         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19798         128 bits.
19800         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19801         variables.
19803         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19804         return value.
19806 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19808         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19809         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19811 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19813         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19814         different rtl trees depending on TARGET_64BIT.
19815         (rs6000_gen_lvx): Likewise.
19817 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19819         * config/visium/visium.md (nop): Tweak comment.
19820         (hazard_nop): Likewise.
19822 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19824         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19825         -mspeculate-indirect-jumps.
19826         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19827         for -mno-speculate-indirect-jumps.
19828         (*call_indirect_elfv2<mode>_nospec): New define_insn.
19829         (*call_value_indirect_elfv2<mode>): Disable for
19830         -mno-speculate-indirect-jumps.
19831         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19832         (indirect_jump): Emit different RTL for
19833         -mno-speculate-indirect-jumps.
19834         (*indirect_jump<mode>): Disable for
19835         -mno-speculate-indirect-jumps.
19836         (*indirect_jump<mode>_nospec): New define_insn.
19837         (tablejump): Emit different RTL for
19838         -mno-speculate-indirect-jumps.
19839         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19840         (tablejumpsi_nospec): New define_expand.
19841         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19842         (tablejumpdi_nospec): New define_expand.
19843         (*tablejump<mode>_internal1): Disable for
19844         -mno-speculate-indirect-jumps.
19845         (*tablejump<mode>_internal1_nospec): New define_insn.
19846         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19847         option.
19849 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19851         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19852         callers updated.
19854 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19855             Richard Biener  <rguenth@suse.de>
19857         PR libgomp/83590
19858         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19859         return early, inline manually is_gimple_sizepos.  Make sure if we
19860         call gimplify_expr we don't end up with a gimple constant.
19861         * tree.c (variably_modified_type_p): Don't return true for
19862         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19863         * gimplify.h (is_gimple_sizepos): Remove.
19865 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19867         PR tree-optimization/83857
19868         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19869         vectorizable_live_operation for pure SLP statements.
19870         (vectorizable_live_operation): Handle PHIs.
19872 2018-01-16  Richard Biener  <rguenther@suse.de>
19874         PR tree-optimization/83867
19875         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19876         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19878 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19880         PR c/83844
19881         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19882         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19883         If off is not INTEGER_CST, issue a may not be aligned warning
19884         rather than isn't aligned.  Use isn%'t rather than isn't.
19885         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19886         into MULT_EXPR.
19887         <case MULT_EXPR>: Improve the case when bottom and one of the
19888         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19889         operand, in that case check if the other operand is multiple of
19890         bottom divided by the INTEGER_CST operand.
19892 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19894         PR target/83858
19895         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19896         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19897         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19898         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19899         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19900         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19901         (pa_function_arg_size): New function.
19903 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19905         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19906         in a separate statement.
19908 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19910         PR tree-optimization/83847
19911         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19912         group gathers and scatters.
19914 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19916         PR rtl-optimization/86620
19917         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19919         PR rtl-optimization/83213
19920         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19921         to last if both are JUMP_INSNs.
19923         PR tree-optimization/83843
19924         * gimple-ssa-store-merging.c
19925         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19926         store_immediate_info for bswap/nop orig_stores.
19928 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19930         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19931         !TARGET_MUL.
19932         <UDIV>: Increase cost if !TARGET_DIV.
19934 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19936         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19937         (define_attr "cr_logical_3op"): New.
19938         (cceq_ior_compare): Adjust.
19939         (cceq_ior_compare_complement): Adjust.
19940         (*cceq_rev_compare): Adjust.
19941         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19942         (is_cracked_insn): Adjust.
19943         (insn_must_be_first_in_group): Adjust.
19944         * config/rs6000/40x.md: Adjust.
19945         * config/rs6000/440.md: Adjust.
19946         * config/rs6000/476.md: Adjust.
19947         * config/rs6000/601.md: Adjust.
19948         * config/rs6000/603.md: Adjust.
19949         * config/rs6000/6xx.md: Adjust.
19950         * config/rs6000/7450.md: Adjust.
19951         * config/rs6000/7xx.md: Adjust.
19952         * config/rs6000/8540.md: Adjust.
19953         * config/rs6000/cell.md: Adjust.
19954         * config/rs6000/e300c2c3.md: Adjust.
19955         * config/rs6000/e500mc.md: Adjust.
19956         * config/rs6000/e500mc64.md: Adjust.
19957         * config/rs6000/e5500.md: Adjust.
19958         * config/rs6000/e6500.md: Adjust.
19959         * config/rs6000/mpc.md: Adjust.
19960         * config/rs6000/power4.md: Adjust.
19961         * config/rs6000/power5.md: Adjust.
19962         * config/rs6000/power6.md: Adjust.
19963         * config/rs6000/power7.md: Adjust.
19964         * config/rs6000/power8.md: Adjust.
19965         * config/rs6000/power9.md: Adjust.
19966         * config/rs6000/rs64.md: Adjust.
19967         * config/rs6000/titan.md: Adjust.
19969 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19971         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19972         ix86_indirect_branch_register logic.
19974 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19976         * config/i386/constraints.md (Bs): Update
19977         ix86_indirect_branch_register check.  Don't check
19978         ix86_indirect_branch_register with GOT_memory_operand.
19979         (Bw): Likewise.
19980         * config/i386/predicates.md (GOT_memory_operand): Don't check
19981         ix86_indirect_branch_register here.
19982         (GOT32_symbol_operand): Likewise.
19984 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19986         * config/i386/predicates.md (constant_call_address_operand):
19987         Rewrite ix86_indirect_branch_register logic.
19988         (sibcall_insn_operand): Likewise.
19990 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19992         * config/i386/constraints.md (Bs): Replace
19993         ix86_indirect_branch_thunk_register with
19994         ix86_indirect_branch_register.
19995         (Bw): Likewise.
19996         * config/i386/i386.md (indirect_jump): Likewise.
19997         (tablejump): Likewise.
19998         (*sibcall_memory): Likewise.
19999         (*sibcall_value_memory): Likewise.
20000         Peepholes of indirect call and jump via memory: Likewise.
20001         * config/i386/i386.opt: Likewise.
20002         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20003         (GOT_memory_operand): Likewise.
20004         (call_insn_operand): Likewise.
20005         (sibcall_insn_operand): Likewise.
20006         (GOT32_symbol_operand): Likewise.
20008 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20010         PR middle-end/83837
20011         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20012         type rather than type addr's type points to.
20013         (expand_omp_atomic_mutex): Likewise.
20014         (expand_omp_atomic): Likewise.
20016 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20018         PR target/83839
20019         * config/i386/i386.c (output_indirect_thunk_function): Use
20020         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20021         for  __x86_return_thunk.
20023 2018-01-15  Richard Biener  <rguenther@suse.de>
20025         PR middle-end/83850
20026         * expmed.c (extract_bit_field_1): Fix typo.
20028 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20030         PR target/83687
20031         * config/arm/iterators.md (VF): New mode iterator.
20032         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20033         Remove integer-related logic from pattern.
20034         (neon_vabd<mode>_3): Likewise.
20036 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20038         PR middle-end/82694
20039         * common.opt (fstrict-overflow): No longer an alias.
20040         (fwrapv-pointer): New option.
20041         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20042         also for pointer types based on flag_wrapv_pointer.
20043         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20044         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20045         opts->x_flag_wrapv got set.
20046         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20047         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20048         POINTER_TYPE_OVERFLOW_UNDEFINED.
20049         * match.pd: Likewise in address comparison pattern.
20050         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20052 2018-01-15  Richard Biener  <rguenther@suse.de>
20054         PR lto/83804
20055         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20056         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
20057         Reset type names to their identifier if their TYPE_DECL doesn't
20058         have linkage (and thus is used for ODR and devirt).
20059         (save_debug_info_for_decl): Remove.
20060         (save_debug_info_for_type): Likewise.
20061         (add_tree_to_fld_list): Adjust.
20062         * tree-pretty-print.c (dump_generic_node): Make dumping of
20063         type names more robust.
20065 2018-01-15  Richard Biener  <rguenther@suse.de>
20067         * BASE-VER: Bump to 8.0.1.
20069 2018-01-14  Martin Sebor  <msebor@redhat.com>
20071         PR other/83508
20072         * builtins.c (check_access): Avoid warning when the no-warning bit
20073         is set.
20075 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
20077         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20078         * ira-color (allocno_hard_regs_compare): Likewise.
20080 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
20082         PR target/83013
20083         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20084         Use .pushsection/.popsection.
20086 2018-01-14  Martin Sebor  <msebor@redhat.com>
20088         PR c++/81327
20089         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20091 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
20093         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20094         entry from extra_headers.
20095         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20096         extra_headers, make the list bitwise identical to the i?86-*-* one.
20098 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20100         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20101         -mcmodel=large with -mindirect-branch=thunk,
20102         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20103         -mfunction-return=thunk-extern.
20104         * doc/invoke.texi: Document -mcmodel=large is incompatible with
20105         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20106         -mfunction-return=thunk and -mfunction-return=thunk-extern.
20108 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20110         * config/i386/i386.c (print_reg): Print the name of the full
20111         integer register without '%'.
20112         (ix86_print_operand): Handle 'V'.
20113         * doc/extend.texi: Document 'V' modifier.
20115 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20117         * config/i386/constraints.md (Bs): Disallow memory operand for
20118         -mindirect-branch-register.
20119         (Bw): Likewise.
20120         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20121         (GOT_memory_operand): Likewise.
20122         (call_insn_operand): Likewise.
20123         (sibcall_insn_operand): Likewise.
20124         (GOT32_symbol_operand): Likewise.
20125         * config/i386/i386.md (indirect_jump): Call convert_memory_address
20126         for -mindirect-branch-register.
20127         (tablejump): Likewise.
20128         (*sibcall_memory): Likewise.
20129         (*sibcall_value_memory): Likewise.
20130         Disallow peepholes of indirect call and jump via memory for
20131         -mindirect-branch-register.
20132         (*call_pop): Replace m with Bw.
20133         (*call_value_pop): Likewise.
20134         (*sibcall_pop_memory): Replace m with Bs.
20135         * config/i386/i386.opt (mindirect-branch-register): New option.
20136         * doc/invoke.texi: Document -mindirect-branch-register option.
20138 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20140         * config/i386/i386-protos.h (ix86_output_function_return): New.
20141         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20142         set function_return_type.
20143         (indirect_thunk_name): Add ret_p to indicate thunk for function
20144         return.
20145         (output_indirect_thunk_function): Pass false to
20146         indirect_thunk_name.
20147         (ix86_output_indirect_branch_via_reg): Likewise.
20148         (ix86_output_indirect_branch_via_push): Likewise.
20149         (output_indirect_thunk_function): Create alias for function
20150         return thunk if regno < 0.
20151         (ix86_output_function_return): New function.
20152         (ix86_handle_fndecl_attribute): Handle function_return.
20153         (ix86_attribute_table): Add function_return.
20154         * config/i386/i386.h (machine_function): Add
20155         function_return_type.
20156         * config/i386/i386.md (simple_return_internal): Use
20157         ix86_output_function_return.
20158         (simple_return_internal_long): Likewise.
20159         * config/i386/i386.opt (mfunction-return=): New option.
20160         (indirect_branch): Mention -mfunction-return=.
20161         * doc/extend.texi: Document function_return function attribute.
20162         * doc/invoke.texi: Document -mfunction-return= option.
20164 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20166         * config/i386/i386-opts.h (indirect_branch): New.
20167         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20168         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20169         with local indirect jump when converting indirect call and jump.
20170         (ix86_set_indirect_branch_type): New.
20171         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20172         (indirectlabelno): New.
20173         (indirect_thunk_needed): Likewise.
20174         (indirect_thunk_bnd_needed): Likewise.
20175         (indirect_thunks_used): Likewise.
20176         (indirect_thunks_bnd_used): Likewise.
20177         (INDIRECT_LABEL): Likewise.
20178         (indirect_thunk_name): Likewise.
20179         (output_indirect_thunk): Likewise.
20180         (output_indirect_thunk_function): Likewise.
20181         (ix86_output_indirect_branch_via_reg): Likewise.
20182         (ix86_output_indirect_branch_via_push): Likewise.
20183         (ix86_output_indirect_branch): Likewise.
20184         (ix86_output_indirect_jmp): Likewise.
20185         (ix86_code_end): Call output_indirect_thunk_function if needed.
20186         (ix86_output_call_insn): Call ix86_output_indirect_branch if
20187         needed.
20188         (ix86_handle_fndecl_attribute): Handle indirect_branch.
20189         (ix86_attribute_table): Add indirect_branch.
20190         * config/i386/i386.h (machine_function): Add indirect_branch_type
20191         and has_local_indirect_jump.
20192         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20193         to true.
20194         (tablejump): Likewise.
20195         (*indirect_jump): Use ix86_output_indirect_jmp.
20196         (*tablejump_1): Likewise.
20197         (simple_return_indirect_internal): Likewise.
20198         * config/i386/i386.opt (mindirect-branch=): New option.
20199         (indirect_branch): New.
20200         (keep): Likewise.
20201         (thunk): Likewise.
20202         (thunk-inline): Likewise.
20203         (thunk-extern): Likewise.
20204         * doc/extend.texi: Document indirect_branch function attribute.
20205         * doc/invoke.texi: Document -mindirect-branch= option.
20207 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
20209         PR ipa/83051
20210         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20212 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
20214         * ipa-inline.c (want_inline_small_function_p): Return false if
20215         inlining has already failed with CIF_FINAL_ERROR.
20216         (update_caller_keys): Call want_inline_small_function_p before
20217         can_inline_edge_p.
20218         (update_callee_keys): Likewise.
20220 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20222         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20223         New function.
20224         (rs6000_quadword_masked_address_p): Likewise.
20225         (quad_aligned_load_p): Likewise.
20226         (quad_aligned_store_p): Likewise.
20227         (const_load_sequence_p): Add comment to describe the outer-most loop.
20228         (mimic_memory_attributes_and_flags): New function.
20229         (rs6000_gen_stvx): Likewise.
20230         (replace_swapped_aligned_store): Likewise.
20231         (rs6000_gen_lvx): Likewise.
20232         (replace_swapped_aligned_load): Likewise.
20233         (replace_swapped_load_constant): Capitalize argument name in
20234         comment describing this function.
20235         (rs6000_analyze_swaps): Add a third pass to search for vector loads
20236         and stores that access quad-word aligned addresses and replace
20237         with stvx or lvx instructions when appropriate.
20238         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20239         New function prototype.
20240         (rs6000_quadword_masked_address_p): Likewise.
20241         (rs6000_gen_lvx): Likewise.
20242         (rs6000_gen_stvx): Likewise.
20243         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20244         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20245         when memory address is aligned.
20246         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20247         this split to select lvx instruction when memory address is aligned.
20248         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20249         instruction when memory address is aligned.
20250         (*vsx_le_perm_load_v16qi): Likewise.
20251         (four unnamed splitters): Modify to select the stvx instruction
20252         when memory is aligned.
20254 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
20256         * predict.c (determine_unlikely_bbs): Handle correctly BBs
20257         which appears in the queue multiple times.
20259 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20260             Alan Hayward  <alan.hayward@arm.com>
20261             David Sherwood  <david.sherwood@arm.com>
20263         * tree-vectorizer.h (vec_lower_bound): New structure.
20264         (_loop_vec_info): Add check_nonzero and lower_bounds.
20265         (LOOP_VINFO_CHECK_NONZERO): New macro.
20266         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20267         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20268         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20269         fields.  Make seg_len the distance travelled, not including the
20270         access size.
20271         (dr_direction_indicator): Declare.
20272         (dr_zero_step_indicator): Likewise.
20273         (dr_known_forward_stride_p): Likewise.
20274         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20275         tree-ssanames.h.
20276         (runtime_alias_check_p): Allow runtime alias checks with
20277         variable strides.
20278         (operator ==): Compare access_size and align.
20279         (prune_runtime_alias_test_list): Rework for new distinction between
20280         the access_size and seg_len.
20281         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
20282         segment lengths.
20283         (get_segment_min_max): New function.
20284         (create_intersect_range_checks): Use it.
20285         (dr_step_indicator): New function.
20286         (dr_direction_indicator): Likewise.
20287         (dr_zero_step_indicator): Likewise.
20288         (dr_known_forward_stride_p): Likewise.
20289         * tree-loop-distribution.c (data_ref_segment_size): Return
20290         DR_STEP * (niters - 1).
20291         (compute_alias_check_pairs): Update call to the dr_with_seg_len
20292         constructor.
20293         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20294         (vect_preserves_scalar_order_p): New function, split out from...
20295         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
20296         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20297         (vect_vfa_access_size): New function.
20298         (vect_vfa_align): Likewise.
20299         (vect_compile_time_alias): Take access_size_a and access_b arguments.
20300         (dump_lower_bound): New function.
20301         (vect_check_lower_bound): Likewise.
20302         (vect_small_gap_p): Likewise.
20303         (vectorizable_with_step_bound_p): Likewise.
20304         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20305         depencies if the vectorization factor is 1.  Convert the checks
20306         for nonzero steps into checks on the bounds of DR_STEP.  Try using
20307         a bunds check for variable steps if the minimum required step is
20308         relatively small. Update calls to the dr_with_seg_len
20309         constructor and to vect_compile_time_alias.
20310         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20311         function.
20312         (vect_loop_versioning): Call it.
20313         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20314         when retrying.
20315         (vect_estimate_min_profitable_iters): Account for any bounds checks.
20317 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20318             Alan Hayward  <alan.hayward@arm.com>
20319             David Sherwood  <david.sherwood@arm.com>
20321         * doc/sourcebuild.texi (vect_scatter_store): Document.
20322         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20323         optabs.
20324         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20325         Document.
20326         * genopinit.c (main): Add supports_vec_scatter_store and
20327         supports_vec_scatter_store_cached to target_optabs.
20328         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20329         IFN_MASK_SCATTER_STORE.
20330         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20331         functions.
20332         * internal-fn.h (internal_store_fn_p): Declare.
20333         (internal_fn_stored_value_index): Likewise.
20334         * internal-fn.c (scatter_store_direct): New macro.
20335         (expand_scatter_store_optab_fn): New function.
20336         (direct_scatter_store_optab_supported_p): New macro.
20337         (internal_store_fn_p): New function.
20338         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20339         IFN_MASK_SCATTER_STORE.
20340         (internal_fn_mask_index): Likewise.
20341         (internal_fn_stored_value_index): New function.
20342         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20343         for scatter stores.
20344         * optabs-query.h (supports_vec_scatter_store_p): Declare.
20345         * optabs-query.c (supports_vec_scatter_store_p): New function.
20346         * tree-vectorizer.h (vect_get_store_rhs): Declare.
20347         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20348         true for scatter stores.
20349         (vect_gather_scatter_fn_p): Handle scatter stores too.
20350         (vect_check_gather_scatter): Consider using scatter stores if
20351         supports_vec_scatter_store_p.
20352         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20353         scatter stores too.
20354         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20355         internal_fn_stored_value_index.
20356         (check_load_store_masking): Handle scatter stores too.
20357         (vect_get_store_rhs): Make public.
20358         (vectorizable_call): Use internal_store_fn_p.
20359         (vectorizable_store): Handle scatter store internal functions.
20360         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20361         when deciding whether the end of the group has been reached.
20362         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20363         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20364         (mask_scatter_store<mode>): New insns.
20366 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20367             Alan Hayward  <alan.hayward@arm.com>
20368             David Sherwood  <david.sherwood@arm.com>
20370         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20371         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20372         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20373         function.
20374         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20375         Use vect_truncate_gather_scatter_offset if we can't treat the
20376         operation as a normal gather load or scatter store.
20377         (get_group_load_store_type): Take the gather_scatter_info
20378         as argument.  Try using a gather load or scatter store for
20379         single-element groups.
20380         (get_load_store_type): Update calls to get_group_load_store_type
20381         and vect_use_strided_gather_scatters_p.
20383 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20384             Alan Hayward  <alan.hayward@arm.com>
20385             David Sherwood  <david.sherwood@arm.com>
20387         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20388         optional tree argument.
20389         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20390         null target hooks.
20391         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20392         but continue to use the current value as a fallback.
20393         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20394         to compare the updates.
20395         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20396         (get_load_store_type): Use it when handling a strided access.
20397         (vect_get_strided_load_store_ops): New function.
20398         (vect_get_data_ptr_increment): Likewise.
20399         (vectorizable_load): Handle strided gather loads.  Always pass
20400         a step to vect_create_data_ref_ptr and bump_vector_ptr.
20402 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20403             Alan Hayward  <alan.hayward@arm.com>
20404             David Sherwood  <david.sherwood@arm.com>
20406         * doc/md.texi (gather_load@var{m}): Document.
20407         (mask_gather_load@var{m}): Likewise.
20408         * genopinit.c (main): Add supports_vec_gather_load and
20409         supports_vec_gather_load_cached to target_optabs.
20410         * optabs-tree.c (init_tree_optimization_optabs): Use
20411         ggc_cleared_alloc to allocate target_optabs.
20412         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20413         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20414         functions.
20415         * internal-fn.h (internal_load_fn_p): Declare.
20416         (internal_gather_scatter_fn_p): Likewise.
20417         (internal_fn_mask_index): Likewise.
20418         (internal_gather_scatter_fn_supported_p): Likewise.
20419         * internal-fn.c (gather_load_direct): New macro.
20420         (expand_gather_load_optab_fn): New function.
20421         (direct_gather_load_optab_supported_p): New macro.
20422         (direct_internal_fn_optab): New function.
20423         (internal_load_fn_p): Likewise.
20424         (internal_gather_scatter_fn_p): Likewise.
20425         (internal_fn_mask_index): Likewise.
20426         (internal_gather_scatter_fn_supported_p): Likewise.
20427         * optabs-query.c (supports_at_least_one_mode_p): New function.
20428         (supports_vec_gather_load_p): Likewise.
20429         * optabs-query.h (supports_vec_gather_load_p): Declare.
20430         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20431         and memory_type field.
20432         (NUM_PATTERNS): Bump to 15.
20433         * tree-vect-data-refs.c: Include internal-fn.h.
20434         (vect_gather_scatter_fn_p): New function.
20435         (vect_describe_gather_scatter_call): Likewise.
20436         (vect_check_gather_scatter): Try using internal functions for
20437         gather loads.  Recognize existing calls to a gather load function.
20438         (vect_analyze_data_refs): Consider using gather loads if
20439         supports_vec_gather_load_p.
20440         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20441         (vect_get_gather_scatter_offset_type): Likewise.
20442         (vect_convert_mask_for_vectype): Likewise.
20443         (vect_add_conversion_to_patterm): Likewise.
20444         (vect_try_gather_scatter_pattern): Likewise.
20445         (vect_recog_gather_scatter_pattern): New pattern recognizer.
20446         (vect_vect_recog_func_ptrs): Add it.
20447         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20448         internal_fn_mask_index and internal_gather_scatter_fn_p.
20449         (check_load_store_masking): Take the gather_scatter_info as an
20450         argument and handle gather loads.
20451         (vect_get_gather_scatter_ops): New function.
20452         (vectorizable_call): Check internal_load_fn_p.
20453         (vectorizable_load): Likewise.  Handle gather load internal
20454         functions.
20455         (vectorizable_store): Update call to check_load_store_masking.
20456         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20457         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20458         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20459         (aarch64_gather_scale_operand_d): New predicates.
20460         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20461         (mask_gather_load<mode>): New insns.
20463 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20464             Alan Hayward  <alan.hayward@arm.com>
20465             David Sherwood  <david.sherwood@arm.com>
20467         * optabs.def (fold_left_plus_optab): New optab.
20468         * doc/md.texi (fold_left_plus_@var{m}): Document.
20469         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20470         * internal-fn.c (fold_left_direct): Define.
20471         (expand_fold_left_optab_fn): Likewise.
20472         (direct_fold_left_optab_supported_p): Likewise.
20473         * fold-const-call.c (fold_const_fold_left): New function.
20474         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20475         * tree-parloops.c (valid_reduction_p): New function.
20476         (gather_scalar_reductions): Use it.
20477         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20478         (vect_finish_replace_stmt): Declare.
20479         * tree-vect-loop.c (fold_left_reduction_fn): New function.
20480         (needs_fold_left_reduction_p): New function, split out from...
20481         (vect_is_simple_reduction): ...here.  Accept reductions that
20482         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20483         (vect_force_simple_reduction): Also store the reduction type in
20484         the assignment's STMT_VINFO_REDUC_TYPE.
20485         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20486         (merge_with_identity): New function.
20487         (vect_expand_fold_left): Likewise.
20488         (vectorize_fold_left_reduction): Likewise.
20489         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
20490         scalar phi in place for it.  Check for target support and reject
20491         cases that would reassociate the operation.  Defer the transform
20492         phase to vectorize_fold_left_reduction.
20493         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20494         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20495         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20497 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20499         * tree-if-conv.c (predicate_mem_writes): Remove redundant
20500         call to ifc_temp_var.
20502 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20503             Alan Hayward  <alan.hayward@arm.com>
20504             David Sherwood  <david.sherwood@arm.com>
20506         * target.def (legitimize_address_displacement): Take the original
20507         offset as a poly_int.
20508         * targhooks.h (default_legitimize_address_displacement): Update
20509         accordingly.
20510         * targhooks.c (default_legitimize_address_displacement): Likewise.
20511         * doc/tm.texi: Regenerate.
20512         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20513         as an argument, moving assert of ad->disp == ad->disp_term to...
20514         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
20515         Try calling targetm.legitimize_address_displacement before expanding
20516         the address rather than afterwards, and adjust for the new interface.
20517         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20518         Match the new hook interface.  Handle SVE addresses.
20519         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20520         new hook interface.
20522 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20524         * Makefile.in (OBJS): Add early-remat.o.
20525         * target.def (select_early_remat_modes): New hook.
20526         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20527         * doc/tm.texi: Regenerate.
20528         * targhooks.h (default_select_early_remat_modes): Declare.
20529         * targhooks.c (default_select_early_remat_modes): New function.
20530         * timevar.def (TV_EARLY_REMAT): New timevar.
20531         * passes.def (pass_early_remat): New pass.
20532         * tree-pass.h (make_pass_early_remat): Declare.
20533         * early-remat.c: New file.
20534         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20535         function.
20536         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20538 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20539             Alan Hayward  <alan.hayward@arm.com>
20540             David Sherwood  <david.sherwood@arm.com>
20542         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20543         vfm1 with a bound_epilog parameter.
20544         (vect_do_peeling): Update calls accordingly, and move the prologue
20545         call earlier in the function.  Treat the base bound_epilog as 0 for
20546         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
20547         this base when peeling for gaps.
20548         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20549         with fully-masked loops.
20550         (vect_estimate_min_profitable_iters): Handle the single peeled
20551         iteration in that case.
20553 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20554             Alan Hayward  <alan.hayward@arm.com>
20555             David Sherwood  <david.sherwood@arm.com>
20557         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20558         single-element interleaving even if the size is not a power of 2.
20559         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20560         accesses for single-element interleaving if the group size is
20561         not a power of 2.
20563 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20564             Alan Hayward  <alan.hayward@arm.com>
20565             David Sherwood  <david.sherwood@arm.com>
20567         * doc/md.texi (fold_extract_last_@var{m}): Document.
20568         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20569         * optabs.def (fold_extract_last_optab): New optab.
20570         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20571         * internal-fn.c (fold_extract_direct): New macro.
20572         (expand_fold_extract_optab_fn): Likewise.
20573         (direct_fold_extract_optab_supported_p): Likewise.
20574         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20575         * tree-vect-loop.c (vect_model_reduction_cost): Handle
20576         EXTRACT_LAST_REDUCTION.
20577         (get_initial_def_for_reduction): Do not create an initial vector
20578         for EXTRACT_LAST_REDUCTION reductions.
20579         (vectorizable_reduction): Leave the scalar phi in place for
20580         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
20581         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
20582         epilogue code for EXTRACT_LAST_REDUCTION and defer the
20583         transform phase to vectorizable_condition.
20584         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20585         split out from...
20586         (vect_finish_stmt_generation): ...here.
20587         (vect_finish_replace_stmt): New function.
20588         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20589         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20590         pattern.
20591         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20593 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20594             Alan Hayward  <alan.hayward@arm.com>
20595             David Sherwood  <david.sherwood@arm.com>
20597         * doc/md.texi (extract_last_@var{m}): Document.
20598         * optabs.def (extract_last_optab): New optab.
20599         * internal-fn.def (EXTRACT_LAST): New internal function.
20600         * internal-fn.c (cond_unary_direct): New macro.
20601         (expand_cond_unary_optab_fn): Likewise.
20602         (direct_cond_unary_optab_supported_p): Likewise.
20603         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20604         loops using EXTRACT_LAST.
20605         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20606         (extract_last_<mode>): ...this optab.
20607         (vec_extract<mode><Vel>): Update accordingly.
20609 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20610             Alan Hayward  <alan.hayward@arm.com>
20611             David Sherwood  <david.sherwood@arm.com>
20613         * target.def (empty_mask_is_expensive): New hook.
20614         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20615         * doc/tm.texi: Regenerate.
20616         * targhooks.h (default_empty_mask_is_expensive): Declare.
20617         * targhooks.c (default_empty_mask_is_expensive): New function.
20618         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20619         if the target says that empty masks are expensive.
20620         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20621         New function.
20622         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20624 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20625             Alan Hayward  <alan.hayward@arm.com>
20626             David Sherwood  <david.sherwood@arm.com>
20628         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20629         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20630         (vect_use_loop_mask_for_alignment_p): New function.
20631         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20632         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20633         niters_skip argument.  Make sure that the first niters_skip elements
20634         of the first iteration are inactive.
20635         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20636         Update call to vect_set_loop_masks_directly.
20637         (get_misalign_in_elems): New function, split out from...
20638         (vect_gen_prolog_loop_niters): ...here.
20639         (vect_update_init_of_dr): Take a code argument that specifies whether
20640         the adjustment should be added or subtracted.
20641         (vect_update_init_of_drs): Likewise.
20642         (vect_prepare_for_masked_peels): New function.
20643         (vect_do_peeling): Skip prologue peeling if we're using a mask
20644         instead.  Update call to vect_update_inits_of_drs.
20645         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20646         mask_skip_niters.
20647         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20648         alignment.  Do not include the number of peeled iterations in
20649         the minimum threshold in that case.
20650         (vectorizable_induction): Adjust the start value down by
20651         LOOP_VINFO_MASK_SKIP_NITERS iterations.
20652         (vect_transform_loop): Call vect_prepare_for_masked_peels.
20653         Take the number of skipped iterations into account when calculating
20654         the loop bounds.
20655         * tree-vect-stmts.c (vect_gen_while_not): New function.
20657 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20658             Alan Hayward  <alan.hayward@arm.com>
20659             David Sherwood  <david.sherwood@arm.com>
20661         * doc/sourcebuild.texi (vect_fully_masked): Document.
20662         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20663         default value to 0.
20664         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20665         split out from...
20666         (vect_analyze_loop_2): ...here. Don't check the vectorization
20667         factor against the number of loop iterations if the loop is
20668         fully-masked.
20670 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20671             Alan Hayward  <alan.hayward@arm.com>
20672             David Sherwood  <david.sherwood@arm.com>
20674         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20675         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20676         (dump_groups): Update accordingly.
20677         (iv_use::mem_type): New member variable.
20678         (address_p): New function.
20679         (record_use): Add a mem_type argument and initialize the new
20680         mem_type field.
20681         (record_group_use): Add a mem_type argument.  Use address_p.
20682         Remove obsolete null checks of base_object.  Update call to record_use.
20683         (find_interesting_uses_op): Update call to record_group_use.
20684         (find_interesting_uses_cond): Likewise.
20685         (find_interesting_uses_address): Likewise.
20686         (get_mem_type_for_internal_fn): New function.
20687         (find_address_like_use): Likewise.
20688         (find_interesting_uses_stmt): Try find_address_like_use before
20689         calling find_interesting_uses_op.
20690         (addr_offset_valid_p): Use the iv mem_type field as the type
20691         of the addressed memory.
20692         (add_autoinc_candidates): Likewise.
20693         (get_address_cost): Likewise.
20694         (split_small_address_groups_p): Use address_p.
20695         (split_address_groups): Likewise.
20696         (add_iv_candidate_for_use): Likewise.
20697         (autoinc_possible_for_pair): Likewise.
20698         (rewrite_groups): Likewise.
20699         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20700         (determine_group_iv_cost): Update after split of USE_ADDRESS.
20701         (get_alias_ptr_type_for_ptr_address): New function.
20702         (rewrite_use_address): Rewrite address uses in calls that were
20703         identified by find_address_like_use.
20705 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20706             Alan Hayward  <alan.hayward@arm.com>
20707             David Sherwood  <david.sherwood@arm.com>
20709         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20710         TARGET_MEM_REFs.
20711         * gimple-expr.h (is_gimple_addressable: Likewise.
20712         * gimple-expr.c (is_gimple_address): Likewise.
20713         * internal-fn.c (expand_call_mem_ref): New function.
20714         (expand_mask_load_optab_fn): Use it.
20715         (expand_mask_store_optab_fn): Likewise.
20717 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20718             Alan Hayward  <alan.hayward@arm.com>
20719             David Sherwood  <david.sherwood@arm.com>
20721         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20722         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20723         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20724         (cond_umax@var{mode}): Document.
20725         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20726         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20727         (cond_umin_optab, cond_umax_optab): New optabs.
20728         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20729         (COND_IOR, COND_XOR): New internal functions.
20730         * internal-fn.h (get_conditional_internal_fn): Declare.
20731         * internal-fn.c (cond_binary_direct): New macro.
20732         (expand_cond_binary_optab_fn): Likewise.
20733         (direct_cond_binary_optab_supported_p): Likewise.
20734         (get_conditional_internal_fn): New function.
20735         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20736         Cope with reduction statements that are vectorized as calls rather
20737         than assignments.
20738         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20739         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20740         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20741         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20742         (UNSPEC_COND_EOR): New unspecs.
20743         (optab): Add mappings for them.
20744         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20745         (sve_int_op, sve_fp_op): New int attributes.
20747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20748             Alan Hayward  <alan.hayward@arm.com>
20749             David Sherwood  <david.sherwood@arm.com>
20751         * optabs.def (while_ult_optab): New optab.
20752         * doc/md.texi (while_ult@var{m}@var{n}): Document.
20753         * internal-fn.def (WHILE_ULT): New internal function.
20754         * internal-fn.h (direct_internal_fn_supported_p): New override
20755         that takes two types as argument.
20756         * internal-fn.c (while_direct): New macro.
20757         (expand_while_optab_fn): New function.
20758         (convert_optab_supported_p): Likewise.
20759         (direct_while_optab_supported_p): New macro.
20760         * wide-int.h (wi::udiv_ceil): New function.
20761         * tree-vectorizer.h (rgroup_masks): New structure.
20762         (vec_loop_masks): New typedef.
20763         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20764         and fully_masked_p.
20765         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20766         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20767         (vect_max_vf): New function.
20768         (slpeel_make_loop_iterate_ntimes): Delete.
20769         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20770         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20771         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20772         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20773         internal-fn.h, stor-layout.h and optabs-query.h.
20774         (vect_set_loop_mask): New function.
20775         (add_preheader_seq): Likewise.
20776         (add_header_seq): Likewise.
20777         (interleave_supported_p): Likewise.
20778         (vect_maybe_permute_loop_masks): Likewise.
20779         (vect_set_loop_masks_directly): Likewise.
20780         (vect_set_loop_condition_masked): Likewise.
20781         (vect_set_loop_condition_unmasked): New function, split out from
20782         slpeel_make_loop_iterate_ntimes.
20783         (slpeel_make_loop_iterate_ntimes): Rename to..
20784         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
20785         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20786         (vect_do_peeling): Update call accordingly.
20787         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20788         loops.
20789         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20790         mask_compare_type, can_fully_mask_p and fully_masked_p.
20791         (release_vec_loop_masks): New function.
20792         (_loop_vec_info): Use it to free the loop masks.
20793         (can_produce_all_loop_masks_p): New function.
20794         (vect_get_max_nscalars_per_iter): Likewise.
20795         (vect_verify_full_masking): Likewise.
20796         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20797         retries, and free the mask rgroups before retrying.  Check loop-wide
20798         reasons for disallowing fully-masked loops.  Make the final decision
20799         about whether use a fully-masked loop or not.
20800         (vect_estimate_min_profitable_iters): Do not assume that peeling
20801         for the number of iterations will be needed for fully-masked loops.
20802         (vectorizable_reduction): Disable fully-masked loops.
20803         (vectorizable_live_operation): Likewise.
20804         (vect_halve_mask_nunits): New function.
20805         (vect_double_mask_nunits): Likewise.
20806         (vect_record_loop_mask): Likewise.
20807         (vect_get_loop_mask): Likewise.
20808         (vect_transform_loop): Handle the case in which the final loop
20809         iteration might handle a partial vector.  Call vect_set_loop_condition
20810         instead of slpeel_make_loop_iterate_ntimes.
20811         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20812         (check_load_store_masking): New function.
20813         (prepare_load_store_mask): Likewise.
20814         (vectorizable_store): Handle fully-masked loops.
20815         (vectorizable_load): Likewise.
20816         (supportable_widening_operation): Use vect_halve_mask_nunits for
20817         booleans.
20818         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20819         (vect_gen_while): New function.
20820         * config/aarch64/aarch64.md (umax<mode>3): New expander.
20821         (aarch64_uqdec<mode>): New insn.
20823 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20824             Alan Hayward  <alan.hayward@arm.com>
20825             David Sherwood  <david.sherwood@arm.com>
20827         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20828         (reduc_xor_scal_optab): New optabs.
20829         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20830         (reduc_xor_scal_@var{m}): Document.
20831         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20832         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20833         internal functions.
20834         * fold-const-call.c (fold_const_call): Handle them.
20835         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20836         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20837         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20838         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20839         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20840         (UNSPEC_XORV): New unspecs.
20841         (optab): Add entries for them.
20842         (BITWISEV): New int iterator.
20843         (bit_reduc_op): New int attributes.
20845 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20846             Alan Hayward  <alan.hayward@arm.com>
20847             David Sherwood  <david.sherwood@arm.com>
20849         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20850         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20851         * optabs.def (vec_shl_insert_optab): New optab.
20852         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20853         (duplicate_and_interleave): Likewise.
20854         * tree-vect-loop.c: Include internal-fn.h.
20855         (neutral_op_for_slp_reduction): New function, split out from
20856         get_initial_defs_for_reduction.
20857         (get_initial_def_for_reduction): Handle option 2 for variable-length
20858         vectors by loading the neutral value into a vector and then shifting
20859         the initial value into element 0.
20860         (get_initial_defs_for_reduction): Replace the code argument with
20861         the neutral value calculated by neutral_op_for_slp_reduction.
20862         Use gimple_build_vector for constant-length vectors.
20863         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20864         but the first group_size elements have a neutral value.
20865         Use duplicate_and_interleave otherwise.
20866         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20867         Update call to get_initial_defs_for_reduction.  Handle SLP
20868         reductions for variable-length vectors by creating one vector
20869         result for each scalar result, with the elements associated
20870         with other scalar results stubbed out with the neutral value.
20871         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20872         Require IFN_VEC_SHL_INSERT for double reductions on
20873         variable-length vectors, or SLP reductions that have
20874         a neutral value.  Require can_duplicate_and_interleave_p
20875         support for variable-length unchained SLP reductions if there
20876         is no neutral value, such as for MIN/MAX reductions.  Also require
20877         the number of vector elements to be a multiple of the number of
20878         SLP statements when doing variable-length unchained SLP reductions.
20879         Update call to vect_create_epilog_for_reduction.
20880         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20881         and remove initial values.
20882         (duplicate_and_interleave): Make public.
20883         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20884         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20886 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20887             Alan Hayward  <alan.hayward@arm.com>
20888             David Sherwood  <david.sherwood@arm.com>
20890         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20891         (can_duplicate_and_interleave_p): New function.
20892         (vect_get_and_check_slp_defs): Take the vector of statements
20893         rather than just the current one.  Remove excess parentheses.
20894         Restriction rejectinon of vect_constant_def and vect_external_def
20895         for variable-length vectors to boolean types, or types for which
20896         can_duplicate_and_interleave_p is false.
20897         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20898         (duplicate_and_interleave): New function.
20899         (vect_get_constant_vectors): Use gimple_build_vector for
20900         constant-length vectors and suitable variable-length constant
20901         vectors.  Use duplicate_and_interleave for other variable-length
20902         vectors.  Don't defer the update when inserting new statements.
20904 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20905             Alan Hayward  <alan.hayward@arm.com>
20906             David Sherwood  <david.sherwood@arm.com>
20908         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20909         min_profitable_iters doesn't go negative.
20911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20912             Alan Hayward  <alan.hayward@arm.com>
20913             David Sherwood  <david.sherwood@arm.com>
20915         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20916         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20917         * optabs.def (vec_mask_load_lanes_optab): New optab.
20918         (vec_mask_store_lanes_optab): Likewise.
20919         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20920         (MASK_STORE_LANES): Likewise.
20921         * internal-fn.c (mask_load_lanes_direct): New macro.
20922         (mask_store_lanes_direct): Likewise.
20923         (expand_mask_load_optab_fn): Handle masked operations.
20924         (expand_mask_load_lanes_optab_fn): New macro.
20925         (expand_mask_store_optab_fn): Handle masked operations.
20926         (expand_mask_store_lanes_optab_fn): New macro.
20927         (direct_mask_load_lanes_optab_supported_p): Likewise.
20928         (direct_mask_store_lanes_optab_supported_p): Likewise.
20929         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20930         parameter.
20931         (vect_load_lanes_supported): Likewise.
20932         * tree-vect-data-refs.c (strip_conversion): New function.
20933         (can_group_stmts_p): Likewise.
20934         (vect_analyze_data_ref_accesses): Use it instead of checking
20935         for a pair of assignments.
20936         (vect_store_lanes_supported): Take a masked_p parameter.
20937         (vect_load_lanes_supported): Likewise.
20938         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20939         vect_store_lanes_supported and vect_load_lanes_supported.
20940         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20941         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20942         parameter.  Don't allow gaps for masked accesses.
20943         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20944         and vect_load_lanes_supported.
20945         (get_load_store_type): Take a masked_p parameter and update
20946         call to get_group_load_store_type.
20947         (vectorizable_store): Update call to get_load_store_type.
20948         Handle IFN_MASK_STORE_LANES.
20949         (vectorizable_load): Update call to get_load_store_type.
20950         Handle IFN_MASK_LOAD_LANES.
20952 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20953             Alan Hayward  <alan.hayward@arm.com>
20954             David Sherwood  <david.sherwood@arm.com>
20956         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20957         modes for SVE.
20958         * config/aarch64/aarch64-protos.h
20959         (aarch64_sve_struct_memory_operand_p): Declare.
20960         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20961         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20962         (VPRED, vpred): Handle SVE structure modes.
20963         * config/aarch64/constraints.md (Utx): New constraint.
20964         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20965         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20966         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20967         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20968         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20969         structure modes.  Split into pieces after RA.
20970         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20971         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20972         New patterns.
20973         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20974         SVE structure modes.
20975         (aarch64_classify_address): Likewise.
20976         (sizetochar): Move earlier in file.
20977         (aarch64_print_operand): Handle SVE register lists.
20978         (aarch64_array_mode): New function.
20979         (aarch64_sve_struct_memory_operand_p): Likewise.
20980         (TARGET_ARRAY_MODE): Redefine.
20982 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20983             Alan Hayward  <alan.hayward@arm.com>
20984             David Sherwood  <david.sherwood@arm.com>
20986         * target.def (array_mode): New target hook.
20987         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20988         * doc/tm.texi: Regenerate.
20989         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20990         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20991         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20992         targetm.array_mode.
20993         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20994         type sizes.
20996 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20997             Alan Hayward  <alan.hayward@arm.com>
20998             David Sherwood  <david.sherwood@arm.com>
21000         * fold-const.c (fold_binary_loc): Check the argument types
21001         rather than the result type when testing for a vector operation.
21003 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21005         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21006         * doc/tm.texi: Regenerate.
21008 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21009             Alan Hayward  <alan.hayward@arm.com>
21010             David Sherwood  <david.sherwood@arm.com>
21012         * doc/invoke.texi (-msve-vector-bits=): Document new option.
21013         (sve): Document new AArch64 extension.
21014         * doc/md.texi (w): Extend the description of the AArch64
21015         constraint to include SVE vectors.
21016         (Upl, Upa): Document new AArch64 predicate constraints.
21017         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21018         enum.
21019         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21020         (msve-vector-bits=): New option.
21021         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21022         SVE when these are disabled.
21023         (sve): New extension.
21024         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21025         modes.  Adjust their number of units based on aarch64_sve_vg.
21026         (MAX_BITSIZE_MODE_ANY_MODE): Define.
21027         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21028         aarch64_addr_query_type.
21029         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21030         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21031         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21032         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21033         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21034         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21035         (aarch64_simd_imm_zero_p): Delete.
21036         (aarch64_check_zero_based_sve_index_immediate): Declare.
21037         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21038         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21039         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21040         (aarch64_sve_float_mul_immediate_p): Likewise.
21041         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21042         rather than an rtx.
21043         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21044         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21045         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21046         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21047         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21048         (aarch64_regmode_natural_size): Likewise.
21049         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21050         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21051         left one place.
21052         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21053         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21054         for VG and the SVE predicate registers.
21055         (V_ALIASES): Add a "z"-prefixed alias.
21056         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21057         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21058         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21059         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21060         (REG_CLASS_NAMES): Add entries for them.
21061         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
21062         and the predicate registers.
21063         (aarch64_sve_vg): Declare.
21064         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21065         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21066         (REGMODE_NATURAL_SIZE): Define.
21067         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21068         SVE macros.
21069         * config/aarch64/aarch64.c: Include cfgrtl.h.
21070         (simd_immediate_info): Add a constructor for series vectors,
21071         and an associated step field.
21072         (aarch64_sve_vg): New variable.
21073         (aarch64_dbx_register_number): Handle VG and the predicate registers.
21074         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21075         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21076         (VEC_ANY_DATA, VEC_STRUCT): New constants.
21077         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21078         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21079         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21080         (aarch64_get_mask_mode): New functions.
21081         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21082         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21083         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
21084         predicate modes and predicate registers.  Explicitly restrict
21085         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
21086         to store a vector mode if it is recognized by
21087         aarch64_classify_vector_mode.
21088         (aarch64_regmode_natural_size): New function.
21089         (aarch64_hard_regno_caller_save_mode): Return the original mode
21090         for predicates.
21091         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21092         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21093         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21094         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21095         functions.
21096         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
21097         does not overlap dest if the function is frame-related.  Handle
21098         SVE constants.
21099         (aarch64_split_add_offset): New function.
21100         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21101         them aarch64_add_offset.
21102         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21103         and update call to aarch64_sub_sp.
21104         (aarch64_add_cfa_expression): New function.
21105         (aarch64_expand_prologue): Pass extra temporary registers to the
21106         functions above.  Handle the case in which we need to emit new
21107         DW_CFA_expressions for registers that were originally saved
21108         relative to the stack pointer, but now have to be expressed
21109         relative to the frame pointer.
21110         (aarch64_output_mi_thunk): Pass extra temporary registers to the
21111         functions above.
21112         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
21113         IP0 and IP1 values for SVE frames.
21114         (aarch64_expand_vec_series): New function.
21115         (aarch64_expand_sve_widened_duplicate): Likewise.
21116         (aarch64_expand_sve_const_vector): Likewise.
21117         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21118         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
21119         into the register, rather than emitting a SET directly.
21120         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21121         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21122         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21123         (offset_9bit_signed_scaled_p): New functions.
21124         (aarch64_replicate_bitmask_imm): New function.
21125         (aarch64_bitmask_imm): Use it.
21126         (aarch64_cannot_force_const_mem): Reject expressions involving
21127         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
21128         (aarch64_classify_index): Handle SVE indices, by requiring
21129         a plain register index with a scale that matches the element size.
21130         (aarch64_classify_address): Handle SVE addresses.  Assert that
21131         the mode of the address is VOIDmode or an integer mode.
21132         Update call to aarch64_classify_symbol.
21133         (aarch64_classify_symbolic_expression): Update call to
21134         aarch64_classify_symbol.
21135         (aarch64_const_vec_all_in_range_p): New function.
21136         (aarch64_print_vector_float_operand): Likewise.
21137         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
21138         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
21139         and the FP immediates 1.0 and 0.5.
21140         (aarch64_print_address_internal): Handle SVE addresses.
21141         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21142         (aarch64_regno_regclass): Handle predicate registers.
21143         (aarch64_secondary_reload): Handle big-endian reloads of SVE
21144         data modes.
21145         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21146         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21147         (aarch64_convert_sve_vector_bits): New function.
21148         (aarch64_override_options): Use it to handle -msve-vector-bits=.
21149         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21150         rather than an rtx.
21151         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21152         Handle SVE vector and predicate modes.  Accept VL-based constants
21153         that need only one temporary register, and VL offsets that require
21154         no temporary registers.
21155         (aarch64_conditional_register_usage): Mark the predicate registers
21156         as fixed if SVE isn't available.
21157         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21158         Return true for SVE vector and predicate modes.
21159         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21160         rather than an unsigned int.  Handle SVE modes.
21161         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
21162         SVE modes.
21163         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21164         if SVE is enabled.
21165         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21166         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21167         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21168         (aarch64_sve_float_mul_immediate_p): New functions.
21169         (aarch64_sve_valid_immediate): New function.
21170         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21171         Explicitly reject structure modes.  Check for INDEX constants.
21172         Handle PTRUE and PFALSE constants.
21173         (aarch64_check_zero_based_sve_index_immediate): New function.
21174         (aarch64_simd_imm_zero_p): Delete.
21175         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21176         vector modes.  Accept constants in the range of CNT[BHWD].
21177         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21178         ask for an Advanced SIMD mode.
21179         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21180         (aarch64_simd_vector_alignment): Handle SVE predicates.
21181         (aarch64_vectorize_preferred_vector_alignment): New function.
21182         (aarch64_simd_vector_alignment_reachable): Use it instead of
21183         the vector size.
21184         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21185         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21186         functions.
21187         (MAX_VECT_LEN): Delete.
21188         (expand_vec_perm_d): Add a vec_flags field.
21189         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21190         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21191         (aarch64_evpc_ext): Don't apply a big-endian lane correction
21192         for SVE modes.
21193         (aarch64_evpc_rev): Rename to...
21194         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
21195         (aarch64_evpc_rev_global): New function.
21196         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21197         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21198         MAX_VECT_LEN.
21199         (aarch64_evpc_sve_tbl): New function.
21200         (aarch64_expand_vec_perm_const_1): Update after rename of
21201         aarch64_evpc_rev.  Handle SVE permutes too, trying
21202         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21203         than aarch64_evpc_tbl.
21204         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21205         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21206         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21207         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21208         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21209         (aarch64_expand_sve_vcond): New functions.
21210         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21211         of aarch64_vector_mode_p.
21212         (aarch64_dwarf_poly_indeterminate_value): New function.
21213         (aarch64_compute_pressure_classes): Likewise.
21214         (aarch64_can_change_mode_class): Likewise.
21215         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21216         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21217         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21218         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21219         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21220         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21221         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21222         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21223         constraints.
21224         (Dn, Dl, Dr): Accept const as well as const_vector.
21225         (Dz): Likewise.  Compare against CONST0_RTX.
21226         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21227         of "vector" where appropriate.
21228         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21229         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21230         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21231         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21232         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21233         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21234         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21235         (v_int_equiv): Extend to SVE modes.
21236         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21237         mode attributes.
21238         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21239         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21240         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21241         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21242         (SVE_COND_FP_CMP): New int iterators.
21243         (perm_hilo): Handle the new unpack unspecs.
21244         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21245         attributes.
21246         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21247         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21248         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21249         (aarch64_equality_operator, aarch64_constant_vector_operand)
21250         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21251         (aarch64_sve_nonimmediate_operand): Likewise.
21252         (aarch64_sve_general_operand): Likewise.
21253         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21254         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21255         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21256         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21257         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21258         (aarch64_sve_float_arith_immediate): Likewise.
21259         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21260         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21261         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21262         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21263         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21264         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21265         (aarch64_sve_float_arith_operand): Likewise.
21266         (aarch64_sve_float_arith_with_sub_operand): Likewise.
21267         (aarch64_sve_float_mul_operand): Likewise.
21268         (aarch64_sve_vec_perm_operand): Likewise.
21269         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21270         (aarch64_mov_operand): Accept const_poly_int and const_vector.
21271         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21272         as well as const_vector.
21273         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21274         in file.  Use CONST0_RTX and CONSTM1_RTX.
21275         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
21276         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21277         Use aarch64_simd_imm_zero.
21278         * config/aarch64/aarch64-sve.md: New file.
21279         * config/aarch64/aarch64.md: Include it.
21280         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21281         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21282         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21283         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21284         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21285         (sve): New attribute.
21286         (enabled): Disable instructions with the sve attribute unless
21287         TARGET_SVE.
21288         (movqi, movhi): Pass CONST_POLY_INT operaneds through
21289         aarch64_expand_mov_immediate.
21290         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21291         CNT[BHSD] immediates.
21292         (movti): Split CONST_POLY_INT moves into two halves.
21293         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21294         Split additions that need a temporary here if the destination
21295         is the stack pointer.
21296         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21297         (*add<mode>3_poly_1): New instruction.
21298         (set_clobber_cc): New expander.
21300 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21302         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21303         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
21304         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21305         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21306         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
21307         Change innermode from fixed_mode_size to machine_mode.
21308         (simplify_subreg): Update call accordingly.  Handle a constant-sized
21309         subreg of a variable-length CONST_VECTOR.
21311 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21312             Alan Hayward  <alan.hayward@arm.com>
21313             David Sherwood  <david.sherwood@arm.com>
21315         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21316         (add_offset_to_base): New function, split out from...
21317         (create_mem_ref): ...here.  When handling a scale other than 1,
21318         check first whether the address is valid without the offset.
21319         Add it into the base if so, leaving the index and scale as-is.
21321 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21323         PR c++/83778
21324         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21325         fold_for_warn before checking if arg2 is INTEGER_CST.
21327 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
21329         * config/rs6000/predicates.md (load_multiple_operation): Delete.
21330         (store_multiple_operation): Delete.
21331         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21332         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21333         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21334         guarded by TARGET_STRING.
21335         (rs6000_output_load_multiple): Delete.
21336         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21337         OPTION_MASK_STRING / TARGET_STRING handling.
21338         (print_operand) <'N', 'O'>: Add comment that these are unused now.
21339         (const rs6000_opt_masks) <"string">: Change mask to 0.
21340         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21341         (MASK_STRING): Delete.
21342         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21343         parts.  Simplify.
21344         (load_multiple): Delete.
21345         (*ldmsi8): Delete.
21346         (*ldmsi7): Delete.
21347         (*ldmsi6): Delete.
21348         (*ldmsi5): Delete.
21349         (*ldmsi4): Delete.
21350         (*ldmsi3): Delete.
21351         (store_multiple): Delete.
21352         (*stmsi8): Delete.
21353         (*stmsi7): Delete.
21354         (*stmsi6): Delete.
21355         (*stmsi5): Delete.
21356         (*stmsi4): Delete.
21357         (*stmsi3): Delete.
21358         (movmemsi_8reg): Delete.
21359         (corresponding unnamed define_insn): Delete.
21360         (movmemsi_6reg): Delete.
21361         (corresponding unnamed define_insn): Delete.
21362         (movmemsi_4reg): Delete.
21363         (corresponding unnamed define_insn): Delete.
21364         (movmemsi_2reg): Delete.
21365         (corresponding unnamed define_insn): Delete.
21366         (movmemsi_1reg): Delete.
21367         (corresponding unnamed define_insn): Delete.
21368         * config/rs6000/rs6000.opt (mno-string): New.
21369         (mstring): Replace by deprecation warning stub.
21370         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21372 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21374         * regrename.c (regrename_do_replace): If replacing the same
21375         reg multiple times, try to reuse last created gen_raw_REG.
21377         PR debug/81155
21378         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21379         main to workaround a bug in GDB.
21381 2018-01-12  Tom de Vries  <tom@codesourcery.com>
21383         PR target/83737
21384         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21386 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
21388         PR rtl-optimization/80481
21389         * ira-color.c (get_cap_member): New function.
21390         (allocnos_conflict_by_live_ranges_p): Use it.
21391         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21392         (setup_slot_coalesced_allocno_live_ranges): Ditto.
21394 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
21396         PR target/83628
21397         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21398         (*saddl_se_1): Ditto.
21399         (*ssubsi_1): Ditto.
21400         (*ssubl_se_1): Ditto.
21402 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21404         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21405         rather than wi::to_widest for DR_INITs.
21406         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21407         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21408         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21409         INTEGER_CSTs.
21410         (vect_analyze_group_access_1): Note that here.
21412 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21414         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21415         polynomial type sizes.
21417 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21419         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21420         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21421         (gimple_add_tmp_var): Likewise.
21423 2018-01-12  Martin Liska  <mliska@suse.cz>
21425         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21426         (gimple_alloc_sizes): Likewise.
21427         (dump_gimple_statistics): Use PRIu64 in printf format.
21428         * gimple.h: Change uint64_t to int.
21430 2018-01-12  Martin Liska  <mliska@suse.cz>
21432         * tree-core.h: Use uint64_t instead of int.
21433         * tree.c (tree_node_counts): Likewise.
21434         (tree_node_sizes): Likewise.
21435         (dump_tree_statistics): Use PRIu64 in printf format.
21437 2018-01-12  Martin Liska  <mliska@suse.cz>
21439         * Makefile.in: As qsort_chk is implemented in vec.c, add
21440         vec.o to linkage of gencfn-macros.
21441         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21442         passing the info to record_node_allocation_statistics.
21443         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21444         and pass the info.
21445         * ggc-common.c (struct ggc_usage): Add operator== and use
21446         it in operator< and compare function.
21447         * mem-stats.h (struct mem_usage): Likewise.
21448         * vec.c (struct vec_usage): Remove operator< and compare
21449         function. Can be simply inherited.
21451 2018-01-12  Martin Jambor  <mjambor@suse.cz>
21453         PR target/81616
21454         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21455         * tree-ssa-math-opts.c: Include domwalk.h.
21456         (convert_mult_to_fma_1): New function.
21457         (fma_transformation_info): New type.
21458         (fma_deferring_state): Likewise.
21459         (cancel_fma_deferring): New function.
21460         (result_of_phi): Likewise.
21461         (last_fma_candidate_feeds_initial_phi): Likewise.
21462         (convert_mult_to_fma): Added deferring logic, split actual
21463         transformation to convert_mult_to_fma_1.
21464         (math_opts_dom_walker): New type.
21465         (math_opts_dom_walker::after_dom_children): New method, body moved
21466         here from pass_optimize_widening_mul::execute, added deferring logic
21467         bits.
21468         (pass_optimize_widening_mul::execute): Moved most of code to
21469         math_opts_dom_walker::after_dom_children.
21470         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21471         * config/i386/i386.c (ix86_option_override_internal): Added
21472         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21474 2018-01-12  Richard Biener  <rguenther@suse.de>
21476         PR debug/83157
21477         * dwarf2out.c (gen_variable_die): Do not reset old_die for
21478         inline instance vars.
21480 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
21482         PR target/81819
21483         * config/rx/rx.c (rx_is_restricted_memory_address):
21484         Handle SUBREG case.
21486 2018-01-12  Richard Biener  <rguenther@suse.de>
21488         PR tree-optimization/80846
21489         * target.def (split_reduction): New target hook.
21490         * targhooks.c (default_split_reduction): New function.
21491         * targhooks.h (default_split_reduction): Declare.
21492         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21493         target requests first reduce vectors by combining low and high
21494         parts.
21495         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21496         (get_vectype_for_scalar_type_and_size): Export.
21497         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21498         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21499         * doc/tm.texi: Regenerate.
21500         * config/i386/i386.c (ix86_split_reduction): Implement
21501         TARGET_VECTORIZE_SPLIT_REDUCTION.
21503 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21505         PR target/83368
21506         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21507         in PIC mode except for TARGET_VXWORKS_RTP.
21508         * config/sparc/sparc.c: Include cfgrtl.h.
21509         (TARGET_INIT_PIC_REG): Define.
21510         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21511         (sparc_pic_register_p): New predicate.
21512         (sparc_legitimate_address_p): Use it.
21513         (sparc_legitimize_pic_address): Likewise.
21514         (sparc_delegitimize_address): Likewise.
21515         (sparc_mode_dependent_address_p): Likewise.
21516         (gen_load_pcrel_sym): Remove 4th parameter.
21517         (load_got_register): Adjust call to above.  Remove obsolete stuff.
21518         (sparc_expand_prologue): Do not call load_got_register here.
21519         (sparc_flat_expand_prologue): Likewise.
21520         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21521         (sparc_use_pseudo_pic_reg): New function.
21522         (sparc_init_pic_reg): Likewise.
21523         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21524         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21526 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
21528         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21529         Add item for branch_cost.
21531 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21533         PR rtl-optimization/83565
21534         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21535         not extend the result to a larger mode for rotate operations.
21536         (num_sign_bit_copies1): Likewise.
21538 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21540         PR target/40411
21541         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21542         -symbolic.
21543         Use values-Xc.o for -pedantic.
21544         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21546 2018-01-12  Martin Liska  <mliska@suse.cz>
21548         PR ipa/83054
21549         * ipa-devirt.c (final_warning_record::grow_type_warnings):
21550         New function.
21551         (possible_polymorphic_call_targets): Use it.
21552         (ipa_devirt): Likewise.
21554 2018-01-12  Martin Liska  <mliska@suse.cz>
21556         * profile-count.h (enum profile_quality): Use 0 as invalid
21557         enum value of profile_quality.
21559 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
21561         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21562         -mext-string options.
21564 2018-01-12  Richard Biener  <rguenther@suse.de>
21566         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21567         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21568         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21569         Likewise.
21570         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21572 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
21574         * configure.ac (--with-long-double-format): Add support for the
21575         configuration option to change the default long double format on
21576         PowerPC systems.
21577         * config.gcc (powerpc*-linux*-*): Likewise.
21578         * configure: Regenerate.
21579         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21580         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21581         used without modification.
21583 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21585         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21586         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21587         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21588         MISC_BUILTIN_SPEC_BARRIER.
21589         (rs6000_init_builtins): Likewise.
21590         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21591         enum value.
21592         (speculation_barrier): New define_insn.
21593         * doc/extend.texi: Document __builtin_speculation_barrier.
21595 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
21597         PR target/83203
21598         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21599         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21600         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21601         iterators.
21602         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
21603         integral modes instead of "ss" and "sd".
21604         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21605         vectors with 32-bit and 64-bit elements.
21606         (vecdupssescalarmodesuffix): New mode attribute.
21607         (vec_dup<mode>): Use it.
21609 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
21611         PR target/83330
21612         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21613         frame if argument is passed on stack.
21615 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
21617         PR target/82682
21618         * ree.c (combine_reaching_defs): Optimize also
21619         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21620         reg2=any_extend(exp); reg1=reg2;, formatting fix.
21622 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
21624         PR middle-end/83189
21625         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21627 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
21629         PR middle-end/83718
21630         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21631         after they are computed.
21633 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
21635         PR tree-optimization/83695
21636         * gimple-loop-linterchange.cc
21637         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21638         reset cached scev information after interchange.
21639         (pass_linterchange::execute): Remove call to scev_reset_htab.
21641 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21643         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21644         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21645         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21646         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21647         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21648         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21649         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21650         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21651         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21652         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21653         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21654         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21655         (V_lane_reg): Likewise.
21656         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21657         New define_expand.
21658         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21659         (vfmal_lane_low<mode>_intrinsic,
21660         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21661         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21662         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21663         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21664         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21665         vfmsl_lane_high<mode>_intrinsic): New define_insns.
21667 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21669         * config/arm/arm-cpus.in (fp16fml): New feature.
21670         (ALL_SIMD): Add fp16fml.
21671         (armv8.2-a): Add fp16fml as an option.
21672         (armv8.3-a): Likewise.
21673         (armv8.4-a): Add fp16fml as part of fp16.
21674         * config/arm/arm.h (TARGET_FP16FML): Define.
21675         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21676         when appropriate.
21677         * config/arm/arm-modes.def (V2HF): Define.
21678         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21679         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21680         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21681         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21682         vfmsl_low, vfmsl_high): New set of builtins.
21683         * config/arm/iterators.md (PLUSMINUS): New code iterator.
21684         (vfml_op): New code attribute.
21685         (VFMLHALVES): New int iterator.
21686         (VFML, VFMLSEL): New mode attributes.
21687         (V_reg): Define mapping for V2HF.
21688         (V_hi, V_lo): New mode attributes.
21689         (VF_constraint): Likewise.
21690         (vfml_half, vfml_half_selector): New int attributes.
21691         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21692         define_expand.
21693         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21694         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21695         New define_insn.
21696         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21697         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21698         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21699         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
21700         documentation.
21701         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21702         Document new effective target and option set.
21704 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21706         * config/arm/arm-cpus.in (armv8_4): New feature.
21707         (ARMv8_4a): New fgroup.
21708         (armv8.4-a): New arch.
21709         * config/arm/arm-tables.opt: Regenerate.
21710         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21711         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21712         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21713         Add matching rules for -march=armv8.4-a and extensions.
21714         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21716 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
21718         PR target/81821
21719         * config/rx/rx.md (BW): New mode attribute.
21720         (sync_lock_test_and_setsi): Add mode suffix to insn output.
21722 2018-01-11  Richard Biener  <rguenther@suse.de>
21724         PR tree-optimization/83435
21725         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21726         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21727         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21729 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21730             Alan Hayward  <alan.hayward@arm.com>
21731             David Sherwood  <david.sherwood@arm.com>
21733         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21734         field.
21735         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
21736         (aarch64_print_address_internal): Use it to check for a zero offset.
21738 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21739             Alan Hayward  <alan.hayward@arm.com>
21740             David Sherwood  <david.sherwood@arm.com>
21742         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21743         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21744         Return a poly_int64 rather than a HOST_WIDE_INT.
21745         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21746         rather than a HOST_WIDE_INT.
21747         * config/aarch64/aarch64.h (aarch64_frame): Protect with
21748         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
21749         hard_fp_offset, frame_size, initial_adjust, callee_offset and
21750         final_offset from HOST_WIDE_INT to poly_int64.
21751         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21752         to_constant when getting the number of units in an Advanced SIMD
21753         mode.
21754         (aarch64_builtin_vectorized_function): Check for a constant number
21755         of units.
21756         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21757         GET_MODE_SIZE.
21758         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21759         attribute instead of GET_MODE_NUNITS.
21760         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21761         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21762         GET_MODE_SIZE for fixed-size registers.
21763         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21764         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21765         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21766         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21767         (aarch64_print_operand, aarch64_print_address_internal)
21768         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21769         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21770         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21771         Handle polynomial GET_MODE_SIZE.
21772         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
21773         wider than SImode without modification.
21774         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21775         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21776         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21777         passing and returning SVE modes.
21778         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21779         rather than GEN_INT.
21780         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21781         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21782         (aarch64_allocate_and_probe_stack_space): Likewise.
21783         (aarch64_layout_frame): Cope with polynomial offsets.
21784         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21785         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
21786         polynomial offsets.
21787         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21788         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21789         poly_int64 rather than a HOST_WIDE_INT.
21790         (aarch64_get_separate_components, aarch64_process_components)
21791         (aarch64_expand_prologue, aarch64_expand_epilogue)
21792         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21793         (aarch64_anchor_offset): New function, split out from...
21794         (aarch64_legitimize_address): ...here.
21795         (aarch64_builtin_vectorization_cost): Handle polynomial
21796         TYPE_VECTOR_SUBPARTS.
21797         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21798         GET_MODE_NUNITS.
21799         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21800         number of elements from the PARALLEL rather than the mode.
21801         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21802         rather than GET_MODE_BITSIZE.
21803         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21804         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21805         (aarch64_expand_vec_perm_const_1): Handle polynomial
21806         d->perm.length () and d->perm elements.
21807         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
21808         Apply to_constant to d->perm elements.
21809         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21810         polynomial CONST_VECTOR_NUNITS.
21811         (aarch64_move_pointer): Take amount as a poly_int64 rather
21812         than an int.
21813         (aarch64_progress_pointer): Avoid temporary variable.
21814         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21815         the mode attribute instead of GET_MODE.
21817 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21818             Alan Hayward  <alan.hayward@arm.com>
21819             David Sherwood  <david.sherwood@arm.com>
21821         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21822         x exists before using it.
21823         (aarch64_add_constant_internal): Rename to...
21824         (aarch64_add_offset_1): ...this.  Replace regnum with separate
21825         src and dest rtxes.  Handle the case in which they're different,
21826         including when the offset is zero.  Replace scratchreg with an rtx.
21827         Use 2 additions if there is no spare register into which we can
21828         move a 16-bit constant.
21829         (aarch64_add_constant): Delete.
21830         (aarch64_add_offset): Replace reg with separate src and dest
21831         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
21832         Use aarch64_add_offset_1.
21833         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21834         an rtx rather than an int.  Take the delta as a poly_int64
21835         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
21836         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21837         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21838         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21839         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21840         and aarch64_add_sp.
21841         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21842         aarch64_add_constant.
21844 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21846         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21847         Use scalar_float_mode.
21849 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21851         * config/aarch64/aarch64-simd.md
21852         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21853         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21854         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21855         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21856         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21857         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21858         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21859         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21860         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21861         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21863 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21865         PR target/83514
21866         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21867         targ_options->x_arm_arch_string is non NULL.
21869 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21871         * config/aarch64/aarch64.h
21872         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21874 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21876         PR target/82096
21877         * expmed.c (emit_store_flag_force): Swap if const op0
21878         and change VOIDmode to mode of op0.
21880 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21882         PR rtl-optimization/83761
21883         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21884         than bytes to mode_for_size.
21886 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21888         PR middle-end/83189
21889         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21890         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21891         profile.
21893 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21895         PR middle-end/83575
21896         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21897         when in layout mode.
21898         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21899         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21900         partition fixup.
21902 2018-01-10  Michael Collison  <michael.collison@arm.com>
21904         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21905         * config/aarch64/aarch64-option-extension.def: Add
21906         AARCH64_OPT_EXTENSION of 'fp16fml'.
21907         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21908         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21909         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21910         * config/aarch64/constraints.md (Ui7): New constraint.
21911         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21912         (VFMLA_SEL_W): Ditto.
21913         (f16quad): Ditto.
21914         (f16mac1): Ditto.
21915         (VFMLA16_LOW): New int iterator.
21916         (VFMLA16_HIGH): Ditto.
21917         (UNSPEC_FMLAL): New unspec.
21918         (UNSPEC_FMLSL): Ditto.
21919         (UNSPEC_FMLAL2): Ditto.
21920         (UNSPEC_FMLSL2): Ditto.
21921         (f16mac): New code attribute.
21922         * config/aarch64/aarch64-simd-builtins.def
21923         (aarch64_fmlal_lowv2sf): Ditto.
21924         (aarch64_fmlsl_lowv2sf): Ditto.
21925         (aarch64_fmlalq_lowv4sf): Ditto.
21926         (aarch64_fmlslq_lowv4sf): Ditto.
21927         (aarch64_fmlal_highv2sf): Ditto.
21928         (aarch64_fmlsl_highv2sf): Ditto.
21929         (aarch64_fmlalq_highv4sf): Ditto.
21930         (aarch64_fmlslq_highv4sf): Ditto.
21931         (aarch64_fmlal_lane_lowv2sf): Ditto.
21932         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21933         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21934         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21935         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21936         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21937         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21938         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21939         (aarch64_fmlal_lane_highv2sf): Ditto.
21940         (aarch64_fmlsl_lane_highv2sf): Ditto.
21941         (aarch64_fmlal_laneq_highv2sf): Ditto.
21942         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21943         (aarch64_fmlalq_lane_highv4sf): Ditto.
21944         (aarch64_fmlsl_lane_highv4sf): Ditto.
21945         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21946         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21947         * config/aarch64/aarch64-simd.md:
21948         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21949         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21950         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21951         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21952         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21953         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21954         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21955         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21956         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21957         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21958         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21959         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21960         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21961         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21962         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21963         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21964         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21965         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21966         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21967         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21968         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21969         (vfmlsl_low_u32): Ditto.
21970         (vfmlalq_low_u32): Ditto.
21971         (vfmlslq_low_u32): Ditto.
21972         (vfmlal_high_u32): Ditto.
21973         (vfmlsl_high_u32): Ditto.
21974         (vfmlalq_high_u32): Ditto.
21975         (vfmlslq_high_u32): Ditto.
21976         (vfmlal_lane_low_u32): Ditto.
21977         (vfmlsl_lane_low_u32): Ditto.
21978         (vfmlal_laneq_low_u32): Ditto.
21979         (vfmlsl_laneq_low_u32): Ditto.
21980         (vfmlalq_lane_low_u32): Ditto.
21981         (vfmlslq_lane_low_u32): Ditto.
21982         (vfmlalq_laneq_low_u32): Ditto.
21983         (vfmlslq_laneq_low_u32): Ditto.
21984         (vfmlal_lane_high_u32): Ditto.
21985         (vfmlsl_lane_high_u32): Ditto.
21986         (vfmlal_laneq_high_u32): Ditto.
21987         (vfmlsl_laneq_high_u32): Ditto.
21988         (vfmlalq_lane_high_u32): Ditto.
21989         (vfmlslq_lane_high_u32): Ditto.
21990         (vfmlalq_laneq_high_u32): Ditto.
21991         (vfmlslq_laneq_high_u32): Ditto.
21992         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21993         (AARCH64_FL_FOR_ARCH8_4): New.
21994         (AARCH64_ISA_F16FML): New ISA flag.
21995         (TARGET_F16FML): New feature flag for fp16fml.
21996         (doc/invoke.texi): Document new fp16fml option.
21998 2018-01-10  Michael Collison  <michael.collison@arm.com>
22000         * config/aarch64/aarch64-builtins.c:
22001         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22002         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22003         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22004         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22005         (AARCH64_ISA_SHA3): New ISA flag.
22006         (TARGET_SHA3): New feature flag for sha3.
22007         * config/aarch64/iterators.md (sha512_op): New int attribute.
22008         (CRYPTO_SHA512): New int iterator.
22009         (UNSPEC_SHA512H): New unspec.
22010         (UNSPEC_SHA512H2): Ditto.
22011         (UNSPEC_SHA512SU0): Ditto.
22012         (UNSPEC_SHA512SU1): Ditto.
22013         * config/aarch64/aarch64-simd-builtins.def
22014         (aarch64_crypto_sha512hqv2di): New builtin.
22015         (aarch64_crypto_sha512h2qv2di): Ditto.
22016         (aarch64_crypto_sha512su0qv2di): Ditto.
22017         (aarch64_crypto_sha512su1qv2di): Ditto.
22018         (aarch64_eor3qv8hi): Ditto.
22019         (aarch64_rax1qv2di): Ditto.
22020         (aarch64_xarqv2di): Ditto.
22021         (aarch64_bcaxqv8hi): Ditto.
22022         * config/aarch64/aarch64-simd.md:
22023         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22024         (aarch64_crypto_sha512su0qv2di): Ditto.
22025         (aarch64_crypto_sha512su1qv2di): Ditto.
22026         (aarch64_eor3qv8hi): Ditto.
22027         (aarch64_rax1qv2di): Ditto.
22028         (aarch64_xarqv2di): Ditto.
22029         (aarch64_bcaxqv8hi): Ditto.
22030         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22031         (vsha512h2q_u64): Ditto.
22032         (vsha512su0q_u64): Ditto.
22033         (vsha512su1q_u64): Ditto.
22034         (veor3q_u16): Ditto.
22035         (vrax1q_u64): Ditto.
22036         (vxarq_u64): Ditto.
22037         (vbcaxq_u16): Ditto.
22038         * config/arm/types.md (crypto_sha512): New type attribute.
22039         (crypto_sha3): Ditto.
22040         (doc/invoke.texi): Document new sha3 option.
22042 2018-01-10  Michael Collison  <michael.collison@arm.com>
22044         * config/aarch64/aarch64-builtins.c:
22045         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22046         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22047         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22048         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22049         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22050         (AARCH64_ISA_SM4): New ISA flag.
22051         (TARGET_SM4): New feature flag for sm4.
22052         * config/aarch64/aarch64-simd-builtins.def
22053         (aarch64_sm3ss1qv4si): Ditto.
22054         (aarch64_sm3tt1aq4si): Ditto.
22055         (aarch64_sm3tt1bq4si): Ditto.
22056         (aarch64_sm3tt2aq4si): Ditto.
22057         (aarch64_sm3tt2bq4si): Ditto.
22058         (aarch64_sm3partw1qv4si): Ditto.
22059         (aarch64_sm3partw2qv4si): Ditto.
22060         (aarch64_sm4eqv4si): Ditto.
22061         (aarch64_sm4ekeyqv4si): Ditto.
22062         * config/aarch64/aarch64-simd.md:
22063         (aarch64_sm3ss1qv4si): Ditto.
22064         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22065         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22066         (aarch64_sm4eqv4si): Ditto.
22067         (aarch64_sm4ekeyqv4si): Ditto.
22068         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22069         (sm3part_op): Ditto.
22070         (CRYPTO_SM3TT): Ditto.
22071         (CRYPTO_SM3PART): Ditto.
22072         (UNSPEC_SM3SS1): New unspec.
22073         (UNSPEC_SM3TT1A): Ditto.
22074         (UNSPEC_SM3TT1B): Ditto.
22075         (UNSPEC_SM3TT2A): Ditto.
22076         (UNSPEC_SM3TT2B): Ditto.
22077         (UNSPEC_SM3PARTW1): Ditto.
22078         (UNSPEC_SM3PARTW2): Ditto.
22079         (UNSPEC_SM4E): Ditto.
22080         (UNSPEC_SM4EKEY): Ditto.
22081         * config/aarch64/constraints.md (Ui2): New constraint.
22082         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22083         * config/arm/types.md (crypto_sm3): New type attribute.
22084         (crypto_sm4): Ditto.
22085         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22086         (vsm3tt1aq_u32): Ditto.
22087         (vsm3tt1bq_u32): Ditto.
22088         (vsm3tt2aq_u32): Ditto.
22089         (vsm3tt2bq_u32): Ditto.
22090         (vsm3partw1q_u32): Ditto.
22091         (vsm3partw2q_u32): Ditto.
22092         (vsm4eq_u32): Ditto.
22093         (vsm4ekeyq_u32): Ditto.
22094         (doc/invoke.texi): Document new sm4 option.
22096 2018-01-10  Michael Collison  <michael.collison@arm.com>
22098         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22099         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22100         (AARCH64_FL_FOR_ARCH8_4): New.
22101         (AARCH64_FL_V8_4): New flag.
22102         (doc/invoke.texi): Document new armv8.4-a option.
22104 2018-01-10  Michael Collison  <michael.collison@arm.com>
22106         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22107         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22108         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22109         * config/aarch64/aarch64-option-extension.def: Add
22110         AARCH64_OPT_EXTENSION of 'sha2'.
22111         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22112         (crypto): Disable sha2 and aes if crypto disabled.
22113         (crypto): Enable aes and sha2 if enabled.
22114         (simd): Disable sha2 and aes if simd disabled.
22115         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22116         New flags.
22117         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22118         (TARGET_SHA2): New feature flag for sha2.
22119         (TARGET_AES): New feature flag for aes.
22120         * config/aarch64/aarch64-simd.md:
22121         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22122         conditional on TARGET_AES.
22123         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22124         (aarch64_crypto_sha1hsi): Make pattern conditional
22125         on TARGET_SHA2.
22126         (aarch64_crypto_sha1hv4si): Ditto.
22127         (aarch64_be_crypto_sha1hv4si): Ditto.
22128         (aarch64_crypto_sha1su1v4si): Ditto.
22129         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22130         (aarch64_crypto_sha1su0v4si): Ditto.
22131         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22132         (aarch64_crypto_sha256su0v4si): Ditto.
22133         (aarch64_crypto_sha256su1v4si): Ditto.
22134         (doc/invoke.texi): Document new aes and sha2 options.
22136 2018-01-10  Martin Sebor  <msebor@redhat.com>
22138         PR tree-optimization/83781
22139         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22140         as string arrays.
22142 2018-01-11  Martin Sebor  <msebor@gmail.com>
22143             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22145         PR tree-optimization/83501
22146         PR tree-optimization/81703
22148         * tree-ssa-strlen.c (get_string_cst): Rename...
22149         (get_string_len): ...to this.  Handle global constants.
22150         (handle_char_store): Adjust.
22152 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
22153             Jim Wilson  <jimw@sifive.com>
22155         * config/riscv/riscv-protos.h (riscv_output_return): New.
22156         * config/riscv/riscv.c (struct machine_function): New naked_p field.
22157         (riscv_attribute_table, riscv_output_return),
22158         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22159         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22160         (riscv_compute_frame_info): Only compute frame->mask if not a naked
22161         function.
22162         (riscv_expand_prologue): Add early return for naked function.
22163         (riscv_expand_epilogue): Likewise.
22164         (riscv_function_ok_for_sibcall): Return false for naked function.
22165         (riscv_set_current_function): New.
22166         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22167         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22168         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22169         * doc/extend.texi (RISC-V Function Attributes): New.
22171 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22173         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22174         check for 128-bit long double before checking TCmode.
22175         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22176         128-bit long doubles before checking TFmode or TCmode.
22177         (FLOAT128_IBM_P): Likewise.
22179 2018-01-10  Martin Sebor  <msebor@redhat.com>
22181         PR tree-optimization/83671
22182         * builtins.c (c_strlen): Unconditionally return zero for the empty
22183         string.
22184         Use -Warray-bounds for warnings.
22185         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22186         for non-constant array indices with COMPONENT_REF, arrays of
22187         arrays, and pointers to arrays.
22188         (gimple_fold_builtin_strlen): Determine and set length range for
22189         non-constant character arrays.
22191 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
22193         PR middle-end/81897
22194         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22195         empty blocks.
22197 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
22199         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22201 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22203         PR target/83399
22204         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22205         VECTOR_MEM_ALTIVEC_OR_VSX_P.
22206         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22207         indexed_or_indirect_operand predicate.
22208         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22209         (*vsx_le_perm_load_v8hi): Likewise.
22210         (*vsx_le_perm_load_v16qi): Likewise.
22211         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22212         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22213         (*vsx_le_perm_store_v8hi): Likewise.
22214         (*vsx_le_perm_store_v16qi): Likewise.
22215         (eight unnamed splitters): Likewise.
22217 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22219         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22220         * config/rs6000/emmintrin.h: Likewise.
22221         * config/rs6000/mmintrin.h: Likewise.
22222         * config/rs6000/xmmintrin.h: Likewise.
22224 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
22226         PR c++/43486
22227         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22228         "public_flag".
22229         * tree.c (tree_nop_conversion): Return true for location wrapper
22230         nodes.
22231         (maybe_wrap_with_location): New function.
22232         (selftest::check_strip_nops): New function.
22233         (selftest::test_location_wrappers): New function.
22234         (selftest::tree_c_tests): Call it.
22235         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22236         (maybe_wrap_with_location): New decl.
22237         (EXPR_LOCATION_WRAPPER_P): New macro.
22238         (location_wrapper_p): New inline function.
22239         (tree_strip_any_location_wrapper): New inline function.
22241 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
22243         PR target/83735
22244         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22245         stack_realign_offset for the largest alignment of stack slot
22246         actually used.
22247         (ix86_find_max_used_stack_alignment): New function.
22248         (ix86_finalize_stack_frame_flags): Use it.  Set
22249         max_used_stack_alignment if we don't realign stack.
22250         * config/i386/i386.h (machine_function): Add
22251         max_used_stack_alignment.
22253 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
22255         * config/arm/arm.opt (-mbranch-cost): New option.
22256         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22257         account.
22259 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
22261         PR target/83629
22262         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22263         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22265 2018-01-10  Richard Biener  <rguenther@suse.de>
22267         PR debug/83765
22268         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22269         early out so it also covers the case where we have a non-NULL
22270         origin.
22272 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22274         PR tree-optimization/83753
22275         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22276         for non-strided grouped accesses if the number of elements is 1.
22278 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22280         PR target/81616
22281         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22282         * i386.h (TARGET_USE_GATHER): Define.
22283         * x86-tune.def (X86_TUNE_USE_GATHER): New.
22285 2018-01-10  Martin Liska  <mliska@suse.cz>
22287         PR bootstrap/82831
22288         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22289         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22290         partitioning.
22291         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22292         CLEANUP_NO_PARTITIONING is not set.
22294 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22296         * doc/rtl.texi: Remove documentation of (const ...) wrappers
22297         for vectors, as a partial revert of r254296.
22298         * rtl.h (const_vec_p): Delete.
22299         (const_vec_duplicate_p): Don't test for vector CONSTs.
22300         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22301         * expmed.c (make_tree): Likewise.
22303         Revert:
22304         * common.md (E, F): Use CONSTANT_P instead of checking for
22305         CONST_VECTOR.
22306         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22307         checking for CONST_VECTOR.
22309 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22311         PR middle-end/83575
22312         * predict.c (force_edge_cold): Handle in more sane way edges
22313         with no prediction.
22315 2018-01-09  Carl Love  <cel@us.ibm.com>
22317         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22318         V4SI, V4SF types.
22319         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22320         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22321         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22322         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
22323         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22324         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
22325         * config/rs6000/rs6000-protos.h: Add extern defition for
22326         rs6000_generate_float2_double_code.
22327         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22328         function.
22329         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22330         (float2_v2df): Add define_expand.
22332 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
22334         PR target/83628
22335         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22336         op_mode in the force_to_mode call.
22338 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22340         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22341         instead of checking each element individually.
22342         (aarch64_evpc_uzp): Likewise.
22343         (aarch64_evpc_zip): Likewise.
22344         (aarch64_evpc_ext): Likewise.
22345         (aarch64_evpc_rev): Likewise.
22346         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22347         instead of checking each element individually.  Return true without
22348         generating rtl if
22349         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22350         whether all selected elements come from the same input, instead of
22351         checking each element individually.  Remove calls to gen_rtx_REG,
22352         start_sequence and end_sequence and instead assert that no rtl is
22353         generated.
22355 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22357         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22358         order of HIGH and CONST checks.
22360 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22362         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22363         if the destination isn't an SSA_NAME.
22365 2018-01-09  Richard Biener  <rguenther@suse.de>
22367         PR tree-optimization/83668
22368         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22369         move prologue...
22370         (canonicalize_loop_form): ... here, renamed from ...
22371         (canonicalize_loop_closed_ssa_form): ... this and amended to
22372         swap successor edges for loop exit blocks to make us use
22373         the RPO order we need for initial schedule generation.
22375 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
22377         PR tree-optimization/64811
22378         * match.pd: When optimizing comparisons with Inf, avoid
22379         introducing or losing exceptions from comparisons with NaN.
22381 2018-01-09  Martin Liska  <mliska@suse.cz>
22383         PR sanitizer/82517
22384         * asan.c (shadow_mem_size): Add gcc_assert.
22386 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
22388         Don't save registers in main().
22390         PR target/83738
22391         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22392         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22393         * config/avr/avr.c (avr_set_current_function): Don't error if
22394         naked, OS_task or OS_main are specified at the same time.
22395         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22396         OS_main.
22397         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22398         attribute.
22399         * common/config/avr/avr-common.c (avr_option_optimization_table):
22400         Switch on -mmain-is-OS_task for optimizing compilations.
22402 2018-01-09  Richard Biener  <rguenther@suse.de>
22404         PR tree-optimization/83572
22405         * graphite.c: Include cfganal.h.
22406         (graphite_transform_loops): Connect infinite loops to exit
22407         and remove fake edges at the end.
22409 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22411         * ipa-inline.c (edge_badness): Revert accidental checkin.
22413 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22415         PR ipa/80763
22416         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22417         symbols; not inline clones.
22419 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
22421         PR target/83507
22422         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22423         hard registers.  Formatting fixes.
22425         PR preprocessor/83722
22426         * gcc.c (try_generate_repro): Pass
22427         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22428         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22429         do_report_bug.
22431 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
22432             Kito Cheng  <kito.cheng@gmail.com>
22434         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22435         (riscv_leaf_function_p): Delete.
22436         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22438 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22440         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22441         function.
22442         (do_ifelse): New function.
22443         (do_isel): New function.
22444         (do_sub3): New function.
22445         (do_add3): New function.
22446         (do_load_mask_compare): New function.
22447         (do_overlap_load_compare): New function.
22448         (expand_compare_loop): New function.
22449         (expand_block_compare): Call expand_compare_loop() when appropriate.
22450         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22451         option description.
22452         (-mblock-compare-inline-loop-limit): New option.
22454 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22456         PR target/83677
22457         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22458         Reverse order of second and third operands in first alternative.
22459         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22460         of first and second elements in UNSPEC_VPERMR vector.
22461         (altivec_expand_vec_perm_le): Likewise.
22463 2018-01-08  Jeff Law  <law@redhat.com>
22465         PR rtl-optimizatin/81308
22466         * tree-switch-conversion.c (cfg_altered): New file scoped static.
22467         (process_switch): If group_case_labels makes a change, then set
22468         cfg_altered.
22469         (pass_convert_switch::execute): If a switch is converted, then
22470         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
22472         PR rtl-optimization/81308
22473         * recog.c (split_all_insns): Conditionally cleanup the CFG after
22474         splitting insns.
22476 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
22478         PR target/83663 - Revert r255946
22479         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22480         generation for cases where splatting a value is not useful.
22481         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22482         across a vec_duplicate and a paradoxical subreg forming a vector
22483         mode to a vec_concat.
22485 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22487         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22488         -march=armv8.3-a variants.
22489         * config/arm/t-multilib: Likewise.
22490         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
22492 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22494         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22495         to generate rtl.
22496         (cceq_ior_compare_complement): Give it a name so I can use it, and
22497         change boolean_or_operator predicate to boolean_operator so it can
22498         be used to generate a crand.
22499         (eqne): New code iterator.
22500         (bd/bd_neg): New code_attrs.
22501         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22502         a single define_insn.
22503         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22504         decrement (bdnzt/bdnzf/bdzt/bdzf).
22505         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22506         with the new names of the branch decrement patterns, and added the
22507         names of the branch decrement conditional patterns.
22509 2018-01-08  Richard Biener  <rguenther@suse.de>
22511         PR tree-optimization/83563
22512         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22513         cache.
22515 2018-01-08  Richard Biener  <rguenther@suse.de>
22517         PR middle-end/83713
22518         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22520 2018-01-08  Richard Biener  <rguenther@suse.de>
22522         PR tree-optimization/83685
22523         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22524         references to abnormals.
22526 2018-01-08  Richard Biener  <rguenther@suse.de>
22528         PR lto/83719
22529         * dwarf2out.c (output_indirect_strings): Handle empty
22530         skeleton_debug_str_hash.
22531         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22533 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
22535         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22536         (emit_store_direct): Likewise.
22537         (arc_trampoline_adjust_address): Likewise.
22538         (arc_asm_trampoline_template): New function.
22539         (arc_initialize_trampoline): Use asm_trampoline_template.
22540         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22541         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22542         * config/arc/arc.md (flush_icache): Delete pattern.
22544 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
22546         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22547         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22548         munaligned-access.
22550 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22552         PR target/83681
22553         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22554         by not USED_FOR_TARGET.
22555         (make_pass_resolve_sw_modes): Likewise.
22557 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22559         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22560         USED_FOR_TARGET.
22562 2018-01-08  Richard Biener  <rguenther@suse.de>
22564         PR middle-end/83580
22565         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22567 2018-01-08  Richard Biener  <rguenther@suse.de>
22569         PR middle-end/83517
22570         * match.pd ((t * 2) / 2) -> t): Add missing :c.
22572 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
22574         PR middle-end/81897
22575         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22576         basic blocks with a small number of successors.
22577         (convert_control_dep_chain_into_preds): Improve handling of
22578         forwarder blocks.
22579         (dump_predicates): Split apart into...
22580         (dump_pred_chain): ...here...
22581         (dump_pred_info): ...and here.
22582         (can_one_predicate_be_invalidated_p): Add debugging printfs.
22583         (can_chain_union_be_invalidated_p): Improve check for invalidation
22584         of paths.
22585         (uninit_uses_cannot_happen): Avoid unnecessary if
22586         convert_control_dep_chain_into_preds yielded nothing.
22588 2018-01-06  Martin Sebor  <msebor@redhat.com>
22590         PR tree-optimization/83640
22591         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22592         subtracting negative offset from size.
22593         (builtin_access::overlap): Adjust offset bounds of the access to fall
22594         within the size of the object if possible.
22596 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
22598         PR rtl-optimization/83699
22599         * expmed.c (extract_bit_field_1): Restrict the vector usage of
22600         extract_bit_field_as_subreg to cases in which the extracted
22601         value is also a vector.
22603         * lra-constraints.c (process_alt_operands): Test for the equivalence
22604         substitutions when detecting a possible reload cycle.
22606 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
22608         PR debug/83480
22609         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22610         by default if flag_selective_schedling{,2}.  Formatting fixes.
22612         PR rtl-optimization/83682
22613         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22614         if it has non-VECTOR_MODE element mode.
22615         (vec_duplicate_p): Likewise.
22617         PR middle-end/83694
22618         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22619         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22621 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22623         PR target/83604
22624         * config/i386/i386-builtin.def
22625         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22626         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22627         Require also OPTION_MASK_ISA_AVX512F in addition to
22628         OPTION_MASK_ISA_GFNI.
22629         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22630         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22631         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22632         to OPTION_MASK_ISA_GFNI.
22633         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22634         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22635         OPTION_MASK_ISA_AVX512BW.
22636         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22637         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22638         addition to OPTION_MASK_ISA_GFNI.
22639         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22640         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22641         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22642         to OPTION_MASK_ISA_GFNI.
22643         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22644         a requirement for all ISAs rather than any of them with a few
22645         exceptions.
22646         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22647         processing.
22648         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22649         bitmasks to be enabled with 3 exceptions, instead of requiring any
22650         enabled ISA with lots of exceptions.
22651         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22652         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22653         Change avx512bw in isa attribute to avx512f.
22654         * config/i386/sgxintrin.h: Add license boilerplate.
22655         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
22656         to __AVX512F__ and __AVX512VL to __AVX512VL__.
22657         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22658         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22659         defined.
22660         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22661         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22662         temporarily sse2 rather than sse if not enabled already.
22664         PR target/83604
22665         * config/i386/sse.md (VI248_VLBW): Rename to ...
22666         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
22667         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22668         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22669         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22670         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22671         mode iterator instead of VI248_VLBW.
22673 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
22675         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22676         (record_modified): Skip clobbers; add debug output.
22677         (param_change_prob): Use sreal frequencies.
22679 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22681         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22682         punt for user-aligned variables.
22684 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22686         * tree-chrec.c (chrec_contains_symbols): Return true for
22687         POLY_INT_CST.
22689 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
22691         PR target/82439
22692         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22693         of (x|y) == x for BICS pattern.
22695 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22697         PR tree-optimization/83605
22698         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22699         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22700         can throw.
22702 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22704         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22705         * config/epiphany/rtems.h: New file.
22707 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22708             Uros Bizjak  <ubizjak@gmail.com>
22710         PR target/83554
22711         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22712         QIreg_operand instead of register_operand predicate.
22713         * config/i386/i386.c (ix86_rop_should_change_byte_p,
22714         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22715         comments instead of -fmitigate[-_]rop.
22717 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22719         PR bootstrap/81926
22720         * cgraphunit.c (symbol_table::compile): Switch to text_section
22721         before calling assembly_start debug hook.
22722         * run-rtl-passes.c (run_rtl_passes): Likewise.
22723         Include output.h.
22725 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22727         * tree-vrp.c (extract_range_from_binary_expr_1): Check
22728         range_int_cst_p rather than !symbolic_range_p before calling
22729         extract_range_from_multiplicative_op_1.
22731 2018-01-04  Jeff Law  <law@redhat.com>
22733         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22734         redundant test in assertion.
22736 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22738         * doc/rtl.texi: Document machine_mode wrapper classes.
22740 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22742         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22743         using tree_to_uhwi.
22745 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22747         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22748         the VEC_PERM_EXPR fold to fail.
22750 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22752         PR debug/83585
22753         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22754         to switched_sections.
22756 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22758         PR target/83680
22759         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22760         test for d.testing.
22762 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
22764         PR target/83387
22765         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22766         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22768 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22770         PR debug/83666
22771         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22772         is BLKmode and bitpos not zero or mode change is needed.
22774 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22776         PR target/83675
22777         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22778         TARGET_VIS2.
22780 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
22782         PR target/83628
22783         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22784         instead of MULT rtx.  Update all corresponding splitters.
22785         (*saddl_se): Ditto.
22786         (*ssub<modesuffix>): Ditto.
22787         (*ssubl_se): Ditto.
22788         (*cmp_sadd_di): Update split patterns.
22789         (*cmp_sadd_si): Ditto.
22790         (*cmp_sadd_sidi): Ditto.
22791         (*cmp_ssub_di): Ditto.
22792         (*cmp_ssub_si): Ditto.
22793         (*cmp_ssub_sidi): Ditto.
22794         * config/alpha/predicates.md (const23_operand): New predicate.
22795         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22796         Look for ASHIFT, not MULT inner operand.
22797         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22799 2018-01-04  Martin Liska  <mliska@suse.cz>
22801         PR gcov-profile/83669
22802         * gcov.c (output_intermediate_file): Add version to intermediate
22803         gcov file.
22804         * doc/gcov.texi: Document new field 'version' in intermediate
22805         file format. Fix location of '-k' option of gcov command.
22807 2018-01-04  Martin Liska  <mliska@suse.cz>
22809         PR ipa/82352
22810         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22812 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22814         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22816 2018-01-03  Martin Sebor  <msebor@redhat.com>
22818         PR tree-optimization/83655
22819         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22820         checking calls with invalid arguments.
22822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22824         * tree-vect-stmts.c (vect_get_store_rhs): New function.
22825         (vectorizable_mask_load_store): Delete.
22826         (vectorizable_call): Return false for masked loads and stores.
22827         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
22828         instead of gimple_assign_rhs1.
22829         (vectorizable_load): Handle IFN_MASK_LOAD.
22830         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22834         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22835         split out from..,
22836         (vectorizable_mask_load_store): ...here.
22837         (vectorizable_load): ...and here.
22839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22841         * tree-vect-stmts.c (vect_build_all_ones_mask)
22842         (vect_build_zero_merge_argument): New functions, split out from...
22843         (vectorizable_load): ...here.
22845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22847         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22848         split out from...
22849         (vectorizable_mask_load_store): ...here.
22850         (vectorizable_store): ...and here.
22852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22854         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22855         split out from...
22856         (vectorizable_mask_load_store): ...here.
22858 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22860         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22861         (vect_model_store_cost): Take a vec_load_store_type instead of a
22862         vect_def_type.
22863         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22864         (vect_model_store_cost): Take a vec_load_store_type instead of a
22865         vect_def_type.
22866         (vectorizable_mask_load_store): Update accordingly.
22867         (vectorizable_store): Likewise.
22868         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22872         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22873         IFN_MASK_LOAD calls here rather than...
22874         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22876 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22877             Alan Hayward  <alan.hayward@arm.com>
22878             David Sherwood  <david.sherwood@arm.com>
22880         * expmed.c (extract_bit_field_1): For vector extracts,
22881         fall back to extract_bit_field_as_subreg if vec_extract
22882         isn't available.
22884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22885             Alan Hayward  <alan.hayward@arm.com>
22886             David Sherwood  <david.sherwood@arm.com>
22888         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22889         they are variable or constant sized.
22890         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22891         slots for constant-sized data.
22893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22894             Alan Hayward  <alan.hayward@arm.com>
22895             David Sherwood  <david.sherwood@arm.com>
22897         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22898         handling COND_EXPRs with boolean comparisons, try to find a better
22899         basis for the mask type than the boolean itself.
22901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22903         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22904         is calculated and how it can be overridden.
22905         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22906         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22907         if defined.
22908         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22909         if nonzero.
22911 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22912             Alan Hayward  <alan.hayward@arm.com>
22913             David Sherwood  <david.sherwood@arm.com>
22915         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22916         Remove the mode argument.
22917         (aarch64_simd_valid_immediate): Remove the mode and inverse
22918         arguments.
22919         * config/aarch64/iterators.md (bitsize): New iterator.
22920         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22921         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22922         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22923         aarch64_simd_valid_immediate.
22924         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22925         (aarch64_reg_or_bic_imm): Likewise.
22926         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22927         with an insn_type enum and msl with a modifier_type enum.
22928         Replace element_width with a scalar_mode.  Change the shift
22929         to unsigned int.  Add constructors for scalar_float_mode and
22930         scalar_int_mode elements.
22931         (aarch64_vect_float_const_representable_p): Delete.
22932         (aarch64_can_const_movi_rtx_p)
22933         (aarch64_simd_scalar_immediate_valid_for_move)
22934         (aarch64_simd_make_constant): Update call to
22935         aarch64_simd_valid_immediate.
22936         (aarch64_advsimd_valid_immediate_hs): New function.
22937         (aarch64_advsimd_valid_immediate): Likewise.
22938         (aarch64_simd_valid_immediate): Remove mode and inverse
22939         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22940         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22941         and aarch64_float_const_representable_p on the result.
22942         (aarch64_output_simd_mov_immediate): Remove mode argument.
22943         Update call to aarch64_simd_valid_immediate and use of
22944         simd_immediate_info.
22945         (aarch64_output_scalar_simd_mov_immediate): Update call
22946         accordingly.
22948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22949             Alan Hayward  <alan.hayward@arm.com>
22950             David Sherwood  <david.sherwood@arm.com>
22952         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22953         (mode_nunits): Likewise CONST_MODE_NUNITS.
22954         * machmode.def (ADJUST_NUNITS): Document.
22955         * genmodes.c (mode_data::need_nunits_adj): New field.
22956         (blank_mode): Update accordingly.
22957         (adj_nunits): New variable.
22958         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22959         parameter.
22960         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22961         listed in adj_nunits.
22962         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22963         listed in adj_nunits.  Don't emit case statements for such modes.
22964         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22965         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22966         nothing if adj_nunits is nonnull.
22967         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22968         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22969         (emit_mode_fbit): Update use of print_maybe_const_decl.
22970         (emit_move_size): Likewise.  Treat the array as non-const
22971         if adj_nunits.
22972         (emit_mode_adjustments): Handle adj_nunits.
22974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22976         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22977         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22978         (VECTOR_MODES): Use it.
22979         (make_vector_modes): Take the prefix as an argument.
22981 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22982             Alan Hayward  <alan.hayward@arm.com>
22983             David Sherwood  <david.sherwood@arm.com>
22985         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22986         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22987         for MODE_VECTOR_BOOL.
22988         * machmode.def (VECTOR_BOOL_MODE): Document.
22989         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22990         (make_vector_bool_mode): New function.
22991         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22992         MODE_VECTOR_BOOL.
22993         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22994         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22995         Likewise.
22996         * stor-layout.c (int_mode_for_mode): Likewise.
22997         * tree.c (build_vector_type_for_mode): Likewise.
22998         * varasm.c (output_constant_pool_2): Likewise.
22999         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23000         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
23001         for MODE_VECTOR_BOOL.
23002         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23003         of mode class checks.
23004         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23005         instead of a list of mode class checks.
23006         (expand_vector_scalar_condition): Likewise.
23007         (type_for_widest_vector_mode): Handle BImode as an inner mode.
23009 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23010             Alan Hayward  <alan.hayward@arm.com>
23011             David Sherwood  <david.sherwood@arm.com>
23013         * machmode.h (mode_size): Change from unsigned short to
23014         poly_uint16_pod.
23015         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23016         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23017         or if measurement_type is not polynomial.
23018         (fixed_size_mode::includes_p): Check for constant-sized modes.
23019         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23020         return a poly_uint16 rather than an unsigned short.
23021         (emit_mode_size): Change the type of mode_size from unsigned short
23022         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
23023         (emit_mode_adjustments): Cope with polynomial vector sizes.
23024         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23025         for GET_MODE_SIZE.
23026         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23027         for GET_MODE_SIZE.
23028         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23029         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23030         * caller-save.c (setup_save_areas): Likewise.
23031         (replace_reg_with_saved_mem): Likewise.
23032         * calls.c (emit_library_call_value_1): Likewise.
23033         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23034         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23035         (gen_lowpart_for_combine): Likewise.
23036         * convert.c (convert_to_integer_1): Likewise.
23037         * cse.c (equiv_constant, cse_insn): Likewise.
23038         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23039         (cselib_subst_to_values): Likewise.
23040         * dce.c (word_dce_process_block): Likewise.
23041         * df-problems.c (df_word_lr_mark_ref): Likewise.
23042         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23043         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23044         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23045         (rtl_for_decl_location): Likewise.
23046         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23047         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23048         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23049         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23050         (expand_expr_real_1): Likewise.
23051         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23052         (pad_below): Likewise.
23053         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23054         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23055         * ira.c (get_subreg_tracking_sizes): Likewise.
23056         * ira-build.c (ira_create_allocno_objects): Likewise.
23057         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23058         (ira_sort_regnos_for_alter_reg): Likewise.
23059         * ira-costs.c (record_operand_costs): Likewise.
23060         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23061         (resolve_simple_move): Likewise.
23062         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23063         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23064         (lra_constraints): Likewise.
23065         (CONST_POOL_OK_P): Reject variable-sized modes.
23066         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23067         (add_pseudo_to_slot, lra_spill): Likewise.
23068         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23069         * optabs-query.c (get_best_extraction_insn): Likewise.
23070         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23071         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23072         (expand_mult_highpart, valid_multiword_target_p): Likewise.
23073         * recog.c (offsettable_address_addr_space_p): Likewise.
23074         * regcprop.c (maybe_mode_change): Likewise.
23075         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23076         * regrename.c (build_def_use): Likewise.
23077         * regstat.c (dump_reg_info): Likewise.
23078         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23079         (find_reloads, find_reloads_subreg_address): Likewise.
23080         * reload1.c (eliminate_regs_1): Likewise.
23081         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23082         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23083         (simplify_binary_operation_1, simplify_subreg): Likewise.
23084         * targhooks.c (default_function_arg_padding): Likewise.
23085         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23086         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23087         (verify_gimple_assign_ternary): Likewise.
23088         * tree-inline.c (estimate_move_cost): Likewise.
23089         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23090         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23091         (get_address_cost_ainc): Likewise.
23092         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23093         (vect_supportable_dr_alignment): Likewise.
23094         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23095         (vectorizable_reduction): Likewise.
23096         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23097         (vectorizable_operation, vectorizable_load): Likewise.
23098         * tree.c (build_same_sized_truth_vector_type): Likewise.
23099         * valtrack.c (cleanup_auto_inc_dec): Likewise.
23100         * var-tracking.c (emit_note_insn_var_location): Likewise.
23101         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23102         (ADDR_VEC_ALIGN): Likewise.
23104 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23105             Alan Hayward  <alan.hayward@arm.com>
23106             David Sherwood  <david.sherwood@arm.com>
23108         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23109         unsigned short.
23110         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23111         or if measurement_type is polynomial.
23112         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23113         * combine.c (make_extraction): Likewise.
23114         * dse.c (find_shift_sequence): Likewise.
23115         * dwarf2out.c (mem_loc_descriptor): Likewise.
23116         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23117         (extract_bit_field, extract_low_bits): Likewise.
23118         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23119         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23120         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23121         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23122         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23123         * reload.c (find_reloads): Likewise.
23124         * reload1.c (alter_reg): Likewise.
23125         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23126         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23127         * tree-if-conv.c (predicate_mem_writes): Likewise.
23128         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23129         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23130         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23131         * valtrack.c (dead_debug_insert_temp): Likewise.
23132         * varasm.c (mergeable_constant_section): Likewise.
23133         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23135 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23136             Alan Hayward  <alan.hayward@arm.com>
23137             David Sherwood  <david.sherwood@arm.com>
23139         * expr.c (expand_assignment): Cope with polynomial mode sizes
23140         when assigning to a CONCAT.
23142 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23143             Alan Hayward  <alan.hayward@arm.com>
23144             David Sherwood  <david.sherwood@arm.com>
23146         * machmode.h (mode_precision): Change from unsigned short to
23147         poly_uint16_pod.
23148         (mode_to_precision): Return a poly_uint16 rather than an unsigned
23149         short.
23150         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23151         or if measurement_type is not polynomial.
23152         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
23153         in which the mode is already known to be a scalar_int_mode.
23154         * genmodes.c (emit_mode_precision): Change the type of mode_precision
23155         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
23156         initializer.
23157         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23158         for GET_MODE_PRECISION.
23159         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23160         for GET_MODE_PRECISION.
23161         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23162         as polynomial.
23163         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23164         (expand_field_assignment, make_extraction): Likewise.
23165         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23166         (get_last_value): Likewise.
23167         * convert.c (convert_to_integer_1): Likewise.
23168         * cse.c (cse_insn): Likewise.
23169         * expr.c (expand_expr_real_1): Likewise.
23170         * lra-constraints.c (simplify_operand_subreg): Likewise.
23171         * optabs-query.c (can_atomic_load_p): Likewise.
23172         * optabs.c (expand_atomic_load): Likewise.
23173         (expand_atomic_store): Likewise.
23174         * ree.c (combine_reaching_defs): Likewise.
23175         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23176         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23177         * tree.h (type_has_mode_precision_p): Likewise.
23178         * ubsan.c (instrument_si_overflow): Likewise.
23180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23181             Alan Hayward  <alan.hayward@arm.com>
23182             David Sherwood  <david.sherwood@arm.com>
23184         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23185         polynomial numbers of units.
23186         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23187         (valid_vector_subparts_p): New function.
23188         (build_vector_type): Remove temporary shim and take the number
23189         of units as a poly_uint64 rather than an int.
23190         (build_opaque_vector_type): Take the number of units as a
23191         poly_uint64 rather than an int.
23192         * tree.c (build_vector_from_ctor): Handle polynomial
23193         TYPE_VECTOR_SUBPARTS.
23194         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23195         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23196         (build_vector_from_val): If the number of units is variable,
23197         use build_vec_duplicate_cst for constant operands and
23198         VEC_DUPLICATE_EXPR otherwise.
23199         (make_vector_type): Remove temporary is_constant ().
23200         (build_vector_type, build_opaque_vector_type): Take the number of
23201         units as a poly_uint64 rather than an int.
23202         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23203         VECTOR_CST_NELTS.
23204         * cfgexpand.c (expand_debug_expr): Likewise.
23205         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23206         (store_constructor, expand_expr_real_1): Likewise.
23207         (const_scalar_mask_from_tree): Likewise.
23208         * fold-const-call.c (fold_const_reduction): Likewise.
23209         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23210         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23211         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23212         (fold_relational_const): Likewise.
23213         (native_interpret_vector): Likewise.  Change the size from an
23214         int to an unsigned int.
23215         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23216         TYPE_VECTOR_SUBPARTS.
23217         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23218         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23219         duplicating a non-constant operand into a variable-length vector.
23220         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23221         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23222         * ipa-icf.c (sem_variable::equals): Likewise.
23223         * match.pd: Likewise.
23224         * omp-simd-clone.c (simd_clone_subparts): Likewise.
23225         * print-tree.c (print_node): Likewise.
23226         * stor-layout.c (layout_type): Likewise.
23227         * targhooks.c (default_builtin_vectorization_cost): Likewise.
23228         * tree-cfg.c (verify_gimple_comparison): Likewise.
23229         (verify_gimple_assign_binary): Likewise.
23230         (verify_gimple_assign_ternary): Likewise.
23231         (verify_gimple_assign_single): Likewise.
23232         * tree-pretty-print.c (dump_generic_node): Likewise.
23233         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23234         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23235         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23236         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23237         (vect_shift_permute_load_chain): Likewise.
23238         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23239         (expand_vector_condition, optimize_vector_constructor): Likewise.
23240         (lower_vec_perm, get_compute_type): Likewise.
23241         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23242         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23243         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23244         (vect_recog_mask_conversion_pattern): Likewise.
23245         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23246         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23247         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23248         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23249         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23250         (vectorizable_shift, vectorizable_operation, vectorizable_store)
23251         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23252         (supportable_widening_operation): Likewise.
23253         (supportable_narrowing_operation): Likewise.
23254         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23255         Likewise.
23256         * varasm.c (output_constant): Likewise.
23258 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23259             Alan Hayward  <alan.hayward@arm.com>
23260             David Sherwood  <david.sherwood@arm.com>
23262         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23263         so that both the length == 3 and length != 3 cases set up their
23264         own permute vectors.  Add comments explaining why we know the
23265         number of elements is constant.
23266         (vect_permute_load_chain): Likewise.
23268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23269             Alan Hayward  <alan.hayward@arm.com>
23270             David Sherwood  <david.sherwood@arm.com>
23272         * machmode.h (mode_nunits): Change from unsigned char to
23273         poly_uint16_pod.
23274         (ONLY_FIXED_SIZE_MODES): New macro.
23275         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23276         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23277         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23278         New typedefs.
23279         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23280         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23281         or if measurement_type is not polynomial.
23282         * genmodes.c (ZERO_COEFFS): New macro.
23283         (emit_mode_nunits_inline): Make mode_nunits_inline return a
23284         poly_uint16.
23285         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23286         Use ZERO_COEFFS when emitting initializers.
23287         * data-streamer.h (bp_pack_poly_value): New function.
23288         (bp_unpack_poly_value): Likewise.
23289         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23290         for GET_MODE_NUNITS.
23291         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23292         for GET_MODE_NUNITS.
23293         * tree.c (make_vector_type): Remove temporary shim and make
23294         the real function take the number of units as a poly_uint64
23295         rather than an int.
23296         (build_vector_type_for_mode): Handle polynomial nunits.
23297         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23298         * emit-rtl.c (const_vec_series_p_1): Likewise.
23299         (gen_rtx_CONST_VECTOR): Likewise.
23300         * fold-const.c (test_vec_duplicate_folding): Likewise.
23301         * genrecog.c (validate_pattern): Likewise.
23302         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23303         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23304         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23305         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23306         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23307         * rtlanal.c (subreg_get_info): Likewise.
23308         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23309         (vect_grouped_load_supported): Likewise.
23310         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23311         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23312         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23313         (simplify_const_unary_operation, simplify_binary_operation_1)
23314         (simplify_const_binary_operation, simplify_ternary_operation)
23315         (test_vector_ops_duplicate, test_vector_ops): Likewise.
23316         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23317         instead of CONST_VECTOR_NUNITS.
23318         * varasm.c (output_constant_pool_2): Likewise.
23319         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23320         explicit-encoded elements in the XVEC for variable-length vectors.
23322 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23324         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23327             Alan Hayward  <alan.hayward@arm.com>
23328             David Sherwood  <david.sherwood@arm.com>
23330         * coretypes.h (fixed_size_mode): Declare.
23331         (fixed_size_mode_pod): New typedef.
23332         * builtins.h (target_builtins::x_apply_args_mode)
23333         (target_builtins::x_apply_result_mode): Change type to
23334         fixed_size_mode_pod.
23335         * builtins.c (apply_args_size, apply_result_size, result_vector)
23336         (expand_builtin_apply_args_1, expand_builtin_apply)
23337         (expand_builtin_return): Update accordingly.
23339 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23341         * cse.c (hash_rtx_cb): Hash only the encoded elements.
23342         * cselib.c (cselib_hash_rtx): Likewise.
23343         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23344         CONST_VECTOR encoding.
23346 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23347             Jeff Law  <law@redhat.com>
23349         PR target/83641
23350         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23351         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23352         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23353         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23355         PR target/83641
23356         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23357         explicitly probe *sp in a noreturn function if there were any callee
23358         register saves or frame pointer is needed.
23360 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23362         PR debug/83621
23363         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23364         BLKmode for ternary, binary or unary expressions.
23366         PR debug/83645
23367         * var-tracking.c (delete_vta_debug_insn): New inline function.
23368         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23369         insns from get_insns () to NULL instead of each bb separately.
23370         Use delete_vta_debug_insn.  No longer static.
23371         (vt_debug_insns_local, variable_tracking_main_1): Adjust
23372         delete_vta_debug_insns callers.
23373         * rtl.h (delete_vta_debug_insns): Declare.
23374         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23375         instead of variable_tracking_main.
23377 2018-01-03  Martin Sebor  <msebor@redhat.com>
23379         PR tree-optimization/83603
23380         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23381         arguments past the endof the argument list in functions declared
23382         without a prototype.
23383         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23384         Avoid checking when arguments are null.
23386 2018-01-03  Martin Sebor  <msebor@redhat.com>
23388         PR c/83559
23389         * doc/extend.texi (attribute const): Fix a typo.
23390         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23391         issuing -Wsuggest-attribute for void functions.
23393 2018-01-03  Martin Sebor  <msebor@redhat.com>
23395         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23396         offset_int::from instead of wide_int::to_shwi.
23397         (maybe_diag_overlap): Remove assertion.
23398         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23399         * gimple-ssa-sprintf.c (format_directive): Same.
23400         (parse_directive): Same.
23401         (sprintf_dom_walker::compute_format_length): Same.
23402         (try_substitute_return_value): Same.
23404 2018-01-03  Jeff Law  <law@redhat.com>
23406         PR middle-end/83654
23407         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23408         non-constant residual for zero at runtime and avoid probing in
23409         that case.  Reorganize code for trailing problem to mirror handling
23410         of the residual.
23412 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23414         PR tree-optimization/83501
23415         * tree-ssa-strlen.c (get_string_cst): New.
23416         (handle_char_store): Call get_string_cst.
23418 2018-01-03  Martin Liska  <mliska@suse.cz>
23420         PR tree-optimization/83593
23421         * tree-ssa-strlen.c: Include tree-cfg.h.
23422         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23423         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23424         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23425         to false.
23426         (strlen_dom_walker::before_dom_children): Call
23427         gimple_purge_dead_eh_edges. Dump tranformation with details
23428         dump flags.
23429         (strlen_dom_walker::before_dom_children): Update call by adding
23430         new argument cleanup_eh.
23431         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23433 2018-01-03  Martin Liska  <mliska@suse.cz>
23435         PR ipa/83549
23436         * cif-code.def (VARIADIC_THUNK): New enum value.
23437         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23438         thunks.
23440 2018-01-03  Jan Beulich  <jbeulich@suse.com>
23442         * sse.md (mov<mode>_internal): Tighten condition for when to use
23443         vmovdqu<ssescalarsize> for TI and OI modes.
23445 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23447         Update copyright years.
23449 2018-01-03  Martin Liska  <mliska@suse.cz>
23451         PR ipa/83594
23452         * ipa-visibility.c (function_and_variable_visibility): Skip
23453         functions with noipa attribure.
23455 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23457         * gcc.c (process_command): Update copyright notice dates.
23458         * gcov-dump.c (print_version): Ditto.
23459         * gcov.c (print_version): Ditto.
23460         * gcov-tool.c (print_version): Ditto.
23461         * gengtype.c (create_file): Ditto.
23462         * doc/cpp.texi: Bump @copying's copyright year.
23463         * doc/cppinternals.texi: Ditto.
23464         * doc/gcc.texi: Ditto.
23465         * doc/gccint.texi: Ditto.
23466         * doc/gcov.texi: Ditto.
23467         * doc/install.texi: Ditto.
23468         * doc/invoke.texi: Ditto.
23470 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23472         * vector-builder.h (vector_builder::m_full_nelts): Change from
23473         unsigned int to poly_uint64.
23474         (vector_builder::full_nelts): Update prototype accordingly.
23475         (vector_builder::new_vector): Likewise.
23476         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23477         (vector_builder::operator ==): Likewise.
23478         (vector_builder::finalize): Likewise.
23479         * int-vector-builder.h (int_vector_builder::int_vector_builder):
23480         Take the number of elements as a poly_uint64 rather than an
23481         unsigned int.
23482         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23483         from unsigned int to poly_uint64.
23484         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23485         (vec_perm_indices::new_vector): Likewise.
23486         (vec_perm_indices::length): Likewise.
23487         (vec_perm_indices::nelts_per_input): Likewise.
23488         (vec_perm_indices::input_nelts): Likewise.
23489         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23490         number of elements per input as a poly_uint64 rather than an
23491         unsigned int.  Use the original encoding for variable-length
23492         vectors, rather than clamping each individual element.
23493         For the second and subsequent elements in each pattern,
23494         clamp the step and base before clamping their sum.
23495         (vec_perm_indices::series_p): Handle polynomial element counts.
23496         (vec_perm_indices::all_in_range_p): Likewise.
23497         (vec_perm_indices_to_tree): Likewise.
23498         (vec_perm_indices_to_rtx): Likewise.
23499         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23500         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23501         (tree_vector_builder::new_binary_operation): Handle polynomial
23502         element counts.  Return false if we need to know the number
23503         of elements at compile time.
23504         * fold-const.c (fold_vec_perm): Punt if the number of elements
23505         isn't known at compile time.
23507 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23509         * vec-perm-indices.h (vec_perm_builder): Change element type
23510         from HOST_WIDE_INT to poly_int64.
23511         (vec_perm_indices::element_type): Update accordingly.
23512         (vec_perm_indices::clamp): Handle polynomial element_types.
23513         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23514         (vec_perm_indices::all_in_range_p): Likewise.
23515         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23516         than shwi trees.
23517         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23518         polynomial vec_perm_indices element types.
23519         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23520         * fold-const.c (fold_vec_perm): Likewise.
23521         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23522         * tree-vect-generic.c (lower_vec_perm): Likewise.
23523         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23524         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23525         element type to HOST_WIDE_INT.
23527 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23528             Alan Hayward  <alan.hayward@arm.com>
23529             David Sherwood  <david.sherwood@arm.com>
23531         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23532         rather than an int.  Use plus_constant.
23533         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23534         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23537             Alan Hayward  <alan.hayward@arm.com>
23538             David Sherwood  <david.sherwood@arm.com>
23540         * calls.c (emit_call_1, expand_call): Change struct_value_size from
23541         a HOST_WIDE_INT to a poly_int64.
23543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23544             Alan Hayward  <alan.hayward@arm.com>
23545             David Sherwood  <david.sherwood@arm.com>
23547         * calls.c (load_register_parameters): Cope with polynomial
23548         mode sizes.  Require a constant size for BLKmode parameters
23549         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
23550         forces a parameter to be padded at the lsb end in order to
23551         fill a complete number of words, require the parameter size
23552         to be ordered wrt UNITS_PER_WORD.
23554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23555             Alan Hayward  <alan.hayward@arm.com>
23556             David Sherwood  <david.sherwood@arm.com>
23558         * reload1.c (spill_stack_slot_width): Change element type
23559         from unsigned int to poly_uint64_pod.
23560         (alter_reg): Treat mode sizes as polynomial.
23562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23563             Alan Hayward  <alan.hayward@arm.com>
23564             David Sherwood  <david.sherwood@arm.com>
23566         * reload.c (complex_word_subreg_p): New function.
23567         (reload_inner_reg_of_subreg, push_reload): Use it.
23569 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23570             Alan Hayward  <alan.hayward@arm.com>
23571             David Sherwood  <david.sherwood@arm.com>
23573         * lra-constraints.c (process_alt_operands): Reject matched
23574         operands whose sizes aren't ordered.
23575         (match_reload): Refer to this check here.
23577 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23578             Alan Hayward  <alan.hayward@arm.com>
23579             David Sherwood  <david.sherwood@arm.com>
23581         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23582         that the mode size is in the set {1, 2, 4, 8, 16}.
23584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23585             Alan Hayward  <alan.hayward@arm.com>
23586             David Sherwood  <david.sherwood@arm.com>
23588         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23589         Use plus_constant instead of gen_rtx_PLUS.
23591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23592             Alan Hayward  <alan.hayward@arm.com>
23593             David Sherwood  <david.sherwood@arm.com>
23595         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23596         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23597         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23598         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23599         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23600         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23601         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23602         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23603         * config/i386/i386.c (ix86_push_rounding): ...this new function.
23604         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23605         a poly_int64.
23606         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23607         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23608         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23609         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23610         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23611         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23612         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23613         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23614         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23615         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23616         function.
23617         * expr.c (emit_move_resolve_push): Treat the input and result
23618         of PUSH_ROUNDING as a poly_int64.
23619         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23620         (emit_push_insn): Likewise.
23621         * lra-eliminations.c (mark_not_eliminable): Likewise.
23622         * recog.c (push_operand): Likewise.
23623         * reload1.c (elimination_effects): Likewise.
23624         * rtlanal.c (nonzero_bits1): Likewise.
23625         * calls.c (store_one_arg): Likewise.  Require the padding to be
23626         known at compile time.
23628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23629             Alan Hayward  <alan.hayward@arm.com>
23630             David Sherwood  <david.sherwood@arm.com>
23632         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23633         Use plus_constant instead of gen_rtx_PLUS.
23635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23636             Alan Hayward  <alan.hayward@arm.com>
23637             David Sherwood  <david.sherwood@arm.com>
23639         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23640         rather than an int.
23642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23643             Alan Hayward  <alan.hayward@arm.com>
23644             David Sherwood  <david.sherwood@arm.com>
23646         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23647         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23648         via stack temporaries.  Treat the mode size as polynomial too.
23650 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23651             Alan Hayward  <alan.hayward@arm.com>
23652             David Sherwood  <david.sherwood@arm.com>
23654         * expr.c (expand_expr_real_2): When handling conversions involving
23655         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23656         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
23657         as a poly_uint64 too.
23659 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23660             Alan Hayward  <alan.hayward@arm.com>
23661             David Sherwood  <david.sherwood@arm.com>
23663         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23666             Alan Hayward  <alan.hayward@arm.com>
23667             David Sherwood  <david.sherwood@arm.com>
23669         * combine.c (can_change_dest_mode): Handle polynomial
23670         REGMODE_NATURAL_SIZE.
23671         * expmed.c (store_bit_field_1): Likewise.
23672         * expr.c (store_constructor): Likewise.
23673         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23674         and polynomial REGMODE_NATURAL_SIZE.
23675         (gen_lowpart_common): Likewise.
23676         * reginfo.c (record_subregs_of_mode): Likewise.
23677         * rtlanal.c (read_modify_subreg_p): Likewise.
23679 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23680             Alan Hayward  <alan.hayward@arm.com>
23681             David Sherwood  <david.sherwood@arm.com>
23683         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23684         numbers of elements.
23686 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23687             Alan Hayward  <alan.hayward@arm.com>
23688             David Sherwood  <david.sherwood@arm.com>
23690         * match.pd: Cope with polynomial numbers of vector elements.
23692 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23693             Alan Hayward  <alan.hayward@arm.com>
23694             David Sherwood  <david.sherwood@arm.com>
23696         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23697         in a POINTER_PLUS_EXPR.
23699 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23700             Alan Hayward  <alan.hayward@arm.com>
23701             David Sherwood  <david.sherwood@arm.com>
23703         * omp-simd-clone.c (simd_clone_subparts): New function.
23704         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23705         (ipa_simd_modify_function_body): Likewise.
23707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23708             Alan Hayward  <alan.hayward@arm.com>
23709             David Sherwood  <david.sherwood@arm.com>
23711         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23712         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23713         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23714         (expand_vector_condition, vector_element): Likewise.
23715         (subparts_gt): New function.
23716         (get_compute_type): Use subparts_gt.
23717         (count_type_subparts): Delete.
23718         (expand_vector_operations_1): Use subparts_gt instead of
23719         count_type_subparts.
23721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23722             Alan Hayward  <alan.hayward@arm.com>
23723             David Sherwood  <david.sherwood@arm.com>
23725         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23726         (vect_compile_time_alias): ...this new function.  Do the calculation
23727         on poly_ints rather than trees.
23728         (vect_prune_runtime_alias_test_list): Update call accordingly.
23730 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23731             Alan Hayward  <alan.hayward@arm.com>
23732             David Sherwood  <david.sherwood@arm.com>
23734         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23735         numbers of units.
23736         (vect_schedule_slp_instance): Likewise.
23738 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23739             Alan Hayward  <alan.hayward@arm.com>
23740             David Sherwood  <david.sherwood@arm.com>
23742         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23743         constant and extern definitions for variable-length vectors.
23744         (vect_get_constant_vectors): Note that the number of units
23745         is known to be constant.
23747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23748             Alan Hayward  <alan.hayward@arm.com>
23749             David Sherwood  <david.sherwood@arm.com>
23751         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23752         of units as polynomial.  Choose between WIDE and NARROW based
23753         on multiple_p.
23755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23756             Alan Hayward  <alan.hayward@arm.com>
23757             David Sherwood  <david.sherwood@arm.com>
23759         * tree-vect-stmts.c (simd_clone_subparts): New function.
23760         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23762 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23763             Alan Hayward  <alan.hayward@arm.com>
23764             David Sherwood  <david.sherwood@arm.com>
23766         * tree-vect-stmts.c (vectorizable_call): Treat the number of
23767         vectors as polynomial.  Use build_index_vector for
23768         IFN_GOMP_SIMD_LANE.
23770 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23771             Alan Hayward  <alan.hayward@arm.com>
23772             David Sherwood  <david.sherwood@arm.com>
23774         * tree-vect-stmts.c (get_load_store_type): Treat the number of
23775         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23776         for variable-length vectors.
23777         (vectorizable_mask_load_store): Treat the number of units as
23778         polynomial, asserting that it is constant if the condition has
23779         already been enforced.
23780         (vectorizable_store, vectorizable_load): Likewise.
23782 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23783             Alan Hayward  <alan.hayward@arm.com>
23784             David Sherwood  <david.sherwood@arm.com>
23786         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23787         of units as polynomial.  Punt if we can't tell at compile time
23788         which vector contains the final result.
23790 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23791             Alan Hayward  <alan.hayward@arm.com>
23792             David Sherwood  <david.sherwood@arm.com>
23794         * tree-vect-loop.c (vectorizable_induction): Treat the number
23795         of units as polynomial.  Punt on SLP inductions.  Use an integer
23796         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
23797         cast of such a series for variable-length floating-point
23798         reductions.
23800 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23801             Alan Hayward  <alan.hayward@arm.com>
23802             David Sherwood  <david.sherwood@arm.com>
23804         * tree.h (build_index_vector): Declare.
23805         * tree.c (build_index_vector): New function.
23806         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23807         of units as polynomial, forcibly converting it to a constant if
23808         vectorizable_reduction has already enforced the condition.
23809         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
23810         to create a {1,2,3,...} vector.
23811         (vectorizable_reduction): Treat the number of units as polynomial.
23812         Choose vectype_in based on the largest scalar element size rather
23813         than the smallest number of units.  Enforce the restrictions
23814         relied on above.
23816 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23817             Alan Hayward  <alan.hayward@arm.com>
23818             David Sherwood  <david.sherwood@arm.com>
23820         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23821         number of units as polynomial.
23823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23824             Alan Hayward  <alan.hayward@arm.com>
23825             David Sherwood  <david.sherwood@arm.com>
23827         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23828         * target.def (autovectorize_vector_sizes): Return the vector sizes
23829         by pointer, using vector_sizes rather than a bitmask.
23830         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23831         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23832         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23833         Likewise.
23834         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23835         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23836         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23837         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23838         * omp-general.c (omp_max_vf): Likewise.
23839         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23840         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23841         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23842         * tree-vect-slp.c (vect_slp_bb): Likewise.
23843         * doc/tm.texi: Regenerate.
23844         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23845         to a poly_uint64.
23846         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23847         the vector size as a poly_uint64 rather than an unsigned int.
23848         (current_vector_size): Change from an unsigned int to a poly_uint64.
23849         (get_vectype_for_scalar_type): Update accordingly.
23850         * tree.h (build_truth_vector_type): Take the size and number of
23851         units as a poly_uint64 rather than an unsigned int.
23852         (build_vector_type): Add a temporary overload that takes
23853         the number of units as a poly_uint64 rather than an unsigned int.
23854         * tree.c (make_vector_type): Likewise.
23855         (build_truth_vector_type): Take the number of units as a poly_uint64
23856         rather than an unsigned int.
23858 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23859             Alan Hayward  <alan.hayward@arm.com>
23860             David Sherwood  <david.sherwood@arm.com>
23862         * target.def (get_mask_mode): Take the number of units and length
23863         as poly_uint64s rather than unsigned ints.
23864         * targhooks.h (default_get_mask_mode): Update accordingly.
23865         * targhooks.c (default_get_mask_mode): Likewise.
23866         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23867         * doc/tm.texi: Regenerate.
23869 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23870             Alan Hayward  <alan.hayward@arm.com>
23871             David Sherwood  <david.sherwood@arm.com>
23873         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23874         * omp-general.c (omp_max_vf): Likewise.
23875         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23876         (expand_omp_simd): Handle polynomial safelen.
23877         * omp-low.c (omplow_simd_context): Add a default constructor.
23878         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23879         (lower_rec_simd_input_clauses): Update accordingly.
23880         (lower_rec_input_clauses): Likewise.
23882 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23883             Alan Hayward  <alan.hayward@arm.com>
23884             David Sherwood  <david.sherwood@arm.com>
23886         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23887         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23888         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23889         (vect_analyze_slp_cost): Likewise.
23890         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23891         (vect_model_load_cost): Likewise.
23893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23894             Alan Hayward  <alan.hayward@arm.com>
23895             David Sherwood  <david.sherwood@arm.com>
23897         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23898         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23899         from an unsigned int * to a poly_uint64_pod *.
23900         (calculate_unrolling_factor): New function.
23901         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
23903 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23904             Alan Hayward  <alan.hayward@arm.com>
23905             David Sherwood  <david.sherwood@arm.com>
23907         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23908         from an unsigned int to a poly_uint64.
23909         (_loop_vec_info::slp_unrolling_factor): Likewise.
23910         (_loop_vec_info::vectorization_factor): Change from an int
23911         to a poly_uint64.
23912         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23913         (vect_get_num_vectors): New function.
23914         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23915         (vect_get_num_copies): Use vect_get_num_vectors.
23916         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23917         to an unsigned int *.
23918         (vect_analyze_data_refs): Change min_vf from an int * to a
23919         poly_uint64 *.
23920         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23921         than an unsigned HOST_WIDE_INT.
23922         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23923         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23924         to an unsigned int *.
23925         (vect_analyze_data_ref_dependences): Likewise.
23926         (vect_compute_data_ref_alignment): Handle polynomial vf.
23927         (vect_enhance_data_refs_alignment): Likewise.
23928         (vect_prune_runtime_alias_test_list): Likewise.
23929         (vect_shift_permute_load_chain): Likewise.
23930         (vect_supportable_dr_alignment): Likewise.
23931         (dependence_distance_ge_vf): Take the vectorization factor as a
23932         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23933         (vect_analyze_data_refs): Change min_vf from an int * to a
23934         poly_uint64 *.
23935         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23936         vfm1 as a poly_uint64 rather than an int.  Make the same change
23937         for the returned bound_scalar.
23938         (vect_gen_vector_loop_niters): Handle polynomial vf.
23939         (vect_do_peeling): Likewise.  Update call to
23940         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23941         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23942         be constant.
23943         * tree-vect-loop.c (vect_determine_vectorization_factor)
23944         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23945         (vect_get_known_peeling_cost): Likewise.
23946         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23947         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23948         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23949         updating the upper bounds of the loop.
23950         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23951         rather than an int.
23952         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23953         polynomial unroll factors.
23954         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23955         (vect_make_slp_decision): Likewise.
23956         (vect_supported_load_permutation_p): Likewise, and polynomial
23957         vf too.
23958         (vect_analyze_slp_cost): Handle polynomial vf.
23959         (vect_slp_analyze_node_operations): Likewise.
23960         (vect_slp_analyze_bb_1): Likewise.
23961         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23962         than an unsigned HOST_WIDE_INT.
23963         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23964         (vectorizable_load): Handle polynomial vf.
23965         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23966         a poly_uint64.
23967         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23969 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23970             Alan Hayward  <alan.hayward@arm.com>
23971             David Sherwood  <david.sherwood@arm.com>
23973         * match.pd: Handle bit operations involving three constants
23974         and try to fold one pair.
23976 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23978         * tree-vect-loop-manip.c: Include gimple-fold.h.
23979         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23980         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23981         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23982         Add a path that uses a step of VF instead of 1, but disable it
23983         for now.
23984         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23985         and niters_no_overflow parameters.  Update calls to
23986         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23987         Create a new SSA name if the latter choses to use a ste other
23988         than zero, and return it via niters_vector_mult_vf_var.
23989         * tree-vect-loop.c (vect_transform_loop): Update calls to
23990         vect_do_peeling, vect_gen_vector_loop_niters and
23991         slpeel_make_loop_iterate_ntimes.
23992         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23993         (vect_gen_vector_loop_niters): Update declarations after above changes.
23995 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23997         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23998         128-bit round to integer instructions.
23999         (ceil<mode>2): Likewise.
24000         (btrunc<mode>2): Likewise.
24001         (round<mode>2): Likewise.
24003 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24005         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24006         unaligned VSX load/store on P8/P9.
24007         (expand_block_clear): Allow the use of unaligned VSX
24008         load/store on P8/P9.
24010 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24012         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24013         New function.
24014         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24015         swap associated with both a load and a store.
24017 2018-01-02  Andrew Waterman  <andrew@sifive.com>
24019         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24020         * config/riscv/riscv.md (clear_cache): Use it.
24022 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
24024         * web.c: Remove out-of-date comment.
24026 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24028         * expr.c (fixup_args_size_notes): Check that any existing
24029         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24030         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24031         (emit_single_push_insn): ...here.
24033 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24035         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24036         (const_vector_encoded_nelts): New function.
24037         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24038         (const_vector_int_elt, const_vector_elt): Declare.
24039         * emit-rtl.c (const_vector_int_elt_1): New function.
24040         (const_vector_elt): Likewise.
24041         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24042         of CONST_VECTOR_ELT.
24044 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24046         * expr.c: Include rtx-vector-builder.h.
24047         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24048         directly on the tree encoding.
24049         (const_vector_from_tree): Likewise.
24050         * optabs.c: Include rtx-vector-builder.h.
24051         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24052         sequence of "u" values.
24053         * vec-perm-indices.c: Include rtx-vector-builder.h.
24054         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24055         directly on the vec_perm_indices encoding.
24057 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24059         * doc/rtl.texi (const_vector): Describe new encoding scheme.
24060         * Makefile.in (OBJS): Add rtx-vector-builder.o.
24061         * rtx-vector-builder.h: New file.
24062         * rtx-vector-builder.c: Likewise.
24063         * rtl.h (rtx_def::u2): Add a const_vector field.
24064         (CONST_VECTOR_NPATTERNS): New macro.
24065         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24066         (CONST_VECTOR_DUPLICATE_P): Likewise.
24067         (CONST_VECTOR_STEPPED_P): Likewise.
24068         (CONST_VECTOR_ENCODED_ELT): Likewise.
24069         (const_vec_duplicate_p): Check for a duplicated vector encoding.
24070         (unwrap_const_vec_duplicate): Likewise.
24071         (const_vec_series_p): Check for a non-duplicated vector encoding.
24072         Say that the function only returns true for integer vectors.
24073         * emit-rtl.c: Include rtx-vector-builder.h.
24074         (gen_const_vec_duplicate_1): Delete.
24075         (gen_const_vector): Call gen_const_vec_duplicate instead of
24076         gen_const_vec_duplicate_1.
24077         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24078         (gen_const_vec_duplicate): Use rtx_vector_builder.
24079         (gen_const_vec_series): Likewise.
24080         (gen_rtx_CONST_VECTOR): Likewise.
24081         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24082         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24083         Build a new vector rather than modifying a CONST_VECTOR in-place.
24084         (handle_special_swappables): Update call accordingly.
24085         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24086         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24087         Build a new vector rather than modifying a CONST_VECTOR in-place.
24088         (handle_special_swappables): Update call accordingly.
24090 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24092         * simplify-rtx.c (simplify_const_binary_operation): Use
24093         CONST_VECTOR_ELT instead of XVECEXP.
24095 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24097         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24098         the selector elements to be different from the data elements
24099         if the selector is a VECTOR_CST.
24100         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24101         ssizetype for the selector.
24103 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24105         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24106         before testing each element individually.
24107         * tree-vect-generic.c (lower_vec_perm): Likewise.
24109 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24111         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24112         * selftest-run-tests.c (selftest::run_tests): Call it.
24113         * vector-builder.h (vector_builder::operator ==): New function.
24114         (vector_builder::operator !=): Likewise.
24115         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24116         (vec_perm_indices::all_from_input_p): New function.
24117         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24118         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24119         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24120         instead of reading the VECTOR_CST directly.  Detect whether both
24121         vector inputs are the same before constructing the vec_perm_indices,
24122         and update the number of inputs argument accordingly.  Use the
24123         utility functions added above.  Only construct sel2 if we need to.
24125 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24127         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24128         the broadcast of the low byte.
24129         (expand_mult_highpart): Use an explicit encoding for the permutes.
24130         * optabs-query.c (can_mult_highpart_p): Likewise.
24131         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24132         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24133         (vectorizable_bswap): Likewise.
24134         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24135         explicit encoding for the power-of-2 permutes.
24136         (vect_permute_store_chain): Likewise.
24137         (vect_grouped_load_supported): Likewise.
24138         (vect_permute_load_chain): Likewise.
24140 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24142         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24143         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24144         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24145         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24146         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24147         (vect_gen_perm_mask_any): Likewise.
24149 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24151         * int-vector-builder.h: New file.
24152         * vec-perm-indices.h: Include int-vector-builder.h.
24153         (vec_perm_indices): Redefine as an int_vector_builder.
24154         (auto_vec_perm_indices): Delete.
24155         (vec_perm_builder): Redefine as a stand-alone class.
24156         (vec_perm_indices::vec_perm_indices): New function.
24157         (vec_perm_indices::clamp): Likewise.
24158         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24159         (vec_perm_indices::new_vector): New function.
24160         (vec_perm_indices::new_expanded_vector): Update for new
24161         vec_perm_indices class.
24162         (vec_perm_indices::rotate_inputs): New function.
24163         (vec_perm_indices::all_in_range_p): Operate directly on the
24164         encoded form, without computing elided elements.
24165         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24166         encoding.  Update for new vec_perm_indices class.
24167         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24168         the given vec_perm_builder.
24169         (expand_vec_perm_var): Update vec_perm_builder constructor.
24170         (expand_mult_highpart): Use vec_perm_builder instead of
24171         auto_vec_perm_indices.
24172         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24173         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
24174         or double series encoding as appropriate.
24175         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24176         vec_perm_indices instead of auto_vec_perm_indices.
24177         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24178         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24179         (vect_permute_store_chain): Likewise.
24180         (vect_grouped_load_supported): Likewise.
24181         (vect_permute_load_chain): Likewise.
24182         (vect_shift_permute_load_chain): Likewise.
24183         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24184         (vect_transform_slp_perm_load): Likewise.
24185         (vect_schedule_slp_instance): Likewise.
24186         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24187         (vectorizable_mask_load_store): Likewise.
24188         (vectorizable_bswap): Likewise.
24189         (vectorizable_store): Likewise.
24190         (vectorizable_load): Likewise.
24191         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24192         vec_perm_indices instead of auto_vec_perm_indices.  Use
24193         tree_to_vec_perm_builder to read the vector from a tree.
24194         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24195         vec_perm_builder instead of a vec_perm_indices.
24196         (have_whole_vector_shift): Use vec_perm_builder and
24197         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
24198         truncation to calc_vec_perm_mask_for_shift.
24199         (vect_create_epilog_for_reduction): Likewise.
24200         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24201         from auto_vec_perm_indices to vec_perm_indices.
24202         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24203         instead of changing individual elements.
24204         (aarch64_vectorize_vec_perm_const): Use new_vector to install
24205         the vector in d.perm.
24206         * config/arm/arm.c (expand_vec_perm_d::perm): Change
24207         from auto_vec_perm_indices to vec_perm_indices.
24208         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24209         instead of changing individual elements.
24210         (arm_vectorize_vec_perm_const): Use new_vector to install
24211         the vector in d.perm.
24212         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24213         Update vec_perm_builder constructor.
24214         (rs6000_expand_interleave): Likewise.
24215         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24216         (rs6000_expand_interleave): Likewise.
24218 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24220         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24221         to qimode could truncate the indices.
24222         * optabs.c (expand_vec_perm_var): Likewise.
24224 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24226         * Makefile.in (OBJS): Add vec-perm-indices.o.
24227         * vec-perm-indices.h: New file.
24228         * vec-perm-indices.c: Likewise.
24229         * target.h (vec_perm_indices): Replace with a forward class
24230         declaration.
24231         (auto_vec_perm_indices): Move to vec-perm-indices.h.
24232         * optabs.h: Include vec-perm-indices.h.
24233         (expand_vec_perm): Delete.
24234         (selector_fits_mode_p, expand_vec_perm_var): Declare.
24235         (expand_vec_perm_const): Declare.
24236         * target.def (vec_perm_const_ok): Replace with...
24237         (vec_perm_const): ...this new hook.
24238         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24239         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24240         * doc/tm.texi: Regenerate.
24241         * optabs.def (vec_perm_const): Delete.
24242         * doc/md.texi (vec_perm_const): Likewise.
24243         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24244         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24245         expand_vec_perm for constant permutation vectors.  Assert that
24246         the mode of variable permutation vectors is the integer equivalent
24247         of the mode that is being permuted.
24248         * optabs-query.h (selector_fits_mode_p): Declare.
24249         * optabs-query.c: Include vec-perm-indices.h.
24250         (selector_fits_mode_p): New function.
24251         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24252         is defined, instead of checking whether the vec_perm_const_optab
24253         exists.  Use targetm.vectorize.vec_perm_const instead of
24254         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
24255         fit in the vector mode before using a variable permute.
24256         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24257         vec_perm_indices instead of an rtx.
24258         (expand_vec_perm): Replace with...
24259         (expand_vec_perm_const): ...this new function.  Take the selector
24260         as a vec_perm_indices rather than an rtx.  Also take the mode of
24261         the selector.  Update call to shift_amt_for_vec_perm_mask.
24262         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24263         Use vec_perm_indices::new_expanded_vector to expand the original
24264         selector into bytes.  Check whether the indices fit in the vector
24265         mode before using a variable permute.
24266         (expand_vec_perm_var): Make global.
24267         (expand_mult_highpart): Use expand_vec_perm_const.
24268         * fold-const.c: Includes vec-perm-indices.h.
24269         * tree-ssa-forwprop.c: Likewise.
24270         * tree-vect-data-refs.c: Likewise.
24271         * tree-vect-generic.c: Likewise.
24272         * tree-vect-loop.c: Likewise.
24273         * tree-vect-slp.c: Likewise.
24274         * tree-vect-stmts.c: Likewise.
24275         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24276         Delete.
24277         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24278         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24279         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24280         (aarch64_vectorize_vec_perm_const): ...this new function.
24281         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24282         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24283         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24284         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24285         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24286         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24287         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24288         into...
24289         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
24290         check for NEON modes.
24291         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24292         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24293         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24294         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24295         into...
24296         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
24297         the old VEC_PERM_CONST conditions.
24298         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24299         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24300         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24301         (ia64_vectorize_vec_perm_const_ok): Merge into...
24302         (ia64_vectorize_vec_perm_const): ...this new function.
24303         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24304         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24305         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24306         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24307         * config/mips/mips.c (mips_expand_vec_perm_const)
24308         (mips_vectorize_vec_perm_const_ok): Merge into...
24309         (mips_vectorize_vec_perm_const): ...this new function.
24310         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24311         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24312         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24313         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24314         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24315         (rs6000_expand_vec_perm_const): Delete.
24316         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24317         Delete.
24318         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24319         (altivec_expand_vec_perm_const_le): Take each operand individually.
24320         Operate on constant selectors rather than rtxes.
24321         (altivec_expand_vec_perm_const): Likewise.  Update call to
24322         altivec_expand_vec_perm_const_le.
24323         (rs6000_expand_vec_perm_const): Delete.
24324         (rs6000_vectorize_vec_perm_const_ok): Delete.
24325         (rs6000_vectorize_vec_perm_const): New function.
24326         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24327         an element count and rtx array.
24328         (rs6000_expand_extract_even): Update call accordingly.
24329         (rs6000_expand_interleave): Likewise.
24330         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24331         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24332         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24333         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24334         (rs6000_expand_vec_perm_const): Delete.
24335         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24336         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24337         (altivec_expand_vec_perm_const_le): Take each operand individually.
24338         Operate on constant selectors rather than rtxes.
24339         (altivec_expand_vec_perm_const): Likewise.  Update call to
24340         altivec_expand_vec_perm_const_le.
24341         (rs6000_expand_vec_perm_const): Delete.
24342         (rs6000_vectorize_vec_perm_const_ok): Delete.
24343         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
24344         reference to the SPE evmerge intructions.
24345         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24346         an element count and rtx array.
24347         (rs6000_expand_extract_even): Update call accordingly.
24348         (rs6000_expand_interleave): Likewise.
24349         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24350         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24351         new function.
24352         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24354 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24356         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24357         vector mode and that that mode matches the mode of the data
24358         being permuted.
24359         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24360         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
24361         directly using expand_vec_perm_1 when forcing selectors into
24362         registers.
24363         (expand_vec_perm_var): New function, split out from expand_vec_perm.
24365 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24367         * optabs-query.h (can_vec_perm_p): Delete.
24368         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24369         * optabs-query.c (can_vec_perm_p): Split into...
24370         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24371         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24372         particular selector is valid.
24373         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24374         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24375         (vect_grouped_load_supported): Likewise.
24376         (vect_shift_permute_load_chain): Likewise.
24377         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24378         (vect_transform_slp_perm_load): Likewise.
24379         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24380         (vectorizable_bswap): Likewise.
24381         (vect_gen_perm_mask_checked): Likewise.
24382         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
24383         implementations of variable permutation vectors into account
24384         when deciding which selector to use.
24385         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24386         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24387         with a false third argument.
24388         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24389         to test whether the constant selector is valid and can_vec_perm_var_p
24390         to test whether a variable selector is valid.
24392 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24394         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24395         * optabs-query.c (can_vec_perm_p): Likewise.
24396         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24397         instead of vec_perm_indices.
24398         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24399         (vect_gen_perm_mask_checked): Likewise,
24400         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24401         (vect_gen_perm_mask_checked): Likewise,
24403 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24405         * optabs-query.h (qimode_for_vec_perm): Declare.
24406         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24407         (qimode_for_vec_perm): ...this new function.
24408         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24410 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24412         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24413         does not have a conditional at the top.
24415 2018-01-02  Richard Biener  <rguenther@suse.de>
24417         * ipa-inline.c (big_speedup_p): Fix expression.
24419 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24421         PR target/81616
24422         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24423         for generic 4->6.
24425 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24427         PR target/81616
24428         Generic tuning.
24429         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24430         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24431         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24432         cond_taken_branch_cost 3->4.
24434 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
24436         PR tree-optimization/83581
24437         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24438         TODO_cleanup_cfg if any changes have been made.
24440         PR middle-end/83608
24441         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24442         convert_modes if target mode has the right side, but different mode
24443         class.
24445         PR middle-end/83609
24446         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24447         last argument when extracting from CONCAT.  If either from_real or
24448         from_imag is NULL, use expansion through memory.  If result is not
24449         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24450         the parts directly to inner mode, if even that fails, use expansion
24451         through memory.
24453         PR middle-end/83623
24454         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24455         check for bswap in mode rather than HImode and use that in expand_unop
24456         too.
24458 Copyright (C) 2018 Free Software Foundation, Inc.
24460 Copying and distribution of this file, with or without modification,
24461 are permitted in any medium without royalty provided the copyright
24462 notice and this notice are preserved.